hysts / pytorch_mpiigaze_demo

Gaze estimation using MPIIGaze and MPIIFaceGaze
MIT License
295 stars 66 forks source link

"Error deserializing object of type int" upon Executing "...ptgaze.exe --mode eye" #1

Closed tslever closed 4 years ago

tslever commented 4 years ago

To whom it may concern,

I installed ptgaze using "pip install ptgaze" on a Windows-10 PC running Python 3.8.5. Per your GitHub ReadMe, I ran "...ptgaze.exe --mode eye" in PowerShell as Administrator, where the ellipsis symbolized the rest of the absolute path to ptgaze.exe. The following error was output to console: "RuntimeError: Error deserializing object of type int". How do I get ptgaze working?

Best regards,

Tom Lever

ptgaze_error
hysts commented 4 years ago

Hi, @tslever

According to this stackoverflow article, the dlib's pretrained model doesn't seem to be downloaded and extracted properly. The code for downloading and extracting works on Mac and Linux, so I guess it's due to a difference of environment. I don't have a Windows environment, so I can't check it myself, but if you download the model from the URL in the article and put it in ~/.ptgaze/dlib/ (which I think is C:/Users/your_user_name/.ptgaze/dlib in case of Windows), i think it will work.

Hope it helps.

tslever commented 4 years ago

Thank you for your time and help. Your solution worked. While "C:\users\your_user_name.ptgaze\dlib" already had a version of "shape_predictor_68_face_landmarks.dat", it seems that this model file somehow was not completed or was corrupted during installation on my Windows-10 PC.

hysts commented 4 years ago

Glad to hear that. :)

a-fly-fly-bird commented 1 year ago

Hi, @tslever

According to this stackoverflow article, the dlib's pretrained model doesn't seem to be downloaded and extracted properly. The code for downloading and extracting works on Mac and Linux, so I guess it's due to a difference of environment. I don't have a Windows environment, so I can't check it myself, but if you download the model from the URL in the article and put it in ~/.ptgaze/dlib/ (which I think is C:/Users/your_user_name/.ptgaze/dlib in case of Windows), i think it will work.

Hope it helps.

Thanks. It helps me a lot.