How manoj8712/cafe_ai_system works
This is a local hotel/cafe video-analytics application. Its main workflow processes camera or video frames into persistent detections, visit sessions, and attributed cup/plate events; it stores analytics and publishes annotated frames and recordings for a Streamlit dashboard. Other documented capabilities include worker-photo enrollment and matching, date-based totals, and configurable camera regions. Edges follow the README or shown source references; some orchestration details are documented rather than visible in the sampled main.py excerpt.
Main entry points: main.py Frame orchestrator · app.py Streamlit dashboard · database.py SQLite analytics · event_processor.py Item event processor
Components 18
Video analytics
- Frame orchestrator
main.py - Runtime configuration
config.py - YOLO detection
detection/detector.py - ROI geometry
utils/roi.py - Runtime logging
utils/logger.py
Visits and service events
- Visit sessions
tracking/person_tracker.py - Worker matching
analytics/worker_recognition.py - Item event processor
analytics/event_processor.py - Service totals
analytics/service_counter.py - Cup category
analytics/cup_counter.py - Plate category
analytics/plate_counter.py
Local persistence
- SQLite analytics
database/database.py
Dashboard and evidence
- Streamlit dashboard
dashboard/app.py - Frame overlays
utils/visualization.py - Video segments
utils/video_recorder.py
Other components
- Camera operator
- Camera or video
- Dashboard user
Connections 21
- Camera operator → Frame orchestrator: starts processing
README.md - Camera or video → Frame orchestrator: provides frames
README.md - Frame orchestrator → YOLO detection: requests detections
README.md - YOLO detection → Frame orchestrator: returns tracks
README.md - Frame orchestrator → Visit sessions: updates sessions
README.md - Frame orchestrator → Worker matching: matches workers
main.py - Frame orchestrator → Item event processor: updates events
main.py - Item event processor → SQLite analytics: records events
analytics/event_processor.py - Item event processor → Service totals: updates totals
analytics/event_processor.py - Frame orchestrator → SQLite analytics: saves sessions
main.py - Frame orchestrator → Frame overlays: draws overlays
README.md - Frame overlays → ROI geometry: draws regions
utils/visualization.py - Frame orchestrator → Video segments: writes frames
main.py - Frame orchestrator → Streamlit dashboard: publishes frame
README.md - Streamlit dashboard → SQLite analytics: reads totals
dashboard/app.py - Streamlit dashboard → SQLite analytics: registers workers
dashboard/app.py - Streamlit dashboard → Worker matching: validates photos
dashboard/app.py - Streamlit dashboard → Video segments: lists recordings
dashboard/app.py - Dashboard user → Streamlit dashboard: views analytics
README.md - Runtime configuration → Frame orchestrator: configures runtime
main.py - Frame orchestrator → Runtime logging: logs runtime
main.py