Step 1:
Download the Bianbu firmware and flash it to the AIBOX-K3.
Firmware flashing tutorial link: https://wiki.t-firefly.com/en/AI … tmode_spacemit.html
Step 2:
2.1 Obtaining the Code
Install the Git tool
sudo apt update
sudo apt install git
This repository uses Git Submodules to manage the source code of each component; recursive fetching is recommended.
git clone --recurse-submodules https://github.com/spacemit-com/model-zoo.git
# or ssh
# git clone --recurse-submodules git@github.com:spacemit-com/model-zoo.git
If you have already cloned the main repository but not the sub-repository:
cd model-zoo
git submodule update --init --recursive
If you only want to compile a specific component in the SDK, you can navigate to the corresponding directory and execute mm (you also need to source build/envsetup.sh first):
source build/envsetup.sh
cd vision && mm
The build artifacts are typically installed to output/staging (based on the SDK project).
- Example Run
Note: The following examples assume you have already completed the one-click compilation as described above (the example executables will be installed in output/staging).
3.1 Computer Vision
Step 1: Download the Model. Download all vision example models (they will be placed in ~/.cache/models/vision/)
bash vision/scripts/download_all_models.sh
Step 2: Download resource files (images/videos). Download example image/video resources (they will be placed under ~/.cache/assets/)
bash vision/scripts/download_assets.sh
Default directories:
Models: ~/.cache/models/vision/
Resources: ~/.cache/assets/
Step 3: Run the Examples
The following are the commands to run all the examples under vision/examples/ (C++, which can be run directly in the SDK root directory after executing m):
# Facial Recognition (Similarity)
arcface vision/examples/arcface/config/arcface.yaml
# Face detection
yolov5-face vision/examples/yolov5-face/config/yolov5-face.yaml
# Gesture detection
yolov5_gesture vision/examples/yolov5_gesture/config/yolov5_gesture.yaml
# Object Detection
yolov8 vision/examples/yolov8/config/yolov8.yaml
yolov11 vision/examples/yolov11/config/yolov11.yaml
# Attitude estimation
yolov8_pose vision/examples/yolov8_pose/config/yolov8_pose.yaml
# Instance splitting
yolov8_seg vision/examples/yolov8_seg/config/yolov8_seg.yaml
# Image Classification / Emotion Recognition
resnet vision/examples/resnet/config/resnet50.yaml
emotion vision/examples/emotion/config/emotion.yaml
# Multi-target tracking (video/camera)
# The following two examples demonstrate real-time target tracking and require a screen connection; otherwise, an error will occur.
bytetrack vision/examples/bytetrack/config/bytetrack.yaml
ocsort vision/examples/ocsort/config/ocsort.yaml
Example results:
arcface
root@firefly:/home/firefly/model-zoo# arcface vision/examples/arcface/config/arcface.yaml
SpaceMIT EP initialized: /root/.cache/models/vision/arcface/arcface_mobilefacenet_cut.q.onnx
相似度: 0.1584
判断: 非同一人
yolov5-face
root@firefly:/home/firefly/model-zoo# yolov5-face vision/examples/yolov5-face/config/yolov5-face.yaml
Loading image: /root/.cache/assets/image/006_test.jpg
SpaceMIT EP initialized: /root/.cache/models/vision/yolov5-face/yolov5n-face_cut.q.onnx
Detected 3 face(s):
face 1 score=0.812 box=[166.036,75.602,196.464,110.691]
face 2 score=0.799 box=[44.460,117.240,65.123,145.286]
face 3 score=0.748 box=[262.426,125.130,287.910,162.370]
Result saved to: result_face.jpg
yolov5_gesture
root@firefly:/home/firefly/model-zoo# yolov5_gesture vision/examples/yolov5_gesture/config/yolov5_gesture.yaml
Warning: failed to load labels from: assets/labels/gesture.txt
Loading image: /root/.cache/assets/image/012_gesture.jpg
SpaceMIT EP initialized: /root/.cache/models/vision/yolov5/yolov5_gesture.q.onnx
Detected 2 gesture(s):
Class 0 (class 0) score=0.900 box=[809.209,762.571,923.803,915.754]
Class 5 (class 5) score=0.815 box=[401.791,1386.415,469.781,1524.662]
Result saved to: result_gesture.jpg
yolov8
root@firefly:/home/firefly/model-zoo# yolov8 vision/examples/yolov8/config/yolov8.yaml
Loading image: /root/.cache/assets/image/006_test.jpg
SpaceMIT EP initialized: /root/.cache/models/vision/yolov8/yolov8n.q.onnx
Detected 3 objects:
Class 0, Score: 0.9169, Box: [0.5928,114.2840,85.0366,351.8688]
Class 0, Score: 0.8943, Box: [230.9659,122.4463,315.6410,371.7448]
Class 33, Score: 0.6868, Box: [64.7624,168.9862,247.7783,371.1805]
Result image saved to: result.jpg
yolov11
root@firefly:/home/firefly/model-zoo# yolov11 vision/examples/yolov11/config/yolov11.yaml
Loading image: /root/.cache/assets/image/006_test.jpg
SpaceMIT EP initialized: /root/.cache/models/vision/yolov11/yolo11n.q.onnx
Detected 5 objects:
1: Class 0, Score: 0.8821, Box: [0.2121,114.1500,84.3134,352.4440]
2: Class 0, Score: 0.8821, Box: [230.5667,121.9574,315.4816,372.6761]
3: Class 0, Score: 0.5720, Box: [111.6640,48.7848,215.3329,269.6542]
4: Class 0, Score: 0.4291, Box: [6.0540,261.3405,14.3792,269.3897]
5: Class 33, Score: 0.6063, Box: [67.3937,236.3271,246.2147,372.6607]
Result image saved to: yolo11_result.jpg
yolov8_pose
root@firefly:/home/firefly/model-zoo# yolov8_pose vision/examples/yolov8_pose/config/yolov8_pose.yaml
Running pose estimation...
SpaceMIT EP initialized: /root/.cache/models/vision/yolov8_pose/yolov8n-pose.q.onnx
Detected 1 persons with keypoints
Result image saved to: yolov8_pose_result.jpg
yolov8_seg
root@firefly:/home/firefly/model-zoo# yolov8_seg vision/examples/yolov8_seg/config/yolov8_seg.yaml
Running instance segmentation...
SpaceMIT EP initialized: /root/.cache/models/vision/yolov8_seg/yolov8n-seg.q.onnx
Detected 4 objects with segmentation masks
Result image saved to: yolov8_seg_result.jpg
resnet
root@firefly:/home/firefly/model-zoo# resnet vision/examples/resnet/config/resnet50.yaml
Loading image: /root/.cache/assets/image/005_kitten.jpg
SpaceMIT EP initialized: /root/.cache/models/vision/resnet/resnet50.q.onnx
Classification results:
1. tabby, tabby cat (confidence: 0.5056)
emotion
root@firefly:/home/firefly/model-zoo# emotion vision/examples/emotion/config/emotion.yaml
Loading image: /root/.cache/assets/image/003_face0.png
SpaceMIT EP initialized: /root/.cache/models/vision/resnet/emotion_resnet50_final.q.onnx
Emotion: neutral (class 0, score: 1.7003)
Result saved to: result_emotion.jpg
For optional parameters for each example (such as --image, --video, --use-camera, --output, threshold, etc.), please refer to the README in the corresponding directory (vision/examples/*/README.md) or see the model-zoo-vision README.





