Edge AI Libraries

repository·main·Indexed 41 days ago

https://github.com/open-edge-platform/edge-ai-libraries

A suite of Intel-optimized tools, libraries, and microservices for real-time AI deployment at the edge, focusing on computer vision, multimedia, and industrial automation. Includes the Edge Device Enablement Framework (EEF) for deploying validated infrastructure stacks (profiles) and an OEP installer for managing component lifecycles on Ubuntu-based devices.

Tokens
465.1K
Snippets
1.2K
Records
2K
Agent score
51%

What's inside Edge AI Libraries

  1. Overview of the Alert Agent Service

    main

    The Alert Agent Service is a multimodal alert action dispatcher microservice designed for edge environments. It acts as a bridge between detection pipelines (video analytics, audio sensors, IoT) and response actions.

    How it works:

    1. Receives Alerts: Accepts multimodal payloads including text, image, audio, video, and binary media.
    2. Reasons: Uses an LLM-powered agentic backend (via Google ADK and OpenVINO™ Model Server) to analyze the alert context.
    3. Dispatches Actions: Selects and executes configurable tools such as logging, webhooks, MQTT publishing, or snapshot saving.

    Key Capabilities:

    • Agentic vs. Rule-Based: Supports intelligent tool selection via LLM or deterministic routing via rules (set by AGENT_MODE=false).
    • Deduplication: Prevents notification floods by suppressing repeated alerts within a configurable window.
    • Escalation: Automatically triggers additional tools (e.g., MQTT) after a specific number of consecutive detections.
    • Extensibility: Supports Model Context Protocol (MCP) to dynamically add tools from external servers and allows hot-reloading of configurations without restarts.
  2. Overview of KVCache Quantization and Offload Library

    main

    The KVCache Quantization and Offload Library provides a near-lossless 4-bit KV-cache quantization codec designed for LMCache and vLLM. It is specifically optimized for edge devices to offload KV caches from XPU memory to host memory or disk. This process restores prefix-cache hits that would otherwise be lost due to memory pressure, effectively turning full prefills into cache hits served from disk.

    Key Features:

    • 4-bit Quantization: Uses Randomized Hadamard Transform (RHT) preconditioning for near-lossless compression.
    • Configurable Scaling: Supports per_tensor, per_channel, and per_token scaling methods, with optional asymmetric quantization.
    • Multi-Platform Kernels: Includes CPU kernels (AVX2/AVX-512 with optional OpenMP) and optional standalone SYCL/DPC++ kernels for Intel XPUs.
    • LMCache Integration: Acts as a drop-in codec for LMCache's serde interface, remaining transparent to the vLLM serving path.
    • Hybrid Model Support: Allows per-sub-state control, enabling hybrid models (like Mamba or linear-attention) to keep specific states at full precision.
  3. Overview of FLANN Optimized with Intel oneAPI DPC++

    main

    FLANN (Fast Library for Approximate Nearest Neighbors) is a 3-D processing library designed to search for nearest neighbors in three-dimensional or higher-dimensional spaces. It builds indices for input points and provides interfaces to search for the nearest K neighbors or nearest R (radius) neighbors.

    This specific implementation is optimized using Intel oneAPI DPC++. The migration from CUDA to Data Parallel C++ (DPC++) involves:

    • Using the oneAPI DPC++ Compatibility Tool (DPCT) to migrate CUDA implementations for k-dimensional tree building and searching.
    • Manually migrating certain CUDA thrust functions.
    • Adapting dimension, index space size, and SYCL nd_range based on hardware device capabilities (maximum work-group size).
    • Utilizing Unified Shared Memory (USM) to eliminate unnecessary memory copies.
  4. Overview of the Agent Quality Handler service

    main

    The Agent Quality Handler is a standalone, configuration-driven microservice designed to run Agentic Predictive Maintenance graphs. It processes detections received from an external storage API to perform automated analysis and decision-making.

    Key Capabilities

    • Agent Types: Supports Policy, Analysis, Evidence, and Ticketing agents.
    • Execution Modes: Offers a rule-based fallback mode or a profile-gated LLM mode.
    • Ingestion: Ingests detections via MQTT, supporting authenticated connections to external brokers.
    • Extensibility: Supports custom use-case configurations and prompt mounts.
    • Observability: Provides a direct REST API and Prometheus metrics on port 5002.
    • Error Handling: Provides explicit graph errors while preserving partial results.

    Deployment Notes

    • The service requires an external Detection Service and storage.
    • A default Docker Compose deployment includes the agent and a private MQTT broker.
    • Activating the llm profile adds OpenVINO Model Server (OVMS) and model download capabilities.
    • Note that the default deployment does not include a UI or Nginx.
  5. Overview of the Scene Understanding Service Microservice

    main

    The Scene Understanding Service is a FastAPI-based microservice designed for multi-scene behavioral analysis. It functions as an event consumer and producer, subscribing to SceneScape MQTT topics to ingest scene events and track objects across configured scenes and zones.

    Key characteristics:

    • Declarative Logic: Behavior is defined via a rule engine using YAML configuration rather than code changes.
    • Event Routing: It interprets scene events and routes resulting alerts to a downstream alert service.
    • Decoupled Use Cases: It can be used for various scenarios such as detecting loitering, checkout bypass, concealment, or restricted-zone violations.
    • Integration Requirement: Requires a reachable SceneScape deployment (including an MQTT broker and REST API) to function.
  6. Overview of the Alert Agent Microservice

    main

    The Alert Agent Microservice is a FastAPI-based service designed for alert action dispatching. It acts as a reasoning layer between detection pipelines and action execution.

    Core Workflow:

    1. Receive: It accepts alert events from upstream detection pipelines.
    2. Reason: It uses an LLM-powered agentic backend to analyze the alert context.
    3. Dispatch: It executes one or more configurable action tools based on its reasoning.

    Supported Action Tools include:

    • Logging
    • Webhook notifications
    • MQTT publishing
    • Snapshot saving
  7. Overview of the Vector Retriever - Milvus Microservice

    main

    The Vector Retriever - Milvus Microservice is a Python-based service designed for efficient semantic retrieval over visual datasets. It enables users to retrieve relevant visual data from a Milvus vector database using either text or image queries.

    Core Capabilities

    • Text-to-Image Retrieval: Converts text prompts into embeddings using the CLIP model to find relevant images. Supports optional filters.
    • Image-to-Image Retrieval: Uses a query image to find visually similar images via CLIP image encoding.
    • Vector Search with Metadata: Performs top-k similarity searches in Milvus and returns associated metadata (e.g., file paths, source references, or original image linkages) along with similarity scores and unique identifiers.
    • Scalable Retrieval: Optimized for large-scale datasets using fast nearest-neighbor search within Milvus.
  8. Overview of the Visual Pipeline and Platform Evaluation Tool (ViPPET)

    main

    ViPPET (Visual Pipeline and Platform Evaluation Tool) is a tool designed to simplify hardware selection for AI workloads. It allows developers to configure workload parameters, perform performance benchmarking, and analyze critical metrics to optimize hardware selection and performance tuning.

    Core Capabilities

    • Hardware Comparison: Compare how AI pipelines behave across different hardware targets, model variants, and input sources.
    • Performance Benchmarking: Validate model performance targets and KPIs by testing inference pipelines with various accelerators to measure throughput, latency, and resource utilization.
    • End-to-End Validation: Exercise complete media and AI pipelines with different inputs and execution settings to understand real-world deployment behavior.
    • Intel® Optimization: Optimized for Intel® AI Edge Systems, allowing pipelines to run directly on target devices for seamless integration.
  9. Overview of Deep Learning Streamer Pipeline Server

    main

    The Deep Learning Streamer Pipeline Server is a Python-based, containerized microservice designed for developing and deploying video analytics pipelines. It leverages GStreamer and Deep Learning Streamer (DL Streamer) to provide video ingestion and deep learning inference capabilities.

    It is used to convert video streams into insights by performing operations such as:

    • Object detection
    • Classification
    • Identification
    • Counting
    • Tracking
  10. Overview of the Visual Data Preparation for Retrieval - Milvus Microservice

    main

    The Dataprep - Milvus microservice is a Python-based service designed to preprocess visual data (images and videos) and store their feature embeddings in a vector database (Milvus) for efficient retrieval.

    It uses the CLIP model's image encoder to extract embeddings. This allows for advanced semantic search capabilities across large-scale visual datasets.

    Core Capabilities:

    • Video Processing: Automatically extracts frames at configurable intervals for embedding generation.
    • Image/Frame Processing: Handles resizing, color conversion, and normalization.
    • Object-Aware Preprocessing: Uses object detection to crop images around key subjects. This ensures that important objects remain recognizable and high-quality even after resizing, which significantly improves retrieval performance for complex scenes.
    • Metadata Linking: Maintains a link between cropped objects and their original source images. If a search retrieves a specific cropped object, the system can return the original image to provide full context.
  11. Overview of Metrics Manager

    main

    Metrics Manager is a unified service for collecting, ingesting, and relaying metrics. It combines Telegraf-based system metrics (CPU, memory, temperature, GPU, and NPU) with a REST API for custom metrics.

    Key Capabilities:

    • System Metrics: Automatically collects hardware telemetry including Intel GPUs (via qmassa) and Intel NPUs (via PMT sysfs).
    • Custom Ingestion: Supports JSON, InfluxDB Line Protocol, and OpenTelemetry (OTLP) via a REST API.
    • Real-time Streaming: Provides real-time metrics via Server-Sent Events (SSE) at GET /metrics/stream.
    • Prometheus Integration: Exposes a Prometheus-compatible endpoint for scraping.
    • Reliability Features: Includes rate limiting, memory protection (automatic eviction), and distributed tracing support via correlation IDs.
  12. Overview of ViPPET Pipeline Management

    main
    ViPPET's Pipeline Builder allows you to configure, edit, and test AI pipelines. The workflow involves creating a pipeline using a DL Streamer launch string, modifying individual pipeline elements, and executing the pipeline on different hardware (CPU vs. GPU) to perform performance comparisons and evaluations.