There are different ways to enable access control and personalize common objects (physical key, pin code, fingerprint or face authentication). Face recognition is the most convenient way to authenticate users because it is immediate, touchless, and secure (biometric data).

Approach

Frames are grabbed from a camera input (/dev/videox) and processed by two neural network models (face detection and face recognition) interpreted by theTensorFlow Lite runtimeframework.
A GStreamer pipeline is used to stream camera frames (using v4l2src), to display a preview (using waylandsink), and to execute neural network inference (using appsink).
The result of the inference is displayed using overlay generated by GtkWidgets with Cairo.

use-case-ai-for-linux-face-recognition-pipeline use-case-ai-for-linux-face-recognition-pipeline use-case-ai-for-linux-face-recognition-pipeline

Pipeline

Sensor

USB webCam or built-in camera.

Data

Data format RGB888 color input image with resolution of 96x96 

Results

Model: Custom CNN for face detection and for face recognition 
Results on STM32MP157F (High-perf) 
The average execution frame rate to execute both face detection and face recognition on1 faceis around 5 fps 
- Face detection execution time ~ 70 ms 
- Face recognition execution time ~ 55 ms 
Optimized with
AI for OpenSTLinux
AI for OpenSTLinux
Compatible with

STM32MP1 series

STM32MP1 series

Resources

Optimized with AI for OpenSTLinux

X-LINUX-AI is an STM32 MPU OpenSTLinux expansion package for running AI models on STM32MP1 microprocessors. It contains Linux® AI frameworks, as well as application examples.

AI for OpenSTLinux AI for OpenSTLinux AI for OpenSTLinux

Compatible with STM32MP1 series

STM32MP1 microprocessor series from single Arm® Cortex®-A7 up to dual Arm® Cortex®-A7 and Cortex®-M4 cores A general-purpose microprocessor portfolio enabling easy development for a broad range of applications, the STM32MP1 series has the ability to support multiple and flexible applications, achieving the best performance and power figures at any time.

STM32MP1 series STM32MP1 series STM32MP1 series
You might also be interested by

Vision | Tutorial | GitHub | Appliances | Smart city | STM32Cube AI Studio | Object detection | STM32 AI MCU

How Edge AI Cameras are changing the future of smart retail

Detect and count fridge beverages fully on-device for smarter retail inventory, with Camthink's NE301

Vision | STM32Cube.AI | STM32 AI MCU | Partner | Video | Smart home | Smart building

How to personalize smart home with familiar face identification

embedUR's on-device face authentication embedded on STM32N6 with easy mobile enrollment

Vision | STM32Cube.AI | STM32 AI MCU | Partner | Smart home | Wearables | Microphone | Accelerometer | Tutorial

Handheld development platform for real-time vision, motion, and voice at the edge

All‑in‑one STM32N6‑based platform for on‑device edge AI with NPU acceleration