I am trying to use GPU for @ageitgey face recognition api
I installed and compiled dlib successfully during installation of dlib I got
Found CUDA: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v10.1 (found suitable version "10.1", minimum required is "7.5")
-- Looking for cuDNN install...
-- Found cuDNN: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v10.1/lib/x64/cudnn.lib
-- Building a CUDA test project to see if your compiler is compatible with CUDA...
-- Checking if you have the right version of cuDNN installed.
-- Enabling CUDA support for dlib. DLIB WILL USE CUDA
-- C++11 activated.
-- Configuring done
-- Generating done
BUT now when I am running
import dlib
print(dlib.DLIB_USE_CUDA)
in SPYDER I am getting FALSE
please help
I expected (dlib.DLIB_USE_CUDA) to return TRUE
I expected CNN face detector model to run on GPU
dlib.DLIB_USE_CUDA is returning false
CNN based face detector is taking whole CPU and RAM
I also checked gpu usage by using nvidia-smi but it was not showing any usage
cuda.get_num_devices() returns 1
install dlib https://github.com/davisking/dlib
install cuda toolkit and other dependecies
Run this
https://github.com/davisking/dlib
dlib version dlib==19.18.99
dlib: https://github.com/davisking/dlib
I am working on Windows 10 64 bit
I am using SPYDER
so hard to install dlib....
dlib.DLIB_USE_CUDA is a compile time constant. Therefore, if you install dlib and it says Enabling CUDA support for dlib. DLIB WILL USE CUDA during install, but dlib.DLIB_USE_CUDA is False then this absolutely, 100% guaranteed, means you have installed two separate copies of dlib. One built to use cuda and another not.
This isn't because dlib is hard to install. There is nothing I could possibly do to stop you from installing multiple copies of dlib and configuring them differently.
Maybe I need to emphasize that what is happening here is _you have two copies of dlib installed in different python environments_ and you are getting confused about what python environment you are running your stuff in.
I got your point @davisking Thnx for helping
I wanted to ask that can we run dlibs hog face detectort on multiple cpu cores?
If yes can you please tell me how
Warning: this issue has been inactive for 35 days and will be automatically closed on 2019-11-28 if there is no further activity.
If you are waiting for a response but haven't received one it's possible your question is somehow inappropriate. E.g. it is off topic, you didn't follow the issue submission instructions, or your question is easily answerable by reading the FAQ, dlib's official compilation instructions, dlib's API documentation, or a Google search.
Warning: this issue has been inactive for 42 days and will be automatically closed on 2019-11-28 if there is no further activity.
If you are waiting for a response but haven't received one it's possible your question is somehow inappropriate. E.g. it is off topic, you didn't follow the issue submission instructions, or your question is easily answerable by reading the FAQ, dlib's official compilation instructions, dlib's API documentation, or a Google search.
Notice: this issue has been closed because it has been inactive for 45 days. You may reopen this issue if it has been closed in error.
import dlib.cuda as cuda
print(cuda.get_num_devices());
...
1
print(cuda.get_device());
0
dlib.DLIB_USE_CUDA
False
still no wits shows that dlib.DLIB_USE_CUDA as False
Can any one tell me how to over come this ?