yjn870 / RCAN-pytorch

PyTorch implementation of Image Super-Resolution Using Very Deep Residual Channel Attention Networks (ECCV 2018)

Home Page:https://arxiv.org/abs/1807.02758

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

RCAN

This repository is implementation of the "Image Super-Resolution Using Very Deep Residual Channel Attention Networks".

Requirements

  • PyTorch
  • Tensorflow
  • tqdm
  • Numpy
  • Pillow

Tensorflow is required for quickly fetching image in training phase.

Results

For below results, we set the number of residual groups as 6, the number of RCAB as 12, the number of features as 64.
In addition, we use a intermediate weights because training process need to take a looong time on my computer. 😭

Original BICUBIC x2 RCAN x2

Usages

Train

When training begins, the model weights will be saved every epoch.
If you want to train quickly, you should use --use_fast_loader option.

python main.py --scale 2 \
               --num_rg 10 \
               --num_rcab 20 \ 
               --num_features 64 \              
               --images_dir "" \
               --outputs_dir "" \               
               --patch_size 48 \
               --batch_size 16 \
               --num_epochs 20 \
               --lr 1e-4 \
               --threads 8 \
               --seed 123 \
               --use_fast_loader              

Test

Output results consist of restored images by the BICUBIC and the RCAN.

python example --scale 2 \
               --num_rg 10 \
               --num_rcab 20 \
               --num_features 64 \
               --weights_path "" \
               --image_path "" \
               --outputs_dir ""                              

About

PyTorch implementation of Image Super-Resolution Using Very Deep Residual Channel Attention Networks (ECCV 2018)

https://arxiv.org/abs/1807.02758


Languages

Language:Python 100.0%