Contents
Computer vision best satisfies artificial intelligence tasks that would otherwise be solved with human eyesight. Hence, people counting, also known as crowd counting, is a common application of computer vision.
This specific use case is often applied in situations where understanding crowd characteristics and behavior is necessary. For example, this may look like utilizing count data to understand people entering stores at peak business hours. This data informs marketing campaigns giving customers an extra push to enter the stores at certain hours or optimize operations. An example of such is having enough staff on hand when stores are busy.
In this article, we will dive into the following:
Build my people-counting solution using the No Code Platform ProX PC
Share a step-by-step how-to
Review the ProX PC Builder interface in an easy-to-follow tutorial
People counting technology can track crowd movement, estimate foot traffic, or calculate the population density of a crowd. The statistics of people counted provide useful information for event detection or strategy planning for a moderated area.
People Counting with Computer Vision and Deep Learning
Person Detection and Tracking
The people counter system I will build in this tutorial should be based on object detection. This is to count the number of people using neural networks. To create an object counter, we use object detection methods in combination with a region of interest to focus on a specific image region, and a counting logic to aggregate the detected classes (“Person”) that are the output of the algorithm.
We will deploy a pre-trained computer vision algorithm to a device. The algorithms process images fetched from a connected camera or video source. These sources can including CCTV, IP camera, USB camera, webcam, or even a video file played in a loop to simulate a camera stream.
Region-of-Interest and Counting Logic
A common practice to implement a counting logic is to use a region of interest (coordinates of a specific section within the image), with a crossing line. The deep learning algorithms are only applied within the region of interest, which enables significant performance gains (smaller images, less complex background, etc).
Object detection is used to detect the object, followed by object tracking to fetch the path of the detected object (here, the detected object is the class “person”). The counting system counts tracked objects that cross the predefined crossing line, simulating the entrance of a retail store, as an example.
Real time people counting in a shopping mall with Object Detection. You can see the box with the Region of Interest (ROI) and the crossing line.
ProX PC provides all popular and state-of-the-art deep learning models as pre-built modules for use in the visual editor. You can use pre-trained neural networks that were trained to detect people and other classes on massive public image datasets, such as the MS COCO dataset.
Since most pre-trained CNN models (YOLO, SSD-mobile, etc.) are trained on frontal view or side view, only a few models are trained on top-down views. However, research shows that those models are very robust and provide good results even when applied in top-down view-based people counting applications.
Connect Pre-Built Modules To Build the People Counting Application
For this Tutorial, you need a ProX PC account.
Logged into ProX PC, I want to create my people counting system using pre-trained models and off-the-shelf tools. This will be done in the ProX PC Builder, a visual programming interface for building computer vision applications.
The ProX PC Builder makes it easy to add nodes to an application. I simply drag and drop the nodes mentioned above into the workspace grid. They are ready to be configured without any additional programming.
For the system to work correctly, the nodes need to be connected in the right way. The video source should send the input frames to the Region of Interest (ROI) node to be further processed. At the same time, the frames are sent to the Output Preview node, where the results are displayed for debugging. Hovering over the connection dots shows the output of each node which makes it simple to choose the right connections.
Nodes
Computer Vision Smart City Use Cases
Configure the People Counting Application
After the nodes are connected using the ProX PC Builder canvas, I want to configure each node to suit my needs. While the Region of Interest (ROI) piece of the application will need to be configured using a separate configuration interface, all other nodes are directly configured in the ProX PC Builder. Upon saving my application, it will create the first version for deployment to an edge device of my choice.
Nodes
People counting with ProX PC
Check the People Counting Result Preview
The people counting system is now ready to run. The program’s output can be reviewed with the Output Preview module, which was added to the workflow. The short extract of the video shows what to expect from the application we’ve just built.
Once the application is created successfully, it can be deployed to edge devices at the click of a button. Additionally, the data can be sent to a custom cloud dashboard, directly within ProX PC.
Related Products
Share this: