Zero-Trace Contextual Edge Video Analytics SDK
Project description
FluxState: Edge Intelligence SDK
FluxState Edge is an extensible, camera-agnostic video analytics SDK designed for integration into enterprise security backends. It processes RTSP streams locally on the edge, extracting behavioral metadata using a combination of object detection, 3D skeletal posing, and audio processing.
The system is designed to minimize storage overhead by saving structured metadata (JSON telemetry and SQLite logs) rather than raw video footage, making it useful for privacy-conscious environments.
🚀 Core Capabilities
- Temporal Forensic Database: Events and behavioral anomalies are logged directly into a local SQLite database (
core/forensics.py). This allows operators to run SQL or text searches to locate past incidents (e.g., finding instances of specific anomalies or entity interactions) without needing to scrub through hours of video. - Hardware Agnostic (RTSP): Connects to existing IP cameras via standard RTSP URLs without requiring proprietary recording hardware.
- C-Level Memory Mitigation: Python's garbage collector can leave image data in memory longer than desired. FluxState uses
ctypes.memsetto manually zero out numpy array pixel buffers at the C-level immediately after inference. While OS and GPU drivers may still cache buffers, this mitigates raw image lingering in the Python heap. - Over-The-Air (OTA) Policies: Behavioral thresholds and integration webhooks can be updated dynamically via the
intelligence_policy.jsonfile. The SDK hot-reloads these parameters without restarting the stream. - Headless Telemetry Hooks: Designed to run purely in the background. It emits Python callback events or HTTP POST webhooks when behavioral thresholds are crossed, acting as a data-feed for your own Video Management System (VMS).
📦 Installation & System Requirements
System Dependencies: FluxState relies on native system libraries for optical character recognition and audio streaming.
- macOS:
brew install tesseract portaudio - Linux (Ubuntu/Debian):
sudo apt-get install tesseract-ocr libportaudio2 libportaudiocpp0 portaudio19-dev
Install the SDK:
pip install fluxstate-edge
🛠️ SDK Integration
FluxState is designed to be embedded into your proprietary backend.
Minimal 5-Line Integration
Create an entrypoint script (e.g., main.py):
import time
from app import FluxStateNode
# Initialize the SDK
sdk = FluxStateNode()
# Define your integration hook
def handle_threat(event_payload):
print(f"\n[INTEGRATION BUS] Threat Detected! Escalating to VMS...")
print(f"Target Identity: {event_payload['entities']}")
print(f"Behavioral Vector: {event_payload['context_log']}")
# Bind the hook to the SDK
sdk.on_threat_detected = handle_threat
# Deploy Headlessly (Runs as a background daemon)
sdk.start_headless_daemon()
try:
while True:
time.sleep(1)
except KeyboardInterrupt:
print("Shutting down SDK cleanly...")
sdk.stop()
Forensic Searching
You can query the SQLite database to retrieve past events:
from core.forensics import ForensicDatabase
db = ForensicDatabase()
results = db.query_forensics("ANOMALY")
for timestamp, context in results:
print(f"[{timestamp}] {context}")
⚙️ Configuration: The Intelligence Policy
FluxState uses a dynamic JSON file (intelligence_policy.json) located in the runtime directory to configure behavioral thresholds.
{
"SECTOR_ID": "ENTERPRISE-HQ-01",
"RTSP_STREAM_URL": "0",
"INTEGRATION_WEBHOOK_URL": "https://api.your-vms.com/v1/telemetry",
"THREAT_VECTORS": {
"ARMS_RAISED_OR_REACHING": {
"enabled": true,
"escalation_threshold": 0.85
}
}
}
🛡️ Architecture Overview
Please refer to the architecture.md file in the source repository for a deeper dive into the threading model, the telemetry pipeline, and the SQLite database schema.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fluxstate_edge-1.1.0.tar.gz.
File metadata
- Download URL: fluxstate_edge-1.1.0.tar.gz
- Upload date:
- Size: 19.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8cfae4b127afcd075406c9925a5e697f88a3cbf6ee103413aa9fad29b2c9fc8d
|
|
| MD5 |
f02977dd7a6fce99ef92c4a6f9b0068e
|
|
| BLAKE2b-256 |
c8f974f2e868cbb5a0eca521ef05c9c3f62917a1342ec99e9536eae18537cf35
|
Provenance
The following attestation bundles were made for fluxstate_edge-1.1.0.tar.gz:
Publisher:
publish.yml on iamrealvinnu/fluxstate
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fluxstate_edge-1.1.0.tar.gz -
Subject digest:
8cfae4b127afcd075406c9925a5e697f88a3cbf6ee103413aa9fad29b2c9fc8d - Sigstore transparency entry: 2071654117
- Sigstore integration time:
-
Permalink:
iamrealvinnu/fluxstate@261574762695f9153f743f6f8f0cc530612206ff -
Branch / Tag:
refs/tags/v1.1.0 - Owner: https://github.com/iamrealvinnu
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@261574762695f9153f743f6f8f0cc530612206ff -
Trigger Event:
release
-
Statement type:
File details
Details for the file fluxstate_edge-1.1.0-py3-none-any.whl.
File metadata
- Download URL: fluxstate_edge-1.1.0-py3-none-any.whl
- Upload date:
- Size: 19.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
794570e6f3ad72cc4a414591a40e3f1ec9a9781905fcd6543a756239c5839b3b
|
|
| MD5 |
034eaeffb0aa4b339043acff2cb8b6d2
|
|
| BLAKE2b-256 |
33ce3bc00efdabec56265668093d204d066fe0acdd1baad726fdef48017867b9
|
Provenance
The following attestation bundles were made for fluxstate_edge-1.1.0-py3-none-any.whl:
Publisher:
publish.yml on iamrealvinnu/fluxstate
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fluxstate_edge-1.1.0-py3-none-any.whl -
Subject digest:
794570e6f3ad72cc4a414591a40e3f1ec9a9781905fcd6543a756239c5839b3b - Sigstore transparency entry: 2071654127
- Sigstore integration time:
-
Permalink:
iamrealvinnu/fluxstate@261574762695f9153f743f6f8f0cc530612206ff -
Branch / Tag:
refs/tags/v1.1.0 - Owner: https://github.com/iamrealvinnu
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@261574762695f9153f743f6f8f0cc530612206ff -
Trigger Event:
release
-
Statement type: