/
SNNF Demo Introduction

SNNF Demo Introduction

The SNNF demo is an example based on SNNF V1.1.0 that easily displays the detection results of different NN models. It can quickly switch between different NN models through the menu and then display the real time images and detection results on the screen. The display supports connections through MIPI and HDMI, and the demo's UI can adapt to screens of different resolutions.

Currently supported NN model:

  • Pose (yolov8n_pose_opti)

  • Segment (yolov8n_segment_opti)

  • Object detection (yolov8n_detection_opti)

  • Face Match (det_10g + w600k_r50)

  • Tracking (yolov8n_detection_opti + reid)

  • CCPD (yolov8n_ccpd_opti + ocr_rec)

Here we provide an ISPBOOOT.BIN (Boot from eMMC) that automatically starts the SNNF Demo after boot-up, so that you can see the demo's effects more quickly.

By default, the SNNF Demo is automatically initiated using the device node /dev/video40 (i.e., the node created when the sensor OV5640 is connected to the platform via MIPI-RX4_2D) to obtain input data. If you do not have an OV5640, you can substitute it with a USB Cam. Please refer to "How to modify SNNF demo parameters" for instructions on modification.

UI

Click the screen to pop up the menu.

snnf_demo_ui.png
snnf_demo_menu_new.png

Model

Pose

Segment

Object Detection

Face Match

How to Add a Face

  1. Before Adding a Face:

  2. Adding a Face:

Double-click on the face (the click must be within the face frame for it to be valid). Enter the person's name in the pop-up window as shown below, click OK, and the face will be added.

  1. After Adding a Face:

Once added, the face can be recognized in real time.

If the face has already been added, it cannot be added again.

Tracking

CCPD

 

How to switch between MIPI and HDMI displays

Switch to MIPI

Set the jump cap in the above figure to the ON state and unplug the HDMI cable.

Switch to HDMI

Set the jump cap in the above figure to OFF, power off the Panel connected to MIPI, and plug in the HDMI cable.

How to modify SNNF demo parameters

  1. Stop SNNF demo:systemctl stop snnf-demo

  2. Get the format supported by the sensor:

    1. v4l2-ctl --list-formats -d /dev/video40

    2. v4l2-ctl --list-formats-ext -d /dev/video40

  3. View the parameters supported by the SNNF Demo:/usr/bin/snnf_demo -h

    # /usr/bin/snnf_demo -h Version: 1.1.0 Usage: /usr/bin/snnf_demo [options] Options: -h, --help Print this help message and exit -m, --model ARG Specify the model (default: pose, support model list: pose, segment, object, face match, tracking, CCPD) -v, --video ARG Specify the video file or device (default: /dev/video0, e.g., /dev/video40, /mnt/test.mp4) -f, --format ARG Specify the video capture format (default: YUYV, only YUYV, UYVY, YUY2, H264, MJPG are supported) -s, --size ARG Specify the video capture size (default: 640x480, e.g., 1920x1080, 1280x720) -r, --framerate ARG Specify the video capture frame rate (default: 30)
  4. Modify /etc/systemd/system/snnf-demo.service:vi /etc/systemd/system/snnf-demo.service

ExecStart=/usr/bin/snnf_demo -v /dev/video40 -s 640x480 -f YUYV -r 30

For example:

The node of the USB camera is /dev/video0, supporting a resolution of 1280x720, and the capture format is YUYV with a frame rate of 15.

ExecStart=/usr/bin/snnf_demo -v /dev/video0 -s 1280x720 -f YUYV -r 15

[Unit] Description=SNNF_DEMO After=network.target [Service] Type=simple ExecStart=/usr/bin/snnf_demo -v /dev/video0 -s 1280x720 -f YUYV -r 15 Restart=always [Install] WantedBy=multi-user.target
  1. Save modifications: systemctl daemon-reload;

  2. Restart the SNNF demo: systemctl restart snnf-demo.