How prince-of-morocco/ai-driven-smart-surveillance-for-weapon-detection-using-yolov8 works
This is a desktop-to-server weapon-surveillance application. A user logs in, supplies a location and alert recipient, then starts webcam monitoring; the client runs YOLOv8 detection, displays annotated frames, plays an alarm, and posts captured detections to Django. The backend accepts uploads, stores alert records, dispatches email or SMS notifications, and serves filtered dashboard and alert-history views. The principal client and server calls are excerpted; broader notification and dashboard capabilities are also documented in the README.
Main entry points: detection/views.py Account and dashboard views · detection.py Camera detector · login_window.py Desktop login · alertupload_rest/views.py Alert upload
Components 16
Desktop client
- Desktop login
Client_Side/login_window.py - Monitoring settings
Client_Side/settings_window.py - Detection display
Client_Side/detection_window.py - Camera detector
Client_Side/detection.py
Upload and alerts
- REST endpoints
Server_Side/alertupload_rest/urls.py - Alert upload
Server_Side/alertupload_rest/views.py - Upload serializer
Server_Side/alertupload_rest/serializers.py - Detection records
Server_Side/detection/models.py - Email and SMS
Server_Side/alertupload_rest/views.py
Accounts and history
- Account and dashboard views
Server_Side/detection/views.py - Registration form
Server_Side/detection/forms.py - History filters
Server_Side/detection/filters.py - Web pages
Server_Side/detection/templates/detection
Other components
- Operator
- Webcam
- Email / SMS providers
Connections 19
- Operator → Desktop login: opens
- Desktop login → REST endpoints: requests token
Client_Side/login_window.py - Desktop login → Monitoring settings: opens settings
Client_Side/login_window.py - Operator → Monitoring settings: sets monitoring
README.md - Monitoring settings → Detection display: starts detector
Client_Side/settings_window.py - Detection display → Camera detector: creates and starts
Client_Side/detection_window.py - Webcam → Camera detector: provides frames
Client_Side/detection.py - Camera detector → Detection display: emits frames
Client_Side/detection_window.py - Camera detector → REST endpoints: posts capture
Client_Side/detection.py - REST endpoints → Alert upload: routes upload
Server_Side/alertupload_rest/urls.py - Alert upload → Upload serializer: validates and saves
Server_Side/alertupload_rest/views.py - Upload serializer → Detection records: serializes records
Server_Side/alertupload_rest/serializers.py - Alert upload → Email and SMS: dispatches alert
Server_Side/alertupload_rest/views.py - Email and SMS → Email / SMS providers: sends email or SMS
Server_Side/alertupload_rest/views.py - Operator → Account and dashboard views: uses dashboard
README.md - Account and dashboard views → Registration form: uses registration form
Server_Side/detection/views.py - Account and dashboard views → History filters: filters records
Server_Side/detection/views.py - Account and dashboard views → Detection records: queries records
Server_Side/detection/views.py - Account and dashboard views → Web pages: renders pages
README.md