- Linux-like System.
- CMake 3.1+ installed.
- Use a C++11 compiler(C++11 is optional).
- For benchmark tests
- OpenCV:
sudo apt install libopencv-dev
- OpenCV:
$ mkdir build
$ cd build
$ cmake ..
$ make -j
$ make install DESTDIR={your destination}
Environment:
- WSL,Ubuntu18.04
- Bazel 3.3+
- Android JNI Library
- Local JDK 8+(just for using
javah
orjavac
to generate native headers)sudo apt install openjdk-8-jdk-headless
- Android sdkmanager (https://developer.android.com/studio#command-tools)
- config the environment of
sdkmanager
sdkmanager --sdk_root=$HOME/Android --list
sdkmanager --sdk_root=$HOME/Android 'build-tools;29.0.2'
sdkmanager --sdk_root=$HOME/Android 'platforms;android-28'
sdkmanager --sdk_root=$HOME/Android --install "ndk;18.1.5063045"
- config the environment of
- Local JDK 8+(just for using
Build:
$ bazel build --platforms=//platforms:p_android_aarch64 android:jni_lib_shared
$ mkdir build
$ cd build
$ cmake .. -DBUILD_BENCHMARKS=OFF -DCMAKE_TOOLCHAIN_FILE=../platforms/linux/mips32r2-linux-gnu.toolchain.cmake
$ make -j
$ make install DESTDIR={your destination}
$ cd build/bin/tests
$ cp ../../../conf/config.json .
$ cp ../../../resource/4.gray .
$ ./test_mnn_clazz 4.gray
$ cd build/bin/tests
$ cp ../../../conf/config.json .
$ ./test_mnn_clazz_benchmark {your_test_dataset}