How jahnavi-deshkar/real_time_mask_detection_system works
This is a local Streamlit mask-compliance video prototype: a user uploads a video, the app reads frames and passes them to an ONNX-backed detector, then displays annotated frames and a cumulative violation count. The README also describes webcam input and cooldown-based CSV logging; the sampled app does not implement webcam handling or call the tracker, so those capabilities are shown only where their documented or implemented behavior is supported. The detector and tracker source were sampled; other README-described UI details are not independently verified.
Main entry points: app.py Streamlit app · detector.py Frame detector · tracker.py Violation tracker · best.onnx Trained model
Components 14
Video interface
- Streamlit app
app.py - Uploaded video
- Frame acquisition
app.py - Annotated display
app.py
Detection
- Frame detector
src/detector.py - Preprocessing
src/detector.py - ONNX inference
src/detector.py - Trained model
models/best.onnx - Confidence filter
src/detector.py - Classify violations
src/detector.py - Draw detections
src/detector.py
Violation logging
- Violation tracker
src/tracker.py - Violation log
data/logs.csv
Other components
- Video user
Connections 14
- Video user → Streamlit app: uploads video
- Streamlit app → Uploaded video: stores temporary copy
- Streamlit app → Frame acquisition: opens and reads
- Frame acquisition → Frame detector: passes frames
- Streamlit app → Frame detector: sets threshold
- Frame detector → Preprocessing: prepares frame
- Preprocessing → ONNX inference: supplies tensor
- ONNX inference → Trained model: runs inference
- ONNX inference → Confidence filter: returns detections
- Confidence filter → Classify violations: accepts detections
- Classify violations → Draw detections: labels and counts
- Frame detector → Annotated display: returns frame and count
- Annotated display → Streamlit app: renders results
- Violation tracker → Violation log: appends cooled-down violations