-
Notifications
You must be signed in to change notification settings - Fork 1
Vision and Face Enrollment

- Bridge grabs JPEG frames via ffmpeg (
COMSTAR_CAMERA_SOURCE). - At
ambient_fps/engaged_fps, posts to CodeProject.AI detection. - On
person, runs face recognize until votes accumulate for auserid. -
FaceRecognized→ Engaged → AO session headers use that userid.
API details: Contracts — CodeProject.AI.
The kiosk does not show a camera preview. If Chrome "has no camera," that is expected.

Enrollment is an HTTP call to CodeProject.AI. The userid you register becomes the AO session identity.
cd /opt/comstar/src # or repo root
./scripts/enroll_face.sh <userid>Defaults: camera /dev/video0, CPAI from env/CPAI_URL. Override with COMSTAR_CAMERA_SOURCE, CPAI_URL, COMSTAR_ENROLL_DIR.
curl -X POST "http://ai-server.lan:32168/v1/vision/face/register" \
-F "userid=zlatko" \
-F "image1=@enroll/01.jpg" \
-F "image2=@enroll/02.jpg" \
-F "image3=@enroll/03.jpg"Verify:
curl -X POST "http://ai-server.lan:32168/v1/vision/face/list"
curl -X POST "http://ai-server.lan:32168/v1/vision/face/recognize" \
-F "image=@test.jpg" -F "min_confidence=0.5"Enroll from the terminal itself. Capture frames using the actual camera, at the actual distance, under the actual lighting where COMSTAR will live. Enrollment-condition mismatch is the single largest cause of flaky recognition. Good studio photos make it worse.
- Ten to twenty frames across a few sessions beats three perfect ones.
- Raise
recognize_votesbefore you lowerface_confidence. - DeepStack-derived embeddings are adequate for a household at 1–2 m facing the camera; they degrade at oblique angles and low light.

CPAI returns a biometric faceId. When directory resolve is enabled, the bridge
maps comstarFaceId → FreeIPA uid / displayName (see Directory Identity).
ReachConnectionConfig(
headers: {
'x-agentic-user-name': resolvedUid, // FreeIPA uid
'x-agentic-session-id': 'comstar-$resolvedUid',
'x-warpgate-token': token,
},
)Unrecognised face or directory miss (when required) → guest / restricted overlay
depending on attention.stranger_mode.
Enrollment: ./scripts/enroll_face.sh <ipa-uid> verifies FreeIPA and registers
comstarFaceId with CPAI.
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