Home

Awesome

PWC

[AAAI 2022 Oral] Low-Light Image Enhancement with Normalizing Flow

Paper | Project Page

Low-Light Image Enhancement with Normalizing Flow <br>Yufei Wang, Renjie Wan, Wenhan Yang, Haoliang Li, Lap-pui Chau, Alex C. Kot<br> In AAAI'2022

Overall

Framework

Quantitative results

Evaluation on LOL

The evauluation results on LOL are as follows

MethodPSNRSSIMLPIPS
LIME16.760.560.35
RetinexNet16.770.560.47
DRBN20.130.830.16
Kind20.870.800.17
KinD++21.300.820.16
LLFlow (Ours)25.190.93 (0.86)0.11

(Our method measures SSIM value on grayscale images by strictly following SSIM's official code. We also assume that all LoL methods follow this offical code. Since some recent Python implementations of SSIM also provide the option for non-grayscale images, the results obtained using such unofficial implementations have been provided within brackets.)

Computational Cost

Computational Cost

The computational cost and performance of models are in the above table. We evaluate the cost using one image with a size 400×600. Ours(large) is the standard model reported in supplementary and Ours(small) is a model with reduced parameters. Both the training config files and pre-trained models are provided.

Visual Results

Visual comparison with state-of-the-art low-light image enhancement methods on LOL dataset.

Get Started

Dependencies and Installation

  1. Clone Repo
git clone https://github.com/wyf0912/LLFlow.git
  1. Create Conda Environment
conda create --name LLFlow python=3.8
conda activate LLFlow
  1. Install Dependencies
cd LLFlow
pip install -r ./code/requirements.txt

Dataset

You can refer to the following links to download the datasets LOL, and LOL-v2.

Pretrained Model

We provide the pre-trained models with the following settings:

Test

You can check the training log to obtain the performance of the model. You can also directly test the performance of the pre-trained model as follows

  1. Modify the paths to dataset and pre-trained mode. You need to modify the following path in the config files in ./confs
#### Test Settings
dataroot_unpaired # needed for testing with unpaired data
dataroot_GT # needed for testing with paired data
dataroot_LR # needed for testing with paired data
model_path
  1. Test the model

To test the model with paired data and obtain the evaluation results, e.g., PSNR, SSIM, and LPIPS. You need to specify the data path dataroot_LR, dataroot_GT, and model path model_path in the config file. Then run

python test.py --opt your_config_path
# You need to specify an appropriate config file since it stores the config of the model, e.g., the number of layers.

To test the model with unpaired data, you need to specify the unpaired data path dataroot_unpaired, and model path model_path in the config file. Then run

python test_unpaired.py --opt your_config_path -n results_folder_name
# You need to specify an appropriate config file since it stores the config of the model, e.g., the number of layers.

You can check the output in ../results.

Train

All logging files in the training process, e.g., log message, checkpoints, and snapshots, will be saved to ./experiments.

  1. Modify the paths to dataset in the config yaml files. We provide the following training configs for both LOL and LOL-v2 benchmarks. You can also create your own configs for your own dataset.
.\confs\LOL_smallNet.yml
.\confs\LOL-pc.yml
.\confs\LOLv2-pc.yml

You need to modify the following terms

datasets.train.root
datasets.val.root
gpu_ids: [0] # Our model can be trained using a single GPU with memory>20GB. You can also train the model using multiple GPUs by adding more GPU ids in it.
  1. Train the network.
python train.py --opt your_config_path

Citation

If you find our work useful for your research, please cite our paper

@article{wang2021low,
  title={Low-Light Image Enhancement with Normalizing Flow},
  author={Wang, Yufei and Wan, Renjie and Yang, Wenhan and Li, Haoliang and Chau, Lap-Pui and Kot, Alex C},
  journal={arXiv preprint arXiv:2109.05923},
  year={2021}
}

Contact

If you have any question, please feel free to contact us via yufei001@ntu.edu.sg. (Please use your institution of shool email address to avoid being classfied as junk emails.)