/LLDE

This is the code repo of our ICIP2023 work that proposes a novel approach to low-light image enhancement using the diffusion model (LLDE).

Primary LanguagePythonBSD 3-Clause "New" or "Revised" LicenseBSD-3-Clause

LLDE: Enhancing Low-light Images With Diffusion Model

Official pytorch implementation of the paper:

- LLDE: Enhancing Low-light Images With Diffusion Model

ICIP 2023 (PDF)

(Released on June 28, 2023)

Results

Input Image Enhancement Process Output Image
input enhancement output

Datasets

  • We use LOL dataset as training data, which is available in RetinexNet repo
  • We use LSRW dataset as testing data, which is available in R2RNet repo

How to run

Requirements

  1. python 3.10
  2. pytorch == 1.11.0
  3. accelerate == 0.12.0
  4. wandb == 0.12.17 (used in model training)

Pre-trained model

Download the pretrained model and put it into ./checkpoints

Training

  • Download your training dataset
  • Execute train.py (refer train.py to check what parameters/hyperparameters to run with)
    python train.py --dataset_dir=path/to/your/training/dataset --batch_size=32

Testing

  • Download your testing dataset

  • Put your model weight into ./checkpoints

  • Execute test.py (refer test.py to check what parameters/hyperparameters to run with)

    python test.py --dataset_dir=path/to/your/testing/dataset --model_name=LLDE --timestep_respacing=25
  • The output images are saved in ./saved_images by default

Citation

If you find this work useful for your research, please cite

@article{LLDE,
  inproceedings={LLDE: Enhancing Low-light Images With Diffusion Model},
  author={Ooi, Xin Peng and Chan, Chee Seng},
  booktitle={2023 IEEE international conference on image processing (ICIP)},
  year={2023}
}

Feedback

Suggestions and opinions on this work (both positive and negative) are greatly welcomed. Please contact the authors by sending an email to 0417oxp at gmail.com or cs.chan at um.edu.my.

License and Copyright

The project is open source under BSD-3 license (see the LICENSE file).

©2023 Universiti Malaya.