irolaina / FCRN-DepthPrediction

Deeper Depth Prediction with Fully Convolutional Residual Networks (FCRN)
BSD 2-Clause "Simplified" License
1.12k stars 312 forks source link

restore failed with latest tensorflow(1.x) #72

Open mmxuan18 opened 6 years ago

mmxuan18 commented 6 years ago

image

Ariel-JUAN commented 6 years ago

There are two ways to restore models, you need to use the right code and use the right model.

mmxuan18 commented 6 years ago

try both command as follow has the same error, my tensorflow version is 1.8.0 python predict.py --model_path NYU_ResNet-UpProj.npy --image_paths ~/Downloads/dp/t4.jpg

python predict.py --model_path NYU_FCRN-checkpoint/NYU_FCRN.ckpt.data-00000-of-00001 --image_paths ~/Downloads/dp/t4.jpg

what the right code and right model mean, model is download as readme link

Ariel-JUAN commented 6 years ago
  1. Use to load from ckpt file saver = tf.train.Saver()
    saver.restore(sess, model_data_path)

  2. Use to load from npy file net.load(model_data_path, sess)

mmxuan18 commented 6 years ago

i use tensorflow ckpt not modify the predict.py code, and error info like i post

nemerchiedde commented 5 years ago

I have the same problem

nemerchiedde commented 5 years ago

Use for the first option: python predict.py --model_path NYU_FCRN-checkpoint/NYU_FCRN.ckpt --image_paths ~/Downloads/dp/t4.jpg But the seconde one I don't know why it doesn't work.