By Li-Wen Wang, Zhi-Song Liu, Wan-Chi Siu, and Daniel P. K. Lun
This repo provides simple testing codes, pretrained models and the network strategy demo.
We propose a single image low-light enhancement method based on back-projection theory and attention mechanism. to achieve good enhancing performance.
@ARTICLE{DLN2020,
author={Li-Wen Wang and Zhi-Song Liu and Wan-Chi Siu and Daniel P.K. Lun},
journal={IEEE Transactions on Image Processing},
title={Lightening Network for Low-light Image Enhancement},
year={2020},
doi={10.1109/TIP.2020.3008396},
}
The complete architecture of Deep Lighten Network (DLN) is shown as follows, The rectangles and cubes denote the operations and feature maps respectively.
- Python 3.5
- NVIDIA GPU + CUDA
- [optional] sacred+ mongodb (experiment control)
- Install PyTorch and dependencies from http://pytorch.org
- Install python libraries:
pip install pillow, opencv-python, scikit-image, sacred, pymongo
- Clone this repo
- A few example test images are included in the
./test_img
folder. - Please download trained model
- Test the model by:
python test.py --modelfile models/DLN_pretrained.pth
# or if the task towards real low-light image enhancement
python test.py --modelfile models/DLN_finetune_LOL.pth
The test results will be saved to the folder: ./output
.
- Download the VOC2007 dataset and put it to "datasets/VOC2007/".
- Download the LOL dataset and put it to "datasets/LOL".
It needs to manually switch the training dataset:
- first, train from the synthesized dataset,
- then, load the pretrained model and train from the real dataset
python train.py
We tested the proposed method on the LOL real dataset for evaluation. We have achieve better performance.