Skip to content

Plumerai People Detection for Cortex-A library

This document describes how to use the C and C++ library for Plumerai’s people detection software for videos on Arm Cortex-A. For documentation about the API and an example, please see here for C++, here for C and here for Python. Go here for more information about Plumerai’s people detection solution and to try it out yourself.


Plumerai's people detection software expects a video feed and computes bounding boxes with a confidence value, for each person that is detected. The software assumes that the camera does not move. For the best results we recommend mounting the camera to a fixed position. The software works for any input resolution, but a higher resolution is always preferred and leads to higher accuracy. Although there is a small latency overhead the extra accuracy is usually worth it. The software works for any aspect ratio, but for best accuracy we recommend an aspect ratio between 16:9 and 9:16.

Contents of the package

The library package consists of the following files inside a archive:

Multiple {target} options are available for x86 and Arm. Note that the x86 version is not optimized for speed, see below.

They can be unzipped to a folder of your choice, which is referred to as $PLUMERAI_DIR below. For example:

unzip -d /opt/
export PLUMERAI_DIR=/opt/plumeraipeopledetection/

Building and linking

Follow these steps to build and link your application with the Plumerai library (example applications can be found here for C++ and here for C):

  • Link to the Plumerai library, e.g. $PLUMERAI_DIR/lib/{target}/libplumeraipeopledetection.a.
  • Add $PLUMERAI_DIR/include to the include path, e.g. -I$PLUMERAI_DIR/include.

Here's how an example C++ application can be built and linked:

g++ -std=c++11 $PLUMERAI_DIR/lib/arm-linux-gnueabihf/libplumeraipeopledetection.a -I$PLUMERAI_DIR/include -lpthread -ldl -o example
And similarly for C:
gcc -std=c99 example.c $PLUMERAI_DIR/lib/arm-linux-gnueabihf/libplumeraipeopledetection.a -I$PLUMERAI_DIR/include -lstdc++ -lm -lpthread -ldl -o example

The final binary size for a minimal example with the Plumerai people detection library should be around 3MB for an ARMv7 device. By using strip example it can be further reduced to 2.4MB.

There are different versions of the library for different targets:

  1. There are x86_64-linux-gnu and x86_64-macos versions which can be used with a normal Intel or AMD CPU on Linux or macOS (x86) respectively. Note however that this is not optimized for speed and only made available to be able to try out the API or to do qualitative evaluation on a regular laptop or desktop computer.

  2. There is a arm64-macos version for more recent Apple computers with macOS and Arm CPUs, such as the M1 or M2. Similar to the x86 versions above, this is only made available to be able to try out the API or to do qualitative evaluation on a regular laptop or desktop computer.

  3. There is a aarch64-linux-gnu version for use on Cortex-A (or similar) Arm devices with a 64-bit CPU and OS.

  4. There are arm-linux-gnueabi (compiled with -mfloat-abi=softfp) and arm-linux-gnueabihf (compiled with -mfloat-abi=hard) versions for the AArch32 target, for use on Arm devices with a 32-bit CPU and OS. The libraries have been linked with the standard libraries that come with GCC 4.9.4 (GLIBC 2.19) and should link fine with code compiled with newer GCC versions.

Installing Python wrapper

The Python wrapper for Linux and macOS can be installed for Python 3.8 or newer using:

pip install --no-index --find-links $PLUMERAI_DIR/python/ plumerai_people_detection

Expected latency

Below is a table with expected latency numbers for some example Arm CPUs and input resolutions1:

OS CPU Threads Latency @ 800x600x3 Latency @ 1600x1200x3
32-bit Cortex-A53 @ 1.2GHz2 1 42 ms 44 ms
64-bit Cortex-A53 @ 1.2GHz2 1 42 ms 44 ms
64-bit Cortex-A72 @ 1.5GHz3 1 20 ms 21 ms

  1. Note that any input resolution is supported. 

  2. BCM2837, Raspberry Pi 3B Rev 1.2 

  3. BCM2711, Raspberry Pi 4B Rev 1.5