Deploying Computer Vision Solutions at the Edge with Barbara

Computer Vision is experiencing unprecedented growth at the edge, driven by the demand for real-time data processing, enhanced privacy, and operational efficiency. This article delves into deploying a comprehensive Computer Vision solution using Barbara Edge Platform, focusing on the integration of Barbara Video Tools and the cutting-edge Ultralytics YOLOv8 application.

Technology
Written by:
Enrique Ramírez

Overview

The convergence of powerful edge devices, advanced AI models, and robust edge orchestrators is making it possible to deploy Computer Vision solutions efficiently and at scale, marking a new era of intelligent, decentralized computing. Edge-based Computer Vision applications require sophisticated orchestration to ensure consistent performance, scalability, and efficiency.

Solution Architecture

We’ll explore the architecture in detail and walk you through the  integration of video processing, AI inference, and real-time visualization.

The deployment architecture includes:

  • Capturing a video stream source: Either a camera feed or a simulated video stream.
  • Use of the MQTT Broker as the central hub for managing video and telemetry data exchange.
  • Ultralytics YOLOv8: An advanced object detection model for analyzing video frames.
  • Video Player: This application is part of the Barbara Video Tools and displays the processed video output in real time.
  • Ingester + InfluxDB + Grafana: Use these popular applications available in the Barbara Marketplace to store telemetry data and visualize it with dynamic dashboards.

DiagramaDescripción generada automáticamente
Figure 1. Solution Architecture

About Barbara Video Tools

The Barbara Video Tools are a suite of five applications designed to simplify video stream handling on Edge Nodes available in the Barbara Marketplace and included with the license.
  • Video Simulator: This tool generates video streams from local files or YouTube videos and transmits them in H.264 format via MQTT.
  • Video Reader: This tool reads video streams and broadcasts them in H.264 format over MQTT for consumption by other applications.
  • Video Player: This tool retrieves video streams published via MQTT and displays them in a web interface.
  • Video Encoder: This tool processes video flows received in base64 format via MQTT and converts them into RTSP video streams.
  • Video Recorder: This tool captures video flows received in base64 format via MQTT and stores them in a video database.

Deploying The Computer Vision Solution at the Edge 

Deploying the MQTT Broker

To deploy our solution at the edge, we'll start by establishing a central communication hub: an MQTT Broker. This broker will facilitate the seamless sharing of video streams and telemetry data among all involved applications.

The MQTT Broker can be effortlessly deployed on an Edge Node with just a few clicks, requiring minimal configuration for connection, exposed ports, etc.

Figure 2: MQTT Broker’s card  already installed in the Edge Node

Video Processing and Inference

Next, we’ll set up the Video Reader, a key component from the Barbara Video Solutions Tools. This tool efficiently ingests video streams from various sources, processes them, and streams the output in H264 format via MQTT. Following this, we’ll deploy the Ultralytics YOLOv8 Inference Server, an application designed to subscribe to MQTT topics and process the video streams provided by the Video Reader.

It will then perform advanced AI tasks such as:

  • Object detection
  • Pose identification
  • Image segmentation
  • Image classification
  • Oriented Bounding Box (OBB) detection

The server comes pre-trained with models for common datasets like COCO and OpenImage. Additionally, it allows you to upload and fine-tune custom detection models using a web file browser. For this specific use case, we'll employ the "coco_yolov8n" model for object detection.

The processed video frames, along with generated telemetry data (inference time, object counts, etc.), will be shared via MQTT.

Figure 3: Ultralytics YOLOv8 app in the Barbara Marketplace

Visualizing Results

To visualize the output, we'll deploy a Video Player application from Barbara marketplace. This application will display the composite video stream generated by the Ultralytics YOLOv8 application.

Figure 4: Video Player application card installed on the edge node

Once the Video Player application is installed, the video visualization can be accessed just by opening a new browser tab and navigating to port 5080 (also defined in the configuration).

Figure 5: Visualization of the composite video output generated by the Ultralytics YOLOv8 application

Telemetry Data Storage and Visualization

To store and visualize the telemetry data generated by the Ultralytics YOLOv8 application, we'll deploy three additional applications:

  • MQTT- InfluxDB Ingester: Extracts data from the MQTT Broker and forwards it to the InfluxDB database.
  • InfluxDB:. A time-series database for storing and querying large amounts of time-stamped data.
  • Grafana: A powerful visualization tool for creating and sharing interactive dashboards.
Figure 6: Finally, all the applications are installed in the Edge Node

Now, we can access the Grafana dashboard to visualize telemetry data in real-time. Simply access port 13000 (configured during installation) to view the predefined dashboard, which we imported using a JSON file during the app configuration.

Figure 7: Visualization of the Ultralytics YOLOv8 telemetry data in the Grafana application

Deploying the Solution to a Group of Edge Nodes

For businesses, deploying a Computer Vision solution at one facility is rarely enough, they need to replicate it across multiple locations or integrate it into larger workflows. While this article has focused on deploying the solution to a single edge node, the true potential of the Barbara platform lies in its ability to scale across multiple edge nodes.

Barbara's batch command functionality enables the simultaneous installation of identical application sets on numerous edge nodes, each with tailored configurations to match specific use case requirements. This powerful feature significantly streamlines both, installation and configuration processes, saving considerable time and effort.

Figure 8: Installing the Video Player app simultaneously on four edge nodes

Benefits of Using Barbara's Platform for Computer Vision Edge Deployment

Barbara, as an Edge Orchestration Management platform, offers several significant advantages when deploying computer vision applications to a set of edge nodes:

1. Simplified Deployment and Management

  • Centralized Management: Barbara provides a unified platform to manage and monitor multiple edge nodes, simplifying deployment and configuration.
  • Automated Deployment: Streamline the deployment process by automating the installation and configuration of computer vision applications and dependencies.
  • Remote Configuration: Configure and update applications remotely, eliminating the need for physical access to edge devices.

2. Enhanced Performance and Scalability

  • Optimized Resource Allocation: Allocate resources efficiently to maximize the performance of YOLO applications.
  • Scalability: Easily scale the deployment to accommodate increasing workloads or new edge nodes.
  • Real-time Monitoring: Monitor the performance and health of edge devices and applications in real-time.

3. Improved Security and Reliability

  • Secure Communication: Ensure secure communication between edge nodes and the central cloud using robust security protocols.
  • Fault Tolerance: Implement fault-tolerant mechanisms to minimize downtime and ensure continuous operation.
  • Remote Troubleshooting: Diagnose and troubleshoot issues remotely, reducing downtime and maintenance costs.

4. Cost-Effective Solution

  • Reduced Operational Costs: Lower operational costs by automating tasks and reducing manual intervention.
  • Optimized Resource Utilization: Maximize hardware utilization to minimize energy consumption and hardware costs.

Conclussion

Deploying, updating, and monitoring Computer Vision systems across numerous edge devices requires a robust orchestration platform that seamlessly orchestrate the entire lifecycle of both the models and the edge devices they operate on, ensuring efficiency, reliability, and scalability.

By leveraging Barbara, organizations can accelerate the deployment of Computer Vision applications to edge nodes, improve performance, and reduce operational costs.

Ready to bring your AI models to the edge? Start exploring Barbara with a free trial today!