CV / MSPN Pose

MSPN RegNetX-800MF

MSPN (Multi-Stage Pose Network) with RegNetX-800MF backbone performs real-time single-person pose estimation with 17 COCO keypoints through HailoRT inference.

Size
1.3 MB
Memory
4GB+
Precision
Hailo HEF / HailoRT

Choose the device you're using, the set up guide and documentation will update accordingly.

Getting Started

Deploy
sudo docker run --rm \
  --name cm5-hailo-mspn-pose \
  --privileged \
  --net=host \
  -e PYTHONUNBUFFERED=1 \
  --device /dev/hailo0:/dev/hailo0 \
  -v /usr/lib/libhailort.so.5.1.1:/usr/lib/libhailort.so.5.1.1:ro 
  -v /usr/lib/libhailort.so:/usr/lib/libhailort.so:ro \
  ghcr.io/seeed-projects/recomputer-hailo10h-cv/mspn_regnetx_800mf:latest \
  python web_detection.py --model_path model/*.hef --video_path video/test.mp4

REST API

Use the REST API to run inference. Copy the commands below.

Curl
curl -X POST "http://<Board_IP>:8000/api/models/mspn_pose/predict" \
  -F "file=@test.jpg"
Python
import requests

resp = requests.post(
    "http://<Board_IP>:8000/api/models/mspn_pose/predict",
    files={"file": open("test.jpg", "rb")},
    timeout=30,
)
print(resp.json())

Model Details

MSPN RegNetX-800MF on reComputer R Series (CM5 + Hailo-10H)

MSPN (Multi-Stage Pose Network) with RegNetX-800MF backbone for single-person pose estimation with 17 COCO keypoints, running on Hailo-10H via HailoRT.

This page targets reComputer R Series (CM5 + Hailo-10H) with a PCIe Hailo-10H accelerator.

Model Info

PropertyValue
ArchitectureMSPN + RegNetX-800MF
TaskSingle Person Pose Estimation
Input256×192×3 RGB
Output17 keypoints (COCO format)
Parameters7.17M
Hardware AP69.8%
FPS2034
SourceHailo Model Zoo

COCO Keypoints

IDNameIDNameIDName
0nose6right_shoulder13left_knee
1left_eye7left_elbow14right_knee
2right_eye8right_elbow15left_ankle
3left_ear9left_wrist16right_ankle
4right_ear10right_wrist
5left_shoulder11left_hip
12right_hip

Hardware and Host Setup

ItemValue
BoardreComputer R Series with Raspberry Pi CM5
AcceleratorHailo-10H over PCIe, exposed as /dev/hailo0
OSRaspberry Pi OS Bookworm, aarch64
Host driverhailo-all apt package
bash
sudo apt update
sudo apt install hailo-all
sudo reboot

# After reboot
hailortcli fw-control identify
ls /dev/hailo0

# Docker
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh --mirror Aliyun
sudo systemctl enable docker
sudo systemctl start docker

Run With Demo Video

bash
sudo docker run --rm --privileged --net=host \
  -e PYTHONUNBUFFERED=1 \
  --device /dev/hailo0:/dev/hailo0 \
  -v /usr/lib/libhailort.so:/usr/lib/libhailort.so:ro \
  ghcr.io/seeed-projects/recomputer-hailo10h-cv/mspn_regnetx_800mf:latest \
  python web_detection.py --video_path video/test.mp4

Open http://<R20_IP>:8000 to view the web preview. The image includes the module source, demo video, HailoRT Python wheel, and HEF files listed below.

USB Camera Mode

bash
sudo docker run --rm --privileged --net=host \
  -e PYTHONUNBUFFERED=1 \
  --device /dev/hailo0:/dev/hailo0 \
  --device /dev/video0:/dev/video0 \
  -v /usr/lib/libhailort.so:/usr/lib/libhailort.so:ro \
  ghcr.io/seeed-projects/recomputer-hailo10h-cv/mspn_regnetx_800mf:latest \
  python web_detection.py --camera_id 0

HEF Files

HEFSizeNotes
mspn_regnetx_800mf.hef1.3 MBPose estimation model

REST API

Prediction endpoint:

text
POST http://<R20_IP>:8000/api/models/mspn_pose/predict

Example image request:

bash
curl -X POST "http://<R20_IP>:8000/api/models/mspn_pose/predict" \
  -F "file=@test.jpg"

Common service endpoints:

EndpointMethodPurpose
/GETWeb preview UI
/api/models/mspn_pose/predictPOSTSingle-frame keypoint inference
/api/models/mspn_pose/visualizePOSTPose overlay visualization
/api/models/mspn_pose/keypointsGETKeypoint definitions
/api/video_feedGETMJPEG preview stream

Development Notes

  • Source module: src/hailo10h_mspn_regnetx_800mf/
  • Dockerfile: docker/hailo10h/mspn_regnetx_800mf.dockerfile
  • Main service: web_detection.py wraps HailoRT inference, post-processing, MJPEG preview, and REST prediction.

Inputs and Outputs

Input: image (256x192 RGB). Output: 17 keypoints with x, y, confidence (COCO format).