English | 简体中文
This is a Paddlepaddle implementation of:Learning to See in the Dark in CVPR 2018, by Chen Chen, Qifeng Chen, Jia Xu, and Vladlen Koltun.
Raw code:Learning-to-See-in-the-Dark
Paper:Learning to See in the Dark
This code includes the default model for training and testing on the See-in-the-Dark (SID) dataset.
Index | Raw Paper | Raw Code | Reproduction |
---|---|---|---|
PSNR | 28.88 | 28.96 | 28.82 |
SSIM | 0.787 | 0.785 | 0.787 |
The dataset is SID-Sony. If you only use Sony dataset, please download the files started with Sony. After you download all the parts, you can combine them together by running: "cat SonyPart* > Sony.zip" and "cat FujiPart* > Fuji.zip".
-
As mentioned in raw README, the authors found some misalignment with the ground-truth for image 10034, 10045, 10172. Please remove those images for quantitative results, but they still can be used for qualitative evaluations.
-
The dataset contains 2697 short-exposed images and 231 long-exposed images. Note that multiple short-exposed images may correspond to the same long-exposed image.
- Train set:1865 short-exposed +161 long-exposed images
- Validation set:234 short-exposed +20 long-exposed images
- Test set:598 short-exposed +50 long-exposed images
-
Data format: The proposed method is designed for sensor raw data. The pretrained model probably not work for data from another camera sensor. We do not have support for other camera data. It also does not work for images after camera ISP, i.e., the JPG or PNG data.
- Hardware: Paddle AI Studio 4 * Tesla V100, 128G. It takes 16 hours for 4000 epochs. The GPU memory should be greater than 64 GB.
- Frameworks:
- Paddlepaddle >= 2.0.0
- rawpy
- scipy == 1.1.0
# clone this repo
git clone git://github.com/WangChen0902/SID-Paddle.git
After downloading, please create three folders: "data", "checkpoint" and "result" in the root path.
Place the datafiles mentioned above in "data" directory as format: "SID-Paddle/data/Sony".
Place the pre-trained models in "checkpoint" directory as format: "SID-Paddle/checkpoint".
python train_Sony_paddle.py # Single GPU
python -m paddle.distributed.launch train_Sony_paddle.py # Multi-GPU
python test_Sony_paddle.py
python eval.py
├── checkpoint # path to saved models
├── data # path to data
├── result # path to output
├── utils # utils
│ ├── PSNR.py
│ └── SSIM.py
├── eval.py # the script of calculating PSNR/SSIM
├── README.md
├── run.sh # the script AI Studio multi-GPU training
├── run_test.sh # the script of single GPU testing
├── test_Sony_paddle.py # Testing
└── train_Sony_paddle.py # Training
Parameter Name | Default Value | Description |
---|---|---|
start_epoch | 0 | start epoch |
num_epoches | 4001 | number of epochs |
patch_size | 512 | patch size of training images |
save_freq | 200 | save frequency of training |
learning_rate | 1e-4 | learning rate |
DEBUG | 0 | if debug |
data_prefix | './data/' | path to data |
output_prefix | './result/' | path to output |
checkpoint_load_dir | './checkpoint/' | path to checkpoint |
last_epoch | 4000 | epoch of testing |
Information Name | Description |
---|---|
Author | Wangchen0902 |
Time | 2021.08 |
Framework | Paddle 2.1.2 |
Application Scenario | Image enhancement |
Hardware | GPU>=64G |
Download | Pretrained model Access code: 6hbx |
Download | Training logs Access code: brfz |
Online Running | SID-Paddle |