ageitgey / face_recognition

The world's simplest facial recognition api for Python and the command line
MIT License
53.36k stars 13.48k forks source link

CUDNN_STATUS_NOT_SUPPORTED #1410

Open Primadual opened 2 years ago

Primadual commented 2 years ago

Installed the face_recognition library through pip on windows 10. same with dlib. when I try to run a simple code I get error that

CUDNN_STATUS_NOT_SUPPORTED

Here is code:

imagePath = '202124219280011710.jpg'
image = cv2.imread(imagePath)
rgb = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)
# detect the (x, y)-coordinates of the bounding boxes
# corresponding to each face in the input image
boxes = face_recognition.face_locations(rgb, model='hog')
# compute the facial embedding for the face
encodings = face_recognition.face_encodings(rgb, boxes)
print(encodings)

and here is the error:

File "encode_mine.py", line 49, in encodings = face_recognition.face_encodings(rgb, boxes) File "C:\Users\ll\AppData\Local\Programs\Python\Python37\lib\site-packages\face_recognition\api.py", line 214, in face_encodings return [np.array(face_encoder.compute_face_descriptor(face_image, raw_landmark_set, num_jitters)) for raw_landmark_set in raw_landmarks] File "C:\Users\ll\AppData\Local\Programs\Python\Python37\lib\site-packages\face_recognition\api.py", line 214, in return [np.array(face_encoder.compute_face_descriptor(face_image, raw_landmark_set, num_jitters)) for raw_landmark_set in raw_landmarks] RuntimeError: Error while calling cudnnConvolutionBiasActivationForward( context(), &alpha1, descriptor(data), data.device(), (const cudnnFilterDescriptor_t)filter_handle, filters.device(), (const cudnnConvolutionDescriptor_t)conv_handle, (cudnnConvolutionFwdAlgo_t)forward_algo, forward_workspace, forward_workspace_size_in_bytes, &alpha2, out_desc, out, descriptor(biases), biases.device(), identity_activation_descriptor(), out_desc, out) in file C:\Users\ll\AppData\Local\Temp\pip-install-cugv8vv1\dlib_088f043d66e24602bdb93ef1756ae92e\dlib\cuda\cudnn_dlibapi.cpp:1219. code: 9, reason: CUDNN_STATUS_NOT_SUPPORTED

Describe what you were trying to get done. Tell us what happened, what went wrong, and what you expected to happen. IMPORTANT: If your issue is related to a specific picture, include it so others can reproduce the issue.

What I Did

Paste the command(s) you ran and the output.
If there was a crash, please include the traceback here.
SamuelAjayiBG commented 2 years ago

Hello, @Primadual I am experiencing the same issue, have you found a solution yet? I'd really appreciate your feedback.

Karshiev commented 2 years ago

Hello, @SamuelAjayiBG, @Primadual I am facing this problem, did you find a solution?

j22054022 commented 2 years ago

Hello, @Primadual @SamuelAjayiBG @Karshiev I'm facing the same issue, did you find a solution? thanks

Es-Kiani commented 2 years ago

Hello, @Primadual @SamuelAjayiBG @Karshiev @j22054022 I'm facing the same issue when I use cnn mode, did you find a solution? thanks

Es-Kiani commented 2 years ago

I found this: Link

Is it helpful?

licksylick commented 1 year ago

You should downgrade dlib: pip uninstall dlib pip install dlib==19.22.1