hysts / pytorch_mpiigaze_demo

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

Code related problems help #21

Closed Xscaaaper closed 2 years ago

Xscaaaper commented 2 years ago

Hello, I am a python novice and am interested in eye tracking. After reading your program, I hope to run it and see the result, but I can't find the input video path. No error is reported but no result is displayed. I hope you could guide me, grateful!

hysts commented 2 years ago

Hi, @Xscaaaper

Sorry for the late reply.

I can't find the input video path.

I don't understand what you mean by this. You can run the program with the command like this:

ptgaze --mode eth-xgaze --video sample.mp4

What command did you run?

hysts commented 2 years ago

Oh, you asked the same question in https://github.com/hysts/pytorch_mpiigaze_demo/issues/20#issuecomment-1065094797 and joqueka kindly answered your question. Have it solved your problem?

Xscaaaper commented 2 years ago

@hysts The path of the input video is shown in the figure. There is no error when running the main function, but I can't see the running result. I don't know where the problem is. I hope you can give me some guidance, thank you! 7a88f39275ca28564dbdd6c18df61c9

hysts commented 2 years ago

@Xscaaaper

Oh, it seems you are using a very old version of this repo. I suggest you use the latest version.

Anyway, it seems you are directly modifying the default config file, but it's not supposed to do so. (In general, modifying the code requires deep understanding of it.) Specifying both config.demo.image_path and config.demo_video_path will lead to unexpected behavior. It's checked in main.py, but only when a config file is given from command line, not when you directly modify the default config.

In your case, try setting config.demo.use_camera = False and config.demo.image_path = ''. As I don't know which version of this repo you are using, I didn't check it myself, but I guess it would work.