- Python >= 3.7 (Recommend to use Anaconda or Miniconda)
- PyTorch >= 1.7
-
Clone repo
git clone https://github.com/xinntao/Real-ESRGAN.git cd Real-ESRGAN
-
Install dependent packages
# Install basicsr - https://github.com/xinntao/BasicSR # We use BasicSR for both training and inference pip install basicsr # facexlib and gfpgan are for face enhancement pip install facexlib pip install gfpgan pip install basicsr>=1.4.2 pip install facexlib>=0.2.5 pip install gfpgan>=1.3.5 pip install numpy pip install opencv-python pip install Pillow pip install torch>=1.7 pip install torchvision pip install tqdm python setup.py develop
-
install pre-trained model
wget https://github.com/xinntao/Real-ESRGAN/releases/download/v0.1.0/RealESRGAN_x4plus.pth -P Real-ESRGAN/experiments/pretrained_models wget https://github.com/xinntao/Real-ESRGAN/releases/download/v0.2.2.3/RealESRGAN_x4plus_netD.pth -P Real-ESRGAN/experiments/pretrained_models