Skip to content

Latest commit

 

History

History

real-esrgan

Real-ESRGAN

Input

Input

(Image from https://github.com/xinntao/Real-ESRGAN/tree/master/inputs/ADE_val_00000114.jpg)

Input

(Image from https://github.com/xinntao/Real-ESRGAN/blob/master/inputs/0030.jpg)

Ailia input shape: (1, 3, 256, 256)

Output

Output

Output

Usage

Automatically downloads the onnx and prototxt files on the first run. It is necessary to be connected to the Internet while downloading.

For the sample image,

$ python3 real_esrgan.py

You can also use an anime-specific super-resolution model by adding the -m RealESRGAN_anime or RealESRGAN_anime_v3 option.

$ python3 real_esrgan.py -m RealESRGAN_anime -i input_anime.jpg -s output_anime.jpg

If you want to specify the input image, put the image path after the --input option.
You can use --savepath option to change the name of the output file to save.

$ python3 real-esrgan.py --input IMAGE_PATH --savepath SAVE_IMAGE_PATH

By adding the --video option, you can input the video.
If you pass 0 as an argument to VIDEO_PATH, you can use the webcam input instead of the video file.

$ python3 real_esrgan.py --video VIDEO_PATH

Reference

Real-ESRGAN

Anime Video Models

Framework

Pytorch

Model Format

ONNX opset = 12

Netron

RealESRGAN.opt.onnx.prototxt

RealESRGAN_anime_v3.opt.onnx.prototxt