A clean PyTorch port of the 2017 super-resolution GAN
If you want to upscale images 2×–8× without reading the original SRGAN paper's Lua code, this is the repo.

What it does
This is a straightforward PyTorch reimplementation of the SRGAN paper from CVPR 2017. It trains a generative adversarial network to reconstruct high-resolution images from low-resolution inputs, with support for 2×, 4×, and 8× upscaling. The repo includes scripts for training on VOC2012, testing against standard benchmark sets (Set5, Set14, BSD100, Urban100, Sun-Hays 80), and running inference on single images or videos.
The interesting bit
The author did the legwork of translating the original paper into runnable PyTorch and benchmarking it properly across all three scale factors. The README includes per-epoch timing on a GTX 1080Ti and side-by-side PSNR/SSIM numbers against bicubic interpolation, which is more rigor than most paper reimplementations bother with.
Key highlights
- Supports 2×, 4×, and 8× upscaling via command-line flag
- Includes separate test scripts for benchmark datasets, single images, and single videos
- Training and validation data drawn from VOC2012 (16,700 train / 425 val images)
- Reports concrete timing: ~2.5 min/epoch for 2×, ~4.5 min for 4×, ~3.5 min for 8× on 1080Ti
- Provides preprocessed datasets and results via Baidu Pan links (access codes included)
Caveats
- All dataset and result downloads are hosted on Baidu Pan, which may be inaccessible or slow outside China
- The README does not specify which PyTorch or Python versions are required, only “Anaconda” and generic conda install commands
- No pretrained model weights are linked directly in the README; you need to train or hunt for
netG_epoch_4_100.pth
Verdict
Worth cloning if you need a working SRGAN baseline in PyTorch for research or comparison. Skip it if you need production-ready inference, modern architecture improvements, or easy access to pretrained weights.