Home

Awesome

Efficient Dual Attention Transformer for Image Super-Resolution

This repository is the official PyTorch implementation of "Efficient Dual Attention Transformer for Image Super-Resolution" (ACM SAC 2024).

[paper] [visual results] [pretrained models]


Abstract : Research based on computationally efficient local-window selfattention has been actively advancing in the field of image superresolution (SR), leading to significant performance improvements. However, in most recent studies, local-window self-attention focuses only on spatial dimension, without sufficient consideration of the channel dimension. Additionally, extracting global information while maintaining the efficiency of local-window self-attention, still remains a challenging task in image SR. To resolve these problems, we propose a novel efficient dual attention transformer (EDAT). Our EDAT presents a dual attention block (DAB) that empowers the exploration of interdependencies not just among features residing at diverse spatial locations but also among distinct channels. Moreover, we propose a global attention block (GAB) to achieve efficient global feature extraction by reducing the spatial size of the keys and values. Our extensive experiments demonstrate that our DAB and GAB complement each other, exhibiting a synergistic effect. Furthermore, based on the two attention blocks, DAB and GAB, our EDAT achieves state-of-the-art results on five benchmark datasets.

<p align="center"><img src="figs/EDAT_2.png" width=1000>
SR (x4)HQSwinIRCAT-AEDAT (Ours)
<img src="figs/barbara_SR_x4.png" height=120 width=175><img src="figs/barbara_HR_x4.jpg" height=120 width=175><img src="figs/barbara_SwinIR_x4.jpg" height=120 width=175><img src="figs/barbara_CAT-A_x4.jpg" height=120 width=175><img src="figs/barbara_EDAT_x4.jpg" height=120 width=175>
<img src="figs/img_062_SR_x4.png" height=120 width=175><img src="figs/img_062_HR_x4.jpg" height=120 width=175><img src="figs/img_062_SwinIR_x4.jpg" height=120 width=175><img src="figs/img_062_CAT-A_x4.jpg" height=120 width=175><img src="figs/img_062_EDAT_x4.jpg" height=120 width=175>

Requirements

Installation

git clone https://github.com/soobin419/EDAT.git
cd EDAT
pip install -r requirements.txt
python setup.py develop

Datasets

Used training and testing sets can be downloaded as follows:

Training SetTesting SetVisual Results
DIV2K (800 training images) + Flickr2K (2650 images) [complete dataset DF2K download]Set5 + Set14 + BSD100 + Urban100 + Manga109 [download]Google Drive

Download training and testing datasets and put them into the corresponding folders of datasets/. See datasets for the detail of the directory structure.

Training

Testing

Test images with HR

Test images without HR

Results

We achieved state-of-the-art performance. Detailed results can be found in the paper. All visual results of EDAT can be downloaded here.

<details> <summary>Click to expan</summary> <p align="center"> <img width="900" src="figs/Table3.PNG"> </p> <p align="center"> <img width="900" src="figs/Figure5.png"> </p> </details>

Acknowledgements

This code is built on BasicSR.