DFSA
Unofficial pytorch implementation of the ICCV 2021 paper "Dynamic High-Pass Filtering and Multi-Spectral Attention for Image Super-Resolution" (paper link: https://openaccess.thecvf.com/content/ICCV2021/papers/Magid_Dynamic_High-Pass_Filtering_and_Multi-Spectral_Attention_for_Image_Super-Resolution_ICCV_2021_paper.pdf)
The environmental settings are described below. (I cannot gaurantee if it works on other environments)
- Pytorch=1.7.1+cu110
- numpy=1.18.3
- cv2=4.2.0
- tqdm=4.45.0
- lpips
Train
First, you need to download the DF2K dataset.
- DF2K is a merged training dataset consisting of 800 DIV2K training images and 2560 Flickr2K training images
- DIV2K download link: https://data.vision.ee.ethz.ch/cvl/DIV2K/
- Flickr2K download link: https://cv.snu.ac.kr/research/EDSR/Flickr2K.tar
- After merging the datasets (DIV2K & Flickr2K), the DF2K dataset should be composed as below
- Set the database path in "./opt/option.py" (It is represented as "dir_data")
After those settings, you can run the train code by running "train.py"
- python3 train.py --gpu_id 0 (execution code)
- This code works on single GPU. If you want to train this code in muti-gpu, you need to change this code
- Options are all included in "./opt/option.py". So you should change the variable in "./opt/option.py"
Inference (the code will be released later)
First, you need to specify variables in "./opt/option.py"
- dir_test: root folder of test images
- weights: checkpoint file (trained on DF2K dataset)
- results: inference results will be saved on this folder
After those settings, you can run the inference code by running "inference.py"
- python3 inference.py --gpu_id 0 (execution code)
Acknolwdgements
We refer to repos below to implement this code.
- official RCAN github (https://github.com/yulunzhang/RCAN)
- official BMVC2020 best paper github (Delving Deeper into Anti-aliasing in ConvNets) (https://github.com/MaureenZOU/Adaptive-anti-Aliasing)
- official FCANet github (https://github.com/cfzd/FcaNet)