Enhance resolution of animations

Real-ESRGAN is one of Ai GAN (Generative Adversarial Network) models to enhance image or video resolution. You can find the original here. This tutorial gives you a step-by-step guide on how to use Real-ESRGAN in GitHub.

1. First download the code from Real-ESRGAN GitHub repository. Open a dos prompt, in the directory where you want to install, type the command:
>git clone https://github.com/xinntao/Real-ESRGAN.git
2. Download realesr-animevideov3.pth or RealESRGAN_x4plus.pth and put them at “Real-ESRGAN\weights” directory.
3. You need to configure a virtual environment to run the code. If you haven’t installed Anaconda3, go to install Anaconda3.
4. Setup a conda environment with the instruction.
5. Now put a short video file you want to enhance in the “inputs\video” directory. Rename the file to “onepiece_demo.mp4.”
6. If you run the project in Windows, open “inference_realesrgan_video.py” with your text editor. In line 319, change to
subprocess.call(cmd, shell=True)
7. Open an Anaconda Prompt. Run command:
>conda activate gfpgan_env
8. Still in the Anaconda prompt, go to the directory “Real-ESRGAN” and run command:
>python setup.py develop
>python inference_realesrgan_video.py -i inputs/video/onepiece_demo.mp4 -n realesr-animevideov3 -s 2 –suffix outx2
9. When it finishes, the new enhanced video is saved at “results\onepiece_demo_outx2.mp4”.

Comments are closed