Social Distancing for Retail Settings

Use video analytics solutions based on Intel® Distribution of OpenVINO™ toolkit models to support retail settings for pandemic scenarios.

Highlights

  • Demonstrates an end-to-end video analytics application to detect people and calculate the social distance between people from multiple input video feeds.

  • Store the data to InfluxDB*. This data can be visualized on a Grafana* dashboard.

author-image

作者

Overview

This reference implementation showcases a retail capacity limit application, line monitoring application, one-way monitoring application and social distancing application.

  • Retail capacity limit application showcases where a people counter keeps track of how many people are in the store based on the detected people entering and exiting the store. Single virtual line is configured for both entrance and exit areas to indicate the limits of entering and exiting the area of interest.  
  • One-way retail application monitors if people are walking in the correct direction in a one-way direction store aisle and reports the people walking in the wrong direction.  
  • Line monitoring retail application counts people standing in, waiting line at a retail store. The application estimates how many people are waiting in a line by doing an intersection between the people detected and a virtual line. 
  • Social distancing application gives count of people who do not maintain social distance.

Try the reference implementation in the Intel® Developer Cloud for the Edge Container Playground powered by Red Hat* OpenShift*, a Kubernetes* environment for testing containers with Intel® hardware.

Configure & Download

How It Works

The application uses the Inference Engine and Model Downloader included in the Intel® Distribution of OpenVINO™ toolkit doing the following steps: 

  1. Ingests video from a file, processing frame by frame. 
  2. Detects people in the frame using a pre-trained DNN model. 
  3. Extracts features from people detected using a second pre-trained DNN in order to do a tracking of the people. 
  4. If analytics field is socialdistancing in the camera_config.json file, then the application computes Euclidean distance between all the people and checks to see whether any people are violating N pixels apart.
  5. If analytics field is capacitylimit in the camera_config.json file, then the application checks if people cross the predefined virtual gates based on the coordinates and identify in which direction the virtual gate was closed to determine if it is an entry or exit event. 
  6. The people counter is updated based on the entry and exit data. 
  7. If analytics field is capacitylimit in the camera_config.json file, then the application checks if any of the tracked persons are not going in the predefined allowed direction. 
  8. The oneway counter is updated based on the people violating the specified direction. 
  9. If analytics field is linemonitoring in the camera_config.json file, then the application checks for the count of people in the line area. The queue line area is defined by a virtual line in the configuration file. The result of the amount of people in line are showcased in the screen. 
  10. Store total violations count of social distancing data in InfluxDB*. 
  11. Visualize the stored data of InfluxDB on Grafana* dashboard. 

The DNN models are optimized for Intel® architecture and are included with the Intel® Distribution of OpenVINO™ toolkit.  

Complex block diagram that starts on the left with "input feeds" and a camera image. The box it has an arrow to says "RI Docker Container" and contains the 4 different applications available and also the Intel® Distribution of OpenVINO™ toolkit.  The entire box has an arrow to InfluxDB and then Grafana which then has an arrow to a computer monitor image.
Figure 1: Architecture Diagram

Try It

Features

The following are features are included:

  • Container Images:  grafana:mcss, influxdb:1.8, mcss_covid19_solution:1.0, eclipse-mosquitto:1.5.8
  • Software Stack: Intel® Distribution of OpenVINO™ Toolkit (Intel® Deep Learning Streamer [Intel® DL Streamer]), InfluxDB, Grafana, MQTT containers in a Helm-chart
  • Task:  Object Detection with Intel® DL Streamer (gstreamer pipeline)
  • Model Info: Pedestrian detector model with MobileNetV2-like backbone for retail scenario.
  • Precisions Supported: N/A
  • Outputs: Exposes 2 web-services (URLs). One link showing annotated input streams with fps, bounding boxes for pedestrians with detected violations, and one for Grafana dashboard.

Download

Select Configure & Download to install and run Social Distancing for Retail Settings on your device.

Configure & Download

Features

Time to complete: 20-30 minutes

Programming Language: Python* 3

Available Software: The following are included in the Social Distancing for Retail Settings zip file:  

 

  • Intel® Distribution of OpenVINO™ toolkit Release

Recommended Hardware

The hardware below is recommended for use with this reference implementation. For other suggestions, see Recommended Hardware

 

Learn More

To continue your learning, see the following guides and software resources:

 

Support Forum 

If you're unable to resolve your issues, contact the  Support Forum.