FP-AI-FACEREC1 getting started

Revision as of 09:55, 27 November 2020 by Registered User

This article explains how to get started on the Face Recognition application running on STM32 microcontroller.

This article provides an overview on the following topics:

  • Overview of the required hardware setup
  • Overview of the software architecture
  • Description of the Face Reco application running on STM32

1. Hardware setup

The Face Reco application is running on a hardware setup made up of a STM32 microcontroller board connected to a camera module board.

1.1. STM32 board: STM32H747 Discovery Kit

The STM32H747I-DISCO is a complete demonstration and development platform for STMicroelectronics STM32H747XIH6 microcontroller, designed to simplify user application development. The STM32H747XIH6device is based on the high-performance Arm® Cortex®-M7 and Cortex®-M4 32-bit RISC cores. The Cortex®-M7 core operates at up to 480 MHz and the Cortex®-M4 core at up to 240 MHz.

The STM32H747XIH6device incorporates high-speed embedded memories with a dual-bank Flash memory of 2 Mbytes and of 1 Mbyte of RAM.

The other key specifications of the board are:

  • On-board STLINK-V3E debugger/programmer
  • USB OTG HS
  • 4” capacitive touch LCD display module with MIPI® DSI interface
  • 2 x 512-Mbit Quad-SPI NOR Flash memory
  • 256-Mbit SDRAM
  • 8-bit camera connector
  • microSD™ card

1.2. Camera board

In the context of the Face Reco application the firmware supports the two following sensors:

  • The OV5640 sensor
  • The OV9655 sensor

(which is th eone mounted on the MB1379 camera daughterboard). Two camera module boards are supported:

1.2.1. STM32F4DIS-CAM camera module

The picture below shows the STM32F4DIS-CAM camera module featuring a OV9655 sensor:


1.2.2. B-CAMS-OMV based camera module

The picture below shows the B-CAMS-OMV mother board on which a MB1379 camera daughterboard is plugged:

An image of B-CAM-OMV camera board board.

The B-CAMS-OMV board is an adaptation which, on top of MB1379 camera daughterboard, enables to support camera board from OpenMV and Arducam.

In the context of the Face Reco application the firmware supports only the OV5640 sensor (which is the one mounted on the MB1379 camera daughterboard).

1.3. STM32H747I-DISCO connection to camera boards

The picture below shows how to connect the camera board to the STM32H747I-DISCO board using a flex cable:

An image of connection between STM32H747I-DISCO and camera board.

2. Software architecture

The figure below depicts the software architecture of the Face recognition application:

An image of the software architecture for the Face Reco application.

Here is below a brief description of the middleware components:

2.1. STM32 AI Runtime

This is a STM32 optimized AI library generated by the X-CUBE-AI tool when generating the C neural network model.

2.2. STM32 Image

This is a library of functions for image preprocessing: rescaling, pixel format conversion etc.

2.3. STM32 Face Detect

Library containing functions for Face Detection purpose.

2.4. STM32 Face Reco

Library containing functions for Face Recognition purpose.

3. Description of Face Reco demo application

The figure below shows the data pipe involved in the Face Recognition application:

An image of the data pipe for the Face Reco application.


  • Camera Capture
  • Pixel format conversion
  • Face Detection and conditioning
  • Face Recognition


Run in internal memory FPS@3.5 Default threshold so to have 1% FAR Threshold configurable via "Change Settings" menu etc..