mnn_example icon indicating copy to clipboard operation
mnn_example copied to clipboard

How to run on Rockchip RK3399?

Open sangdv opened this issue 4 years ago • 9 comments

Hi, have you tried it on RK3399? Does libMNN with OpenCL work on RK3399? I did not successfully run it on RK3399. Besides, will you release other face recognition model on MNN? For example, arcface (insightface) with resnet50 or resnet101 backbone?

sangdv avatar May 02 '20 17:05 sangdv

No RK3399 avaliable, I think you need change the mnn lib compiled on RK 3399

MirrorYuChen avatar May 05 '20 13:05 MirrorYuChen

Thank you, will you release other face recognition model on MNN? For example, arcface (insightface) with resnet50 or resnet101 backbone?

sangdv avatar May 06 '20 08:05 sangdv

yes, but not now, I will provide later when I am free.

MirrorYuChen avatar May 06 '20 09:05 MirrorYuChen

here are the solutions for RK3399 ubuntu: https://github.com/alibaba/MNN/issues/426#issuecomment-569717671 Tips:

  • main.cpp add header: #include<dlfcn.h>

int main():

auto handle = dlopen("libMNN_CL.so", RTLD_NOW);

  • CMakeLists.txt: target_link_libraries(MNN pthread ${CMAKE_DL_LIBS}) 我在RK3399 Ubuntu 18上面成功了

xuguozhi avatar May 07 '20 05:05 xuguozhi

First, you should build the right MNN lib version for your 3399(Ubuntu or Android)

xuguozhi avatar May 07 '20 05:05 xuguozhi

Hi @xuguozhi, do you have any link to guide how to build right MNN lib version on RK3399? When building libMNN_CL.so, first I cloned MNN from https://github.com/alibaba/MNN, set OpenCL flag to ON, and then tried to build the lib but got some errors at the end like this: undefined reference to `dlopen'. Should I modify something in MNN source code? Besides, I have a Android RK3399 but with other board, not that Firefly. Do you have any introduction to flash Ubuntu 18 to eMMC? Thank you!

sangdv avatar May 07 '20 07:05 sangdv

if you use Android, please follow this link to build from source: https://www.yuque.com/mnn/en/build_android or you can just apply the prebuilt lib: https://github.com/alibaba/MNN/releases/download/0.2.1.9/MNN-Android-0.2.1.9.zip version 0.2.1.9 works fine

xuguozhi avatar May 07 '20 07:05 xuguozhi

Hi @xuguozhi, actually i built libMNN_CL.so on a ubuntu 18 virtual machine. Did you get the errors **undefined reference to dlopen', dlclose'... ** when building libmnn_CL.so?

sangdv avatar May 07 '20 08:05 sangdv

Hi @xuguozhi, actually i built libMNN_CL.so on a ubuntu 18 virtual machine. Did you get the errors **undefined reference to dlopen', dlclose'... ** when building libmnn_CL.so?

Not get. I git cloned the source code on RK3399 board and build MNN on it

xuguozhi avatar May 07 '20 08:05 xuguozhi