Unable to get hardware acceleration for YuNet on Windows in Python-Opencv

Hello there ! :smiley:

I managed to achieve 16 FPS with the following settings:

self.detector = cv2.FaceDetectorYN.create(
    "data/face_detection_yunet_2023mar.onnx",
    "",
    (0, 0),
    backend_id=cv2.dnn.DNN_BACKEND_DEFAULT,
    target_id=cv2.dnn.DNN_TARGET_OPENCL,
)

Using OpenCL has the default target sounds to work well, I do see now that most of the processing is done by the GPU.

I don’t know if we could improve this even more.

All of this is running on the laptop using a 11th Intel i7-11850H and a discrete GPU. So I don’t know if we could expect more from this :slight_smile:

Still doing some investigation.

Regards,

1 Like