PyTorch implementation of a Real-ESRGAN model trained on custom dataset. This model shows better results on faces compared to the original version. It is also easier to integrate this model into your projects.

Real-ESRGAN is an upgraded ESRGAN trained with pure synthetic data is capable of enhancing details while removing annoying artifacts for common real-world images.


Code for using model you can obtain in our repo.

import torch
from PIL import Image
import numpy as np
from realesrgan import RealESRGAN

device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')

model = RealESRGAN(device, scale=4)

path_to_image = 'inputs/lr_image.png'
image ='RGB')

sr_image = model.predict(image)'results/sr_image.png')
Downloads last month
Hosted inference API

Unable to determine this model’s pipeline type. Check the docs .