-
Notifications
You must be signed in to change notification settings - Fork 144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ARM plugin] GSoC 2022: Android demo application for ARM CPUs #382
Conversation
@IRONICBo hello. |
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 :) |
| --- | --- | --- | | ||
| ssdlite_mobilenet_v2 | 120ms | 120ms | | ||
| efficientdet-d0-tf | 800ms | 800ms | | ||
| pelee-coco | 220ms | X | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no difference between FP16 and FP32 for CPU - the plugin will convert it automatically to FP32. So no need for two columns.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I will modify it.
cd "$WORK_DIR/open_model_zoo/tools/downloader" | ||
python3 -m pip install -r requirements.in | ||
omz_downloader --name ssdlite_mobilenet_v2 --output_dir $WORK_DIR/open_model_zoo/tools/downloader | ||
omz_converter --name ssdlite_mobilenet_v2 --download_dir $WORK_DIR/open_model_zoo/tools/downloader --precision FP32 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I recommend download only FP16 model because it's just smaller but gives same accuracy and performance.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I have replace FP16 to FP32.
1. Clone `"$WORK_DIR/openvino/bin/aarch64/Release/lib/inference_engine_java_api.jar"` to `app/libs` folder. | ||
2. Clone `"$WORK_DIR/openvino/bin/aarch64/Release/lib/*.so"` and `"$WORK_DIR/android-ndk-r20/sources/cxx-stl/llvm-libc++/libs/arm64-v8a/libc++_shared.so"` to `"app/src/main/jniLibs/arm64-v8a"` | ||
3. Clone `"$WORK_DIR/openvino/bin/aarch64/Release/lib/plugins.xml"` to `"app/src/main/assets"` | ||
4. Download and convert model "ssdlite_mobilenet_v2" [or pelee-coco, efficientdet-d0-tf] with Open Model Zoo in following steps and copy `"$WORK_DIR/open_model_zoo/tools/downloader/intel/ssdlite_mobilenet_v2/FP32/ssdlite_mobilenet_v2.xml"`, `"$WORK_DIR/open_model_zoo/tools/downloader/intel/ssdlite_mobilenet_v2/FP32/ssdlite_mobilenet_v2.bin"` to `"app/src/main/assets"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Model downloading step is required before.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I will adjust order.
| --- | --- | --- | | ||
| ssdlite_mobilenet_v2 | 120ms | 120ms | | ||
| efficientdet-d0-tf | 800ms | 800ms | | ||
| pelee-coco | 220ms | X | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any performance benchmark is a quite sensitive point. It requires an info about hardware/software setup at least. So we recommend not to provide the numbers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I will remove it.
...gin/demos/coco_detection_android_demo/app/src/main/java/org/intel/openvino/MainActivity.java
Show resolved
Hide resolved
...gin/demos/coco_detection_android_demo/app/src/main/java/org/intel/openvino/MainActivity.java
Show resolved
Hide resolved
@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) |
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. |
...gin/demos/coco_detection_android_demo/app/src/main/java/org/intel/openvino/MainActivity.java
Outdated
Show resolved
Hide resolved
...gin/demos/coco_detection_android_demo/app/src/main/java/org/intel/openvino/MainActivity.java
Show resolved
Hide resolved
@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? |
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 #382 (comment) and Adrian |
Hi @IRONICBo I also see that your branch is out of date. Could you please update it and merge the latest changes from master? |
Thanks! I've updated my branch. |
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.