ESRGAN (Enhanced SRGAN) [:rocket: BasicSR] [Real-ESRGAN]
Cloned repository of ESRGAN
Here are some examples for Real-ESRGAN:
📖 Real-ESRGAN: Training Real-World Blind Super-Resolution with Pure Synthetic Data[Paper]
Xintao Wang, Liangbin Xie, Chao Dong, Ying Shan
Applied Research Center (ARC), Tencent PCG
Shenzhen Institutes of Advanced Technology, Chinese Academy of Sciences
- Python 3
- PyTorch >= 1.0 (CUDA version >= 7.5 if installing with CUDA. More details)
pip3 install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cpu
- Python packages:
pip install numpy opencv-python
- Clone this github repo.
git clone https://github.com/xinntao/ESRGAN
cd ESRGAN
- Place your own low-resolution images in
./LR
folder. (There are two sample images - baboon and comic). - Download pretrained models from Google Drive or Baidu Drive. Place the models in
./models
. We provide two models with high perceptual quality and high PSNR performance (see model list). - Run test. We provide ESRGAN model and RRDB_PSNR model and you can config in the
test.py
.
python test.py
- The results are in
./results
folder.
You can interpolate the RRDB_ESRGAN and RRDB_PSNR models with alpha in [0, 1].
- Run
python net_interp.py 0.8
, where 0.8 is the interpolation parameter and you can change it to any value in [0,1]. - Run
python test.py models/interp_08.pth
, where models/interp_08.pth is the model path.