✨
Verified Scholarly Platform
Serving Researchers Since 2012

Advanced AI/ML Analysis of AQI to Study the Crowd Density Effect

DOI : 10.5281/zenodo.23435002
Download Full-Text PDF Cite this Publication

Text Only Version

Advanced AI/ML Analysis of AQI to Study the Crowd Density Effect

Dr. Ashish Jirapure

Department of Industrial IoT, Priyadarshini College of Engineering, Nagpur

Komal Mahalle

Department of Industrial – IoT, Priyadarshini College of Engineering, Nagpur

Swejal Tembhare

Department of Industrial – IoT, Priyadarshini College of Engineering, Nagpur

Aniket Tayde

Department of Industrial – IoT, Priyadarshini College of Engineering, Nagpur

Shruti Sarode

Department of Industrial – IoT, Priyadarshini College of Engineering, Nagpur

Abstract – Public environments can experience rapid changes in person density, particularly during festivals, weekends, and special occasions. These changes may influence carbon dioxide concentration, particulate matter, temperature, humidity, and the resulting air-quality condition. This paper presents an integrated framework that combines camera-based person counting with environmental sensing and artificial intelligence and machine learning analysis. A vision module estimates the number of people and crowd density from video frames, while environmental observations are collected with synchronized timestamps. The combined dataset is preprocessed, aligned, and analyzed to identify relationships between crowd density and air-quality indicators. The framework also supports dashboard-based visualization and alert generation for practical monitoring. The proposed approach is intended to provide a common analytical view of occupancy and environmental conditions in public premises. Since experimental measurements are not included in the supplied project material, numerical performance results are not claimed in this paper; the evaluation structure is defined for completion after data collection.

