How np-overflow/openhouse-ecd-cv works
Eye Can Drive’s Python computer-vision component turns webcam facial movement into driving values and exposes them to Unity over a WebSocket. The main path is camera capture, face-landmark analysis, EAR/MAR calculation, expression-state updates, and WebSocket transmission; Unity can also request a frame capture. The tree includes a separate controller/command-mapper design, but its detector dependency is absent and the Unity sender is an empty stub, so it is shown as a separate, incomplete path. Relationships reflect the excerpts and README, not uninspected runtime behavior.
Main entry points: main.py Vision loop · controller.py Controller loop · ratios.py EAR / MAR · photocounter.txt Photo counter
Components 12
Vision processing
- Vision loop
detection/main.py - Face landmarks
detection/main.py - EAR / MAR
detection/ratios.py - Driving state
detection/main.py - Frame capture
detection/main.py - Photo counter
photocounter.txt
Unity transport
- WebSocket server
detection/main.py
Control mapping
- Controller loop
control/controller.py - Command mapper
control/command_mapper.py - Unity sender
control/unity_sender.py
Other components
- Webcam
- Unity game
Connections 12
- Webcam → Vision loop: provides frames
detection/main.py - Vision loop → Face landmarks: processes frames
detection/main.py - Face landmarks → EAR / MAR: calculates ratios
detection/main.py - EAR / MAR → Driving state: supplies measurements
detection/main.py - Driving state → WebSocket server: serves state
detection/main.py - Unity game → WebSocket server: requests capture
detection/main.py - WebSocket server → Unity game: sends state
detection/main.py - WebSocket server → Frame capture: handles request
detection/main.py - Vision loop → Frame capture: captures frame
detection/main.py - Vision loop → Photo counter: writes count
detection/main.py - Controller loop → Command mapper: maps detection
control/controller.py - Controller loop → Unity sender: sends commands
control/controller.py