LibreFace icon indicating copy to clipboard operation
LibreFace copied to clipboard

The issue regarding device=cuda:0

Open Wh1t3zZwhite opened this issue 11 months ago • 2 comments

When attempting to call libreface.get_facial_attributes, I changed the device to "cuda:0", but the printed message still shows: INFO: Created TensorFlow Lite XNNPACK delegate for CPU. Furthermore, when checking the GPU usage, I found that the GPU was not being utilized. Does this mean the inference is entirely running on the CPU, and the change to the device setting is not taking effect? Thank you very much for your work!

Wh1t3zZwhite avatar Jan 29 '25 17:01 Wh1t3zZwhite

Hi, I have actually the same question. It seems weird as it is very long to execute (like 4 times the duration of my video, which is far away from being real-time...). However, I can see it is getting in memory of the GPU.
Thanks in advance for the help!

valbarriere avatar Feb 13 '25 01:02 valbarriere

@Wh1t3zZwhite , @valbarriere I think the issue is that mediapipe is using CPU and causing the inference to slow down. I suggest changing mediapipe versions to see if it helps.

Also, we have a new release for libreface. It uses python3.9 and a more updated version of mediapipe. Please refer to updated README here for instructions to download -> https://github.com/ihp-lab/LibreFace#getting-started-with-python-installation

Let us know if the issue is resolved.

ac-alpha avatar Apr 03 '25 19:04 ac-alpha