How sasidhar459/ai_security_v2 works
Smart Guard AI captures face data, trains and verifies identities, then monitors a camera stream to classify known and unknown people, record attendance, and alert on intruders. Its Flask dashboard exposes live monitoring information, while separate analysis and retraining workflows support evaluation and model maintenance. The live recognition stages are represented at the documented pipeline level; some internal calls and dashboard routes were not shown in the excerpts, so those links are omitted rather than inferred.
Main entry points: security_system.py Security Runtime · collect_dataset.py Dataset Capture · database.py Attendance Database · telegram_send.py Telegram Alerts
Components 20
Data and Models
- Face Dataset
- Dataset Capture
collect_dataset.py - Model Training
train_model.py - Centroid Builder
generate_centroid.py
Live Security
- Runtime Configuration
config.py - Security Runtime
security_system.py - Face Recognition
security_system.py - Face Tracking
utils/tracker.py - Intruder Records
security_system.py
Attendance and Dashboard
- Attendance Database
database.py - SQL Server
- Flask Dashboard
flask_app.py - Dashboard View
templates/index.html - Telegram Alerts
telegram_send.py
Analysis and Maintenance
- Model Retraining
retrain_job.py - Reports and Graphs
analysis_security.py - Runtime Logs
Other components
- Operator
- Camera
- Telegram API
Connections 20
- Operator → Dataset Capture: collects faces
README.md - Dataset Capture → Face Dataset: saves images
collect_dataset.py - Operator → Model Training: trains model
README.md - Face Dataset → Model Training: reads images
README.md - Operator → Centroid Builder: builds centroids
README.md - Face Dataset → Centroid Builder: reads images
generate_centroid.py - Operator → Security Runtime: starts monitoring
README.md - Camera → Security Runtime: provides frames
README.md - Runtime Configuration → Security Runtime: configures runtime
security_system.py - Security Runtime → Face Recognition: runs pipeline
README.md - Security Runtime → Face Tracking: tracks faces
security_system.py - Security Runtime → Intruder Records: records intruders
security_system.py - Security Runtime → Attendance Database: logs attendance
README.md - Attendance Database → SQL Server: reads and writes
database.py - Security Runtime → Flask Dashboard: starts dashboard
security_system.py - Security Runtime → Telegram Alerts: sends alerts
README.md - Telegram Alerts → Telegram API: posts alerts
telegram_send.py - Operator → Reports and Graphs: generates reports
README.md - Reports and Graphs → Runtime Logs: reads runtime data
- Operator → Model Retraining: runs retraining
retrain_job.py