ClementPinard / SfmLearner-Pytorch

Pytorch version of SfmLearner from Tinghui Zhou et al.
MIT License
1.01k stars 224 forks source link

"You must at least output one value !" when running inference on pretrained model #121

Closed evanc400 closed 2 years ago

evanc400 commented 3 years ago

Thanks for your generosity and hard work maintaining the repo!

I am currently trying to run inference on the pretrained model using KITTI sequences 09 and 10. For my dispnet, I am using the dispnet_model_best.pth.tar which you provided in the "Available here" link under pretrained nets. I am a Mac User. When I try to run: python3 run_inference.py --pretrained pretrained_nets/.dispnet_model_best.pth.tar.icloud --dataset-dir odom_data/dataset/sequences --output-dir output I am met with an error message which reads "You must at least output one value !". I am confused what I am doing wrong exactly as I thought I gave all the arguments requested. Any suggestions would be much appreciated!

ClementPinard commented 3 years ago

This script lets you output disparity or depth. you need to specify it with the option --output-disp or --output_depth (no argument). If you select neither, the script has nothing to save and thus won't run

evanc400 commented 3 years ago

Thanks for your quick response!

So I added that command to my arguments: python3 run_inference.py --pretrained pretrained_nets/.dispnet_model_best.pth.tar.icloud --dataset-dir odom_data/dataset/sequences --output-depth --output-dir output and I am now met with this error:

Screen Shot 2021-04-15 at 9 44 04 AM

I'm unsure what is causing this exactly but I'm guessing it has to do with loading one of the arguments perhaps the dispnet (dispnet_model_best.pth.tar.icloud) I got from the google drive link. Do you have ideas?

ClementPinard commented 3 years ago

It took me some time but I just tested it on my side with a new pytorch install and it runs fine. According to this link https://discuss.pytorch.org/t/unpickling-stack-underflow/68181/2 , the problem might be related to a corrupt file. Have you tried re-downloading it ? As a side note, this file is NOT a compressed file, you just need to use it as is in the CLI without trying to untar it