Keras-SRGAN icon indicating copy to clipboard operation
Keras-SRGAN copied to clipboard

Output Image is Awful

Open hurkal opened this issue 5 years ago • 2 comments

Hi, Thanks for this repo. I have a problem about input images.

I run this command to generate HR images: !python test.py --input_low_res='./data_lr/' --output_dir='./output/' --model_dir='./model/gen_model3000.h5' --number_of_images=1 --test_type='test_lr_images'

When 384x384 pixels with 32 bit-depth PNG image is provided, got this error: ValueError: Error when checking input: expected input_1 to have shape (96, 96, 3) but got array with shape (96, 96, 4)

So, by removing alpha channel image is converted to 24 bit-depth with 384x384 pixels. I understand that HR image is converting into LR image with lr_images() function in Utilty.py. Test image is taken from the output folder, already generated while training: 03-24bits

I need to make some changes according to discussed here before: https://github.com/deepak112/Keras-SRGAN/issues/18#issue-487130609

So, I got the same dimensions and bit-depth as input file: high_res_result_image_0 (3)

It wants us to provide 24 bit-depth image, I think. So I decided to input a PNG file removed alpha channel. But why is the quality is awful even I provide the image within the train set?

hurkal avatar Apr 02 '20 14:04 hurkal

How you removed alpha channel and how you saved that image? Will look into such case.

deepak112 avatar May 04 '20 20:05 deepak112

Thanks for reply. Actually, within photoshop. File/Save for web/unselected "Transparency" and saved as PNG-24

hurkal avatar May 06 '20 18:05 hurkal