/ Модель

Характеристики

Лицензия
MIT
Опубликована
10 авг 2026

ultraface-slim-imx

Поиск объектовИзображение → bounding_boxes3 профессии

Компактная квантованная модель NXP на основе Ultraface slim для обнаружения лиц на устройствах i.MX.

290скачиваний за 30 дней0лайковвеса обновлены10 ноя 2026

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

Ultraface slim — компактная модель обнаружения лиц, первоначально созданная авторами проекта Ultra-Light-Fast-Generic-Face-Detector-1MB и подготовленная NXP для устройств i.MX. Она принимает RGB-изображение размером 320×240 и возвращает ограничивающие рамки и оценки уверенности для найденных лиц; декодирование рамок и подавление немаксимумов включены в граф MPU-варианта. Модель предназначена для быстрого выполнения на периферийных устройствах с LiteRT/TensorFlow Lite и TensorFlow Lite Micro, включая i.MX 8M Plus, i.MX 93, i.MX 95, i.MX 952 и i.MX RT1170. Репозиторий содержит варианты TFLite и C-заголовок с байтовым массивом; MPU-вариант квантован до int8 и занимает около 400 КБ.

NXP преобразовала исходные веса Ultraface slim в TensorFlow Lite и подготовила аппаратно-оптимизированные сборки для NPU. Для MPU модель принимает uint8 и выдаёт float32, а MCU-вариант имеет отдельный экспорт int8 без встроенного NMS, поэтому постобработку выполняет приложение. Это детектор лиц, а не система распознавания личности; качество может меняться для поз, условий освещения, перекрытий и групп, недостаточно представленных в WIDER FACE. Лицензия модели — MIT.

Сценарии применения

  • обнаружение лиц на изображениях с периферийной камеры
  • поиск лиц в видеопотоке на устройстве i.MX
  • встраиваемое обнаружение лиц на микроконтроллере i.MX RT1170

Ограничения

Модель только обнаруживает лица и не распознаёт личности и не оценивает атрибуты людей. Качество может снижаться для поз, освещения, перекрытий и демографических групп, недостаточно представленных в WIDER FACE.

Для каких профессий подходит3

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

Ultraface slim

Overview

Ultraface is a lightweight face detection model designed for edge computing devices. Given an RGB image, it regresses bounding boxes (4 coordinates) and a confidence score for each detected face. The bounding box decoding and non-maximum suppression steps are included in the model graph.

This repository contains the Ultraface slim variant, quantized to int8 and compiled for NXP platforms:

  • i.MX MPUs (i.MX 8M Plus, i.MX 93, i.MX 95, i.MX 952) as LiteRT (.tflite) models at a fixed 320x240 input resolution.
  • i.MX RT MCUs (i.MX RT1170) as a TensorFlow Lite Micro C byte-array header.

It also contains the scripts used to regenerate these assets (recipe.sh), an inference example (example.py) and an evaluation script (evaluate.py).

Note: This is only a face detection model. It does not perform face recognition/identification.

Key Features

  • Very small (~400 KB int8) and fast face detector suitable for 320x240 inputs.
  • Bounding box decoding and NMS are baked into the MPU model graph, so its output is a ready-to-use list of faces.
  • Fully quantized int8 model with uint8 input and float32 output (MPU variant).
  • Compiled for the i.MX 93 Ethos-U65 NPU (Vela) and converted for the i.MX 95 / i.MX 952 eIQ Neutron NPU.
  • Also available for MCUs under TensorFlow Lite Micro (i.MX RT1170), shipped as a C byte-array header.

Model Description

This is a quantized and compiled version of the Ultraface slim face detector from Ultra-Light-Fast-Generic-Face-Detector-1MB, optimized for NXP i.MX MPUs and i.MX RT MCUs.

Modifications

This model is a derivative work with the following changes from the original:

  • Format conversion: the original PyTorch model is converted to a TensorFlow saved model (convert_tensorflow.py) and then to TensorFlow Lite. A patch (slim.patch) adapts the post-processing so that the box decoding and non-maximum suppression are folded into the exported graph, producing a fixed-size (100, 6) output tensor.
  • Quantization (MPU model): full int8 post-training quantization, uint8 input (values 0-255) / float32 output, calibrated on 100 images sampled from a commercially-usable ImageNetV2 subset (WIDER FACE cannot be used for calibration due to licensing).
  • Compilation (i.MX 93): compiled with Vela (--accelerator-config ethos-u65-256 --optimise Performance), tag lf-6.18.20_2.0.0 (the lf-6.18.37_2.1.0 directory ships a byte-identical copy of the same Vela-compiled model, rebuilt against that BSP for compatibility).
  • Compilation (i.MX 95 / i.MX 952): converted with the eIQ Neutron SDK, versions 3.1.3, 3.2.1 and 3.2.3.
  • MCU model: a different int8 quantization/export of the same network (int8 input / int8 output, no in-graph NMS, raw (1, 4420, 6) output), taken as-is from eIQ Media Processing Pipeline (MPP) and exported as a C byte-array header for i.MX RT1170.
  • Post-processing (MCU model only): thresholding and non-maximum suppression are performed outside the graph by the application.

