How whooslizi/drowsinessdetector works
Drowsiness Detector offers two runtime paths: a browser-based Vue monitor and a Python desktop app. Both use camera input to assess eye closure and surface drowsiness; the desktop path sends detector telemetry into its webview and can play a system sound. The README also documents a chime and meme overlay, though their implementation is not visible in the sampled excerpts. The large Vue component appears to combine the monitor with its Windows XP-style desktop interface. Connections reflect shown calls and documented behavior; unsampled details are omitted.
Main entry points: app.py Desktop API and loop · DrowsinessMonitor.vue Monitor and desktop UI · detector.py Frame detector · App.vue App shell
Components 14
Web monitor
- Vue entry
src/main.ts - App shell
src/App.vue - Monitor and desktop UI
src/components/DrowsinessMonitor.vue
Desktop runtime
- Desktop API and loop
app.py - PyWebView window
app.py
Detection
- Frame detector
detector.py - OpenCV camera and fallback
detector.py
Telemetry contract
- Telemetry data
detector.py - Telemetry type
src/types/telemetry.ts
Other components
- User
- Browser camera
- MediaPipe Face Mesh
- Chime and meme
- System audio
Connections 17
- User → Monitor and desktop UI: uses
README.md - Vue entry → App shell: mounts
src/main.ts - App shell → Monitor and desktop UI: renders
src/App.vue - Monitor and desktop UI → Browser camera: requests camera
src/components/DrowsinessMonitor.vue - Monitor and desktop UI → MediaPipe Face Mesh: configures and sends frames
src/components/DrowsinessMonitor.vue - Monitor and desktop UI → Telemetry type: uses type
src/components/DrowsinessMonitor.vue - Monitor and desktop UI → Chime and meme: triggers
README.md - User → Desktop API and loop: runs
README.md - Desktop API and loop → Frame detector: creates and processes frames
app.py - Desktop API and loop → OpenCV camera and fallback: captures camera frames
app.py - Frame detector → OpenCV camera and fallback: uses fallback detection
detector.py - Frame detector → MediaPipe Face Mesh: uses face mesh
detector.py - Frame detector → Telemetry data: returns
detector.py - Desktop API and loop → PyWebView window: creates window
app.py - Desktop API and loop → PyWebView window: pushes telemetry
app.py - Desktop API and loop → System audio: plays alert
app.py - Desktop API and loop → Frame detector: updates thresholds
app.py