Skip to main content
Visitor II
August 17, 2026
Question

Guidance Needed to Train/Extend BlazeFace for Additional Classes in STM32N6 Face Landmark Pipeline

Hello ST Community,

We are currently using the x-cube-n6-ai-face-landmarks pipeline on the STM32N6570-DK.

 

We now want to extend the BlazeFace stage so that it can detect additional DMS-related classes along with face detection.

 

The classes we are interested in are:

Phone, Seatbelt, Smoking, Face, Drinking.

 

At present, the BlazeFace model used in the ST face-landmark project is a single-class face detector, and we could not find a public ST training pipeline for retraining or extending this specific BlazeFace model.

 

Is there any ST example or reference repository for training BlazeFace on:

  • WIDER FACE,
  • custom datasets,
  • or custom multi-class datasets?

Our goal is ideally to reduce the number of separate detection models while keeping the existing face-landmark pipeline functional on STM32N6570-DK.

Any guidance on the recommended training flow, supported model architecture, or available reference code would be very helpful.

1 reply

Julian E.
ST Technical Moderator
October 1, 2026

Hi ​@Rutva Patel,

 

To my knowledge, the Blazeface model outputs keypoints of the face.

This model is not made to do classification.

 

To also do classification, you need to edit the structure of the model (you may look on the internet to see if such model already exists)

We don’t have example corresponding to what you are describing. 

 

A simpler approach may be to use another classification model.

  1. For wide face / slim face, it could use the keypoint from the first model as input.
  2. But to detect phone, belt etc, I don’t think you need the keypoints, so a classic classification model may be more interesting.

 

To retrain a classification model you can look at  the ST Model Zoo services.

You can import a dataset, retrain and deploy a model.

STMicroelectronics/stm32ai-modelzoo-services: AI Model Zoo services for STM32 devices

Tuto:

stm32ai-modelzoo-services/image_classification/docs/README_TRAINING.md at main · STMicroelectronics/stm32ai-modelzoo-services

 

For the other approach, you need to do it yourself, this is too specific.

 

The ST Edge AI Core is the compiler that allows you to convert python AI model to C code for STM32.

We support a large variety of layers for all STM32 targets.

ST Edge AI Documentation - ST Edge AI documentation

 

Have a good day,

Julian

 

 

​In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.