Original model available at: https://github.com/Linzaer/Ultra-Light-Fast-Generic-Face-Detector-1MB.

Model Information

InformationValue
Input shapeRGB image (1, 240, 320, 3), uint8
Input example
Output shapeTensor of size (100, 6) containing up to 100 detected faces (class scores + box coordinates)
Output example
FLOPS168,707,432
Number of parameters264,732
File size (int8)403 KB (assets/quantized_tflite_model/ultraface_slim_uint8_float32.tflite)
Source frameworkPyTorch

Supported Hardware and Software Configurations

All MPU models run with the eIQ LiteRT (TensorFlow Lite) runtime and the corresponding NPU delegate (VX for i.MX 8M Plus, Ethos-U for i.MX 93, Neutron for i.MX 95 / i.MX 952). The i.MX RT1170 header runs with TensorFlow Lite Micro through eIQ Media Processing Pipeline (MPP). The same information is captured in release_manifest.json.

AssetRuntimePrecisionHW targetBSP & SDK versionsLink to asset
i.MX 8M Plus QuantizedLiteRTINT8i.MX 8M Plus-Download
i.MX 93 PrecompiledLiteRTINT8i.MX 93BSP lf-6.18.20_2.0.0, VELA_TAG = lf-6.18.20_2.0.0Download
i.MX 93 PrecompiledLiteRTINT8i.MX 93BSP lf-6.18.37_2.1.0, VELA_TAG = lf-6.18.37_2.1.0Download
i.MX 95 PrecompiledLiteRTINT8i.MX 95BSP lf-6.18.20_2.0.0, Neutron SDK v3.1.3Download
i.MX 95 PrecompiledLiteRTINT8i.MX 95BSP lf-6.18.37_2.1.0, Neutron SDK v3.2.1Download
i.MX 95 PrecompiledLiteRTINT8i.MX 95BSP lf-6.18.37_2.1.0, Neutron SDK v3.2.3Download
i.MX 952 PrecompiledLiteRTINT8i.MX 952BSP lf-6.18.20_2.0.0, Neutron SDK v3.1.3Download
i.MX 952 PrecompiledLiteRTINT8i.MX 952BSP lf-6.18.37_2.1.0, Neutron SDK v3.2.1Download
i.MX 952 PrecompiledLiteRTINT8i.MX 952BSP lf-6.18.37_2.1.0, Neutron SDK v3.2.3Download
i.MX RT1170 C headerTensorFlow Lite MicroINT8i.MX RT1170MCUXpresso SDK 26.09.00Download

The i.MX 8M Plus asset is a symlink to, and byte-identical with, the hardware-independent int8 model in assets/quantized_tflite_model/. The hardware-independent int8 models for both the MPU interface (uint8 input / float32 output) and the MCU interface (int8 input / int8 output) are also provided for host (x86) inference: assets/quantized_tflite_model/ and assets/quantized_tflite_model_mcu/ respectively.

Limitations and Biases

This model inherits all limitations from the original Ultraface slim model. Additional limitations:

  • Task scope: Face detection only. The model does not identify or recognize individuals and does not estimate attributes such as age, gender or emotion.
  • Dataset bias: The model is trained on WIDER FACE. Detection quality may vary for faces, poses, lighting conditions, occlusions or demographic groups that are under-represented in that dataset.

Training

The model was trained on the WIDER FACE dataset by the original authors, according to the original source. NXP did not retrain this model; the weights are those of the original Ultraface slim release, converted and quantized as described in Modifications.

Evaluation

evaluate.py evaluates the int8 quantized model (assets/quantized_tflite_model/ultraface_slim_uint8_float32.tflite) on the WIDER FACE validation set (3226 images) using the official WIDER FACE evaluation protocol (Average Precision at IoU 0.5 for the easy/medium/hard subsets). The evaluation runs on a host PC (x86) with the LiteRT CPU runtime.

Download the WIDER FACE validation images (the ground-truth .mat files are provided in the ground_truth/ directory), then run:

# WIDER_val/ should contain the event sub-folders (e.g. 0--Parade/)
python evaluate.py -m assets/quantized_tflite_model/ultraface_slim_uint8_float32.tflite -d WIDER_val -g ground_truth

