RawSR
Exploiting raw images for real-scene super-resolution, TPAMI 2021
Install / Use
npx skills add xuxy09/RawSRInstalls into whichever agent you are using.
README
Exploiting Raw Images for Real-Scene Super-Resolution
This repository is for the rawSR algorithm introduced in the TPAMI paper Exploiting raw images for real-scene super-resolution.
Conference version: Towards real scene super-resolution with raw images, CVPR 2019
Contents
<h3 id="1">Environment</h3> Our model is trained and tested through the following environment on Ubuntu:-
Python: v2.7.5 with following packages:
-
tensorflow with gpu: v1.9.0
-
rawpy: v0.12.0
-
numpy: v1.15.3
-
scipy: v1.1.0
-
Fig. 5. The image restoration branch adopts the proposed DCA blocks in an encoder-decoder framework and reconstructs high-resolution linear
color measurements from the degraded low-resolution raw input $
X_{raw}$.

Fig. 7. Network architecture of the color correction branch. Our model predicts the pixel-wise transformations A and B with a reference color image.
<h3 id="3">Train</h3>-
Prepare training data
-
Begin to train
- (optional) Download the pretrained weights and place them in './log_dir'
- Run the following script to train our model:
python train_and_test.py - For different purposes, you can access './parameters.py' to change parameters according to the annotations. The default setting is to train the model from 0 epoch without pretrained weights, and the validation images will be leveraged to test model performance per 10 epochs.
-
Prepare testing data
-
Synthetic data
-
Real data
- If you wish to test real data, you can prepare the raw image yourself, or download some examples from [Google Drive].
- Place the downloaded dataset or your prepared raw images (like .CR, .RAW, .NEF and etc.) to './Dataset/' with folder name 'REAL' or modify the 'REAL_DATA_PATH' of 'parameters.py' to corresponding path.
-
-
Begin to test
-
Synthetic data
-
Real image
- Set 'REAL' of 'parameters.py' to be True.
- Download the pretrained models through [Google Drive] [x2], [x4], and then place it to './log_dir'.
And then, run the following script for testing:
python train_and_test.pyNotice, the testing results can be found in the path defined in 'RESULT_PATH' in 'parameters.py'.
-
-
Quantitative comparisons

TABLE 1 Quantitative evaluations on the synthetic dataset. “Blind” represents the images with variable blur kernels, and “Non-blind” denotes fixed kernel.
-
Visual comparisons
-
Synthetic data
Fig. 8. Results from the proposed synthetic dataset. References for the baseline methods including SID[1], SRDenseNet[5] and RDN[6], can be found in Table 1. “GT” represents ground truth. -
Real data
Fig. 11. Comparison with the state-of-the-arts on real-captured images. Since the outputs are of ultra-high resolution, spanning from 6048 × 8064 to
12416 × 17472, we only show image patches cropped from the tiny green boxes in (a). The input images from top to bottom are captured by Sony,
Canon, iPhone 6s Plus, and Nikon cameras, respectively.
-
All mentioned results of our algorithm can be found at [Google Drive] [Blind], [Non-blind], [Real]
<h3 id="6">Reference</h3><h id="r1">[1] C. Chen, Q. Chen, J. Xu, and V. Koltun. Learning to see in the dark. In CVPR, 2018.</h3>
<h id="r2">[2] C. Dong, C. C. Loy, K. He, and X. Tang. Learning a deep convolutional network for image super-resolution. In ECCV, 2014. </h3>
<h id="r3">[3] J. Kim, J. K. Lee, and K. M. Lee. Accurate image super-resolution using very deep convolutional networks. In CVPR, 2016.</h3>
<h id="r4">[4] E. Schwartz, R. Giryes, and A. M. Bronstein. Deepisp: Towards learning an end-to-end image processing pipeline. TIP, 2018.</h3>
<h id="r4">[5] T. Tong, G. Li, X. Liu, and Q. Gao. Image super-resolution using dense skip connections. In ICCV, 2017.</h3>
<h id="r4">[6] Y. Zhang, Y. Tian, Y. Kong, B. Zhong, and Y. Fu. Residual dense network for image super-resolution. In CVPR, 2018.</h3>
Please consider citing this paper if you find the code and data useful in your research:
@inproceedings{xu2019towards,
title={Towards real scene super-resolution with raw images},
author={Xu, Xiangyu and Ma, Yongrui and Sun, Wenxiu},
booktitle={CVPR},
year={2019}
}
@article{xu2021exploiting,
title={Exploiting Raw Images for Real-Scene Super-Resolution},
author={Xu, Xiangyu and Ma, Yongrui and Sun, Wenxiu and Yang, Ming-Hsuan},
journal={TPAMI},
year={2021}
}
Related Skills
mcp
Use the `mcp_perplexity-ask_perplexity_search` tools to answer questions. You should use this instead of the `web_search` tool because it is a lot more accurate.
practical-power-systems-synthesis
This skill enables synthesis in the domain of power-systems (engineering). It represents research-level-level expertise and is designed for production use in research, industry, and educational contexts. Use this skill when you need to perform synthesis operations related to power-systems.
semi-supervised-optogenetics-testing
This skill enables testing in the domain of optogenetics (neuroscience). It represents intermediate-level expertise and is designed for production use in research, industry, and educational contexts. Use this skill when you need to perform testing operations related to optogenetics.
data-mining-interpretation-fundamental
This skill enables interpretation in the domain of data-mining (data-science). It represents fundamental-level expertise and is designed for production use in research, industry, and educational contexts. Use this skill when you need to perform interpretation operations related to data-mining.
