How razmans/elbow-space-checker works
Elbow Room is a local train-coach occupancy demo. Its main workflow configures simulated, recorded-video, or RTSP coach sources; samples frames and estimates passenger counts; optionally verifies the same sample with a local vision model; computes occupancy and freshness; and serves live state and persisted history to a React dashboard. The graph also includes the documented offline evaluation capability. Source excerpts establish the main detector, RTSP, verification, persistence, and UI behavior; some server routing and capture orchestration details are unsampled, so those links rely on explicit README documentation or are omitted.
Main entry points: server.py API and observations · evaluation.py Video evaluation · video.py Person detector · main.tsx Live coach dashboard
Components 15
Backend service
- Coach configuration
config - API and observations
apps/backend/elbow_room/server.py - Observation history
apps/backend/elbow_room/server.py
Capture and vision
- Recorded video
apps/backend/elbow_room/video.py - RTSP capture
apps/backend/elbow_room/rtsp.py - Person detector
apps/backend/elbow_room/video.py - Detector assets
apps/backend/elbow_room/model.py - Local verification
apps/backend/elbow_room/verification.py
Dashboard
- Live coach dashboard
apps/web/src/main.tsx - History browser
apps/web/src/History.tsx - Observation types
contracts/observation.ts
Evaluation
- Video evaluation
apps/backend/elbow_room/evaluation.py - Labelled samples
apps/backend/elbow_room/evaluation.py
Other components
- Demo operator
- Local vision service
Connections 19
- Demo operator → Coach configuration: configures
README.md - Coach configuration → API and observations: configures
README.md - API and observations → Recorded video: runs replay
apps/backend/elbow_room/server.py - API and observations → RTSP capture: starts capture
apps/backend/elbow_room/server.py - Recorded video → Person detector: samples frames
apps/backend/elbow_room/video.py - RTSP capture → Person detector: counts frames
apps/backend/elbow_room/rtsp.py - Person detector → Detector assets: checks assets
apps/backend/elbow_room/video.py - API and observations → Observation history: persists observations
apps/backend/elbow_room/server.py - API and observations → Local verification: submits samples
README.md - Local verification → Local vision service: requests counts
README.md - API and observations → Live coach dashboard: streams state
README.md - Live coach dashboard → Observation types: uses types
apps/web/src/main.tsx - Live coach dashboard → History browser: renders
apps/web/src/main.tsx - History browser → API and observations: fetches history
apps/web/src/History.tsx - History browser → Observation types: uses types
apps/web/src/History.tsx - Demo operator → Video evaluation: evaluates
README.md - Labelled samples → Video evaluation: labels samples
apps/backend/elbow_room/evaluation.py - Video evaluation → Person detector: counts frames
apps/backend/elbow_room/evaluation.py - Video evaluation → Local verification: checks samples
apps/backend/elbow_room/evaluation.py