swook / GazeML

Gaze Estimation using Deep Learning, a Tensorflow-based framework.
MIT License
512 stars 141 forks source link

Stuck with --from_video option #79

Open elvis-kture opened 3 years ago

elvis-kture commented 3 years ago

I am trying to use this script with --from_video option and my video, but script stucks after "Video [MY_VIDEO_URL] closed."

Does anyone have the same? Where a problem could be? Thanks!

MellyGray commented 3 years ago

Hi!

I was having the same issue and for me it solved as follows.

I had a video 200x200 (widthxheight) at 1 fps and the program always stopped at "video closed" . Then I changed the video to 720x480 at 20 fps and now the elg_demo.py --from_video argument works. I hope it helps you. This is the VideoWriter object with the codec:

out = cv2.VideoWriter('webcam_video.avi', cv2.VideoWriter_fourcc(*'DIVX'), 20.0, (720, 480))

I think there migth be a problem with the video you are using, maybe the resolution or the fps.

elvis-kture commented 3 years ago

@MellyGray Great thanks! yes, it helps. But would be great to understand the root cause of that problem to have the ability to recognize any video with any fps and resolution.

keishatsai commented 2 years ago

you can address to this solution. convert to support format: I converted my mp4 to avi and it works. https://github.com/swook/GazeML/issues/34#issuecomment-516671511