gongting commited on
Commit
b8e76b2
·
verified ·
1 Parent(s): c91ad5d

Upload folder using huggingface_hub

Browse files
Files changed (4) hide show
  1. README.md +40 -0
  2. RealESRGAN_x2.pth +3 -0
  3. RealESRGAN_x4.pth +3 -0
  4. RealESRGAN_x8.pth +3 -0
README.md ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - ru
4
+ - en
5
+ tags:
6
+ - PyTorch
7
+ thumbnail: "https://github.com/sberbank-ai/Real-ESRGAN"
8
+ ---
9
+
10
+ # Real-ESRGAN
11
+
12
+ 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.
13
+
14
+ 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.
15
+
16
+ - [Paper](https://arxiv.org/abs/2107.10833)
17
+ - [Original implementation](https://github.com/xinntao/Real-ESRGAN)
18
+ - [Our github](https://github.com/sberbank-ai/Real-ESRGAN)
19
+
20
+ ## Usage
21
+
22
+ Code for using model you can obtain in our [repo](https://github.com/sberbank-ai/Real-ESRGAN).
23
+ ```python
24
+ import torch
25
+ from PIL import Image
26
+ import numpy as np
27
+ from RealESRGAN import RealESRGAN
28
+
29
+ device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
30
+
31
+ model = RealESRGAN(device, scale=4)
32
+ model.load_weights('weights/RealESRGAN_x4.pth', download=True)
33
+
34
+ path_to_image = 'inputs/lr_image.png'
35
+ image = Image.open(path_to_image).convert('RGB')
36
+
37
+ sr_image = model.predict(image)
38
+
39
+ sr_image.save('results/sr_image.png')
40
+ ```
RealESRGAN_x2.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c830d067d54fc767b9543a8432f36d91bc2de313584e8bbfe4ac26a47339e899
3
+ size 67061725
RealESRGAN_x4.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:aa00f09ad753d88576b21ed977e97d634976377031b178acc3b5b238df463400
3
+ size 67040989
RealESRGAN_x8.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8b72fb469d12f05a4770813d2603eb1b550f40df6fb8b37d6c7bc2db3d2bff5e
3
+ size 67189359