Quantcast
Channel: OpenCV Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 1117

How to run OpenCV DNN ON GPU ANDROID

$
0
0
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 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. Perhaps Opencv Android 3.4.6 hasn't OPENCL enabled? I've read that, in some cases, I have to rebuild OPENCV with -DWITH-OPENCL = YES option is this the case? I so set my image in a UMat variable, but nothing changes. Where I'm wrong ? Thank you for your help. F.

Viewing all articles
Browse latest Browse all 1117

Trending Articles