antoinelame / GazeTracking

👀 Eye Tracking library easily implementable to your projects
MIT License
1.85k stars 505 forks source link

Running on gpu #78

Open gd1925 opened 1 year ago

gd1925 commented 1 year ago

Hi, Thank you for the awesome work! It is very helpful! Is it possible to run the code on GPU? I am running it on Ubuntu 18.04 and when I try to run, it does not run on gpu devices and runs on cpu. Is there any way to enforce the condition to run the example.py on gpu? I also tried to run export CUDA_VISIBLE_DEVICES=0, but it still seems to be running on cpu. Many thanks!

Cuda-Chen commented 1 year ago

To my knowledge, it runs on CPU only no matter what.

gd1925 commented 1 year ago

Hi @Cuda-Chen, do you think trying to run the dlib library on gpu can help?

Cuda-Chen commented 1 year ago

@gd1925 It is possible to let dlib and OpenCV function run on GPU. However, the bus to GPU will be the bottleneck. Unless you have a particular reason to run on GPU (e.g., given a 4K resolution image and find the face), running on GPU will not be an idea.