Tuesday 04 March 2025
Managing massive crowds during events like Hajj, where millions of pilgrims gather annually in Saudi Arabia, is a daunting task for authorities. Ensuring public safety and preventing stampedes or other disasters requires advanced technology to monitor and respond to crowd dynamics in real-time.
To tackle this challenge, researchers have developed a machine learning model that can classify crowd density levels into three categories: moderate, overcrowded, and very dense. This system uses video surveillance footage from key locations during Hajj to identify areas where crowds are becoming too dense or unruly.
The model extracts features such as edge density, local binary patterns (LBP), and area-based features from the video frames. Edge density refers to the number of edges in a frame that can indicate movement and activity. LBP is a texture analysis technique used to capture subtle changes in image textures, which can reveal hidden patterns in crowd behavior.
The model was trained on a dataset of 18 videos recorded during Hajj at various locations, including Tawaf, Jamarat, Arafat, and Massaa. The training data was augmented to balance the distribution of crowd density levels, ensuring that the model is not biased towards any particular category.
Results show that the model achieved an accuracy rate of 87%, with a misclassification rate of only 2.14%. This means that for every 100 frames analyzed, the model correctly classified about 87 as moderate, overcrowded, or very dense, while incorrectly classifying just 12.
The system also provides real-time visual alerts when it detects very dense crowd conditions, allowing authorities to respond quickly and take measures to prevent accidents. These alerts are represented as red overlays on the video frames, making it easy for operators to identify areas of concern.
While other studies have focused on detecting individual anomalies or specific behaviors in crowds, this model takes a more holistic approach by analyzing crowd density levels across entire frames. This allows authorities to respond proactively and prevent disasters rather than simply reacting after an incident has occurred.
The authors suggest that the model could be improved further by incorporating additional contextual data such as temporal crowd flow patterns and environmental factors like weather conditions or time of day. They also propose integrating multi-camera feeds to enhance scalability and robustness.
This research demonstrates a significant step towards developing more effective crowd management systems for large-scale events like Hajj. By leveraging advanced machine learning techniques and video surveillance technology, authorities can better respond to the unique challenges posed by massive crowds, ultimately ensuring public safety and preventing disasters.
Cite this article: “Real-Time Crowd Density Monitoring for Hajj Event Safety”, The Science Archive, 2025.
Hajj, Crowd Density, Machine Learning, Video Surveillance, Real-Time Monitoring, Public Safety, Disaster Prevention, Edge Detection, Texture Analysis, Anomaly Detection.







