pydsgz / DeepVOG

Pupil segmentation and gaze estimation using fully convolutional neural networks
GNU General Public License v3.0
153 stars 68 forks source link

Does it run on systems without GPUs ? #5

Open kaushil24 opened 5 years ago

mangotee commented 5 years ago

Hi, Yes it does run on systems without GPUs, you just need to install the cpu version of tensorflow. Please note however that it will run inference considerably slower than with the GPU version (at least by a factor of 10, probably more on the order of 50-100x, depending on your system).

kaushil24 commented 5 years ago

Are there any changes I need to make for running my model on CPUs only ? Because I am getting an error while calling the inferer.process("demo\\demo.mp4", mode="Fit") (as shown in the Usage, as a python module) section of the reamme. The error is as follows: Traceback (most recent call last): File "<input>", line 1, in <module> File "C:\Users\ADMIN\PycharmProjects\GazeEstimator\deepvog\inferer.py", line 83, in process video_name_root, ext, vreader, vid_shapes, shape_correct, image_scaling_factor = self._get_video_info(video_src) File "C:\Users\ADMIN\PycharmProjects\GazeEstimator\deepvog\inferer.py", line 303, in _get_video_info vreader = skv.FFmpegReader(video_src) File "C:\Users\ADMIN\PycharmProjects\GazeEstimator\venv\lib\site-packages\skvideo\io\ffmpeg.py", line 43, in __init__ assert _HAS_FFMPEG, "Cannot find installation of real FFmpeg (which comes with ffprobe)." AssertionError: Cannot find installation of real FFmpeg (which comes with ffprobe).

Does it have something to do with GPUs or am I missing out some step ?

mangotee commented 5 years ago

Thx for sending the error messages. It seems that your issue does not stem from the CPU vs GPU versions of tensorflow, but from a missing ffmpeg installation, which scikit-video depends on. Can you please try installing ffmpeg as follows: On Linux: sudo apt-get install ffmpeg On Windows: install ffmpeg for windows. You might have to add the folder with ffmpeg binaries to your $PATH directories. Can you please report whether this worked for you? In the meantime, I'm going to add this to the requirements list for DeepVOG.

kaushil24 commented 5 years ago

Hello ! Thank you for instant reply. After installing ffmpeg and setting the paths, it works well. However, is there any method, where I can directly use the pretrained weights and model ? I am a neophyte to this.

mangotee commented 5 years ago

Hi there, sorry for the late reply. Of course there's a way to directly use the pretrained weights and model, that's the purpose of this package. :) There's sample code in the README file, under Usage. You can replace the video filename to an (absolute/relative) path on your system and try to see the model's output. The Demo also uses the pre-trained model and weights. Feel free to modify that code as well... Please let us know if you have any further questions. If you have absolute difficulties in running this, you can also send us a download link to a video file from your dataset. We can run the inference for you and send you the result, for you to see whether the output makes sense for you & your team. Cheers and good luck!

mangotee commented 5 years ago

One more thing... in case you're interested in inference (i.e. pupil segmentation) on single images, there is sample code for that as well. A full example can be found here.