From 996a5deb983b20d5efde018545b158080dee2a56 Mon Sep 17 00:00:00 2001 From: gordinmitya Date: Thu, 15 Oct 2020 17:03:26 +0300 Subject: [PATCH] use small libonnxruntime --- README.md | 2 +- onnxruntime/README.md | 22 +++++++++++++++++++ .../main/jniLibs/arm64-v8a/libonnxruntime.so | 4 ++-- .../jniLibs/armeabi-v7a/libonnxruntime.so | 4 ++-- 4 files changed, 27 insertions(+), 5 deletions(-) create mode 100644 onnxruntime/README.md diff --git a/README.md b/README.md index 94bbe72..59d8030 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ Frameworks: - [x] TFMobile Google [ver. 1.13.1](https://mvnrepository.com/artifact/org.tensorflow/tensorflow-android) - [x] Pytorch Facebook [ver. 1.5.0](https://github.com/pytorch/pytorch/tree/master/android) - [x] OpenCV DNN [ver. 4.4.0](https://github.com/opencv/opencv/releases/) -- [x] onnxruntime Microsoft [ver. 1.4.0](https://github.com/microsoft/onnxruntime/releases/) +- [x] onnxruntime Microsoft [ver. 1.4.0](https://github.com/microsoft/onnxruntime/releases/) [how to build](onnxruntime/README.md) - [?] Mace by Xiaomi - [ ] Tengine Lite OPEN AI LAB - [ ] TNN Tencent diff --git a/onnxruntime/README.md b/onnxruntime/README.md new file mode 100644 index 0000000..019c2b6 --- /dev/null +++ b/onnxruntime/README.md @@ -0,0 +1,22 @@ +https://github.com/microsoft/onnxruntime.git + +```bash +./build.sh --android \ + --android_sdk_path $ANDROID_SDK \ + --android_ndk_path $ANDROID_NDK \ + --android_api 27 \ + --use_nnapi \ + --config MinSizeRel \ + --build_shared_lib \ + --parallel \ + --android_abi armeabi-v7a +``` +Pick up `build/Android/MinSizeRel/libonnxruntime.so`. + +The same for `--android_abi arm64-v8a`. + +https://github.com/microsoft/onnxruntime/blob/master/BUILD.md#android-build-instructions + +https://github.com/microsoft/onnxruntime/blob/master/docs/ONNX_Runtime_for_Mobile_Platforms.md + +Many thanks to Rohithkvsp for his repo https://github.com/Rohithkvsp/OnnxRuntimeAndorid \ No newline at end of file diff --git a/onnxruntime/src/main/jniLibs/arm64-v8a/libonnxruntime.so b/onnxruntime/src/main/jniLibs/arm64-v8a/libonnxruntime.so index 3e65424..9907b65 100755 --- a/onnxruntime/src/main/jniLibs/arm64-v8a/libonnxruntime.so +++ b/onnxruntime/src/main/jniLibs/arm64-v8a/libonnxruntime.so @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e080fff12db8960ebc4f44682f053bb94c72033c64abd1c4a075d660b3bbe15f -size 61031768 +oid sha256:0b28c1fe12f6a8860744f5d022cf51f9d65fe1b98f966769438bef13037b60cc +size 8028632 diff --git a/onnxruntime/src/main/jniLibs/armeabi-v7a/libonnxruntime.so b/onnxruntime/src/main/jniLibs/armeabi-v7a/libonnxruntime.so index dc66f25..93fce26 100755 --- a/onnxruntime/src/main/jniLibs/armeabi-v7a/libonnxruntime.so +++ b/onnxruntime/src/main/jniLibs/armeabi-v7a/libonnxruntime.so @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c5c8f3f84f319991c9440ba4e2dc85bee6e5ea145de7fa16c1ff5f87e1bde7b7 -size 45001892 +oid sha256:fd4de442b5ed297aa5bf0778770219064b81ffb327ac4bdbad16dc38cb026a5a +size 5302532