sunny2109 / SAFMN

[ICCV 2023] Spatially-Adaptive Feature Modulation for Efficient Image Super-Resolution; runner-up method for the model complexity track in NTIRE2023 Efficient SR challenge
249 stars 13 forks source link
compressed-image-enhancement image-restoration pytorch real-time super-resolution

📖 Spatially-Adaptive Feature Modulation for Efficient Image Super-Resolution

google colab logo OpenXLab Hugging Face Demo Hugging Face Models video visitors GitHub Stars
[Paper]   [Supp]   [Poster]

Long Sun, Jiangxin Dong, Jinhui Tang, and Jinshan Pan
IMAG Lab, Nanjing University of Science and Technology


An overview of the proposed SAFMN. SAFMN first transforms the input LR image into the feature space using a convolutional layer, performs feature extraction using a series of feature mixing modules (FMMs), and then reconstructs these extracted features by an upsampler module. The FMM block is mainly implemented by a spatially-adaptive feature modulation (SAFM) layer and a convolutional channel mixer (CCM).


News


Requirements

  • Python 3.8, PyTorch >= 1.11
  • BasicSR 1.4.2
  • Platforms: Ubuntu 18.04, cuda-11

Installation

# Clone the repo
git clone https://github.com/sunny2109/SAFMN.git
# Install dependent packages
cd SAFMN
pip install -r requirements.txt
# Install BasicSR
python setup.py develop

You can also refer to this INSTALL.md for installation

Training

Run the following commands for training:

# train SAFMN for x4 effieicnt SR
python basicsr/train.py -opt options/train/SAFMN/train_DF2K_x4.yml
# train SAFMN for x4 classic SR
python basicsr/train.py -opt options/train/SAFMN/train_L_DF2K_x4.yml

Testing

Results

Degradation Model Zoo Visual Results
BI-Efficient SR Google Drive/Baidu Netdisk with code: SAFM Google Drive/Baidu Netdisk with code: SAFM
BI-Classic SR Google Drive/Baidu Netdisk with code: SAFM Google Drive/Baidu Netdisk with code: SAFM
x4 Real-world Google Drive/Baidu Netdisk with code: SAFM

Real-World Image (x4) Real-ESRGAN SwinIR SAFMN (ours)

Citation

If this work is helpful for your research, please consider citing the following BibTeX entry.

@inproceedings{sun2023safmn,
    title={Spatially-Adaptive Feature Modulation for Efficient Image Super-Resolution},
    author={Sun, Long and Dong, Jiangxin and Tang, Jinhui and Pan, Jinshan},
    booktitle={ICCV},
    year={2023}
 }

Acknowledgement

This code is based on BasicSR toolbox. Thanks for the awesome work.

Contact

If you have any questions, please feel free to reach me out at cs.longsun@gmail.com