Skip to main content

No project description provided

Project description

Real-ESRGAN

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.

This is not an official implementation. We partially use code from the original repository

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.

You can try it in google colab Open In Colab

Installation

pip install git+https://github.com/sberbank-ai/Real-ESRGAN.git

Usage


Basic usage:

import torch
from PIL import Image
from py_real_esrgan.model import RealESRGAN

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

model = RealESRGAN(device, scale=4)
model.load_weights('weights/RealESRGAN_x4.pth', download=True)

path_to_image = 'inputs/lr_image.png'
image = Image.open(path_to_image).convert('RGB')

sr_image = model.predict(image)

sr_image.save('results/sr_image.png')

Examples


Low quality image:

Real-ESRGAN result:


Low quality image:

Real-ESRGAN result:


Low quality image:

Real-ESRGAN result:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

py_real_esrgan-2.0.0-py3-none-any.whl (11.9 kB view details)

Uploaded Python 3

File details

Details for the file py_real_esrgan-2.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for py_real_esrgan-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5667e58c416761a1f0fa3fc09c2ec2605379d732ef0fe465bf986d2ccc218a78
MD5 466e8ac7bf33658ca0819315618b61cf
BLAKE2b-256 36cd928f22d14f87e03061785e0929184ba433b1ac6aae958ed67c5d9ab034fd

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page