How to run OpenCV DNN ON GPU ANDROID
Hello everybody, I recently tested my pre trained MobileNet on my android machine by using dnn module in c++. It seems my code is only computing on CPU. I used OPENCV ANDROID v.3.4.6 and 4 and I tried to set:
cv::ocl::setUseOpenCL(true);
cv::setNumThreads(2);
net.setPreferableBackend(DNN_TARGET_OPENCL);
net.setPreferableTarget(DNN_TARGET_OPENCL);
setUseOptimized(true);
but seems that the app run on the CPU with only 3,92 FPS @1024x768 My GPU is a ARM Mali-G71 MP2.
OpenCV is not the best way to run a DNN on a Android GPU? Where I'm wrong ?
Thank you for your help. Francesco
No you are not wrong- Forget about OpenCV DNN on GPU(sad story - but i guess its a political thing as intel does not like nvidia).
Everyone knows it but no one is responding because they are unsure about the tech details on that. Just invest your time into running your model natively.
@holger Thank you for your reply.. !! I was hoping it would have been easier as in matlab, but I have to sweat.