Index Terms – crowd detection, environment monitoring, crowd management, person detection, computer monitoring, machine learning, artificial intelligence, and dashboard for monitor the crowd density.

  1. INTRODUCTION

    Religious sites are usually marked by a great deal of variation in the number of people present. It is possible for the number of people in the building to go from normal levels to a very high number within a short time due to festivals, weekends, special rituals, and other events. When the number of people is high it influences the demand for ventilation and may be linked to changes in carbon dioxide concentration, particulate matter, temperature, and humidity. It therefore makes sense to monitor both crowd conditions and air quality since doing so can give more useful information than considering the two situations as separate observations.

    Most traditional methods of monitoring are either concerned with counting people or with measuring the environment. Cameras are able to estimate the number of people that are visible, and sensors can offer information about the environment. Yet, since the two types of monitoring are carried out separately, it is difficult to examine the temporal relationship between changes in crowd density and those in air quality. Only an integrated system can

    synchronise both streams of data and make them available for analysis and visualisation.

    The study presents a framework for public environments in which the number of people and crowd density are estimated using computer vision, environmental measurements are taken at the corresponding times, and artificial intelligence and machine learning techniques are then applied to the combined dataset. The system is intended to allow for descriptive analysis, the analysis of relationships, prediction experiments, and the use of dashboard visualisations without requiring a particular result to be assumed prior to the measurements being collected.

  2. PROBLEM STATEMENT

    The monitoring of crowds and the monitoring of air quality in public areas are usually treated as distinct tasks. This approach hinders the possibility of finding out how variations in the number of people relate to changes in environmental factors. The research problem addressed in this work is the development of an integrated data pipeline that is

    able to estimate crowd density, link this density with simultaneous air-quality observations, and offer an artificial intelligence and machine learning-based analysis framework for the purpose of crowd monitoring.

  3. OBJECTIVES

    • Estimate the number of people and the density of the crowd from camera data by using computer vision.

    • To gather or combine environmental observations such as carbon dioxide, particulate matter, temperature, and humidity.

    • Use timestamps to coordinate the crowd observations and the environmental observations.

    • Preprocess the combined dataset in order to identify useful analytical features.

    • We want to study the relationship between crowd density and air-quality indicators by using statistical and machine learning methods.

    • Use a web dashboard to visualise both current and historical conditions and to provide threshold-based alerts.

  4. COMPATIBLE WORK

    Computer vision-based crowd analysis has evolved from traditional image-processing methods towards deep-learning object detection and tracking. Recent object detectors are capable of detecting persons from video frames and enabling occupancy and crowd-density estimation. Such approaches are applicable to public and public environments where manual counting becomes difficult during high- density periods. Environmental monitoring research has also shown that occupancy-related variables can be useful inputs for predicting indoor or public- space air-quality conditions. Carbon dioxide can act as an occupancy-related indicator, while particulate matter, temperature, and humidity provide complementary information about environmental conditions. Machine learning models can combine these variables when sufficient timestamped observations are available. The research gap addressed here is the integration of these two streams in a public-space monitoring framework. The proposed work does not treat crowd count as an isolated computer-vision output; instead, the count is synchronised with environmental observations so that temporal relationships can be studied in a common dataset.

  5. PROPOSED METHODOLOGY

    The proposed methodology can have several stages: data acquisition, preprocessing, crowd-density estimation, air-quality analysis, and visualisation. The camera stream is processed to identify persons and estimate the number of visible people.

    Environmental measurements are collected at matching time intervals. The resulting records are synchronised and stored as a structured dataset. Machine learning analysis is then applied to the combined features, and the processed information is displayed through a dashboard.

    Fig. 1. Integrated architecture for crowd and air-quality analysis.

  6. SYSTEM ARCHITECTURE AND WORKFLOW

    Figure 1, which gives us a bird’s-eye view of how everything fits together. We’ve got two main sources of information coming in from the environment: what we can see through the camera, and what the sensors are picking up. The visual data gets processed to detect and count people, while the sensor data gets cleaned up and prepared for analysis. Once both streams are in sync, they’re fed int our artificial intelligence and machine learning systems to uncover deeper insights.

    Here’s how it all starts: we collect data. This involves taking video frames, processing them to find people in the scene, and recording what’s happening in the environment along with the time it’s happening. Once we’ve cleaned up the data, we sync the two streams by matching up the timestamps. Next, we figure out how crowded an area is by counting the people and measuring the space. We also calculate air quality using the chosen standard. With all this information, we create a feature vector that helps us understand what’s going on and make predictions using machine learning.

    Fig. 2. Processing workflow from data collection to visualisation

  7. METHODOLOGY

    1. Crowd Detection and Counting

      A camera provides frames of the monitored crowded area. A deep learning algorithm, i.e. YOLO, is used to detect people in each frame. Let N represent the number of detected persons, and A represent the monitored area. A simple density measure is defined as

      D = N / A (1)

      So, let’s talk about crowd density. We’ve got a few things to consider: the number of people detected, the area we’re looking at, and the density of the crowd. If we don’t have a physical area to work with, we can use a normalised occupancy measure instead. The key thing is to make it clear what we’re using in our experiment. We need to define what we mean by crowd density, and how we’re measuring it. This could be the number of people per square meter, or something similar. Either way, we need to be clear about our methods so others can understand what we’re doing.

    2. Environmental Data Acquisition

      When we’re talking about the environment, there are lots of things that can affect the air around us. For instance, the amount of carbon dioxide, tiny particles, temperature, and how humid it is can all be important. The specific details we can measure depend on the tools we have available. Every time we take a reading, we should make a note of when it was taken and what the measurements were. It’s also crucial to catch any mistakes or missing information when we’re getting ready to use the data, rather than just ignoring them. This way, we can be sure that the information we’re working with is accurate and reliable.

    3. Air-Quality Index Calculation

      If an official air-quality index is computed from pollutant concentration, the relevant national or regional breakpoint table should be used. A general linear interpolation between a concentration breakpoint and its corresponding index breakpoint can be represented as

      I = ((I_H I_L)/(C_H C_L))(C C_L) + I_L (2)

      Let’s break it down – when we measure the concentration of something, we call it C. We also have two important points to consider: the lower and upper limits, or breakpoints, which we’ll call C_L and C_H. Then there are the index breakpoints, I_L and I_H, which correspond to these concentration limits. The key thing to remember is that the way we match pollutants to their index must follow the standard that was chosen for the experiment.

    4. Data Synchronisation and Preprocessing

      When we’re looking at crowd behaviour and how the environment affects it, we need to make sure our data from cameras and sensors is in sync. To do this, we use timestamps to match up the information from both sources. We also have to clean up the data by getting rid of any duplicate records and figuring out what to do with missing values – we use a specific method to handle these gaps. Additionally, we check the numerical data for any outliers that could skew our results. Sometimes, the cameras and sensors might not be taking readings at the same rate, so we need to combine the data into a common time frame, like every minute or every five minutes. It’s crucial that we stick to the same time frame throughout the entire experiment to ensure our data is consistent and reliable.

    5. Machine Learning Analysis

    When we put all the data together, we can use it to understand what’s going on, see how things are related, and make predictions. We can look at things like how crowded it is, the temperature, humidity, tiny particles in the air, and carbon dioxide levels. These can be used to help our models make good predictions. We might use a model like XGBoost, which is a type of Extreme Gradient Boosting regression, or we might choose a different model that works better for our specific data. The key is to pick a model that’s a good fit for the amount of data we have, how the features are spread out, and how well the model does when we test it – rather than just assuming one model will be the best. This way, we can make sure we’re using the best tool for the job and getting the most accurate results.

  8. DATASET FORMATION

    Each synchronised record is represented as a row in the given datasets.

    A suitable structure is shown in Table 1.

    TABLE 1 SUITABLE DATASET FEATURES

    Feature

    Description

    Unit / Type

    Timestamp

    Observation time

    Date-time

    Person Count

    Detected people

    Count

    Crowd Density

    Persons per monitored area

    Person/m²

    CO2 sensor

    Carbon dioxide measurement

    ppm

    PM2.5

    Fine airborne particles

    µg/m³

    PM10

    Inhalable

    particulate matter

    µg/m³

    Temperature

    Surrounding air temperature

    °C

    Humidity

    Moisture content in air

    %RH

    AQI

    Air quality index

    Index

  9. FEATURE SELECTION AND ANALYSIS

    When looking at crowd density, it’s the main thing we’re trying to understand. Other factors like the environment are considered in relation to this, depending on what we’re trying to find out. We also look at things like the time of day, whether it’s a weekday or weekend, if there’s a festival happening, or when we’re observing the crowd. But we have to be careful when choosing which factors to focus on, so we don’t accidentally use information that’s too closely related to what we’re trying to predict, which can give us misleading results. This is called data leakage, and it’s something we want to avoid when selecting the most important variables to study.

    Exploratory analysis can include time-series plots, scatter plots of crowd density against pollutant concentration, correlation matrices, and comparisons between low-, medium-, and high- density observation periods. These analyses help determine whether a simple linear relationship is adequate or whether nonlinear models should be investigated.

  10. EXPERIMENTAL DESIGN

    When conducting an experiment, it’s essential to cover several observation periods to get a well- rounded dataset that includes different scenarios, like normal and high-crowd conditions. To make this happen, measurements should be taken at various times, as long as it’s safe and allowed. Each observation period should have synchronised timestamps, which is crucial for accurate data analysis. At the end of the study, the report should include key details such as how long the observation lasted, the sampling interval, the number of records collected, the area being monitored, where the camera was positioned, the sensor spec, and the environmental conditions at the time. This will help ensure that the data is reliable and useful.

    The dataset should be divided into training and testing portions for predictive experiments. When the observations are time-dependent, chronological splitting or time-aware cross-validation is preferable to randomly mixing records from the same time period between training and testing sets.

  11. DASHBOARD AND VISUALIZATION

