When setting up the backend I use self.net.setPreferableBackend(cv2.dnn.DNN_BACKEND_CUDA) and self.net.setPreferableTarget(cv2.dnn.DNN_TARGET_CUDA_FP16)
self.net.setPreferableBackend(cv2.dnn.DNN_BACKEND_CUDA)
self.net.setPreferableTarget(cv2.dnn.DNN_TARGET_CUDA_FP16)