tensorflow-vdsr icon indicating copy to clipboard operation
tensorflow-vdsr copied to clipboard

Generating Image from Model

Open rickstep opened this issue 8 years ago • 3 comments

I am trying the following to generate a color image from the model.

`im = Image.fromarray((img_vdsr_y * 255).astype(np.uint8))

imycbcr = im.convert("YCbCr")

(y, cb, cr) = imycbcr.split()

origimage = Image.open(originalFilePath)

origimage = origimage.resize((input_y.shape[1], input_y.shape[0]), Image.ANTIALIAS)

origycbcr = origimage.convert('YCbCr')

(yO, cbO, crO) = origycbcr.split()

finalImage = Image.merge('YCbCr', (y, cbO, crO)) `

The resulting image is a color image, but the quality is worse than the original and it has random black pixels throughout. Does anyone know a better way to take the ndarray img_vdsr_y and combine that with the cb and cr channels from the original image?

rickstep avatar Jul 19 '17 01:07 rickstep

Hi, I had the same problem, did you solve the problem? If so, how did you solve it? Thanks :)

KevinZZZZ1 avatar Feb 01 '19 05:02 KevinZZZZ1

hi, guys, did you solve the problem and get the rgb image?

ColdCodeCool avatar Oct 28 '20 03:10 ColdCodeCool

Hi ColdCodeCool,

I apologize. We did eventually figure this out, but it was long enough ago that I don't have the repo on my comp anymore, and I can't remember the exact solution. But it had something to do with the conversion to YCbCrin TEST.py. Sorry I couldn't help more.

rickstep

rickstep avatar Oct 28 '20 04:10 rickstep