Files
rk35xx-android14/external/armnn/python/pyarmnn/examples/image_classification/README.md
T
hmz007 36ed224bac Rockchip Anroid14_SDK 20240628-rkr5 (2556df1a)
Signed-off-by: hmz007 <hmz007@gmail.com>
Change-Id: Ib87fdbe7a0be7dc961af3500fe9ea4589a127f9f
2024-10-29 18:12:02 +08:00

1.4 KiB

PyArmNN Image Classification Sample Application

Overview

To further explore PyArmNN API, we provide an example for running image classification on an image.

All resources are downloaded during execution, so if you do not have access to the internet, you may need to download these manually. The file example_utils.py contains code shared between the examples.

Prerequisites

PyArmNN

Before proceeding to the next steps, make sure that you have successfully installed the newest version of PyArmNN on your system by following the instructions in the README of the PyArmNN root directory.

You can verify that PyArmNN library is installed and check PyArmNN version using:

$ pip show pyarmnn

You can also verify it by running the following and getting output similar to below:

$ python -c "import pyarmnn as ann;print(ann.GetVersion())"
'32.0.0'
Dependencies

Install the dependencies:

$ pip install -r requirements.txt

Perform Image Classification

Perform inference with TFLite model by running the sample script:

$ python tflite_mobilenetv1_quantized.py

Perform inference with ONNX model by running the sample script:

$ python onnx_mobilenetv2.py

The output from inference will be printed as Top N results, listing the classes and probabilities associated with the classified image.