Codes for Pyramid Channel-based Feature Attention Network for Image Dehazing.
Xiaoqin Zhang, Tao Wang, Jinxin Wang, Guiying Tang, Li Zhao
Published on 2020 Computer Vision and Image Understanding (CVIU)
[Paper] [Project Page]
- Python >= 3.5
- Pytorch >= 1.1
- Torchvision >= 0.4.2
- Pillow >= 5.1.0
- Numpy >= 1.14.3
- Scipy >= 1.1.0
Make you dataset by: Downloading the ITS training and SOTS testing datasets from RESIDE.
- Training dataset: Put hazy and clear folers from downloaded ITS in
./data/train/ITS/. - Testing dataset: put downloaded SOTS (~1000 images) in
./data/testing/SOTS/. - Note: train.txt and val.txt provide the image list for training and testing, respectively.
We provide the pre-trained models in the following:
- A model trained on ITS for SOTS-Indoor [Baidu drive].
- A model trained on ITS for SOTS-Outdoor [Baidu drive].
train.pyandtest.pyare the codes for training and testing the PCFAN../datasets/datasets.pyis used to load the training and testing datasets../model/network.pydefines the structure of PCFAN../loss/edg_loss.pydefines the proposed Edge loss.utils.pycontains all utilities used for training and testing the PCFAN../checkpoints/indoor_haze_best.pthand./checkpoints/outdoor_haze.pthare the trained weights for indoor and outdoor in SOTS from RESIDE.- The
./logs/indoor_log.logand./logs/outdoor_log.logrecord the core logs. - The
./logs/run_indoor.logand./logs/run_outdoor.logrecord the detailed training logs. - The testing hazy images are saved in
./results/indoor_results/and./results/outdoor_results/, respectively. - The
./data/folder stores the training and testing data.
You can train the model for indoor dataset by:
python train.py --nEpochs 200 --category indoor
You can train the model for outdoor dataset by:
python train.py --nEpochs 10 --category outdoor
You can test you model on indoor of SOTS dataset.
python test.py --category indoor
You can test you model on outdoor of SOTS dataset.
python test.py --category outdoor
@article{Zhang2020pyramid,
title = {Pyramid Channel-based Feature Attention Network for image dehazing},
author = {Zhang, Xiaoqin and Wang, Tao and Wang, Jinxin and Tang, Guiying and Zhao, Li},
journal = {Computer Vision and Image Understanding},
volume = {197-198},
pages = {103003},
year = {2020},
publisher={Elsevier}
}