-
Notifications
You must be signed in to change notification settings - Fork 1
Contracts CodeProject AI
Base: http://<ai-server>:32168
Transport: multipart form POSTs
Status: VERIFIED — face miss returns userid: "unknown" in predictions (2026-08-02)

POST /v1/vision/detection
image file
min_confidence float
Expected shape:
{
"success": true,
"predictions": [
{"label":"person","confidence":0.91,"x_min":120,"y_min":40,"x_max":410,"y_max":700}
],
"inferenceMs": 31,
"processMs": 44
}Bridge only cares about predictions[].label == "person" above vision.person_confidence.
POST /v1/vision/face/recognize
image file
min_confidence float
{
"success": true,
"predictions": [
{"userid":"zlatko","confidence":0.87,"x_min":180,"y_min":60,"x_max":320,"y_max":240}
]
}A face present but not enrolled returns userid: "unknown" (with a box), not necessarily an empty array. Still handle empty arrays / success: false defensively.
POST /v1/vision/face/register
userid string
image1 file
imageN file
POST /v1/vision/face/list
→ {"success":true,"faces":["zlatko", ...]}
Operator flow: Vision & Face Enrollment.
| Condition | Behaviour |
|---|---|
Non-2xx or success:false
|
Treat as no detection — never crash the poll loop. Log warn, continue. |
| Timeout | 2000 ms detection, 3000 ms recognize |
| Three consecutive failures | Emit vision.degraded, drop to ambient_fps, subtle kiosk indicator |

Recognize runs when a person is present and identity is unresolved or expired — not per frame. Recognize-per-frame works in a 30-second test and melts the GPU queue in production.
Fixtures live in docs/fixtures/cpai_*.json.
COMSTAR AI — Not a mystical AI. A tool you engineered — transparent, hackable, fast.
Home · Architecture · Admin Console · Runbook · Contracts
Apache-2.0 · Pre-alpha · Raspberry Pi 4 terminal + local AI server
COMSTAR AI
Start here
Product
Build & configure
Interfaces
- Contracts Overview
- Bridge ↔ Kiosk
- Bridge ↔ Audio
- CodeProject.AI
- AO Reach
- MCP Tools
- Attention State Machine
Features
- Speech (STT/TTS)
- Vision & Face Enrollment
- Directory Identity
- Wake Word
- MCP Topology
- Terminal Control
- Google Workspace
Decisions (ADRs)
- ADR Index
- 0001 Audio Routing
- 0002 Render Path
- 0003 Speech on Ada
- 0004 Terminal Control
- 0005 LDAP Identity
- 0006 House Presence
- 0007 Full-Duplex AEC
- 0008 TTS Engine
- 0009 Proactivity
- 0010 Text Channel
- 0011 Road VPN
- 0012 Admin Network
- 0013 AO mTLS
- 0014 Fallback Hotspot
Operate
Plan
Meta