Skip to content

songzijiang/LGAN

Repository files navigation

If you have any questions, please feel free to contact us.

email me at: jacksung1995@gmail.com

or create a new issue directly.

LGAN

Information

Source codes for "A Lightweight Local-Global Attention Network for Single Image Super-Resolution". It is accepted by ACCV2022.

The structure of LGAN is shown as follows:

network

The structure of LGAB is shown as follows:

LGAB

How the feature maps reshaped is described in the figure:

LRA

The visual comparison is shown as follows:

visual visual

Performance Evaluation:

Performance_Evaluation

Please check the paper for more details.

Steps

Step 1: Install environment

The required environment is listed in 'env.yaml', please install the environment before training.

Step 2: Edit config file

Settings can be edited in 'configs/config.yml'. If you do not want to change the settings, you can rename the 'configs/config_default.yml' to 'configs/config.yml'.

Step 3: Prepare the dataset

You can download the dataset from here.

|/SR_datasets
|-|/DIV2K
|-|-|/DIV2K_train_HR/
|-|-|/DIV2K_train_LR_bicubic/
|-|/benchmark
|-|-|/B100
|-|-|-|/HR
|-|-|-|/LR_bicubic
|-|-|/Manga109
|-|-|-|/HR
|-|-|-|/LR_bicubic
|-|-|/Set14
|-|-|-|/HR
|-|-|-|/LR_bicubic
|-|-|/Set5
|-|-|-|/HR
|-|-|-|/LR_bicubic
|-|-|/Urban100
|-|-|-|/HR
|-|-|-|/LR_bicubic

Step 4: Train the network

Run

sh train.sh

or you can download pre-trained models x2 x3 x4.

NOTE: PSNR and SSIM listed in paper is calculated by matlab program. The result calculated by Python program may be slightly inconsistent with the paper.

Step 5: Evaluate the network

To evaluate the network, you should specify the parameter 'pretrain' in 'configs/config.yaml' first. And run

sh test.sh

The visual result produced by LGAN can be obtained here.

Thanks

The codes are implemented based on ELAN.

About

Source codes for LGAN

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published