This work was accepted at IEEE Transactions on Image Processing (TIP). Paper
This repository is implemented on
- Ubuntu 16.04
- Conda 4.12.0
- CUDA 11.6
- Python 3.7.15
- Pytorch 1.12.0
To install required environment for the training:
conda env create -n [your env name] -f environment.yaml
conda activate [your env name]
You need to install densetorch package. To install densetorch:
git clone https://github.com/drsleep/densetorch
cd densetorch
pip install -e .
You can download the dataset here:
-
Cityscapes: Download "leftImg8bit_trainvaltest.zip" and "gtFine_trainvaltest.zip" from the Cityscapes Dataset, and put it in the './data/Cityscapes' directory.
-
Foggy Zurich: Download "Foggy Zurich.zip" from the Foggy Zurich Dataset, and put it in the './data/Foggy_Zurich' directory.
-
Foggy Driving: Downlaod "Foggy Driving.zip" from the Foggy Driving Dataset, and put it in the './data/Foggy_Driving' directory.
-
ACDC: Download "rgb_anon_trainvaltest.zip" and "gt_trainval.zip" from the ACDC Dataset, and put it in the './data/ACDC' directory.
You can download pretrained model here:
-
Cityscapes pre-trained model: ./Cityscapes_pretrained_model.pth
-
Pre-trained DAEN: ./DAEN_1.pth
To evaluate DAEN on real foggy datasets:
CUDA_VISIBLE_DEVICES=[gpu_id] python evaluate.py --file-name 'DAEN_result' --restore-from './DAEN_1.pth'
To train DAEN:
CUDA_VISIBLE_DEVICES=[gpu_id] python main.py --file-name 'DAEN' --restore-from './Cityscapes_pretrained_model.pth'
This code is built on FIFO. We thank the authors for sharing their codes.