Tobias-Fischer / rt_gene

RT-GENE: Real-Time Eye Gaze and Blink Estimation in Natural Environments
http://www.imperial.ac.uk/personal-robotics
Other
368 stars 68 forks source link

ImportError: MD5 Hashes of supplied model_files do not match the known_hashes argument. #97

Closed balandongiv closed 3 years ago

balandongiv commented 3 years ago

When executing the estimate_gaze_standalone with pytorch as the beckend.

I got the error ImportError

MD5 Hashes of supplied model_files do not match the known_hashes argument. If you are training your " "own models, then please supply the md5sum hashes in the known_hashes argument. If you're not, " "then you're using old models. The newer models should have downloaded already so please update the " "estimate_gaze.launch file that you've modified.

However, the code run without any run time error with tensorflow as the beckend.

I am using the master version.

Tobias-Fischer commented 3 years ago

Hi @balandongiv, Could you please check the md5 sum of the models that you have downloaded? They live in ./rt_gene/rt_gene/model_nets/. Could you please report

md5sum gaze_model_pytorch_vgg16_prl_mpii_allsubjects1.model
md5sum gaze_model_pytorch_vgg16_prl_mpii_allsubjects2.model
md5sum gaze_model_pytorch_vgg16_prl_mpii_allsubjects3.model
md5sum gaze_model_pytorch_vgg16_prl_mpii_allsubjects4.model

The result should be sth like

(robostackenv) tobias@QUTLAB:~$ md5sum gaze_model_pytorch_vgg16_prl_mpii_allsubjects1.model
ae435739673411940eed18c98c29bfb1  gaze_model_pytorch_vgg16_prl_mpii_allsubjects1.model
(robostackenv) tobias@QUTLAB:~$ md5sum gaze_model_pytorch_vgg16_prl_mpii_allsubjects2.model
4afd7ccf5619552ed4a9f14606b7f4dd  gaze_model_pytorch_vgg16_prl_mpii_allsubjects2.model
(robostackenv) tobias@QUTLAB:~$ md5sum gaze_model_pytorch_vgg16_prl_mpii_allsubjects3.model
743902e643322c40bd78ca36aacc5b4d  gaze_model_pytorch_vgg16_prl_mpii_allsubjects3.model
(robostackenv) tobias@QUTLAB:~$ md5sum gaze_model_pytorch_vgg16_prl_mpii_allsubjects4.model
balandongiv commented 3 years ago

Hi @Tobias-Fischer,the md5sum for the gaze_model_pytorch_vgg16_prl_mpii_allsubjects for id 1,2,3 are the same as post by you. Can you kindly cross check whether md5sum gaze_model_pytorch_vgg16_prl_mpii_allsubjects4.model of mine is similar as yours since you did not share it in your initial post.

ae435739673411940eed18c98c29bfb1    gaze_model_pytorch_vgg16_prl_mpii_allsubjects1.model
4afd7ccf5619552ed4a9f14606b7f4dd    gaze_model_pytorch_vgg16_prl_mpii_allsubjects2.model
743902e643322c40bd78ca36aacc5b4d    gaze_model_pytorch_vgg16_prl_mpii_allsubjects3.model
06a10f43088651053a65f9b0cd5ac4aa    gaze_model_pytorch_vgg16_prl_mpii_allsubjects4.model
Tobias-Fischer commented 3 years ago

I have the same md5sums. Are you using a modified launch file? Or is everything taken from the repository without modifications?

balandongiv commented 3 years ago

I am using the master version and nothing is modified.

May I know what do you mean by modified launch file?

Tobias-Fischer commented 3 years ago

Thanks for helping me to debug this. In the rt_gene/rt_gene/src/rt_gene/estimate_gaze_pytorch.py file can you please add a print(_model_hashes) and print(_correct) after line 23, and let me know the output?

Tobias-Fischer commented 3 years ago

The issue is that you don't change the --models argument to point to a PyTorch model. Simply issue --models /path/to/gaze_model_pytorch_vgg16_prl_mpii_allsubjects1.model and it will work.

Tobias-Fischer commented 3 years ago

Closing here - feel free to reopen if it doesn't work.

balandongiv commented 3 years ago

Thanks @Tobias-Fischer , it solve the issue.

The issue is that you don't change the --models argument to point to a PyTorch model. Simply issue --models /path/to/gaze_model_pytorch_vgg16_prl_mpii_allsubjects1.model and it will work.

Just a suggestion. Is it possible to update or add extra information on the warning

rt_gene/rt_gene/src/rt_gene/estimate_gaze_pytorch.py line 27, to include about the requirement to change the --models argument if one to encounter error whenever the select either tensorflow or PyTorch model

Tobias-Fischer commented 3 years ago

You are right - done.