Code Monkey home page Code Monkey logo

edge-video-services's Introduction

Edge Video Services

This repository provides a reference architecture of Edge Video Services (EVS). It includes instructions to build and deploy a video analytics service tailored for operator's infrastructure using Kubernetes in the Azure public MEC and Azure IoT Edge, and video ML containers like NVIDIA Triton Inference Server, Microsoft Rocket, and Intel OpenVINO Model Server. The repository also contains a sample video to count vehicles entering a parking lot for end-to-end testing.

EVS Architecture

Figure 1 shows the architecture of a video analytics pipeline deployed in an operator's infrastructure. The two-layer edge hierarchy consists of an on-premise (on-prem) edge (an Azure IoT Edge device), and a network edge (an Azure Kubernetes Service, or AKS on Azure public MEC).

  • On-prem edge: An edge machine which sits on enterprise premise. It could be a customer-owned edge box or a compute cluster consisting of multiple work stations.
  • Network edge: A beefy edge (e.g., Azure public MEC) with optimized connectivity to the on-prem edge and the cloud. Typically, it consists of a cluster of machines with accelerators like GPU.

architecture

Figure 1: A sample two-layer edge hierarchy with one on-prem edge node and one network edge cluster.

EVS provides the platform to ingest and orchestrate a cascaded video pipeline for analytics by splitting the pipeline across the edges. An EVS Client container is running on each edge to supply frames to various video ML containers. This way, EVS partitions the video processing workloads to make the best use of the available compute and network resources in the edge and cloud infrastructure.

Note: Video ML containers supported by EVS include Microsoft Rocket, Intel OpenVINO Model Server, and NVIDIA Triton Inference Server which already have support to plug in popular models for object detection and classification.

Other types of edge hierarchies: While the example above uses a two-layer edge hierarchy, EVS is generally applicable to all types of edge hierarchies. For instance, a three-layer edge hierarchy could have a camera edge (e.g., a smart camera) sitting together with an on-prem edge (e.g., a Kubernetes cluster on bare metal Linux) in a private 5G network before accessing the public MEC (Figure 2).

architecture example 2

Figure 2: A three-layer edge hierarchy with a camera edge, an on-prem edge (cluster), and a network edge.

Deployment Instructions: In what follows, we use two-layer hierarchy (Figure 1) as an example, and describe the steps to deploy EVS on an on-prem edge (mimicked by an Azure VM as an IoT Edge Device) and a network edge (an AKS cluster in the public MEC). In the two-layer hierarchy, a CPU-based Rocket container is deployed to the on-prem edge for motion-based object detection. When an objects cross lines of interest in the frame, frames will be encoded and sent to the AKS cluster in the network edge for DNN-based object detection using NVIDIA Triton inference container with COCO pretrained YOLOv3. As a result, EVS reduces network traffic between the edges and provides efficient compute usage in public MEC.

We also provide a sample mp4 video along with a line configuration file so that you can run the pipeline end-to-end with an example to count vehicles entering a parking lot. You will also be able to test the deployment on your own videos (both pre-recorded ones and live RTSP streams). To learn more about configuring lines of interest, please visit this page.

Pre-requisites

0. Terminology

Throughout the samples, we refer to two different terms. Here are descriptions for each of them for future reference:

  • Development PC: the machine you use to clone the repo, run Jupyter Notebooks, connect to AKS cluster (e.g., via Azure and Kubernetes CLI), and remote login to any of the compute devices and the on-prem Kubernetes control node. We use a Windows 10 desktop in this example.
  • Compute Device: any of the machines run EVS and video analytics containers. That includes the Azure IoT Edge device, and nodes in network edge clusters.

1. Setup Development PC

You may use your existing Development System (e.g., your desktop or laptop) or refer below link to create and setup a new Azure Virtual machine.

2. Setup Azure IoT Edge on the on-prem edge

3. Create the required Azure Services

4. Create an Azure Kubernetes Service (AKS) cluster as network edge cluster

Deploy and Orchestrate Video Pipeline in a Two-layer Edge Hierarchy

Now let's walk through the steps for deploying and orchestrating a video pipeline across the two-layer edge hierarchy (i.e., IoT Edge Device + AKS in Figure 1).

5. Deploy EVS and Video ML Containers to the Network Edge (AKS)

6. Deploy Edge Modules to the on-prem Edge (IoT Edge Device)

7. Monitor and Interpret the Output

8. EVS Configuration and Cross-Edge Adaptation

Tested Specifications

Setup On-premise Edge Network Edge Cluster Testing Status
1 Azure VM - OS: Ubuntu 20.04 Azure Kubernetes Service - VM Size: Standard_NC6s_v2 Passed

Information links

Azure public MEC
Microsoft and AT&T demonstrate 5G-powered video analytics
Video analytics at the edge, an ideal technology for 5G cloud monetization
Telstra creates innovative AI solutions for the 5G era with Azure Video Analyzer
Azure for Operators

Contents

Folders Description
common collection of deployment instructions and Jupyter notebooks for environment setup
templates template deployment manifest for on-prem and network edge

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.

When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

Trademarks

This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.

edge-video-services's People

Contributors

microsoftopensource avatar ycshu086 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

edge-video-services's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.