An unofficial implementation of SRGAN described in the paper using PyTorch.
Published in CVPR 2017
- Python 3.6.5
- PyTorch 1.1.0
- Pillow 5.1.0
- numpy 1.14.5
- scikit-image 0.15.0
Train
python main.py --LR_path ./LR_imgs_dir --GT_path ./GT_imgs_dir
Test
python main.py --mode test --LR_path ./LR_imgs_dir --GT_path ./GT_imgs_dir --generator_path ./model/SRGAN.pt
Inference your own images
python main.py --mode test_only --LR_path ./LR_imgs_dir --generator_path ./model/SRGAN.pt
Experimental results on benchmarks.
Method | Set5 | Set14 | B100 |
---|---|---|---|
Bicubic | 28.43 | 25.99 | 25.94 |
SRResNet(paper) | 32.05 | 28.49 | 27.58 |
SRResNet(my model) | 31.96 | 28.48 | 27.49 |
SRGAN(paper) | 29.40 | 26.02 | 25.16 |
SRGAN(my model) | 29.93 | 26.95 | 26.10 |
Bicubic | SRResNet | SRGAN |
---|---|---|
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
If you have any questions or comments on my codes, please email to me. [email protected]