[java_api] Android demo application for ARM CPUs
This is the Android demo application using arm_plugin to reach inference engine.
Using object detection model and recognition model to locate and recognize attributes of detected vehicles.
Running result.

@IRONICBo hello. If you use arm plugin as base plugin in your example. Please move the example to arm plugin directory.
@IRONICBo hello. If you use arm plugin as base plugin in your example. Please move the example to arm plugin directory.
OK, I have changed them. :)
@IRONICBo please upgrade source code and dependencies to OpenVINO 2022.1 and use OpenVINO Java API 2.0
Please find demo for java api 2.0 this
OK,I will do that :)
New result.

Refer to https://github.com/openvinotoolkit/openvino_contrib/issues/420 and https://github.com/openvinotoolkit/openvino_contrib/pull/422, API update process is still in progress.
Update to Java API 2.0

Update to Java API 2.0
Could you share demo's video :)
Update to Java API 2.0
Could you share demo's video :)
OK, I have upload a GIF.


Hello, this check pipeline openvino_contrib-android-arm64 failed, the error message is not clear, how can I solve it?

Hello, this check pipeline openvino_contrib-android-arm64 failed, the error message is not clear, how can I solve it?
@IRONICBo, full error message below. I think it's unrelated to this PR.
FAILED: src/common/legacy/CMakeFiles/inference_engine_legacy_obj.dir/src/network_serializer_v7.cpp.o
/agent/_work/1/_w/android_tools/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ --target=aarch64-none-linux-android29 --gcc-toolchain=/agent/_work/1/_w/android_tools/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64 --sysroot=/agent/_work/1/_w/android_tools/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/sysroot -DIE_BUILD_POSTFIX=\"\" -DPROJECT_ROOT_DIR=\"/agent/_work/1/openvino/src\" -I/agent/_work/1/openvino/src/common/legacy/include -I/agent/_work/1/openvino/src/common/legacy/src -I/agent/_work/1/openvino/src/inference/src -I/agent/_work/1/openvino/src/common/transformations/include -I/agent/_work/1/openvino/src/core/dev_api -I/agent/_work/1/openvino/src/inference/dev_api -I/agent/_work/1/openvino/src/common/low_precision_transformations/include -I/agent/_work/1/openvino/src/common/preprocessing -I/agent/_work/1/openvino/src/core/include -I/agent/_work/1/openvino/src/frontends/common/include -I/agent/_work/1/openvino/src/inference/include -I/agent/_work/1/openvino/src/inference/include/ie -I/agent/_work/1/openvino/src/common/itt/include -I/agent/_work/1/openvino/src/common/util/include -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fsigned-char -ffunction-sections -fdata-sections -fdiagnostics-show-option -Wundef -Wreturn-type -Wunused-variable -Wuninitialized -Winit-self -Winconsistent-missing-override -Wstring-plus-int -O2 -DNDEBUG -Wformat -Wformat-security -D_FORTIFY_SOURCE=2 -fstack-protector-all -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -std=c++11 -MD -MT src/common/legacy/CMakeFiles/inference_engine_legacy_obj.dir/src/network_serializer_v7.cpp.o -MF src/common/legacy/CMakeFiles/inference_engine_legacy_obj.dir/src/network_serializer_v7.cpp.o.d -o src/common/legacy/CMakeFiles/inference_engine_legacy_obj.dir/src/network_serializer_v7.cpp.o -c /agent/_work/1/openvino/src/common/legacy/src/network_serializer_v7.cpp
In file included from /agent/_work/1/openvino/src/common/legacy/src/network_serializer_v7.cpp:17:
/agent/_work/1/openvino/src/inference/dev_api/xml_parse_utils.h:15:10: fatal error: 'pugixml.hpp' file not found
#include <pugixml.hpp>
^~~~~~~~~~~~~
Please remove .png file modules/arm_plugin/demos/coco_detection_android_demo/app/src/main/res/drawable/openvino_icon.png. It's better not to add binaries in source code.
Is modules/arm_plugin/demos/coco_detection_android_demo/gradle/wrapper/gradle-wrapper.jar a required file or can be generated by SDK?
Hello, this check pipeline openvino_contrib-android-arm64 failed, the error message is not clear, how can I solve it?
@IRONICBo, full error message below. I think it's unrelated to this PR.
FAILED: src/common/legacy/CMakeFiles/inference_engine_legacy_obj.dir/src/network_serializer_v7.cpp.o /agent/_work/1/_w/android_tools/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ --target=aarch64-none-linux-android29 --gcc-toolchain=/agent/_work/1/_w/android_tools/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64 --sysroot=/agent/_work/1/_w/android_tools/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/sysroot -DIE_BUILD_POSTFIX=\"\" -DPROJECT_ROOT_DIR=\"/agent/_work/1/openvino/src\" -I/agent/_work/1/openvino/src/common/legacy/include -I/agent/_work/1/openvino/src/common/legacy/src -I/agent/_work/1/openvino/src/inference/src -I/agent/_work/1/openvino/src/common/transformations/include -I/agent/_work/1/openvino/src/core/dev_api -I/agent/_work/1/openvino/src/inference/dev_api -I/agent/_work/1/openvino/src/common/low_precision_transformations/include -I/agent/_work/1/openvino/src/common/preprocessing -I/agent/_work/1/openvino/src/core/include -I/agent/_work/1/openvino/src/frontends/common/include -I/agent/_work/1/openvino/src/inference/include -I/agent/_work/1/openvino/src/inference/include/ie -I/agent/_work/1/openvino/src/common/itt/include -I/agent/_work/1/openvino/src/common/util/include -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fsigned-char -ffunction-sections -fdata-sections -fdiagnostics-show-option -Wundef -Wreturn-type -Wunused-variable -Wuninitialized -Winit-self -Winconsistent-missing-override -Wstring-plus-int -O2 -DNDEBUG -Wformat -Wformat-security -D_FORTIFY_SOURCE=2 -fstack-protector-all -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -std=c++11 -MD -MT src/common/legacy/CMakeFiles/inference_engine_legacy_obj.dir/src/network_serializer_v7.cpp.o -MF src/common/legacy/CMakeFiles/inference_engine_legacy_obj.dir/src/network_serializer_v7.cpp.o.d -o src/common/legacy/CMakeFiles/inference_engine_legacy_obj.dir/src/network_serializer_v7.cpp.o -c /agent/_work/1/openvino/src/common/legacy/src/network_serializer_v7.cpp In file included from /agent/_work/1/openvino/src/common/legacy/src/network_serializer_v7.cpp:17: /agent/_work/1/openvino/src/inference/dev_api/xml_parse_utils.h:15:10: fatal error: 'pugixml.hpp' file not found #include <pugixml.hpp> ^~~~~~~~~~~~~
OK, thanks :)
Please remove
.pngfilemodules/arm_plugin/demos/coco_detection_android_demo/app/src/main/res/drawable/openvino_icon.png. It's better not to add binaries in source code.
OK, I have done it. :)
Is
modules/arm_plugin/demos/coco_detection_android_demo/gradle/wrapper/gradle-wrapper.jara required file or can be generated by SDK?
These gradle configuration files are used to unify the configuration of gradle. Removing the .jar file will prevent the execution of the gradle-wrapper command. But I removed the configuration about gradle-wrapper in the new commit, these can be generated by the IDE, only the environment needs to be configured with gradle.
@IRONICBo, please edit PR title to something like "[ARM plugin] GSoC 2022: Android demo application for ARM CPUs".
@IRONICBo, please edit PR title to something like "[ARM plugin] GSoC 2022: Android demo application for ARM CPUs".
OK, got it! :)
Please fix code style warning: https://github.com/openvinotoolkit/openvino_contrib/actions/runs/3037037332 (download patch from artifacts section)
Please fix code style warning: https://github.com/openvinotoolkit/openvino_contrib/actions/runs/3037037332 (download patch from artifacts section)
Ok, I didn't find a log from the previous code style check that solves this problem. I've done the changes in the new commit.
Thanks, now that the code style check has been passed. :)
@alvoron, @ilya-lavrenov, please prioritize this PR as this is a part of student's Google Summer Of Code challenge.
Thanks! :)
may I know what is ARM specific in this demo? Why is it not a Java API demo?
may I know what is ARM specific in this demo? Why is it not a Java API demo?
This is an demo of running OpenVINO API 2.0 with ARM plugin on ARM CPUs Android(arm64-v8a). On Android, I need to use Java API 2.0 wrappers to get the inference engine.
And the suggestions are from allnes https://github.com/openvinotoolkit/openvino_contrib/pull/382#issuecomment-1186250920 and Adrian
blog link: https://medium.com/openvino-toolkit/object-detection-demo-on-coco-dataset-using-openvino-toolkit-java-api-2-0-with-arm-plugin-28ce1f44bb80
Hello, I can not reach these links, what should I do to solve these checks?

Hi @IRONICBo
The pre-commit check build_ubuntu20_release has been failed because of internal infrastructure issue.
I've already contacted with dev team, they will fix the issue shortly and restart the check.
I also see that your branch is out of date. Could you please update it and merge the latest changes from master?