mrharicot / monodepth

Unsupervised single image depth prediction with CNNs
Other
2.21k stars 628 forks source link

Relative paths don't work for checkpoint_path #247

Open eamonnkenny opened 4 years ago

eamonnkenny commented 4 years ago

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.