OpenNVR

The KAI-C Orchestrator

The KAI-C AI Adapter acts as OpenNVR’s highly specialized computer-vision orchestrator, specifically engineered to handle complex machine learning models, persistent tensor sessions, and local hardware-acceleration pipelines.

Architectural Position

The kai-c adapter exists natively within the repository under AI-adapters/kai-c/.

Unlike simple REST wrappers, this container is heavily integrated with the Python ecosystem, heavily utilizing deep-learning visualization frameworks (numpy, opencv-python-headless) to parse OpenNVR’s raw image URIs dynamically.

Establishing the Runtime

In your kai-c adapter directory:

  1. Ensure your physical server meets the hardware preconditions (e.g., explicit GPU PCI-E passthrough into the Docker engine, or sufficient multi-core CPUs for basic pipelines).
  2. For specific container architectures, always cross-reference the START_INSTRUCTIONS.md inside the directory.
  3. If connecting to proprietary external endpoints, prepare to inject your environment variables.

Staging & Deployment

Edge-Node Production (Docker)

For 24/7 production stability, ensure KAI-C is heavily containerized alongside the core NVR.

cd kai-c/
# Hydrate the internal Python container
docker build -t aegisnvr/kai-c:latest .
# Map explicitly to the secure OpenNVR network bridge
docker run -d --network opennvr-bridge --name kai-c aegisnvr/kai-c:latest

Pure Python Runtime (Development)

If you are a Computer Vision Engineer debugging bounding-box mapping logic, we expose multiple un-containerized entry points:

  • main.py
  • start.py
  • start_no_reload.py (For extreme load-testing)

Assuming a secure Python 3.11 virtual environment is active:

uv pip install -r requirements.txt
python start.py

Immutable Integration Protocol

OpenNVR inherently uses the kai_c.connector middleware to negotiate payload responses. The adapter communicates exact bounding geometry and statistical confidences (defined strictly in kai_c.schemas) back to the OpenNVR backend over the internal private network.

This strict data contract ensures seamless, instantaneous rendering of detected AI labels across the NVR UI Dashboard without exposing the actual processing clusters to the public internet.