| core | ||
| dashboard | ||
| event_recorder | ||
| ingestion | ||
| metrics | ||
| plugins | ||
| utils | ||
| main.so | ||
| README.md | ||
| requirements.txt | ||
Senttinel SD
Real-time multi-camera smoke detection platform. Analyses live RTSP video streams to identify smoke events using physics-based detection algorithms.
Designed for industrial, commercial, and residential environments where early visual smoke detection is critical.
Repository Structure
├── main.so ← Application entry point
│
├── core/ ← Detection engine and system configuration
│ ├── __init__.py
│ ├── camera_config.so ← Per-camera settings, resolution, scheduling
│ ├── detection.so ← State machine: monitoring → suspect → alarm → cooldown
│ ├── frame_buffer.so ← Circular frame buffer for pre-event recording
│ ├── license.so ← Ed25519 license validation (Cloudflare Workers)
│ ├── models.so ← Data models, detection states, configuration schema
│ ├── plugin_interface.so ← Plugin loader — discovers and validates plugins at startup
│ └── settings.so ← Global settings, persistence, runtime config updates
│
├── ingestion/ ← Camera stream management
│ ├── __init__.py
│ ├── gst_pipeline.so ← GStreamer pipeline builder (RTSP → I420 → Y-plane)
│ ├── manager.so ← Multi-camera orchestrator, lifecycle management
│ ├── rtsp_worker.so ← Per-camera worker thread: connects, extracts frames
│ └── types.so ← Frame packet types, stream metadata
│
├── dashboard/ ← Web interface
│ ├── __init__.py
│ ├── app.so ← Flask application, WebSocket endpoints, authentication
│ ├── log_handler.so ← Real-time log streaming to browser
│ ├── templates/ ← Jinja2 HTML templates
│ └── static/ ← CSS, JavaScript, images
│
├── metrics/ ← System monitoring
│ ├── __init__.py
│ └── collector.so ← Prometheus-compatible metrics (CPU, memory, FPS, detections)
│
├── event_recorder/ ← Evidence capture on detection
│ ├── __init__.py
│ ├── clip_writer.so ← Pre/post-event video clip assembly (AVI)
│ ├── event_scanner.so ← Event directory management, retention policy
│ └── snapshot_manager.so ← JPEG snapshot capture at moment of detection
│
├── utils/ ← Shared utilities
│ ├── __init__.py
│ ├── notifier.so ← Twilio SMS alerts on smoke detection
│ └── schedule_utils.so ← Detection scheduling (time windows, on/off per camera)
│
├── plugins/ ← Smoke detection algorithms
│ ├── __init__.py
│ ├── smoke_detector.py ← Wasserstein distance-based patch comparison (Dr. Gustavo Rohde, code optimised by Dr. Henrique Hayes Hesse)
│ └── patch_utils.py ← Patch extraction, statistical distance computation (Dr. Gustavo Rohde, code optimised by Dr. Henrique Hayes Hesse)
│
└── requirements.txt ← Python dependencies
Module Overview
| Module | Responsibility |
|---|---|
core/ |
Detection state machine, configuration management, license validation, plugin loading |
ingestion/ |
RTSP stream handling via GStreamer, per-camera worker threads, automatic reconnection |
dashboard/ |
Flask web interface with live camera feeds, detection stages, event history, settings |
metrics/ |
System health monitoring — CPU, memory, per-camera FPS and detection counts |
event_recorder/ |
Automated evidence capture: JPEG snapshots, AVI clips with pre-event buffer |
utils/ |
SMS notifications (Twilio), detection scheduling |
plugins/ |
Pluggable detection algorithms — loaded dynamically at startup |
Compiled Modules
Core, ingestion, dashboard, metrics, event recorder, and utility modules are distributed as compiled shared objects (.so). This is standard practice for production deployments:
- Performance — native execution, no interpretation overhead
- Consistency — identical behaviour across all deployments
- Protection — prevents accidental modification of production code
Plugins remain as plain Python to allow configuration and algorithm adjustments in the field.
Dashboard URL
Dashboard: http://localhost:5050
Configuration
| File | Purpose |
|---|---|
config/cameras.json |
Camera RTSP URLs and per-camera settings |
config/settings.json |
System settings, notifications, recording |
config/license.json |
License key (pre-provisioned) |
plugins/ |
Detection algorithms |
Build
Generated by build.sh. To rebuild from source:
bash build.sh
Requires Python 3.11+ and a C compiler. Dependencies are installed automatically.
Note:
.sofiles are architecture-specific. Binaries compiled on ARM will not run on x86_64 (Intel/AMD).
Senttinel SD v1.0 — 2026
Author: Dr. Henrique Hayes Hesse — Systems Architecture, Core Platform, Ingestion, Dashboard, Metrics, Event Recorder, Licensing, Deployment