xiaohongshu
xiaohongshu
body-tracking
Person detection, tracking, and Re-ID. Use when faces aren't visible but cast should still be tracked, or when debugging face-body association.
Full skill instructions
Use this skill to debug body tracking and face-body association issues.
| Sub-agent | Purpose |
|---|---|
| PersonDetectorSubagent | YOLO/DETR person detection |
| PersonReIDSubagent | OSNet/Torchreid embeddings |
| TrackFusionSubagent | Face-body association |
Run the sandbox pipeline on an episode (writes artifacts under data/manifests/{ep_id}/body_tracking/).
from pathlib import Path
from FEATURES.body_tracking.src.body_tracking_runner import BodyTrackingRunner
runner = BodyTrackingRunner(
episode_id="my-episode",
config_path=Path("config/pipeline/body_detection.yaml"),
fusion_config_path=Path("config/pipeline/track_fusion.yaml"),
)
runner.run_full_pipeline()
from FEATURES.body_tracking.src.track_fusion import TrackFusion
fusion = TrackFusion()
identities = fusion.fuse_tracks(face_tracks=face_tracks, body_tracks=body_tracks)
python -m FEATURES.body_tracking --episode-id <EP_ID> --stage compare
File: config/pipeline/body_detection.yaml
| Key | Default | Description |
|---|---|---|
body_tracking.enabled | true | Enable body tracking |
person_detection.model | yolov8n | Detector model |
person_detection.confidence_threshold | 0.50 | Detection confidence |
person_tracking.track_buffer | 120 | Frames to keep lost tracks |
person_reid.enabled | true | Enable Re-ID embeddings |
person_reid.model | osnet_x1_0 | Re-ID model |
File: config/pipeline/track_fusion.yaml
| Key | Default | Description |
|---|---|---|
track_fusion.enabled | true | Enable fusion stage |
iou_association.iou_threshold | 0.50 | Face-in-body IoU threshold |
reid_handoff.similarity_threshold | 0.70 | Re-ID match threshold |
reid_handoff.handoff.max_gap_seconds | 30 | Max time for handoff |
reid_handoff.handoff.confidence_decay_rate | 0.95 | Per-second decay |
Cause: Person not detected by YOLO
Check: Detection confidence in logs
Fix: Lower confidence threshold:
person_detection:
confidence_threshold: 0.40 # default is 0.50
Cause: IoU too loose or multiple people close together
Check: association_confidence in track metadata
Fix: Increase IoU threshold:
track_fusion:
association_iou_thresh: 0.60 # default is 0.50
Cause: Clothing change or long gap
Check: reid_similarity between pre/post occlusion
Fix: Lower Re-ID threshold or increase gap tolerance:
track_fusion:
reid_similarity_thresh: 0.60 # default is 0.70
handoff:
max_gap_seconds: 45 # default is 30
Cause: Tracker losing track through occlusion
Check: body_id_switch_rate in metrics
Fix: Increase track buffer:
person_tracking:
track_buffer: 150 # default is 120 (5 seconds)
{
"identity_id": "ID_001",
"face_track_ids": [42, 256],
"body_track_ids": [100127, 100345],
"screen_time": {
"face_visible_duration": 125.5,
"body_only_duration": 45.2,
"total_duration": 170.7
},
"associations": [
{
"face_track": 42,
"body_track": 100127,
"method": "iou",
"confidence": 0.85
},
{
"face_track": null,
"body_track": 100127,
"method": "reid_handoff",
"confidence": 0.72
}
]
}
| File | Purpose |
|---|---|
FEATURES/body_tracking/src/detect_bodies.py | YOLO person detection |
FEATURES/body_tracking/src/track_bodies.py | Body tracking (ByteTrack + fallback) |
FEATURES/body_tracking/src/body_embeddings.py | OSNet Re-ID embeddings |
FEATURES/body_tracking/src/track_fusion.py | Face↔body fusion |
FEATURES/body_tracking/src/screentime_compare.py | Screentime comparison |
config/pipeline/body_detection.yaml | Detection config |
config/pipeline/track_fusion.yaml | Fusion config |
xiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience