RCAN-pytorch
RCAN-pytorch copied to clipboard
PyTorch implementation of Image Super-Resolution Using Very Deep Residual Channel Attention Networks (ECCV 2018)
RCAN
This repository is implementation of the "Image Super-Resolution Using Very Deep Residual Channel Attention Networks".
![](https://github.com/yjn870/RCAN-pytorch/raw/master/figs/fig2.png)
![](https://github.com/yjn870/RCAN-pytorch/raw/master/figs/fig3.png)
![](https://github.com/yjn870/RCAN-pytorch/raw/master/figs/fig4.png)
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. 😭
![]() |
![]() |
![]() |
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 ""