image-super-resolution icon indicating copy to clipboard operation
image-super-resolution copied to clipboard

Different scaling factors depending on model used

Open axymeus opened this issue 3 years ago • 0 comments

I've tried running the code provided here https://github.com/idealo/image-super-resolution#prediction on a sample image. My code is as follows

import numpy as np
from PIL import Image
from ISR.models import RDN, RRDN

img = Image.open('data/input/0001.png')
lr_img = np.array(img)

model = RDN(weights='noise-cancel')

sr_img = model.predict(lr_img)
img = Image.fromarray(sr_img)

img.save('result.png', 'PNG')

When using model = RRDN(weights='gans') the resulting image is 4 times the size of the input, but with RDN models, it is twice the size. Is it possible to run prediction with different scales? It is difficult to truly compare the results of the different models because of that, but I might have missed something.

If this is the intended behavior, what is the best approach to target a specific resolution? (in regard to chaining models together perhaps)

axymeus avatar Mar 14 '21 12:03 axymeus