ageitgey / ageitgey/face_recognition
receiving error with face_encoding of face_recognition library after cuda setup
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 56.8k
- Forks
- 13.7k
- PR merge metrics
- No merged PRs in 30d
Description
- face_recognition version: 1.2.3
- Python version: 3.6.5
- Operating System: windows 10
What I Did
I have just setup my CUDA with dlib and after that I am receiving this error when running the encoding of face using face_recognition library
face_encodings = face_recognition.face_encodings(frame, face_locations, num_jitters=1)
File "C:\Users\abhinav.jhanwar\AppData\Local\Continuum\anaconda3\lib\site-packages\face_recognition\api.py", line 210, in face_encodings
:return: A list of 128-dimensional face encodings (one for each face in the image)
File "C:\Users\abhinav.jhanwar\AppData\Local\Continuum\anaconda3\lib\site-packages\face_recognition\api.py", line 210, in <listcomp>
:return: A list of 128-dimensional face encodings (one for each face in the image)
RuntimeError: Error while calling cudnnCreate(&handles[new_device_id]) in file C:\dlib-master\dlib-master\dlib\cuda\cudnn_dlibapi.cpp:104. code: 1, reason: CUDA Runtime API initialization failed.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the face_recognition.face_encodings call with the reported Python, Windows, CUDA, and dlib setup. Inspect face_recognition/api.py around line 210 and dlib/cuda/cudnn_dlibapi.cpp around line 104, then determine whether the CUDA initialization failure is actionable in this repository and what evidence would confirm resolution.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- computer-vision
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100