Skip to content
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

Merged
merged 20 commits into from
Sep 28, 2022

Conversation

IRONICBo
Copy link
Contributor

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.

@IRONICBo IRONICBo marked this pull request as draft June 26, 2022 13:37
@IRONICBo
Copy link
Contributor Author

Running result.

openvino_demo (3)

@allnes
Copy link
Contributor

allnes commented Jul 16, 2022

@IRONICBo hello.
If you use arm plugin as base plugin in your example. Please move the example to arm plugin directory.

@IRONICBo
Copy link
Contributor Author

@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. :)

@likholat
Copy link
Contributor

@IRONICBo please upgrade source code and dependencies to OpenVINO 2022.1 and use OpenVINO Java API 2.0

@allnes
Copy link
Contributor

allnes commented Aug 23, 2022

Please find demo for java api 2.0 this

@IRONICBo
Copy link
Contributor Author

OK,I will do that :)

@IRONICBo
Copy link
Contributor Author

IRONICBo commented Sep 6, 2022

New result.
image

@IRONICBo
Copy link
Contributor Author

IRONICBo commented Sep 6, 2022

Refer to #420 and #422, API update process is still in progress.

@IRONICBo IRONICBo marked this pull request as ready for review September 6, 2022 15:48
@IRONICBo IRONICBo requested a review from a team as a code owner September 6, 2022 15:48
| --- | --- | --- |
| ssdlite_mobilenet_v2 | 120ms | 120ms |
| efficientdet-d0-tf | 800ms | 800ms |
| pelee-coco | 220ms | X |
Copy link
Contributor

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.

Copy link
Contributor Author

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
Copy link
Contributor

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.

Copy link
Contributor Author

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"`
Copy link
Contributor

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.

Copy link
Contributor Author

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 |
Copy link
Contributor

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.

Copy link
Contributor Author

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.

@IRONICBo
Copy link
Contributor Author

IRONICBo commented Sep 8, 2022

Update to Java API 2.0

image

@allnes
Copy link
Contributor

allnes commented Sep 8, 2022

Update to Java API 2.0

image

Could you share demo's video :)

@IRONICBo
Copy link
Contributor Author

IRONICBo commented Sep 8, 2022

Update to Java API 2.0
image

Could you share demo's video :)

OK, I have upload a GIF.
result3

2022-9-14

@IRONICBo IRONICBo changed the title [java_api] Android demo application for ARM CPUs [ARM plugin] Android demo application for ARM CPUs Sep 10, 2022
@IRONICBo
Copy link
Contributor Author

IRONICBo commented Sep 10, 2022

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

@dkurt
Copy link
Contributor

dkurt commented Sep 13, 2022

@IRONICBo, please edit PR title to something like "[ARM plugin] GSoC 2022: Android demo application for ARM CPUs".

@IRONICBo IRONICBo changed the title [ARM plugin] Android demo application for ARM CPUs [ARM plugin] GSoC 2022: Android demo application for ARM CPUs Sep 13, 2022
@IRONICBo
Copy link
Contributor Author

@IRONICBo, please edit PR title to something like "[ARM plugin] GSoC 2022: Android demo application for ARM CPUs".

OK, got it! :)

@dkurt
Copy link
Contributor

dkurt commented Sep 14, 2022

Please fix code style warning: https://github.com/openvinotoolkit/openvino_contrib/actions/runs/3037037332 (download patch from artifacts section)

@IRONICBo
Copy link
Contributor Author

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.

@IRONICBo
Copy link
Contributor Author

IRONICBo commented Sep 14, 2022

Thanks, now that the code style check has been passed. :)

image

@dkurt
Copy link
Contributor

dkurt commented Sep 14, 2022

@alvoron, @ilya-lavrenov, please prioritize this PR as this is a part of student's Google Summer Of Code challenge.

@IRONICBo
Copy link
Contributor Author

Thanks! :)

@ilya-lavrenov
Copy link
Contributor

may I know what is ARM specific in this demo?
Why is it not a Java API demo?

@IRONICBo
Copy link
Contributor Author

IRONICBo commented Sep 16, 2022

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 #382 (comment) and Adrian

@IRONICBo
Copy link
Contributor Author

blog link: https://medium.com/openvino-toolkit/object-detection-demo-on-coco-dataset-using-openvino-toolkit-java-api-2-0-with-arm-plugin-28ce1f44bb80

@IRONICBo
Copy link
Contributor Author

Hello, I can not reach these links, what should I do to solve these checks?
image

@alvoron
Copy link
Contributor

alvoron commented Sep 28, 2022

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?

@IRONICBo
Copy link
Contributor Author

IRONICBo commented Sep 28, 2022

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?

Thanks! I've updated my branch.

@ilya-lavrenov ilya-lavrenov merged commit ce51398 into openvinotoolkit:master Sep 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants