Run your application

Before you run the application, you must transfer specific files to your Android device.

The following example code transfers the application, Arm NN SDK, data files, and model file to an Android device:

adb push libarmnn.so /data/temp/app
adb push libarnnnTfLiteParser.so /data/temp/app
adb push mobilenetv1_quant_tflite /data/temp/app
adb push mobilenet_v1_1.0_224_quant.tflite /data/temp/app/model
adb push model_output_labels.txt /data/temp/app/model

Note

The example code makes the following assumptions:

  • You put the application and ArmNN SDK in the /data/temp/app directory.
  • You put the model and model output labels files in the /data/temp/app/model directory.
  • The image data resides in the /data/temp/app/images directory.

Run the application

To run the application, run the following commands on an Android device:

cd /data/temp/app
LD_LIBRARY_PATH=. ./mobilenetv1_quant_tflite -m models/mobilenet_v1_1.0_224_quant.tflite -d images/{image_name} -p model/model_output_labels.txt

The following is example output:

ArmNN v20190500

Running network…
Prediction: sea snake,
Ran successfully!
Previous Next