Windaway / FCRN-Depth-Prediction-Tensorflow

Another FCRN for Depth Prediction implement with Tensorflow and Tensorlayer.
GNU General Public License v2.0
11 stars 4 forks source link

I have a question about predicting depth map of my input image. #6

Open huhyukyung opened 5 years ago

huhyukyung commented 5 years ago

First, Thank you for sharing the train code! I'd like to train model using my own dataset and predict depth map. I successfully trained model using your fcrn_train.py and gen_tfrecord.py. But how can I predict depth map of my input image? I tried iro-cp/FCRN-DepthPrediction/tensorflow/predict.py But some errors like below image occured. image

NotFoundError (see above for traceback): Restoring from checkpoint failed. This is most likely due to a Variable name or other graph key that is missing from the checkpoint. Please ensure that you have not altered the graph expected based on the checkpoint. Original error: Key model/ConvPred/bias not found in checkpoint [[node save/RestoreV2 (defined at predict.py:37) ]]

Can you please help me with this problem? Thank you.

Windaway commented 5 years ago

Set restore_from_ckpt True and restore_from_fcrn False Set ckpt_path your ckpt path. Feed you img and sess run logits_test.

e4exp commented 4 years ago

I tried your solution. but I got just black images after saving resulted logits_test what is the possible cause?

im = sess.run(logits_test)    
im = im * 255    
im = im.astype(np.uint8)[0]    
path = "path/to/image.jpg" 
cv2.imwrite(path, im)