MCUXpresso_MIMXRT1052xxxxB/boards/evkbimxrt1050/eiq_examples/mpp_camera_ultraface_view_tflm
Yilin Sun 6baf4427ce
Updated to v2.15.000
Signed-off-by: Yilin Sun <imi415@imi.moe>
2024-03-18 23:15:10 +08:00
..
armgcc Updated to v2.15.000 2024-03-18 23:15:10 +08:00
doc Updated to v2.15.000 2024-03-18 23:15:10 +08:00
hal Updated to v2.15.000 2024-03-18 23:15:10 +08:00
models Updated to v2.15.000 2024-03-18 23:15:10 +08:00
FreeRTOSConfig.h Updated to v2.14.0 2023-11-30 20:55:00 +08:00
board.c Updated to v2.15.000 2024-03-18 23:15:10 +08:00
board.h Updated to v2.15.000 2024-03-18 23:15:10 +08:00
board_init.c Updated to v2.14.0 2023-11-30 20:55:00 +08:00
board_init.h Updated to v2.14.0 2023-11-30 20:55:00 +08:00
camera_support.c Updated to v2.14.0 2023-11-30 20:55:00 +08:00
camera_support.h Updated to v2.14.0 2023-11-30 20:55:00 +08:00
camera_ultraface_view.c Updated to v2.15.000 2024-03-18 23:15:10 +08:00
clock_config.c Updated to v2.14.0 2023-11-30 20:55:00 +08:00
clock_config.h Updated to v2.14.0 2023-11-30 20:55:00 +08:00
dcd.c Updated to v2.14.0 2023-11-30 20:55:00 +08:00
dcd.h Updated to v2.14.0 2023-11-30 20:55:00 +08:00
display_support.c Updated to v2.14.0 2023-11-30 20:55:00 +08:00
display_support.h Updated to v2.14.0 2023-11-30 20:55:00 +08:00
evkbimxrt1050_sdram_init.jlinkscript Updated to v2.14.0 2023-11-30 20:55:00 +08:00
gpt_config.c Updated to v2.15.000 2024-03-18 23:15:10 +08:00
mpp_camera_ultraface_view_tflm_v3_14.xml Updated to v2.15.000 2024-03-18 23:15:10 +08:00
mpp_config.h Updated to v2.15.000 2024-03-18 23:15:10 +08:00
pin_mux.c Updated to v2.14.0 2023-11-30 20:55:00 +08:00
pin_mux.h Updated to v2.14.0 2023-11-30 20:55:00 +08:00
readme.md Updated to v2.15.000 2024-03-18 23:15:10 +08:00

readme.md

Overview

This example shows how to use the library to create a use-case for face detection using camera as source.

The machine learning framework used for this example is TensorFlow Lite Micro. The face detection model used is quantized Ultraface slim model that detects multiple faces in an input image.

Toolchains supported

  • MCUXpresso, version 11.8.0
  • GCC Arm Embedded, version 12.2.Rel1

SDK version

  • Version: 2.15.000

Toolchain supported

  • GCC ARM Embedded 12.2
  • MCUXpresso 11.8.0

Hardware requirements

  • Mini/micro USB cable
  • EVKB-IMXRT1050 board
  • Personal computer
  • MT9M114 camera (optional)
  • RK043FN02H-CT display (optional)

Board settings

Connect the camera to J35 (optional) Connect the display to A1-A40 and B1-B6 (optional) Connect external 5V power supply to J2, set J1 to 1-2

Prepare the Demo

  1. Connect a USB cable between the host PC and the OpenSDA USB port on the target board.
  2. Open a serial terminal with the following settings:
    • 115200 baud rate
    • 8 data bits
    • No parity
    • One stop bit
    • No flow control
  3. Download the program to the target board.
  4. Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.

Running the demo

EXPECTED OUTPUTS: The expected outputs of the example are:

  • For each detected face, a labeled rectangle should be displayed on the screen.
  • Logs below should be displayed on the debug console.

Logs for camera_ultraface_view example using TensorFlow Lite Micro model should look like this:

[MPP_VERSION_1.0.0] Inference Engine: TensorFlow-Lite Micro inference time 707 ms ultraface : no face detected inference time 707 ms ultraface : no face detected inference time 707 ms ultraface : no face detected inference time 706 ms ultraface : box 0 label face score 99(%) inference time 706 ms ultraface : box 0 label face score 99(%) inference time 706 ms ultraface : box 0 label face score 99(%) inference time 706 ms ultraface : box 0 label face score 99(%) inference time 710 ms ultraface : box 0 label face score 99(%) inference time 710 ms ultraface : box 0 label face score 99(%) inference time 710 ms

Important notes

TensorFLow Lite Micro is an optional engine for the ML Inference component of MPP. This project embeds NXP's custom TensorFlow Lite Micro code by default. TensorFLow Lite allows short-listing the "Operations" used by a specific model in order to reduce the binary image footprint. This is done by implementing the function:

tflite::MicroOpResolver &MODEL_GetOpsResolver()

This example implements its own function MODEL_GetOpsResolver dedicated to Ultraface. User may provide its own implementation of MODEL_GetOpsResolver when using a different model.