CV / YOLACT

YOLACT-RegNetX-1.6GF

YOLACT (UC Davis) with a RegNetX-1.6GF backbone predicts instance masks with 49,104 anchors, Fast NMS and prototype-mask assembly (proto @ coeffs) on Hailo-8. Higher accuracy than the 800MF variant; post-processing runs on the host CPU since the HEF exposes 16 raw heads.

2 ダウンロード
サイズ
36 MB
メモリ
4GB+
精度
Hailo HEF / HailoRT 4.23.x

使用しているデバイスを選択してください。セットアップガイドとドキュメントがそれに応じて更新されます。

はじめる

デプロイ
sudo docker run --rm \
  --name cm5-hailo8-yolact-1-6gf \
  --privileged \
  --net=host \
  -e PYTHONUNBUFFERED=1 \
  --device /dev/hailo0:/dev/hailo0 \
  -v /usr/lib/libhailort.so.4.23.0:/usr/lib/libhailort.so.4.23.0:ro \
  -v /usr/lib/libhailort.so:/usr/lib/libhailort.so:ro \
  ghcr.io/seeed-projects/recomputer-hailo8-cv/yolact_regnetx_1_6gf:latest \
  python web_detection.py --model_path model/yolact_regnetx_1_6gf.hef --video_path video/test.mp4

REST API

REST API を使用して推論を実行します。以下のコマンドをコピーしてください。

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

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

モデル詳細

YOLACT-RegNetX-1.6GF on reComputer R Series (CM5 + Hailo-8)

YOLACT (UC Davis) performs real-time instance segmentation — per-object masks on top of COCO 80-class boxes — on Hailo-8 through HailoRT. The HEF exposes 16 raw heads and all decode runs on the host CPU. The 1.6GF variant is the larger, more accurate member of the yolact family.

Model Info

PropertyValue
ArchitectureYOLACT (You Only Look At CoefficienTs), RegNetX-1.6GF backbone
TaskInstance segmentation
Input512x512x3 RGB (normalize_in_net ImageNet RGB mean/std)
Output16 heads: proto (128x128x32) + 5 scales x {bbox, mask coeffs, conf}
Priors49,104 anchors (9/cell, feature maps 64/32/16/8/4)
Classes80 (COCO)
Parameters30.09M
Operations125.34G
mAP (COCO, full precision)27.6% hardware reference
HEFHailo Model Zoo v2.19.0, Hailo-8

The accuracy value above is Hailo's Model Zoo reference. It is not a benchmark measured on CM5.

Run With Demo Video

bash
sudo docker run --rm \
  --name cm5-hailo8-yolact-1-6gf \
  --privileged \
  --net=host \
  -e PYTHONUNBUFFERED=1 \
  --device /dev/hailo0:/dev/hailo0 \
  -v /usr/lib/libhailort.so.4.23.0:/usr/lib/libhailort.so.4.23.0:ro \
  -v /usr/lib/libhailort.so:/usr/lib/libhailort.so:ro \
  ghcr.io/seeed-projects/recomputer-hailo8-cv/yolact_regnetx_1_6gf:latest \
  python web_detection.py --model_path model/yolact_regnetx_1_6gf.hef --video_path video/test.mp4

Open http://<Board_IP>:8000 to view the web preview (colored instance masks overlaid on the MJPEG stream).

REST API

bash
curl -X POST "http://<Board_IP>:8000/api/models/yolact_regnetx_1_6gf/predict" \
  -F "file=@test.jpg"
EndpointMethodPurpose
/GETWeb preview UI
/api/models/yolact_regnetx_1_6gf/predictPOSTBoxes, confidences, mask areas (JSON)
/api/video_feedGETMJPEG preview stream with masks
/api/configGET / POSTConfidence / NMS IOU thresholds

Implementation Notes

  • CPU post-processing (meta_arch=yolact): no on-chip NMS. The Detect pipeline (49,104 anchors → SSD decode → per-instance argmax → Fast NMS, top-200/class, max 100 detections) is a numpy port of the Model Zoo's instance_segmentation_postprocessing.py.
  • Candidate masks: sigmoid(proto @ coeffs^T) cropped to each detection box; visualized with mask_thresh=0.5 (YAML mask_threshold).
  • normalize_in_net ImageNet RGB; the app feeds raw uint8 RGB.
  • Preprocessing: plain bilinear resize to 512x512 (no letterbox, no pad).

Development Notes

  • Source module: src/rpi5_hailo8_yolact_regnetx_1_6gf/
  • Dockerfile: docker/hailo8/yolact_regnetx_1_6gf.dockerfile
  • Container: ghcr.io/seeed-projects/recomputer-hailo8-cv/yolact_regnetx_1_6gf:latest
  • Family: YOLACT (variants: regnetx_800mf / regnetx_1.6gf)

入力と出力

Input: image, video, or USB camera frame. Output: COCO 80-class boxes with confidences, per-object mask pixel areas, and an MJPEG preview with colored instance masks.