Leveraging NVIDIA’s NvDsAnalytics Plugin for Entry-Exit People Count

SmartCow
3 min readAug 28, 2020

SmartCow specializes in building deep learning models and edge systems, making HW/SW integration seamless. We at SmartCow offer a vertical solution to the problem ranging from the underlying technologies for building or accelerating video analytics to complete turnkey solutions.

The advancement in deep learning and compute hardware has transformed the industries in the way they operate. Especially in the current COVID-19 time where having Intelligent Video analytics application such as People counting, Occupancy Analytics to monitor the crowd at public places, Access Control to workplaces, Heatmap Generation to recognize the group activities and personal protective equipment (PPE) monitoring to detect, if people are wearing a mask or other safety equipment required to wear while working, has never been essential as it is now.

Deepstream is a streaming analytics toolkit to extract insights from cameras. It helps to build an end to end intelligent video analytics application for edge processing.

As industries move towards reopening their offices, the ability to monitor the people and counting the people is another application, which IVA enables.

In this blog post, we are going to discuss How SmartCow leveraging NvDsAnalytics Plugin for counting Entry-Exit of People, which is configurable via User Interface developed by SmartCow.

Our office capacity is 50 employees for the building. We used NvDsAnalytics to monitor the number of people coming in and going out.

Fig 1. Entry-Exit Counter Application Workflow
  • RTSP Cameras (H.265/1080p/30fps) deployed at our office parking, are seamlessly streaming input feed to our device AGX 16GB for further edge processing.
Fig 2. RTSP Camera mounted at the Parking lot
  • Then the input stream is decoded after decoding the next step is to batch the frames for optimal inference performance at the edge. (We have used
    batch size =1)
  • Once the frames are batched they go for inference where we are using Transfer Learning Toolkit pre-trained ‘PeopleNet Model’ based on DetectNet_v2 detector with ResNet34 and ResNet18 as feature extractors , specifically designed to detect people and ResNet18 SSD is used as ‘PPE Kit Detection Model’.
  • After the Inference, used NvDCF tracker to assign a unique ID to each of the detected people.
  • NvDsAnalytics allows us to set up Entry-Exit rule by drawing virtual Entry-Exit ROI with the directions and we can configure it according to the camera setup. This feature uses to check if the object is following a pre-configured direction for the virtual line and if it has crossed the virtual line. The Entry and Exit count increased.
RTSP Camera at Parking lot
Fig 3. Entry-Exit lines with the directions
  • Here is the UI developed by SmartCow in which we can configure the Entry-Exit ROIs and generate configuration file.

User Interface Demo :

Demo: SmartCow’s User Interface to configure Entry-Exit ROIs

Short Demo :

NvDsAnalytics Demo

Since NvDsAnalytics is opensource,
1. We are able to integrate with other machine learning platforms like Tensorflow, tfLite, etc.
2. Extract the metadata and the can be sent over the cloud for eg. AWS, Azure, etc, and do more complex machine learning processing.

Author :
Saurabh Kumar Singh
IVA Engineer
SmartCow AI Technologies Pvt. Ltd.
www.smartcow.ai

Reference :
DeepStream SDK Developer Guide: https://rb.gy/rd27dn
Demo Video: https://youtu.be/r6frta7LVlM

Do Checkout -
SmartCow H/W Edge Devices:
https://smartcow.ai/en/products/
SmartCow Software Solutions: https://smartcow.ai/en/solutions/

Contact us at sales@smartcow.ai

--

--

SmartCow

SmartCow is an AI engineering company that specializes in advanced video analytics, applied artificial intelligence & electronics manufacturing.