Density-based Approach to Crowd Counting
Supper & Supper GmbH
Brains as a service - Geo AI, Computational Life Science und Mechanical Engineering Data Science L?sungen
Accurate crowd size estimation is becoming increasingly important in a wide range of fields. From managing large public events to ensuring public safety, crowd size calculation can provide valuable insights and help decision makers make informed choices. However, it is not currently possible to keep an exact count of the number of people within a crowd. Instead, the crowd density can be inferred using algorithms to allow for the safe distribution of people. With the advent of advanced computer vision and machine learning techniques, we are able to develop efficient crowd size tracking algorithms that can operate in near real-time and handle diverse crowd conditions.?
Project Goals
Due to increasing urbanization, the concentration of people living in the limited space of cities is growing as well. It is becoming increasingly more common for large numbers of people to gather in confined spaces for events such as:?
Therefore, it is essential to monitor crowds to ensure safety and prevent injuries. The goal of this project was to develop an artificial intelligence for crowd size estimation that is able to quickly deduce the amount of people as well as crowd density in diverse imagery. However, the high density of people in a crowd makes regular counting ineffective – a problem that can be solved by a density-based approach. Such a tool allows real-time tracking of crowds to quickly assess the risk of mass panics and riots in crowded areas.?
Data Used?
To train the AI for crowd density estimation, the following dataset has been used:??
?A portion of the images was randomly gathered from the internet, while the other half was taken from busy streets of metropolitan areas in Shanghai. The dataset contains images with stark differences in crowd densities and camera angles, for the AI to cover a broad amount of input with varying conditions.?
Challenges of Crowd Size Estimation?
Training an algorithm to gather the amount of people in an image comes with a set of difficulties:?
Due to these factors, classic AI solutions struggle with their performance when it comes to processing speed and precision – especially when a large number of objects has to be classified within one image.?
Methods used for Crowd Size Estimation??
We considered a density-based approach to counter the problems raised by differing mass densities and distributions. For this, an AI was trained through methods of deep learning for object detection, calculating the density of people on a per-pixel-basis. To do this, we implemented the neural network architecture CSRNet for crowd density. It consists of two primary components:?
领英推荐
Creating Training Data for Crowd Size Estimation
Input as well as output of our approach needed to be a density map of the people seen in the images. To achieve this, we built on two types of kernels:?
To then multiply and increase the size of our training set we used image patching, mirroring and blurring.?
?
Performance?
In the second step we used the trained algorithm on the set of images for testing. The predicted crowd densities resembled a close spatial relationship compared to the ground-truth densities in the?
unseen test set. This test set measured a total of 115.905 people with an average of 252 people per image. The average absolute error of the prediction per image was 12 persons – therefore providing an impressive precision with a mere 5 % uncertainty.??
?
Project Results?
We were able to train an efficient algorithm using deep learning. The tool we developed captures the number of people in crowds shown on an image. This density map helps to assess potential risks and bottlenecks in security planning. Next to that, it can also be used for similar use cases in different fields of industry.?
?
What can Crowd Size Estimation be used for?
While the AI has been trained with pre-existing images, it can be used for live events as well. Due to its processing speed, footage captured through camera can be used for near real time crowd size estimation with a minimal temporal delay.??
Next to that, the concept of crowd count and density measurement is not limited to humans either. Further applications the methods used include:?
How else can industries benefit from data science? Read more use cases on the supper & supper website: https://supperundsupper.com/use-cases