How khaled214566/face-recognition works
SIVAC is a PyQt5 desktop video-surveillance application. Its main workflow is source capture → person/pose tracking and face identity → behavior events → annotated display and durable alerts, with enrollment and zone setup feeding surveillance and history/reporting providing follow-up. The graph combines excerpted calls, SOURCE INDEX references, and documented capabilities; links based only on README architecture statements are identified by README evidence, and unsampled implementation details are not assumed.
Main entry points: app_context.py App composition · video_worker.py Video worker · pipeline.py Frame pipeline · behavior_analyzer.py Behavior analyzer
Components 34
Desktop interface
- Application setup
main.py - App composition
ui/app_context.py - Live surveillance
ui/views/live_view.py - Batch analysis
ui/views/batch_view.py - Event history
ui/views/history_view.py - Video worker
ui/workers/video_worker.py - Video display
ui/widgets/video_widget.py - Alert card
ui/widgets/alert_card.py
Video analysis
- Live capture
core/capture/stream_reader.py - File capture
core/capture/video_file_reader.py - Frame pipeline
core/pipeline.py - Person and pose tracking
core/detection/person_tracker.py - Pose estimation
core/detection/pose_estimator.py - Behavior analyzer
core/behavior/behavior_analyzer.py - Track history
core/behavior/track_state.py - Behavior geometry
core/behavior/geometry.py - Zone monitoring
core/behavior/rules/zone_monitor.py - Motion rules
core/behavior/rules/motion_kinematics.py - Altercation rules
core/behavior/rules/altercation.py - Event detection
core/behavior/event_detector.py - Frame annotation
core/annotator.py
Identity and zones
- Face enrollment
ui/views/enrollment_view.py - Zone editor
ui/views/zone_editor_view.py - Face detection
core/detection/face_engine.py - Identity resolution
core/identity.py
Persistence
- Application settings
config/settings.py - SQLite database
database/database_manager.py - Database models
database/models.py - Face vector index
database/vector_store.py
Alerts and exports
- Alert handling
services/alert_manager.py - Email and Telegram
services/notifier.py - Sound alert
services/sound_alert.py - Annotated video export
services/video_exporter.py
Other components
- Operator
Connections 48
- Operator → Application setup: launches
- Application setup → App composition: creates
main.py - Application setup → Application settings: loads
main.py - Operator → Live surveillance: starts surveillance
- Operator → Face enrollment: enrolls people
- Operator → Zone editor: defines zones
- Operator → Batch analysis: selects videos
- Operator → Event history: reviews events
- App composition → Application settings: reads
ui/app_context.py - App composition → SQLite database: creates
ui/app_context.py - App composition → Face vector index: creates
ui/app_context.py - App composition → Alert handling: creates
ui/app_context.py - App composition → Email and Telegram: creates
ui/app_context.py - App composition → Frame pipeline: assembles
ui/app_context.py - Live surveillance → Video worker: starts
ui/views/live_view.py - Batch analysis → Video worker: starts
ui/views/batch_view.py - Video worker → Live capture: reads live frames
ui/workers/video_worker.py - Video worker → File capture: reads file frames
ui/workers/video_worker.py - Video worker → Frame pipeline: processes frames
- Frame pipeline → Person and pose tracking: tracks people
core/pipeline.py - Frame pipeline → Face detection: detects faces
core/pipeline.py - Frame pipeline → Identity resolution: resolves identities
core/pipeline.py - Frame pipeline → Behavior analyzer: analyzes behavior
core/pipeline.py - Frame pipeline → Frame annotation: annotates frames
core/pipeline.py - Behavior analyzer → Track history: maintains tracks
core/behavior/behavior_analyzer.py - Behavior analyzer → Zone monitoring: applies rules
core/behavior/behavior_analyzer.py - Behavior analyzer → Motion rules: applies rules
core/behavior/behavior_analyzer.py - Behavior analyzer → Altercation rules: applies rules
core/behavior/behavior_analyzer.py - Behavior analyzer → Event detection: detects events
core/behavior/behavior_analyzer.py - Motion rules → Behavior geometry: uses geometry
core/behavior/rules/motion_kinematics.py - Altercation rules → Behavior geometry: uses geometry
core/behavior/rules/altercation.py - Zone monitoring → Behavior geometry: uses geometry
core/behavior/rules/zone_monitor.py - Motion rules → Pose estimation: uses pose data
core/behavior/rules/motion_kinematics.py - Altercation rules → Pose estimation: uses pose data
core/behavior/rules/altercation.py - Track history → Behavior geometry: uses geometry
core/behavior/track_state.py - Face enrollment → Live capture: previews camera
ui/views/enrollment_view.py - Face enrollment → Face detection: extracts embeddings
ui/views/enrollment_view.py - App composition → SQLite database: stores embeddings
ui/app_context.py - App composition → Face vector index: indexes embeddings
ui/app_context.py - Identity resolution → Face vector index: matches faces
ui/app_context.py - Identity resolution → SQLite database: looks up identities
ui/app_context.py - Zone editor → Live capture: captures preview
ui/views/zone_editor_view.py - Zone editor → SQLite database: saves zones
- App composition → SQLite database: loads zones
ui/app_context.py - Video worker → Alert handling: handles events
ui/workers/video_worker.py - Alert handling → SQLite database: persists events
- Alert handling → Email and Telegram: sends notifications
- Video worker → Annotated video export: writes annotated video
ui/workers/video_worker.py