shermanlian / spatial-entropy-loss

Equipping Diffusion Models with Differentiable Spatial Entropy for Low-Light Image Enhancement, CVPRW 2024. Best LPIPS in NTIRE chanllenge.
https://arxiv.org/abs/2404.09735
MIT License
15 stars 1 forks source link
diffusion-models image-entropy image-restoration kernel-density-estimation low-light-image-enhancement pytorch

Entropy-SDE | Paper
Equipping Diffusion Models with Differentiable Spatial Entropy for Low-Light Image Enhancement, CVPRW 2024.

Image reconstruction based on statistical matching

entropy-sde

Dependenices

Training

The current config setting is for low-light enhancement but you can change the dataset path to adapt it for other tasks.

Run the training code:

cd codes/config/low-light
python train.py -opt=options/train/entropy-refusion.yml

Differentiable Spatial Entropy

Key code for the differentiable spatial entropy is the kde_utils.py.

Testing

Change the dataset and the pretrained model path in the option file.

cd codes/config/low-light
python test.py -opt=options/test/refusion.yml

Examples on the NTIRE challenge: Refusion

Pretrained models

We also provide the pretrained models for the challenge, LOLv1, and LOLv2-real.

Citations

If our code helps your research or work, please consider citing our paper. The following are BibTeX references:

@article{lian2024equipping,
  title={Equipping Diffusion Models with Differentiable Spatial Entropy for Low-Light Image Enhancement},
  author={Lian, Wenyi and Lian, Wenjing and Luo, Ziwei},
  journal={arXiv preprint arXiv:2404.09735},
  year={2024}
}

Contact

Thanks for your interest! If you have questions please contect: shermanlian@163.com