This is the official PyTorch implementation of A Data-Centric Solution to NonHomogeneous Dehazing via Vision Transformer.
See more details in [report] , [paper], [certificate]
Our solution competes in NTIRE 2023 HR Non-homogeneous Dehazing Challenge, achieving the BEST performance in terms of PNSR, SSIM and LPIPS.
- (2023/6/18) We are the winner of the NTIRE 2023 HR Non-homogeneous Dehazing Challenge!
- (2022/6/01) We are invited to present our method at the NTIRE 2023 HR Non-homogeneous Dehazing Challenge.
- python3.7
- PyTorch >= 1.0
- NVIDIA GPU+CUDA
- numpy
- matplotlib
- tensorboardX(optional)
- Download ImageNet pretrained SwinTransformer V2 weights and our model weights.
- Download our dataset or the original dataset & gamma correction code
Please put train/val/test three folders into a root folder. This root folder would be the training dataset. Note, we have performed preprocessing to the data in folder train.
NTIRE2023_Val, and NTIRE2023_Test contain official validation and test. If you want to obtain val and test accuracy, please step towards the official competition server.
python train.py --data_dir data --imagenet_model SwinTransformerV2 --cfg configs/swinv2/swinv2_base_patch4_window8_256.yaml -train_batch_size 8 --model_save_dir train_result -train_epoch 6500
python test.py --imagenet_model SwinTransformerV2 --cfg configs/swinv2/swinv2_base_patch4_window8_256.yaml --model_save_dir ./output_img/test/best_result --ckpt_path ./checkpoints/best.pkl --hazy_data NTIRE2023_Test --cropping 4
- Using this command line for generating outputs of test data, the dehazed results could be found in: ./output_img/test/best_result
- This testing command line requires GPU memory >= 40 GB to ensure best results If GPU memory < 40 GB, please use " --cropping 6 " instead
Results on NTIRE 2023 NonHomogeneous Dehazing Challenge test data:
If you use the code in this repo for your work, please cite the following bib entries:
@inproceedings{liu2023data,
title={A Data-Centric Solution to NonHomogeneous Dehazing via Vision Transformer},
author={Liu, Yangyi and Liu, Huan and Li, Liangyan and Wu, Zijun and Chen, Jun},
booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition},
pages={1406--1415},
year={2023}
}