Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

i got no such options #20

Open
GitGhidorah opened this issue Aug 31, 2019 · 6 comments
Open

i got no such options #20

GitGhidorah opened this issue Aug 31, 2019 · 6 comments

Comments

@GitGhidorah
Copy link

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
Copy link
Author

Exactly saying,
'No such option'

@mrciolino
Copy link

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
Copy link

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_batch_lr)
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
Copy link

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

@dangmanhtruong1995
Copy link

dangmanhtruong1995 commented Sep 11, 2019 via email

@mrciolino
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants