truskovskiyk / nima.pytorch

NIMA: Neural IMage Assessment
MIT License
335 stars 79 forks source link

CLI command can only be invoked by " - " rather than " _ " in the original setting. #27

Open JustinAsdz opened 4 years ago

JustinAsdz commented 4 years ago

I was just tried to run the get one image's score as
python nima/cli.py get_image_score --path_to_model_weight ./pretrain-model.pth --path_to_image test_image.jpg while find below error, then I check the help info, and the program run correctly if I use "get-image-score" as in help info. I wander why this would occur when the defination and call function in cli.py are all using " _ ".

image

Cashel-000 commented 1 year ago

Thanks for your sharing! I met the same problem when I run this "get-image-score" test, but there is another problem with my code. Here is my problem:When I run the command 'python nima/cli.py get-image-score --path_to_model_state ./pretrain-model.pth --path_to_image test_image.png', I met an error saying ''TypeError: create_model() missing 1 required positional argument: 'model_type''', have you ever met this problem? Or would you like to share how to fix this problem? Thanks a lot!

dydxdt commented 1 year ago

Thanks for your sharing! I met the same problem when I run this "get-image-score" test, but there is another problem with my code. Here is my problem:When I run the command 'python nima/cli.py get-image-score --path_to_model_state ./pretrain-model.pth --path_to_image test_image.png', I met an error saying ''TypeError: create_model() missing 1 required positional argument: 'model_type''', have you ever met this problem? Or would you like to share how to fix this problem? Thanks a lot!

Hi, I also meet this problem. Have you solved it? Thanks very much