InfraFornetWork

Model update application source code is given in this URL

https://github.com/DLinIoTedge/Send2Phone

Following IP network configuration is recommended in the above.

Send2Phone source code in JAVA and it is running in Power 9 machine or in X86 machine.

Question: How to build toPhone/SndModel.jar ?

javac main.java

Question: How to use toPhone/SndModel.jar ?

java -jar toPhone/SndModel.jar

Deployment of trained model on to Edge requires lot more care and hard work. Following sub systems configuration is given for IoT Edge. In this, Android phone working as IoT device, It will work well for small size model. Deploying huge model on to Android phone might create challenges and may not work well if reduce model size to fit in Android phone .

J7appProject

Inference app in Android phone

Install NDK in Android Studio

ANN model based inference engine is coded in C++ and C. To make a library by using inference engine code, there is a need to have NDK also installed in Android studio. In the following installation of Android studio and also installation of NDK are given in detail. Following is installed in Ubuntu 18.04 x86 machine.


Installation of dependencies

Android Studio requires OpenJDK version 8 or above to be installed to your system

sudo apt update

sudo apt install openjdk-8-jdk

java -version


Install Android Studio

sudo snap install android-studio --classic

start Android Studio either by typing android-studio in your terminal or by clicking on the Android Studio icon (Activities -> Android Studio).


SDK required version

Use SDK 22 or above.

What is used in present build of J722 version of App is SDK 29


Install NDK

Use SDK manager to install the following components ( NDK). these components useful to build JNI part of Inference engine

Packages to install:

- LLDB 3.1 (lldb;3.1)

- CMake 3.10.2.4988404 (cmake;3.10.2.4988404)

- NDK (Side by side) 20.1.5948944 (ndk;20.1.5948944)


Reference:

https://linuxize.com/post/how-to-install-android-studio-on-ubuntu-18-04/

Build Inference Engine

Using Android studio build Inference engine as given in the following workflow and copy the same APK into Android phone .

Windows 10 or Ubuntu 18.04 with Android Studio ( the latest stable version of Android Studio is version 3.3.1.0.) is used. NDK (Side by side) 20.1.5948944 (ndk;20.1.5948944) is used to handle JNI side lib creation for Inference Engine,


Inference engine full source code is given in “ https://github.com/DLinIoTedge/NN


Following diagram provides information on workflow to create J722 application in the form of APK that can run in Android phone.


J7NMapp.apk

Download J7app.apk and install in Android Phone