Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

cv2.dnn.setPreferableBackend(cv2.dnn.DNN_BACKEND_CUDA)

cv2.dnn.setPreferableTarget(cv2.dnn.DNN_TARGET_CUDA)

You can also use cv2.dnn.DNN_TARGET_CUDA_FP16 if your device supports it.