How harshitahegde/safego_ai-safety-monitoring-and-alert-system works
SafeGoAI combines a Flask user-management application with a separate webcam monitoring process. Its main safety workflow is camera capture, gesture confirmation, identity and location enrichment, evidence capture, then push and email alerts subject to a cooldown. The sampled detection excerpts show several stages, but omit portions of alert dispatch and temporal logic; README statements support those links. The user-management routes and SQLite access are visible in app.py; the schema is initialized separately.
Main entry points: detection.py Monitoring loop · app.py Flask routes · init_db.py Database initializer · index.html Web pages
Components 20
Safety monitoring
- Monitoring loop
detection.py - Gesture recognition
detection.py - Face recognition
detection.py - IP geolocation
detection.py - Evidence capture
detection.py - Alert cooldown
detection.py
Alert delivery
- Push notification
detection.py - Email alert
detection.py
User management
- Flask routes
app.py - Web pages
index.html - Registration and login
app.py - Profile management
app.py - Profile photo upload
app.py
User data
- SQLite user database
app.py - Database initializer
init_db.py
Other components
- Person at camera
- Webcam
- ntfy.sh
- Gmail SMTP
- Web user
Connections 22
- Person at camera → Webcam: signals to
README.md - Webcam → Monitoring loop: provides frames
README.md - Monitoring loop → Gesture recognition: processes frames
detection.py - Gesture recognition → Monitoring loop: confirms gesture
detection.py - Monitoring loop → Face recognition: identifies person
detection.py - Monitoring loop → IP geolocation: requests location
detection.py - Monitoring loop → Evidence capture: captures frame
detection.py - Monitoring loop → Alert cooldown: checks interval
README.md - Monitoring loop → Push notification: dispatches alert
README.md - Monitoring loop → Email alert: dispatches alert
README.md - Push notification → ntfy.sh: sends notification
README.md - Email alert → Gmail SMTP: sends email
detection.py - Email alert → Evidence capture: attaches image
README.md - Web user → Flask routes: uses
app.py - Flask routes → Web pages: renders pages
app.py - Flask routes → Registration and login: routes requests
app.py - Flask routes → Profile management: routes requests
app.py - Registration and login → SQLite user database: inserts user
app.py - Profile management → SQLite user database: reads and updates
app.py - Registration and login → Profile photo upload: saves photo
app.py - Profile photo upload → Face recognition: provides known faces
README.md - Database initializer → SQLite user database: creates schema
init_db.py