davisking / dlib

A toolkit for making real world machine learning and data analysis applications in C++
http://dlib.net
Boost Software License 1.0
13.5k stars 3.37k forks source link

Dlib GPU support for Python #2322

Closed RarDay closed 3 years ago

RarDay commented 3 years ago

Hi everyone, how can I run face recognition with dlib and face_recognition on the GPU? My devices don't support CUDA

I have two computers: 1) Windows with Intel Graphics 2) ALT Linux with Ryzen Vega

And PyCharm with Python 3.7, dlib version 19.21.0 Does Dlib support OpenCL?

davisking commented 3 years ago

No, only CUDA is supported.

On Tue, Mar 9, 2021 at 6:33 AM Leonid notifications@github.com wrote:

Hi everyone, how can I run face recognition with dlib and face_recognition on the GPU? My devices don't support CUDA

I have two computers:

  1. Windows with Intel Graphics
  2. ALT Linux with Ryzen Vega

And PyCharm with Python 3.7, dlib version 19.21.0 Does Dlib support OpenCL?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/davisking/dlib/issues/2322, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABPYFR5Q3XP7FHE5RDOBAV3TCYBQ5ANCNFSM4Y3MTMYA .

RarDay commented 3 years ago

@davisking Can you tell me what I can use to run face recognition in python on the GPU (without CUDA) Do I understand correctly that of the open source facial recognition software, dlib is in the first place? It seems that PyTorch, Keras and TensorFlow have OpenCL support, how much worse are they than dlib?

(I am considering options with ready-made solutions, without training datasets, and if there is nothing interesting anymore, I will use dlib with CUDA)

Thank you so much for any advice!

SheldonPatnett commented 3 years ago

Typically OpenCL implementations are considerably slower than cuDNN. While Dlib doesn't support OpenCL, if your system doesn't have Cuda/Cudnn it should fallback to building with only CPU support. The Python library you mentioned 'face_recognition' should work with Dlib without GPU support.