The dashboard gives you a quick overview of what’s going on with the crowd and the environment. It’s got a section that shows you the current situation, including how many people are there, how crowded it is, the temperature, humidity, and air quality. You can also see charts that show how these things change over time. And if you want to look at past data, you can use filters to compare different times. This way, you can easily see what’s happening now and how it’s different from before. The dashboard is designed to be compact, so you can get all the information you need at a glance.

When it comes to alert logic, it’s crucial to base it on documented thresholds. Think of it like a warning system – when a certain level of pollution or crowd density is reached, the system flags it. This doesn’t necessarily mean there’s a problem, just that a certain threshold has been crossed. These alerts are more like indicators and shouldn’t be taken as a definitive medical or regulatory conclusion unless the relevant standard is specifically applied. For instance, the system can be set up to flag a condition when a selected pollutant exceeds a predefined threshold, but it’s essential to understand that this is just a signal, not a final verdict.

Experiment

Observation records

Model / Method

Crowd detection

Number of video frames processed and people

detected

YOLO +

OpenCV

Crowd-density classification

Low, medium, and

high density observations

Threshold- based classification

Environmental monitoring

Synchronized AQI, CO,

temperature, and humidity

readings

ESP32-based sensor unit

Relationship analysis

Matched crowd and sensor

observations

Pearson / Spearman correlation

AQI prediction

Training and testing

observations

Random Forest

AQI prediction

Training and

testing observations

XGBoost

Model comparison

Same held- out test observations

Baseline, Random

Table II. Experimental Results to Be Completed

