Overview

This guide shows you how to use Arm NN and PyArmNN to build and run a real-time object detection system.

The system runs on a Raspberry Pi 4 with Raspbian 10 operating system.

This guide examines the following sample applications that ship as part of Arm NN and PyArmNN:

These sample applications take a model and video file or camera feed as input. The applications then run inference on each frame. Finally, the applications draw bounding boxes around detected objects, with the corresponding labels and confidence scores overlaid.

By understanding how these sample applications perform object detection, you can learn to write your own Machine Leaning applications using Arm NN and PyArmNN.

Before you begin

This guide requires installing ArmNN on a Raspberry Pi. From ArmNN 20.11, we provide Debian packages for Ubuntu 64-bit. To use these packages, you must download a supported 64-bit Debian Linux Operating System. Because Raspberry Pi OS 64-bit is still in beta, we recommend Ubuntu 64-bit 20.10 Groovy Gorilla. However, this version of Linux requires a Raspberry Pi 4 with at least 4GB of RAM, and runs better on 8GB. If you do not need a full desktop environment or more LTS support, you can install 20.04 Server, as explained on linuxhint.

To run the example in this guide:

  1. Install Ubuntu. See installation instructions for the Raspberry Pi4 on the Ubuntu website.
  2. Download and install the required packages.
    Add the PPA to your sources the software-properties-common package:
    sudo apt install software-properties-common
    sudo add-apt-repository ppa:armnn/ppa
    sudo apt update
    sudo apt-get install -y python3-pyarmnn libarmnn-cpuacc-backend_VERSION_ 
        libarmnn-cpuref-backend_VERSION_
    Replace _VERSION_ with the latest supported version of libarmn, as listed on our GitHub repository.
    These packages provide the TensorflowLite parser for ArmNN, which is what this guide uses.
Next