Appearance
About this article
- Audience: Operators, integrators, and compliance reviewers who need RF-DETR contracts without reading firmware source
- Goal: Look up model identity, performance expectations, precomp authority rules, and integration hooks
- Type: Reference
Summary
Ghost Protocol ships RF-DETR small as the on-device precomp model for person and weapon detection. Person class c=0 with confidence ≥ 0.35 is the authoritative safety count—used in MCP tools, MQTT, ONVIF events, and soak gates before any cloud escalation. This card documents the production precomp contract.
For the full story—custom Omni packages (rf_detr_oak4.tar / rf_detr_qcs8550.dlc), TrOCR encoder/decoder cascade, ML Pipeline training and turnaround, dataset types, S1/S2/VMS deploy, USA hosting posture, and exact names including Gemma 4—see RF-DETR, TrOCR, ML Pipeline & fleet deployment.
Prerequisites
- Edge AI pipeline — dual-stream context
- ONVIF reference — person events bridged from RF-DETR
- Proxy reachable for status probes — API quick reference
Model details
| Field | Value |
|---|---|
| Name | RF-DETR small (fixed inference build) |
| Artifact | rfdetr_small_inference_model_fixed.dlc (~135 MB float16) |
| Input | 640×640 NHWC BGR888i |
| Output | Up to 300 detections with class and confidence |
| Classes | 23 labels — person (0) plus weapon categories |
| Target | Edge AI / SNPE on Hexagon DSP (RVC4 Shadow 1) |
| Load path | Bundled under /app/models or /data/models via layer env |
Supporting files: labels.json, config.json, buildinfo.json in the models directory.
Intended use
- Sovereign on-device detection for transit-safety surveillance (bus, train, shuttle)
- ~10 Hz inference stride (
RF_DETR_STRIDE_FPS=10) on the detection substream - Sacred authority for person counts—no LLM override
- Upstream input to ONVIF person events, Hermes enrichment, and cloud escalation on justified clips
Out of scope: Primary face recognition on RF-DETR alone. Optional face identity on S2 (Shadow 2) uses person c=0 head crops via nist_fr (edge FATE depth PAD + quality) + host AdaFace IR-18 (512-dim, MIT) gallery match with FRTE 1:1 FMR-calibrated τ (self-assessed, not NIST-certified). S1 (Shadow 1) has no stereo depth — nist_fr does not run there. See NIST compliance.
Key parameters
python
PERSON_CLASS_ID = 0
WEAPON_CLASS_IDS = {10, 11, 12, 13} # gun, knife, rifle, shotgun
def count_persons(dets, conf_thresh=0.35) -> int:
# Count detections where c == 0 and p >= conf_thresh
...| Parameter | Default | Usage |
|---|---|---|
PERSON_CLASS_ID | 0 | Person label in labels.json and all public integrations |
conf_thresh | 0.35 | Precomp person count gate |
RF_DETR_STRIDE_FPS | 10 | Layer environment stride target |
Precomp metrics inject first in every A2A, MCP, and Hermes safety query. Downstream LLM layers describe and contextualize—they do not replace counts.
Detection flow
Probe live status:
bash
curl -s -X POST "$PHANTOM_PROXY/tools/call?target=<device-ip>" \
-H "Content-Type: application/json" \
-d '{"tool":"get_rfdetr_status","arguments":{}}'Performance and gates
| Check | Expectation |
|---|---|
| Stride | ~9.9–10 Hz sustained in soak harness |
| Encode pairing | Justified 60s chunks at ~30 fps with valid sidecar |
| Thermal | AI suspend threshold before encoder compromise |
| Storage | Prune-first when storage_health reaches CRITICAL |
Soak, vision-verify, and unit test suites assert precomp contract stability. ONVIF PullMessages filters c=0 person events from the same detection stream.
Limitations and risks
- Device tracker: SNPE link failures on RVC4 may require host-side IoU tracking in the agent.
- Thermal: High die temperature suspends AI while keeping the encoder running—monitor MQTT die temp.
- Storage: Long runs without prune can mark recorder CRITICAL; justified metadata required for playback and cloud escalation.
- Privacy: Edge-only inference; cloud escalation uses signed object-storage uploads from the proxy only.
- Precomp immutability: Blur and quality gates in vision-verify complement but do not override on-device counts.
Related references
| Topic | Doc |
|---|---|
| Full ML Pipeline hub | RF-DETR models, ML Pipeline & fleet deployment |
| Pipeline | Edge AI and RF-DETR |
| ONVIF person events | ONVIF reference |
| Cloud escalation | Cloud video escalation |
| NIST RMF mapping | NIST compliance |
| Proxy tools | API quick reference |
Next steps
- RF-DETR ML Pipeline hub — training, DLC specs, exact fleet model names
- Justified recording — sidecar fields paired with detection stride
- Architecture diagrams — end-to-end dataflow
- Video understanding — cloud escalation after precomp
Operator depth
Live fleet state and harness evidence live in private operator handoff (not published) (private).