How vigneshinti/yolov8-cafe-monitoring-system works
This is a Flask-based cafe occupancy monitor: a browser dashboard selects a video source, the server delegates frame processing to a detector, and occupancy and annotated video are returned to the dashboard. The detector separates capture, person detection/tracking, annotation, and JPEG encoding, while the dashboard also supports capacity updates, uploads, and occupancy trends. A separate training workflow fine-tunes YOLO on a cafe dataset. Some implementation details are unsampled; edges below rely on the excerpts or explicit README statements.
Main entry points: app.py Flask routes · detector.py Video capture · train.py YOLO fine-tuning · index.html Dashboard UI
Components 15
Dashboard
- Dashboard UI
templates/index.html - Dashboard logic
static/js/main.js
Web API
- Flask routes
app.py - Uploaded videos
app.py
Vision Pipeline
- Video capture
detector.py - Person detection
detector.py - Person tracking
detector.py - Occupancy and history
detector.py - Frame annotation
detector.py - JPEG encoding
detector.py
Model Training
- YOLO fine-tuning
train.py - Cafe dataset config
data/cafe.yaml
Other components
- Dashboard user
- Webcam / RTSP / video
- YOLO model runtime
Connections 16
- Dashboard user → Dashboard UI: uses
README.md - Dashboard UI → Dashboard logic: loads
- Dashboard logic → Flask routes: requests API
static/js/main.js - Flask routes → Uploaded videos: saves uploads
app.py - Flask routes → Video capture: switches source
app.py - Flask routes → Occupancy and history: reads and updates
app.py - Flask routes → JPEG encoding: requests frames
app.py - Webcam / RTSP / video → Video capture: provides input
README.md - Video capture → Person detection: supplies frames
detector.py - YOLO model runtime → Person detection: runs inference
detector.py - Person detection → Person tracking: detects people
README.md - Person tracking → Occupancy and history: provides count
README.md - Occupancy and history → Frame annotation: overlays status
detector.py - Frame annotation → JPEG encoding: encodes frames
detector.py - YOLO fine-tuning → Cafe dataset config: uses config
train.py - YOLO fine-tuning → YOLO model runtime: fine-tunes model
train.py