The SNNF demo is an example based on SNNF V1.01.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.
...
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.
...
Info |
---|
If the face has already been added, it cannot be added again. |
Tracking
...
CCPD
...
How to switch between MIPI and HDMI displays
...
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
Stop SNNF demo:
systemctl stop snnf-demo
;Get the format supported by the sensor:
v4l2-ctl --list-formats -d /dev/video40
v4l2-ctl --list-formats-ext -d /dev/video40
View the parameters supported by the SNNF Demo:
/usr/bin/snnf_demo -h
Code Block # /usr/bin/snnf_demo -h Version: 1.1.0 Usage: ./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, humanattr, ocr, lightface, age, face match, tracking, falling, CCPD, VehicleAttr, RTMDet-s, yolov10s, genderAge) -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)
Modify /etc/systemd/system/snnf-demo.service:
vi /etc/systemd/system/snnf-demo.service
Info |
---|
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
Code Block | ||
---|---|---|
| ||
[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 |
Save modifications:
systemctl daemon-reload
;Restart the SNNF demo:
systemctl restart snnf-demo
.