top of page

The

Crowd

Density

Project

               SPAIC 2019

     A Project Showcase

THE PROBLEM

"Exploring Crowd Counting with Computer Vision, aimed at preventing stampedes and promoting safer gatherings everywhere"

​

"STAMPEDES ARE PREVENTABLE MAN-MADE DISASTERS" 

"More than 3000 people have lost their lives in stampedes between 2000 and 2015, in india alone"

2015 Mina Stampede News Report

"THE

ELPHINSTONE RAILWAY STATION STAMPEDE OF 2017 CLAIMED 23 LIVES"

"THE KUMBH MELA IN INDIA, ONE OF THE WORLD'S LARGEST RELIGIOUS FESTIVALS, HAS CLAIMED SCORES OF LIVES IN MASSIVE STAMPEDES ACROSS THE PAST SEVERAL YEARS"

​

 KUMBH MELA, INDIA

"The most cost-effective stampede prevention solutions currently employed, depend extensively on sensor-based hardware which brings along with it the possibility of hardware failure, degradation and maintenance costs"

About Our Project

Our Purpose

We believe that human stampedes are very much preventable disasters. It is absolutely unacceptable that even in this advanced age where technology has the power to prevent such incidents, so many lives are being lost in this manner. Every human being at every public gathering, deserves to return home safely. 

Our Vision
  • To give Crowd Density Detection the platform of significance that it deserves, with regards to safety at every public gathering. 

  • To explore current trends in Crowd Density Detection.

  • To make consistent efforts towards building pure software-based solutions that can give high accurate information that can help detect and prevent imminent stampedes. 

Exploration

Throughout the course of our journey on the Facebook Secure and Private AI Challenge 2019, we have tried to explore this topic from every angle. Right from the various use cases of Crowd Density Detection to the varieties of different models and data sets used, we have tried to make our exploration as comprehensive as possible within our short journey as a team. Here, you can see a collation of all of these efforts. 

Who are we

Project Work: Implementations

Visitor Counter for Public Events

  • Based on the centroid tracking algorithm and uses OpenCV,Numpy,dlib,imutils and the MobileNet-SSD model to achieve tracking of people moving in both directions w.r.t the reference line drawn in the middle of the screen.

  • Program code could be run on cameras placed above entrances/exits at festivals/conferences to calculate net number of visitors to various sub-events and judge the popularity of various programmes.

  • Could also be used to determine the most crowded areas at a public expo and take precautions to prevent stampedes.

  • Output of 34 Frames Per Second(FPS) was recorded on this implementation. 

           

​

           

Face-Level People Counter for Incoming Crowds

  • Achieved using DeepSort Algorithm, NumPy, sklean, OpenCV, Pillow and YOLOv3.

​

  • Can be used to get live counts of individuals from live cameras, that face incoming crowds. 

​

  • Can be used to get dynamic stats of net number of people in a room/area at malls/public places at once, irrespective of which direction they are walking in.

​

  • Counts coming from different regions can be used to update and constantly improve a crowd count predictor, using Federated Learning approach.

​

  • Can be integrated with a decentralized approach to get live stats about crowds at different places in the same mall/venue at once(bird's eye view of crowd counts across the venue).

​

  • Output rate: 10 FPS

CSRnet Implementation on images

 

  • Achieved using PyTorch, CUDA and CSRnet model on ShanghaiTech dataset.

​

  • Can provide impressively accurate counts of people from images alone.

​

  • Can be used for creation of crowd count predictors specific for various events and programmes, trained on counts generated from images alone(no need for live video capture). Past records of images taken at the venue can be used to predict future crowd counts to plan in advance for stampede prevention measures. 

​

  • Would be especially useful at large scale religious festivals like the Kumbh Mela, to accurately predict and prepare for crowds based on past images.

​

  • Would be ideal to use with a Federated Learning Approach if image dataset is too large and spread across several machines.

​

  • Would have comparively much less data storage requirements as images are being used, not space-consuming video archives. 
     

C ^3 Framework: An Open-source PyTorch Framework for Crowd Counting

  • We also briefly explored the Crowd-Counting-Code(C^3) Framework, an open-source framework based on PyTorch, intended for crowd counting.

  • It generates Gaussian Density Maps from input images and counts crowds using it.

  • This framework is intended to reduce the human cost in training.

 

 

How it works

Research and Blog

1. Topic: The Wide Array of Use Cases where Crowd Density Detection can prove useful 

​

​

2. Topic: Exploring The Most Widely Used Datasets for Crowd Density Detection

​​

3. Topic: Summarizing The Crowd Density Project

​

4. Topic: Crowd Counting with DeepSort and YOLO

​

5. Topic: Crowd Counting on images with CSRnet

​

6. Topic: Creating a net crowd counter with OpenCV and MobileNetSSD

​

7. Topic: The C3 Framework: An open source Crowd-Counting-Code framework

Testimonials

 

Concluding Notes

Request demo
The Future : Improving the Project with Secure and Private AI

We see a lot of scope to further work on this project. We think that Secure and Private AI can be significantly employed on this project to achieve the following:

​​

  • Encrypt the identity of individuals in crowds, and ensure that only the requisite statistical analysis is obtained from the Crowd Density Detector(no particulars about any individual is retrievable)(Scope for incorporating Differential Privacy)

  • Federated Learning and Secure Aggregation can be employed during large-scale events, that involve a network of cameras recording live visuals of various areas of the venue or sub-events.  

  • In this case, the model would be downloaded to each station(surveillance unit for a particular area), and it would train on the live visuals being generated at that area.

  • The results from multiple such stations would be uploaded and averaged before being used to update the model at the central server, which gains better crowd counting/predicting ability as a result of this iterative process.

  • This smarter model is then downloaded and employed at all the stations supervising the different areas. 

​

Reinforcing the Aim of this Project 
  • Stampede Detection and Prevention is among the most overlooked and underestimated disasters, for which there is usually very less preparedness. But this is an attitude that must change. Stampedes are such dynamic situations, so much so that a crowd that seemed normal can turn into a violent stampede in a matter of seconds.

​

  • The only way to prevent such incidents is to ensure that crowds that exceed the capacity of a venue are never formed; this can be done only by actively monitoring crowds and keeping a tab on COUNTING the number of individuals in the crowd. If the count exceeds the safe threshold, the authorities must take precautionary measures to prevent am imminent stampede at all costs. This is exactly where The Crowd Density Project comes in.

​

  • 'PREVENTION IS BETTER THAN CURE' - This is the saying that this project embodies. Managing a crowd that is ALREADY in a stampede is not an option(this is near impossible). So, the best and only option at preventing such incidents and protecting human lives in such crowds, is to maintain active surveillance, send alerts in the event of threshold-exceeding counts and take crowd redirection measures accordingly. 

​

  • We sincerely hope that this project and the collation on this website inspires more tech enthusiasts to see the real challenge that crowds and stampedes are. Human lives are too precious to be lost on avoidable incidents like these. This website collation was intended to serve as a starting ground for anyone who is trying to explore the field of crowd counting and its applications. We understand that getting one's feet wet in a new technical area can be challenging, and all our blogs and implementations are aimed at helping  anyone who is trying to explore this field for the first time.

A 'Note' of Thanks
  • On behalf of the entire team comprising myself(Pooja Vinod), Sreekanth Zipsy, Ramkrishna Acharya and Suraiya Khan, I would like to thank the Facebook Udacity Secure and Private AI Scholarship Challenge Community 2019 for being the most supportive space for this project. We would like to thank the entire team at #sg_wonder_vision for encouraging us throughout and providing all the help we needed. 

​

  • I would also like to thank the amazing technologists out there, who truly make the world of Computer Vision easy to explore. My sincere thanks to Adrian Rosebrock of PyImageSearch, whose blogs and tutorials were my guideposts to many  successful implementations. Thanks also go out to the AnalyticsVidhya blog and the authors of the C3 framework for helping us explore the world of crowd counting further.

​

  • Last but not the least, I want to thank my awesome teammates without whose support and cooperation, this project would have never reached realization. 

bottom of page