Issue with running predict.py file
zahangircse opened this issue · 4 comments
Hi,
Hope you are doing great. First of all, I would not able to reach you through email(showing incorrect email address). I have tried to run your code, the following files are running properly : bootstrap.py and train.py ( database, training and validation)
I would not able to run predict.py file. Could you please let me know what does "path/to/image' mean?
I used testing directory path according the following commands:
python predict.py -p "/home/....../sorted/test/" --model=vgg16
showing syntax errors..
could you please give me solution regarding this issue?
Thanks
zahangir
@zahangircse "path/to/image" means that you should provide path to image(s) you want de recognize. It can be single image "path/to/image.jpg" (or .png jpeg, .etc) or images in a dir defined by a pattern like "path/to/*.jpg" - will take all .jpg files inside of the "path/to" directory
@zahangircse I've checked your examples and found two wrong things:
- there is no -p argument. use --path instead.
- use full path to images as the script don't know where is your home directory (I mean ~ sign)
This is my working example: python predict.py --path "/Volumes/storage/projects/keras-oxford102/data/sorted/test/0/*.jpg"
Also please read carefully error's stack when you're getting into some error :)
Did you manage to get this working? I have the following error in bootstrap.py:
move_files('train', labels[idx_test, :])
Index Error: too many indices
Any ideas? Do you have a fully working version you could send please?