Eugene Siow
commited on
Commit
•
98503f9
1
Parent(s):
ab84f51
Add 3x upscaling model.
Browse files- README.md +17 -17
- config.json +1 -1
- pytorch_model_3x.pt +3 -0
README.md
CHANGED
@@ -34,12 +34,12 @@ import requests
|
|
34 |
url = 'https://paperswithcode.com/media/datasets/Set5-0000002728-07a9793f_zA3bDjj.jpg'
|
35 |
image = Image.open(requests.get(url, stream=True).raw)
|
36 |
|
37 |
-
model = EdsrModel.from_pretrained('eugenesiow/edsr-base', scale=2)
|
38 |
inputs = ImageLoader.load_image(image)
|
39 |
preds = model(inputs)
|
40 |
|
41 |
-
ImageLoader.save_image(preds, './scaled_2x.png')
|
42 |
-
ImageLoader.save_compare(inputs, preds, './scaled_2x_compare.png')
|
43 |
```
|
44 |
## Training data
|
45 |
The EDSR models for 2x, 3x and 4x image super resolution were pretrained on [DIV2K](https://data.vision.ee.ethz.ch/cvl/DIV2K/), a dataset of 800 high-quality (2K resolution) images for training, augmented to 4000 images and uses a dev set of 100 validation images (images numbered 801 to 900).
|
@@ -105,20 +105,20 @@ Evaluation datasets include:
|
|
105 |
|
106 |
The results columns below are represented below as `PSNR/SSIM`. They are compared against a Bicubic baseline.
|
107 |
|
108 |
-
|Dataset
|
109 |
-
|---
|
110 |
-
|Set5
|
111 |
-
|Set5
|
112 |
-
|Set5
|
113 |
-
|Set14
|
114 |
-
|Set14
|
115 |
-
|Set14
|
116 |
-
|BSD100
|
117 |
-
|BSD100
|
118 |
-
|BSD100
|
119 |
-
|Urban100
|
120 |
-
|Urban100
|
121 |
-
|Urban100
|
122 |
|
123 |
![Comparing Bicubic upscaling against EDSR x2 upscaling on Set5 Image 2](images/Set5_2_compare.png "Comparing Bicubic upscaling against EDSR x2 upscaling on Set5 Image 2")
|
124 |
|
|
|
34 |
url = 'https://paperswithcode.com/media/datasets/Set5-0000002728-07a9793f_zA3bDjj.jpg'
|
35 |
image = Image.open(requests.get(url, stream=True).raw)
|
36 |
|
37 |
+
model = EdsrModel.from_pretrained('eugenesiow/edsr-base', scale=2) # scale 2, 3 and 4 models available
|
38 |
inputs = ImageLoader.load_image(image)
|
39 |
preds = model(inputs)
|
40 |
|
41 |
+
ImageLoader.save_image(preds, './scaled_2x.png') # save the output 2x scaled image to `./scaled_2x.png`
|
42 |
+
ImageLoader.save_compare(inputs, preds, './scaled_2x_compare.png') # save an output comparing the super-image with a bicubic scaling
|
43 |
```
|
44 |
## Training data
|
45 |
The EDSR models for 2x, 3x and 4x image super resolution were pretrained on [DIV2K](https://data.vision.ee.ethz.ch/cvl/DIV2K/), a dataset of 800 high-quality (2K resolution) images for training, augmented to 4000 images and uses a dev set of 100 validation images (images numbered 801 to 900).
|
|
|
105 |
|
106 |
The results columns below are represented below as `PSNR/SSIM`. They are compared against a Bicubic baseline.
|
107 |
|
108 |
+
|Dataset |Scale |Bicubic |edsr-base |
|
109 |
+
|--- |--- |--- |--- |
|
110 |
+
|Set5 |2x |33.64/0.9292 |**38.02/0.9607** |
|
111 |
+
|Set5 |3x |30.39/0.8678 |**35.04/0.9403** |
|
112 |
+
|Set5 |4x |28.42/0.8101 |**32.12/0.8947** |
|
113 |
+
|Set14 |2x |30.22/0.8683 |**33.57/0.9172** |
|
114 |
+
|Set14 |3x |27.53/0.7737 |**30.93/0.8567** |
|
115 |
+
|Set14 |4x |25.99/0.7023 |**28.60/0.7815** |
|
116 |
+
|BSD100 |2x |29.55/0.8425 |**32.21/0.8999** |
|
117 |
+
|BSD100 |3x |27.20/0.7382 |**29.65/0.8204** |
|
118 |
+
|BSD100 |4x |25.96/0.6672 |**27.61/0.7363** |
|
119 |
+
|Urban100 |2x |26.66/0.8408 |**32.04/0.9276** |
|
120 |
+
|Urban100 |3x | |**29.23/0.8723** |
|
121 |
+
|Urban100 |4x |23.14/0.6573 |**26.02/0.7832** |
|
122 |
|
123 |
![Comparing Bicubic upscaling against EDSR x2 upscaling on Set5 Image 2](images/Set5_2_compare.png "Comparing Bicubic upscaling against EDSR x2 upscaling on Set5 Image 2")
|
124 |
|
config.json
CHANGED
@@ -7,5 +7,5 @@
|
|
7 |
"n_resblocks": 16,
|
8 |
"res_scale": 1,
|
9 |
"rgb_range": 255,
|
10 |
-
"supported_scales": [2, 4]
|
11 |
}
|
|
|
7 |
"n_resblocks": 16,
|
8 |
"res_scale": 1,
|
9 |
"rgb_range": 255,
|
10 |
+
"supported_scales": [2, 3, 4]
|
11 |
}
|
pytorch_model_3x.pt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:27a09b477d3b9531e2a0e6747a103a8c619c0daac9f4ee704828e335bdb034cd
|
3 |
+
size 6245313
|