Forest, and XGBoost

  1. EXPECTED ANALYTICAL OUTPUT

    The goal of this project is to create a system that can provide us with a clear picture of how crowd conditions and environmental factors are related. We want to be able to look at the data and see if there are any patterns – for example, do certain environmental factors change when the crowd gets bigger? We also want to use machine learning to try to predict certain outcomes, and we need to make sure that our predictions are accurate and reliable. When we’re done, we’ll be able to look at the results and understand what they mean, including any limitations or uncertainties. We’ll also be able to say exactly how we collected the data, so that others can understand our methods and results. This will help us to have confidence in our findings and to make informed decisions based on the evidence.

  2. ADVANTAGES

    • Combines crowd monitoring and environmental monitoring in one analytical workflow.

    • Provides timestamp-based synchronization of visual and sensor data.

    • Supports both real-time visualization and historical analysis.

    • Allows different machine learning models to identify the crowd effects in crowded places.

    • This system can be adjusted to fit various layouts of public spaces and can also be used for different lengths of observation time.

  3. LIMITATIONS

    • Camera performance can be affected by occlusion, lighting, camera placement, and dense crowds.

    • Things that can affect how accurate sensor measurements are include how well the sensor is calibrated, where it’s placed, the conditions around it, and the limitations of the hardware itself.

    • You can’t always get a complete picture of what a crowd is like just by watching for a little while

      – there are lots of factors that can change, like the time of year.

    • Correlation between crowd density and air quality does not by itself establish causation.

    • Model performance depends on crowd management, people count, and testing the AQI in surrounding.

  4. FUTURE SCOPE

    • Multi-camera tracking can be used to reduce blind spots and improve coverage.

    • Temporal machine learning models can be investigated for forecasting future environmental conditions.

    • You can also set up a system to automatically detect any unusual issues with the sensors or strange crowd behavior.

    • You can get more information by watching what happens at different times, like during festivals, on weekdays, and on weekends, and in various kinds of weather.

    • The dashboard can be extended with role-based access, historical reports, and configurable threshold management.

  5. CONCLUSION

When we think about crowded places like bus stops and railway stations, we often wonder how they affect the air we breathe. This study aimed to explore the connection between the number of people in these areas and the quality of the air around them. To do this, researchers used a combination of computer vision, environmental sensors, and artificial intelligence to analyse the data. The goal was to create a single dataset that brings together information about crowd density and environmental conditions, making it easier to study their relationship. While the approach shows promise, its effectiveness still needs to be proven through real- world measurements and testing. Future research should focus on collecting more data, comparing different models, and interpreting the results in a way that’s based on evidence. By doing so, we can gain a better understanding of how crowded places impact air quality and take steps to improve the situation.

REFERENCES

  1. A study by N. Dalal and B. Triggs, published in the proceedings of the IEEE Conference on Computer Vision and Pattern Recognition in2005, introduced a new approach to detecting humans in images using histograms of oriented gradients. This method, outlined on pages 886-893, presented a novel way to identify people in visual data.

  2. J. Redmon, S. Divvala, R. Girshick, and A. Farhadi, You only look once: Unified, real-time object detection, in Proc. IEEE Conf. Comput. Vis. Pattern Recognit., 2016, pp. 779788.

  3. J. Redmon and A. Farhadi, YOLOv3: An incremental improvement, arXiv:1804.02767, 2018.

  4. A research paper by T.-Y. Lin and others, titled “Microsoft COCO: Cmmon objects in context,” was presented at the European Conference on Computer Vision in 2014, where they discussed their work on pages 740-755.

  5. A. J. Smola and B. Schölkopf, A tutorial on support vector regression, Statist. Comput., vol. 14, no. 3, pp. 199222,

    2004.

  6. L. Breiman, Random forests, Mach. Learn., vol. 45, no. 1, pp. 532, 2001.

  7. F. Pedregosa et al., Scikit-learn: Machine learning in Python, J. Mach. Learn. Res., vol. 12, pp. 28252830, 2011.

  8. A team of researchers, including S. Ren, K. He, R. Girshick, and J. Sun, published a paper in 2017 on a new approach to object detection called Faster R-CNN. This method uses

region proposal networks to make object detection faster and more efficient, with the goal of achieving real-time results. The paper, titled “Faster R-CNN: Towards real-time object detection with region proposal networks,” was published in the IEEE Transactions on Pattern Analysis and Machine Intelligence, volume 39, issue 6, pages1137-1149.