vinayakarannil / Background_removal_using_image_segmentation

Background substitution from an image/video using FCN image segmentation
7 stars 3 forks source link

Can't load save_path #1

Open nanthakumar94 opened 5 years ago

nanthakumar94 commented 5 years ago

This is my folder order: --fcn_8s_checkpoint --models --nets --preprocessing --recipes --utils

Traceback (most recent call last): File "C:/Users/nanth/PycharmProjects/Background_removal_using_image_segmentation-master/Background_removal_using_image_segmentation-master/segment_image.py", line 59, in saver.restore(sess, tf.train.latest_checkpoint(checkpoint_dir='model_fcn8s_final.ckpt')) File "C:\Users\nanth\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\training\saver.py", line 1713, in restore raise ValueError("Can't load save_path when it is None.") ValueError: Can't load save_path when it is None

please tell me, how to load ckpt file in this script and i need only the segmented image only

bhavi289 commented 4 years ago

First remove the suffix ".data-00000-of-00001" from the checkpoint file. So model_fcn8s_final.ckpt.data-00000-of-00001 becomes model_fcn8s_final.ckpt

Then change the sess.restore line to this -

saver.restore(sess, "fcn_8s_checkpoint/model_fcn8s_final.ckpt")