OpenCV DNN issues in Android device (cv::gemm() bottleneck).
As of now I've successfully included the DNN module (dnn_modern
) from opencv-contrib
into my current OpenCV 3.3.0 build for Android ARM, and am intending to use the Gil-Levi Caffe model for gender and age detection. The problem is that when I use it on a face submat, the whole app slows down to around 0.37 FPS.
I've heard from other questions that cv::gemm()
is the prime bottleneck of the current DNN implementation, and that replacing said function with the one from MKL or OpenBLAS can solve it. The problem is that I'm building for Android devices, so should I include it in my CMake toolchain somehow, or should I just modify the source (and how do I modify it)?
EDIT: And while we're at it, what other optimizations can I make?
@Gensoukyou1337, dnn_modern module is just a wrapper of tiny-dnn framework. Does it use
cv::gemm
?I just realized it doesn't.