How yuturuishi/rebucca works
Rebucca is a multi-camera video access and intelligent surveillance platform. Its main user workflow is to add a camera, configure detection and business algorithms, draw and bind monitoring zones, start analysis, and review alarms. Runtime analysis runs per-camera pipelines, applies detection and tracking plus zone rules, and sends alarm events for persistence. The graph also preserves documented stream management, recording, ONVIF discovery, large-model review, and operations capabilities. Several view, streaming, and integration implementations were not excerpted; documented relationships use the README as evidence.
Main entry points: models.py Platform models · pipeline.py Camera pipeline · factory.py Engine factory · StreamView.py Stream management
Components 30
Video access
- Web interface
- Stream management
app/views/StreamView.py - GB28181 SIP
app/utils/GB28181SipServer.py - ZLMediaKit
app/utils/ZLMediaKitApi.py - ONVIF discovery
app/services/onvif_discovery.py - Video decoder
static/lib/easyPlayer/js/decoder-pro-mt-worker.js
Analysis and rules
- Model configuration
app/views/SmallModelView.py - Business algorithms
app/views/AlgorithmView.py - Zone configuration
app/views/AnalysisView.py - Analysis manager
app/analysis/manager.py - Camera pipeline
app/analysis/pipeline.py - Detector pool
app/analysis/worker_pool.py - Engine factory
app/analysis/engines/factory.py - Engine interface
app/analysis/engines/base.py - YOLO PyTorch
app/analysis/engines/yolo_pytorch_engine.py - ONNX engine
app/analysis/engines/onnx_engine.py - OpenVINO engine
app/analysis/engines/openvino_engine.py - YOLO postprocess
app/analysis/engines/yolo_postprocess.py - Motion analysis
app/analysis/motion.py - Zone rules
app/analysis/biz_rules.py - Large-model review
app/utils/LLMUtils.py
Platform operations
- Recording manager
app/recording/manager.py - FFmpeg
- Operations panel
app/views/ControlView.py - Language support
app/utils/LanguageUtils.py
Data and events
- Platform models
app/models.py - Event bridge
app/analysis/event_bridge.py - Alarm service
app/services/alarm_service.py - SQLite database
Other components
- Operator
Connections 35
- Operator → Web interface: configures
- Web interface → Stream management: manages streams
- Stream management → GB28181 SIP: accepts GB28181
- Stream management → ZLMediaKit: forwards streams
- Stream management → ONVIF discovery: discovers cameras
- Operator → Model configuration: configures models
- Operator → Business algorithms: defines algorithms
- Operator → Zone configuration: binds zones
- Model configuration → Platform models: stores configuration
app/views/SmallModelView.py - Business algorithms → Platform models: stores configuration
- Zone configuration → Platform models: stores zones
- Operator → Analysis manager: starts analysis
- Analysis manager → Camera pipeline: starts pipeline
app/analysis/manager.py - Analysis manager → Detector pool: routes inference
app/analysis/manager.py - Camera pipeline → Detector pool: requests detectors
- Detector pool → Engine factory: creates engines
app/analysis/worker_pool.py - Engine factory → Engine interface: implements interface
app/analysis/engines/factory.py - Engine factory → YOLO PyTorch: dispatches to
app/analysis/engines/factory.py - Engine factory → ONNX engine: dispatches to
app/analysis/engines/factory.py - Engine factory → OpenVINO engine: dispatches to
app/analysis/engines/factory.py - ONNX engine → YOLO postprocess: uses postprocess
app/analysis/engines/onnx_engine.py - OpenVINO engine → YOLO postprocess: uses postprocess
app/analysis/engines/openvino_engine.py - Camera pipeline → Motion analysis: analyzes motion
app/analysis/pipeline.py - Camera pipeline → Zone rules: matches zone rules
app/analysis/pipeline.py - Camera pipeline → Large-model review: requests review
app/analysis/pipeline.py - Analysis manager → Event bridge: forwards events
app/analysis/manager.py - Event bridge → Alarm service: dispatches alarms
app/analysis/event_bridge.py - Alarm service → Platform models: persists alarms
app/services/alarm_service.py - Platform models → SQLite database: stores records
app/models.py - Operator → Recording manager: manages recording
- Recording manager → FFmpeg: records segments
app/recording/manager.py - Recording manager → Platform models: indexes files
app/recording/manager.py - Operator → Operations panel: monitors platform
- Web interface → Video decoder: plays video
- Web interface → Language support: uses translations