object-localization
object-localization copied to clipboard
Unable to open file (unable to open file: name = 'model-0.29.h5', errno = 2, error message = 'No such file or directory', flags = 0, o_flags = 0)
Hi,
I've run the test.py script, but I got an error:
Unable to open file (unable to open file: name = 'model-0.29.h5', errno = 2, error message = 'No such file or directory', flags = 0, o_flags = 0)
I looked into my directory, but there isn't a file named like that. But I do have the files: 'model-0.44.h5' till 'model-0.51.h5'. Even when I changed the 'model-0.29.h5' into 'model-0.44.h5' in WEIGHTS_FILE in test.py and run again, it isn't working. Why this isn't working and how can I fix this? Should I have the file 'model-0.29.h5' into my directory? Should I change: save_best_only=TRUE into FALSE in the train.py script?

Hi,
if you change the constant WEIGHTS_FILE to a file that exists, it will work. Neural networks don't produce exactly the same results in each run. This is why, you don't have model-0.29.
Furthermore, I think you aren't running python from the correct folder. From the project folder, run python3 example_2/train.py then change WEIGHTS_FILE in example_2/test.py, then run python3 example_2/test.py. Alternatively, change WEIGHTS_FILE and IMAGES to the exact location (e.g. /home/XX/....h5).
I hope this helps.
Hi Lars,
Thanks for your reply, now it works!
Laura