mrharicot / monodepth

Unsupervised single image depth prediction with CNNs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Relative paths don't work for checkpoint_path

eamonnkenny opened this issue · comments

On line 205 of monodepth_main.py you are splitting on dot ( split('.') ).

restore_path = args.checkpoint_path.split(".")[0]

This means that if somebody uses a relative path rather than full path (something like):

 ../monodepth/model_cityscapes
 ./monodepth/model_cityscapes

the code will fail saying that the restore_path file is invalid.

The solution is to not split on dot. Using something like adding os.dirname() or os.getcwd() with os.path.join() will not fix the problem if the split remains in the code.