问题解决:consider to specify kernel configuration cache directory through OPENCV_OCL4DNN_CONFIG_PATH par

在使用Openpose代码运行的时候,提示:consider to specify kernel configuration cache directory through OPENCV_OCL4DNN_CONFIG_PATH parameter.
报错的样子
问题代码在于:

self.pose_net.setPreferableBackend(cv2.dnn.DNN_BACKEND_OPENCV)
self.pose_net.setPreferableTarget(cv2.dnn.DNN_TARGET_OPENCL)

把第二个DNN_TARGET_OPENCL的OPENCL改了。可以看到能够改的选项为:
亲测CPU没问题其他的试了好像都不行。
问题解决:consider to specify kernel configuration cache directory through OPENCV_OCL4DNN_CONFIG_PATH par_第1张图片

参考来源:评论里大神给出的解答

你可能感兴趣的:(opencv,计算机视觉,人工智能)