How moeez002/helmet-seatbelt-detection works
This is a Streamlit image-based road-safety detector. A user starts the app, chooses helmet or seatbelt detection, uploads an image, and requests results; the app selects the matching YOLO checkpoint, runs prediction, and displays an annotated image. The sampled source is a single file, so the UI, inference, and rendering stages share its path. The README also describes model training and validation, but these are not part of the deployed app workflow.
Main entry points: app.py Model loading · helmet_model.pt Helmet checkpoint · seatbelt_model.pt Seatbelt checkpoint
Components 9
User interaction
- Streamlit UI
app.py - Image and choice
app.py
Detection workflow
- Model loading
app.py - Model selection
app.py - YOLO prediction
app.py - Result rendering
app.py
Model weights
- Helmet checkpoint
models/helmet_model.pt - Seatbelt checkpoint
models/seatbelt_model.pt
Other components
- User
Connections 9
- User → Streamlit UI: starts and navigates
- User → Image and choice: selects and uploads
- Streamlit UI → Model loading: loads models
- Model loading → Helmet checkpoint: loads
- Model loading → Seatbelt checkpoint: loads
- Image and choice → Model selection: provides image and choice
- Model selection → YOLO prediction: selects model
- YOLO prediction → Result rendering: returns detections
- Result rendering → User: displays annotated image