Download and Run

Running the example

An example showing how to run detection on an image is in example.py (run on a PC):

python example.py -m assets/quantized_tflite_model/ultraface_slim_uint8_float32.tflite -i example_input.jpg -o example_output.jpg

To run the model on an i.MX MPU target with the NPU delegates, see the i.MX Machine Learning User Guide.

Full on-device examples leveraging GStreamer/NNStreamer and this model can be found in nxp-nnstreamer-examples on GitHub.

Regenerating the assets with recipe.sh

The recipe installs the eIQ Neutron SDK from the NXP eIQ PyPI Distribution Portal. Configure pip once to use it:

python -m pip config --user set global.index https://eiq.nxp.com/repository
python -m pip config --user set global.index-url https://eiq.nxp.com/repository
python -m pip config --user set global.trusted-host eiq.nxp.com
python -m pip config --user set global.extra-index-url https://pypi.org/simple
python -m pip config --user set global.find-links https://eiq.nxp.com/repository/

recipe.sh builds both the MPU (Part A) and the MCU (Part B) artifacts. To regenerate the TFLite model fully quantized in int8 (uint8 input, float32 output), compile it for all supported MPU platforms and generate the MCU C header, run:

bash recipe.sh

The generated model files are:

  • assets/quantized_tflite_model/ultraface_slim_uint8_float32.tflite - hardware-independent int8 model for i.MX 8M Plus
  • assets/imx93/lf-6.18.20_2.0.0/ultraface_slim_uint8_float32_vela.tflite - Vela-compiled for i.MX 93
  • assets/imx95/3.2.3/ultraface_slim_uint8_float32_converted.tflite - Neutron-converted for i.MX 95
  • assets/imx952/3.2.3/ultraface_slim_uint8_float32_converted.tflite - Neutron-converted for i.MX 952
  • assets/rt1170/ultraface_slim_tflite.h - C byte array of the int8 MCU model for i.MX RT1170

MCU targets (TensorFlow Lite Micro)

Besides the i.MX MPU files, this repository also ships Ultraface slim for NXP MCUs running TensorFlow Lite Micro. The MCU has no file system, so the shippable artifact there is a C header file (model byte array) that gets compiled directly into the firmware image.

The MCU variant is a separate int8 quantization/export of the same network (assets/quantized_tflite_model_mcu/ultraface_slim_int8_mcu.tflite, int8 input / int8 output). It ships in its own assets/quantized_tflite_model_mcu/ directory. Unlike the MPU model files, it does NOT include the box decoding and non-maximum suppression in the graph: its output is the raw (1, 4420, 6) tensor ([no_face_score, face_score, left, top, right, bottom] per center prior), so the application performs the thresholding and NMS itself.

MCUCore / AcceleratorDirectory
i.MX RT1170Cortex-M7, CPU onlyassets/rt1170/
assets/quantized_tflite_model_mcu/ultraface_slim_int8_mcu.tflite   base int8 MCU model, 320x240

assets/rt1170/ultraface_slim_tflite.h                  i.MX RT1170 (CPU)
assets/rt1170/ultraface_slim_tflite_info.h             matching metadata header

The i.MX RT1170 header uses the plain int8 model (no NPU), found directly under assets/rt1170/. The *_tflite.h declares the model byte array (ultraface_data / ultraface_data_len) and is accompanied by the matching *_tflite_info.h metadata header, which exposes the pre/post processing constants the application needs (ULTRAFACE_INPUT_MEAN 128, ULTRAFACE_INPUT_STD 127, ULTRAFACE_WIDTH 320, ULTRAFACE_HEIGHT 240, ULTRAFACE_OUTPUT_SCALE 0.00392156f, ULTRAFACE_OUTPUT_ZERO_POINT -128.0f).

Ready-to-run application examples that use this model are included in the eIQ Media Processing Pipeline (MPP):

License

This model, including the quantized and compiled assets and the scripts in this repository, is released under the MIT License (see LICENSE). The original Ultraface slim model is also released under the MIT License (see MODEL_LICENSE).

Citation

If you use this model, please cite both this work and the original model:

@inproceedings{yang2016wider,
  title={Wider face: A face detection benchmark},
  author={Yang, Shuo and Luo, Ping and Loy, Chen-Change and Tang, Xiaoou},
  booktitle={Proceedings of the IEEE conference on computer vision and pattern recognition},
  pages={5525--5533},
  year={2016}
}

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм

Нельзя запустить

Библиотека «litert» рантаймом не поддерживается.

Ревизия весов
2e09866

0 моделей