Keras-SRGAN
Keras-SRGAN copied to clipboard
Output Image is Awful
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:

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:

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?
How you removed alpha channel and how you saved that image? Will look into such case.
Thanks for reply. Actually, within photoshop. File/Save for web/unselected "Transparency" and saved as PNG-24