Code and trained models for reproducing results of:
DehazeFlow: Multi-scale Conditional Flow Network for Single Image Dehazing
Hongyu Li, Jia Li, Dong Zhao, Long Xu
ACM Conference on Multimedia (ACM MM), 2021.
[Paper]
The latest performance of our method after parameter adjustment is as follows:
PSNR | SSIM | LPIPS | |
---|---|---|---|
indoor | 40.88 | 0.9897 | 0.0025 |
outdoor | 34.50 | 0.9859 | 0.0051 |
Link of trained models: https://drive.google.com/drive/folders/1NtQyK5dVu47E2LBk5ETcivPO96YFomPN?usp=sharing
Note: Opencv of this version is different from before. You need to run:
conda uninstall opencv
pip install opencv-python==4.5.3.56
- python==3.8.0
- lpips==0.1.3
- pytorch==1.8.0
- scikit-image==0.18.1
- opencv==4.0.1
Note: Different versions of opencv may cause different data reading results.
We use different parts of the RESIDE dataset for training and validation.
- ITS (indoor training set)
- OTS (outdoor training set)
- SOTS (testing set)
- RTTS (real world testing samples)
Use /code/img2path.py to read the image paths and generate path files.
Download the trained models via https://drive.google.com/drive/folders/1Vb9BNYrDqKykfLpbX2lhNaus5YQw-s6V?usp=sharing.
Modify DehazeFlow.yml to:
- set
dataroot_GT
anddataroot_HZ
to paths containing testing images and ground-truths. - set
test_mode
to 'indoor' or 'outdoor'. - set
model_path
to pth file path. - set
heat
(standard deviation) to an appropriate value.
Run:
python test.py
Modify DehazeFlow.yml to:
- set
path_root
to path files for training and validation. - set other parameters to appropriate values.
Run:
python -m torch.distributed.launch --nproc_per_node=2 train.py
@inproceedings{10.1145/3474085.3475432,
author = {Li, Hongyu and Li, Jia and Zhao, Dong and Xu, Long},
title = {DehazeFlow: Multi-Scale Conditional Flow Network for Single Image Dehazing},
year = {2021},
isbn = {9781450386517},
publisher = {Association for Computing Machinery},
address = {New York, NY, USA},
url = {https://doi.org/10.1145/3474085.3475432},
doi = {10.1145/3474085.3475432},
pages = {2577–2585},
numpages = {9},
keywords = {normalizing flow, single image dehazing, attention},
location = {Virtual Event, China},
series = {MM '21}
}
This repository is based on the implementation of SRFlow: Learning the Super-Resolution Space with Normalizing Flow.