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, audio processing, and VLM (Vision-Language Model) semantic reasoning.
🚀 Core Capabilities
- Temporal Forensic Database: Events and behavioral anomalies are logged directly into a local SQLite database (
core/forensics.py). This creates a searchable text-based ledger of physical events. - Agentic VLM Reasoner: The architecture intercepts complex spatial events and runs Vision-Language Models (e.g., Qwen2.5-VL) locally via MLX on Apple Silicon unified memory for deep contextual scene understanding.
- Tactical Visual Grounding: Automatically draws explicit red bounding boxes on target anomalies and utilizes strict, unbiased OSINT prompts to force the VLM to classify threats with pinpoint accuracy.
- C-Level Memory Mitigation: FluxState uses
ctypes.memsetto manually zero out numpy array pixel buffers at the C-level immediately after inference to mitigate image retention in the Python heap. - Hardware Agnostic (RTSP): Connects to existing IP cameras via standard RTSP URLs without requiring proprietary recording hardware.
- Containerized Edge Deployment: Includes a highly optimized
Dockerfilefor enterprise edge deployments (e.g., Kubernetes/Docker Swarm), solving native OS dependencies.
📦 Installation & Deployment
Option A: Enterprise Docker Deployment (Recommended)
For production environments, use the provided Docker container to guarantee system dependencies (Tesseract, PortAudio) are perfectly locked.
docker build -t fluxstate-edge .
docker run -d --name fluxstate-edge fluxstate-edge
Option B: Local Python Development
# macOS
brew install tesseract portaudio
# Linux
sudo apt-get install tesseract-ocr libportaudio2 libportaudiocpp0 portaudio19-dev
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()
🧪 Testing
FluxState ships with an automated pytest suite covering the Forensic SQLite ledger and JSON intelligence policies.
pytest tests/
🛡️ Architecture Overview
Please refer to the architecture.md file in the source repository for a deeper dive into the threading model, the VLM integration 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.3.0.tar.gz.
File metadata
- Download URL: fluxstate_edge-1.3.0.tar.gz
- Upload date:
- Size: 21.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ffdad88b08499afa2d8a3560f648dc2cfd8ace2ade4e9083190d19395c7457db
|
|
| MD5 |
cf26e40a4d7d43e55c1db5a47d2cc7ce
|
|
| BLAKE2b-256 |
209144ba12348651c4296c27a94edd51ae751cb4d7542171a5a10355c484bcfb
|
Provenance
The following attestation bundles were made for fluxstate_edge-1.3.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.3.0.tar.gz -
Subject digest:
ffdad88b08499afa2d8a3560f648dc2cfd8ace2ade4e9083190d19395c7457db - Sigstore transparency entry: 2071867128
- Sigstore integration time:
-
Permalink:
iamrealvinnu/fluxstate@00656e42e0284f950549d8b875a3d92288aaf4db -
Branch / Tag:
refs/tags/v1.3.0 - Owner: https://github.com/iamrealvinnu
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@00656e42e0284f950549d8b875a3d92288aaf4db -
Trigger Event:
release
-
Statement type:
File details
Details for the file fluxstate_edge-1.3.0-py3-none-any.whl.
File metadata
- Download URL: fluxstate_edge-1.3.0-py3-none-any.whl
- Upload date:
- Size: 21.5 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 |
4d592832827d385631c2764c22f039c6c46ac8f09788b34d1d0224210df75fdb
|
|
| MD5 |
35e7f374e62198fbf0d4af58644b994d
|
|
| BLAKE2b-256 |
fce0f8adffc61ce978bbfc57b29e0bc1a9950331a451c6f5f0ad2c832ab13dd9
|
Provenance
The following attestation bundles were made for fluxstate_edge-1.3.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.3.0-py3-none-any.whl -
Subject digest:
4d592832827d385631c2764c22f039c6c46ac8f09788b34d1d0224210df75fdb - Sigstore transparency entry: 2071867130
- Sigstore integration time:
-
Permalink:
iamrealvinnu/fluxstate@00656e42e0284f950549d8b875a3d92288aaf4db -
Branch / Tag:
refs/tags/v1.3.0 - Owner: https://github.com/iamrealvinnu
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@00656e42e0284f950549d8b875a3d92288aaf4db -
Trigger Event:
release
-
Statement type: