I am new to using OpenCV. I have a python script that uses the DNN to do some video processing and it does not use the GPU when running.
I am using an M1 MacBook, which supports OpenCL.
I added these lines into my code:
net.setPreferableBackend(cv.dnn.DNN_BACKEND_OPENCV)
net.setPreferableTarget(cv.dnn.DNN_TARGET_OPENCL)
But it still does not use the GPU.
How can I use GPU acceleration?
Environment:
OpenCV 4.5.2-pre built for arm with WITH_OPENCL=ON
Running using python 3.8 on conda