Sign language recognition on Android with Intel OpenVINO Java bindings |
您所在的位置:网站首页 › openvino安卓端 › Sign language recognition on Android with Intel OpenVINO Java bindings |
Sign language recognition on Android with Intel OpenVINO![]() Anna Likholat ·Follow 4 min read·Dec 2, 2020-- This article explains how to create a sign language recognition application on Android x86 OS (64-bit) with Intel OpenVINO. We used the core component of OpenVINO — Inference Engine, which manages the loading and compiling of the optimized neural network model, runs inference operations on input data, and outputs the results. There are multiple Android OS distributions which may run on Intel Architecture. Some of them are: Intel CeladonAndroid x86The application reads a video from the camera, collects every 16 frames in a sequence, uses a neural network to recognize a sign word and displays a text with the recognized word on image. Build OpenVINO Java bindings for Android:These steps were done on Ubuntu 18.04, but in the general case, they can be done on other operating systems, without fundamental differences. Download and unpack Android NDK to ~/Downloads folder.Install OpenJDK 8:sudo apt-get install -y openjdk-8-jdkExport OpenJDK 8 path:export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64Clone OpenVINO repositories to your computer. Let’s assume that ~/Downloads is used as a working folder:cd ~/Downloadsgit clone https://github.com/openvinotoolkit/openvino.gitgit clone https://github.com/openvinotoolkit/openvino_contrib.gitUpdate openvino submodules and create build directory:cd openvinogit submodule update --init --recursivemkdir build && cd buildBuild OpenVINO for Android:cmake \ -DANDROID_ABI=x86_64 \ -DANDROID_PLATFORM=21 \ -DANDROID_STL=c++_shared \ -DENABLE_VPU=OFF \ -DENABLE_GNA=OFF \ -DENABLE_CLDNN=OFF \ -DENABLE_OPENCV=OFF \ -DENABLE_SAMPLES=OFF \ -DIE_EXTRA_MODULES=~/Downloads/openvino_contrib/modules \ -DCMAKE_TOOLCHAIN_FILE=~/Downloads/android-ndk-r20/build/cmake/android.toolchain.cmake ..make --jobs=$(nproc --all)To reduces size of the binaries do:~/Downloads/android-ndk-r20/toolchains/llvm/prebuilt/linux-x86_64/x86_64-linux-android/bin/strip ../bin/intel64/Release/lib/*.soCreate Android Studio projectDownload Android Studio on your PC.Start a new project, choose “Empty Activity”Download model files from Open Model Zoo : git clone --depth 1 https://github.com/openvinotoolkit/open_model_zoocd open_model_zoo/tools/downloaderpython3 -m pip install -r requirements.inpython3 downloader.py --name asl-recognition-0004Model will be downloaded to intel/asl-recognition-0004/FP32 folder. Add files on Android deviceUse Android Debug Bridge (adb) to transfer data files on Android: adb push ~/Downloads/openvino/plugins.xml /dataadb push asl-recognition-0004.xml asl-recognition-0004.bin /dataTry to run the applicationThe first time application will ask for camera permissions. If you’ll see a blank screen after that — try to run application again. |
今日新闻 |
推荐新闻 |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |