JaredYeDH / BasicSR

Basic codes for Super-Resolution

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

BasicSR

BasicSR mainly contains 3 parts:

  1. general SR models
  2. SRGAN model
  3. SFTGAN model

๐ŸŒž

add sft-gan testing codes. See seg_arch and sft_arch files.

The sft-gan testing codes and models are just from the torch version without much testing. Later, we will improve it and add training codes. (before June 10)

The sft-gan models can be downloaded from Google Drive.

๐ŸŒž

Now it supports 1 and 2.

The repo is still under development. There may be some bugs :-)

Prerequisites

  • Linux
  • Python3
  • Pytorch 0.3.1
  • NVIDIA GPU + CUDA CuDNN

Codes descriptions

Please see Wiki pages, which contains:

Getting Started

How to test a model

  1. prepare your data and pretrained model
    1. SRResNet_bicx4_in3nf64nb16.pth is provided in experiments/pretrained_models and other pretrained models can be downloaded from Google Drive.
  2. modify the corresponding testing json file in options/test/test.json
  3. test the model with the command python3 test.py -opt options/test/test.json

How to train a model

  1. prepare your data (it's better to test whether the data is ok using test_dataloader)
  2. modify the corresponding training json file in options/train/SRResNet(or SRGAN).json
  3. train the model with the command python3 train.py -opt options/train/SRResNet.json

๐Ÿ˜† Image Viewer - HandyViewer

If you have trouble in comparing image details, may have a try for HandyViewer - an image viewer that you can switch image with a fixed zoom ratio.


Pretrained Models

Qualitative results [PSNR/dB] of SRResNet (EDSR)

See more details in experiments/pretrained_models

Model Scale Channel DIV2K2 Set5 Set14 BSD100 Urban100
SRResNet_bicx2_in3nf64nb161 2 RGB 34.7203 35.835 31.643
36.1433 37.947 33.682
SRResNet_bicx3_in3nf64nb16 3 RGB 31.019 32.442 28.499
32.449 34.428 30.371
SRResNet_bicx4_in3nf64nb16 4 RGB 29.051 30.278 26.853
30.486 32.180 28.645
SRResNet_bicx8_in3nf64nb16 8 RGB 25.429 25.357 23.348
26.885 27.070 24.996
SRResNet_bicx2_in1nf64nb16 2 Y 35.870 37.864 33.581
SRResNet_bicx3_in1nf64nb16 3 Y 32.182 34.263 30.186
SRResNet_bicx4_in1nf64nb16 4 Y 30.224 32.038 28.494
SRResNet_bicx8_in1nf64nb16 8 Y 26.660 26.621 24.804

1 bic: MATLAB bicubic downsampling; in3: input has 3 channels; nf64: 64 feature maps; nb16: 16 residual blocks.

2 DIV2K 0801 ~ 0900 validation images.

3 The first row is evaluated on RGB channels, while the secone row is evaluated on Y channel (of YCbCr).

Acknowlegement

  • Code architecture is inspired from pytorch-cyclegan.
  • Thanks to Wai Ho Kwok, who develop the initial version.

About

Basic codes for Super-Resolution


Languages

Language:Python 99.3%Language:Lua 0.7%