Skip to main content

Zero-Trace Contextual Edge Video Analytics SDK

Project description

FluxState: Edge Intelligence SDK

PyPI version License: MIT Tests: Passing

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.memset to 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 Dockerfile for 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

fluxstate_edge-1.3.1.tar.gz (21.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fluxstate_edge-1.3.1-py3-none-any.whl (21.5 kB view details)

Uploaded Python 3

File details

Details for the file fluxstate_edge-1.3.1.tar.gz.

File metadata

  • Download URL: fluxstate_edge-1.3.1.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

Hashes for fluxstate_edge-1.3.1.tar.gz
Algorithm Hash digest
SHA256 6c5d222b121e24804922e582a82ba4d77634aa5a0087a4c54a91eddd93b5ee7b
MD5 9e0d4d3dd17091dfa532b93cfdc38bc7
BLAKE2b-256 192ee979bceab8d02a1623ad91fa6f0b213684ce2392f3f37d4a8c609714a16b

See more details on using hashes here.

Provenance

The following attestation bundles were made for fluxstate_edge-1.3.1.tar.gz:

Publisher: publish.yml on iamrealvinnu/fluxstate

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file fluxstate_edge-1.3.1-py3-none-any.whl.

File metadata

  • Download URL: fluxstate_edge-1.3.1-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

Hashes for fluxstate_edge-1.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c1e6303de01e3efd419dbcb5ed0354c9e18d8b21f76fb1b97376d8236b57c21f
MD5 2d3bb759b9e6f6b9e862dac99ad8fbbc
BLAKE2b-256 d28767fd6cc96920f55a802fbd04510d8e144a2e14fc032899a2c5c2660da99d

See more details on using hashes here.

Provenance

The following attestation bundles were made for fluxstate_edge-1.3.1-py3-none-any.whl:

Publisher: publish.yml on iamrealvinnu/fluxstate

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page