deepak112 / Keras-SRGAN

Photo-Realistic Single Image Super-Resolution Using a Generative Adversarial Network implemented in Keras
276 stars 146 forks source link

i got no such options #20

Open GitGhidorah opened 5 years ago

GitGhidorah commented 5 years ago

python test.py --input_low_res='./data_lr/' --output_dir='./output/' --number_of_images=1 --test_type='test_lr_images'

Then,i got message 'no such options'

Sorry,Idont know why.

GitGhidorah commented 5 years ago

Exactly saying, 'No such option'

mrciolino commented 5 years ago
if values.test_type == 'test_model':
    test_model(values.input_hig_res, model, values.number_of_images, values.output_dir)

elif values.test_type == 'test_lr_images':
    test_model_for_lr_images(values.input_low_res, model, values.number_of_images, values.output_dir)

else:
    print("No such option")

That's weird, --test_type='test_lr_images' is the string that it is checking for. have you edited something?

dangmanhtruong1995 commented 5 years ago

Hi, it should be: test_type=test_lr_images, you have to remove the parentheses. By the way after this I got another error: Traceback (most recent call last): File "test.py", line 68, in test_model_for_lr_images(values.input_low_res, model, values.number_of_images, values.output_dir) File "test.py", line 35, in test_model_for_lr_images Utils.plot_test_generated_images(output_dir, model, x_test_lr) File "E:\Hoctap\Machine_learning\Oil_and_gas\Image_classification_for_valve\Keras-SRGAN-master\Utils.py", line 221, in plot_test_generated_images gen_img = generator.predict(image_batchlr) File "C:\Users\Win10\Anaconda3\lib\site-packages\keras\engine\training.py", line 1149, in predict x, , _ = self._standardize_user_data(x) File "C:\Users\Win10\Anaconda3\lib\site-packages\keras\engine\training.py", line 751, in _standardize_user_data exception_prefix='input') File "C:\Users\Win10\Anaconda3\lib\site-packages\keras\engine\training_utils.py", line 138, in standardize_input_data str(data_shape)) ValueError: Error when checking input: expected input_1 to have shape (96, 96, 3) but got array with shape (40, 40, 3)

mrciolino commented 5 years ago

does #12 solve that problem? - i had a problem with the LR test images trying to be downscaled.

dangmanhtruong1995 commented 5 years ago

Hi. No it does not :(

2019-09-11 15:06 GMT+01:00, mrciolino notifications@github.com:

does #12 solve that problem? - i had a problem with the LR test images trying to be downscaled.

-- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/deepak112/Keras-SRGAN/issues/20#issuecomment-530396432

mrciolino commented 5 years ago

Could you give some more info on the resolution of images you are working with? For example, I trained a few GANs on 320x320 with 4x downsampling to 80x80.

I've found it easier and better to learn by using your own images. Image Magick was a strong command-line tool I used to resize, crop, or tile images. https://imagemagick.org/script/command-line-processing.php