Harnessing sensor fusion and AI for accurate accident detection and classification in the safety of smart cities

. With the growing number of automobiles, traffic accidents are increasing daily. The World Health Organization (WHO) study reports that annually, 1.4 million individuals have died, and 50 million have been wounded globally. An advanced accident detection technique using cognitive agents will reduce rescue operational delays, perhaps saving several lives. Intelligent Transportation Systems (ITS) are gaining significant attention in academia and industry because of the increasing popularity of smart cities. They are seen to enhance road safety in these urban areas. Internet of Things (IoT) and Artificial Intelligence (AI) systems have been widely used to decrease the time needed for rescue operations after an accident. This study introduces an IoT-enabled Automotive Accident Detecting and Categorization (IoT-AADC) method that combines a smartphone's internal and external sensors to identify and categorize the kind of accident. This innovative method enhances the effectiveness of emergency support like fire departments, towing agencies, etc., by providing crucial information regarding the accident category for


Outline of ITS using IoT for smart city
Road Traffic Accidents (RTA) are a major public health issue, causing deaths and injuries yearly.The World Health Organization (WHO) estimated that 1.4 million people die each year due to RTA, with over 52 million suffering minor injuries [1].RTA results in substantial financial consequences and economic setbacks caused by decreased production, medical costs, and harm to assets and facilities [2].Global efforts to mitigate the devastating impacts of RTA on ecological security and public health are still insufficient.Measures used in developing nations include using helmets, strict enforcement of speed restrictions, and imposing penalties on traffic violators.
Low-income nations are most affected by the increase in RTA owing to inadequate roads and rescue services, despite attempts to decrease the number of road traffic deaths.Despite gradual development in high-income nations, 80% of RTA still occurs in underdeveloped countries, as reported [3].The implementation of the United Nations Decade of Action for Road Safety (2021-2030) aims to reduce road traffic fatalities and injuries by 50%, offering a chance to tackle this issue.Previous studies have shown that evidence-based interventions targeting risk factors may decrease road accident fatalities by 45% and save more than 215,000 lives via post-crash rehabilitation [4].Technological progress has recently resulted in the creation of AAD systems.The technologies are created to swiftly identify incidents, leading to decreased evacuation times, eliminating reporting errors, and saving more lives.Due to the increasing acceptance of these systems, there is a growing interest in using costeffective solutions for AADC.
Recently, IoT technology has been utilized to reduce the time taken for accident recovery.The IoT connects many integrated and smart devices to the Internet, including mobile phones, computers, sensors, actuators, and processing units [5].The IoT can potentially be used for monitoring and managing smart vehicles by connecting any linked physical device to a central control server [6].Most academics have focused on enhancing the precision of accident identification, predicting the seriousness of RTA, or reducing the time it takes to respond to an accident.Furthermore, most devices designed to identify and report RTA are costly and only available in luxury automobiles.The existing systems have a limitation in distinguishing between different types of accidents, such as collisions, rollovers, or fall-off events [7].Simply stating the accident incident hinders emergency rescue professionals from offering the victims appropriate rescue assistance and medical help.The kind of collision helps determine the damages to the car and the harm done to the victims.
Utilizing sensor fusion and AI has great promise to transform AADC to enhance the protection of smart cities. Sensor fusion combines data from sensors like gyros, accelerometers, and cameras to thoroughly analyze the surroundings, including vehicle behavior and pedestrian activities.AI systems, especially Deep Learning (DL) models, can evaluate various forms of information to identify and categorize incidents in real time, such as car collisions and pedestrian accidents.Smart cities may use this technology to implement preventive security protocols, like sending timely notifications to emergency services and managing traffic systems, which can help avoid accidents and improve urban safety networks.

State-of-the-art automatic accident detection techniques
This literature survey explores various approaches to harnessing sensor fusion and AI for AADC.Al-Kaff (2023) explored AI tools for urban intelligent mobility, demonstrating ways to improve transportation networks [8].Enhancing urban transportation and safety with AI algorithms and sensor data is suggested.Smart cities have efficient and sustainable transportation due to increased traffic flow, lower congestion, and improved road safety.Benefits include enhanced mobility, lower travel time, and safety, but downsides include data privacy and infrastructural needs.In 2022, Ang et al. studied intelligent urban transportation solutions using geo-information, data analytics, and Machine Learning (ML) [9].They propose optimizing transportation systems, traffic management, and urban mobility via AI and data analytics.Results include better traffic flow, decreased congestion, and more safety.Pros include increased efficiency and reduced environmental impact, but disadvantages include data privacy concerns and implementation issues.
Adewopo and Elsayed (2023) proposed a DL ensemble method for smart city traffic accident detection [10].They accurately identify and categorize traffic events using multiple DL models.The results are better accident detection, faster emergency response, and safer roads.Accident detection is more precise and effective, but computations and data requirements are more complicated.Campero-Jurado and colleagues (2020) proposed a Smart Helmet 5.0 for industrial IoT applications in smart cities, leveraging AI to improve safety and efficiency.It uses AI algorithms and sensor data to monitor worker safety and identify dangers in real-time.Results include improved worker safety, lower accident rates, and higher productivity [11].Pros include immediate threat assessment and preventive safety measures, but disadvantages include cost and implementation issues.
Ramírez-Moreno et al. ( 2021) studied sensors in smart cities for monitoring environmental conditions, infrastructure health, and public safety [12].They recommend deploying sensor networks to collect and analyze urban application data.Improved environmental monitoring, infrastructure upkeep, and public safety are output values.Benefits include data-driven decision-making and urban resilience, although costs and scalability issues may arise.Adel (2023) promoted human-machine cooperation and intelligent automation in smart cities.The proposed method improves urban productivity and efficiency via AI-driven automation and human experience [13].Output values include increased productivity, lower operational costs, and innovation.Urban efficiency and adaptability are improved, but worker displacement and ethical issues may arise.
Sonia and colleagues (2023) studied IoT-AI integration for sustainable urban engineering solutions in smart cities.They propose optimizing resource allocation, infrastructure management, and quality of life via IoT devices and AI algorithms [14].Results include energy efficiency, environmental footprint reduction, and urban resilience.The pros include efficient resource distribution and urban sustainability, but the cons include data privacy and interoperability issues.Adewopo et al. (2024) presented a large dataset for smart city AIpowered traffic accident detection and computer vision systems.Their solution improves accident detection systems using big data and DL [15].The results are better accident recognition, fewer false warnings, and safer city roadways.Benefits include improved accident detection, but negatives include data quality and computing needs.
Fadhel et al. (2024) thoroughly explored smart city and urban information fusion techniques.Their system uses sensor and IoT data to improve urban decision-making and situational awareness [16].Outputs include better data accuracy, decision-making, and urban resilience.Situational awareness and urban planning improved; however, data interoperability and integration may be issues.Previous studies have suggested various systems for detecting and alerting about collisions and rollovers.However, no system categorizes these incidents as a crash, fall-off, rollover, and no-accident.This study introduces an innovative solution that combines smartphone sensors to detect and categorize accidents.The literature survey emphasizes the progress in utilizing sensor fusion and AI for AADC in smart city safety.Researchers have created advanced solutions using various sensor technologies and AI algorithms to detect, classify, and respond to real-time accidents.

Proposed AADC
This paper introduces an innovative solution that combines smartphone sensors with IoT and AI techniques to detect and categorize accidents as crash, fall-off, rolling, and no-accident.

IoT architecture for AADC system
Fig. 1 presents an IoT architecture designed to tackle the issue of categorizing vehicle accidents.We used a modern smartphone and a pre-made sensor platform called Senso-drone to collect data on physical variables related to vehicle movement.The Android device has various built-in sensors like vibration sensor, gyroscope, magnetic field sensors, and the Global Positioning System (GPS).These sensors can calculate the vehicle's acceleration, orientation, tilt, and g-force.The Senso-drone stays connected to the cellphone through Bluetooth to transmit data to the mobile device.

Fig. 1. Proposed IoT architecture for AADC system
The mobile device handles most of the computation.Smartphone processing significantly reduces internet resource consumption by sending only pertinent information like location, name, and type of accident to the IoT server.After evaluating the present scenario, the IoT server sends urgent notifications to different emergency medical services, the nearby police station, family members, and friends.

Dataflow in the proposed IoT-AADC system
Fig. 2 illustrates the data flow in the proposed IoT-AADC system.The AADC system's characteristic vector comprises five parameters: fall-off, pitch, orientation, rollover, and speed, which are used for detecting and categorizing vehicle accidents.The system has been learned, and a repository of information with accident categories has been established by feeding the training dataset to the ML classifier.Following training, the system model is evaluated using the test dataset to determine the accuracy of notifying emergency services, families, and police in the event of an accident.(2) Subject to the limitations: For all  = 1, 2, . . ., , the inequality ( ⋅  + ) ≥ 1 must hold. represents the class label of the i-th sample. is the feature vector of the i-th sample. represents the number of samples.
The SVM algorithm determines the most advantageous values of w and b that maximize the margin while adhering to the classification constraints.SVMs can utilize kernel functions to transform input features into a higher-dimensional space when the data is not linearly separable, allowing for separation.
SVM classifiers provide numerous benefits for AADC in smart cities.They excel in managing high-dimensional data and can address non-linear decision boundaries using kernel tricks.SVMs are less susceptible to overfitting, making them appropriate for small datasets with many features.SVMs can be computationally demanding for large datasets and necessitate meticulous hyperparameter selection for performance optimization.

Decision Tree (DT) classifier
DTs are a forecasting and categorizing tool that utilizes a structure that resembles a tree.Each node in the tree represents an experiment conducted on a characteristic, with branches holding the test results and terminal nodes containing the class label.DTs are ideal for categorized tasks due to their non-parametric nature, eliminating the need for knowledge about the input variables' probability.DTs can process numerical and qualitative inputs, model non-linear connections between attributes and categories, and accommodate missing data.Decision trees are appealing due to their transparent and easily understandable categorization structure.

Naïve Bayes (NB) classifier
Another classification method, NB, is employed for AADC, which relies on Bayes' theorem.The NB method is highly adaptable and increases proportionally with the number of indicators.It is preferred over other techniques for classification due to its computational ease and quick training capability.It is resilient to noisy information.The technique assumes that the variables used to predict are autonomous, meaning that a specific feature in a category is not connected to the existence of other features.
ML classifiers can combine gyroscopes, magnetic field sensor, GPS, and vibration sensor data to detect and categorize accidents in smart cities accurately, enhancing road safety.

Results and discussion
This research specifically focuses on identifying and categorizing four-vehicle accident scenarios: crash, fall-off, rolling, and no-accident, based on the five variables outlined in Fig. 2. Fig. 3. SVM classifier performance for the proposed AADC Fig. 3 demonstrates the performance of the SVM classifier for the proposed AADC system.The SVM classifier demonstrated high precision, recall, and F1-score values of 97.6%, 99.2%, and 98.7% in the "Crash" category, showcasing its effectiveness in accurately detecting crash incidents.The SVM classifier showed strong performance in detecting accidents in the "Fall-off" and "Rolling" categories, with precision, recall, and F1score values exceeding 93%.The SVM classifier showed high precision and recall values of 95.6% and 96.8% for the "No-accident" category, demonstrating its ability to classify instances where no accident occurred accurately.The SVM classifier performs strongly in various accident categories within the AADC system, indicating its appropriateness for precise accident identification and categorization tasks.4 depicts the NB classifier performance for the proposed AADC.The NB classifier showed impressive precision, recall, and F1-score of 96.3%, 98.2%, and 97.4% for "Crash" incidents, demonstrating its accuracy in identifying crash events.The classifier demonstrated its effectiveness in detecting "Fall-off" accidents by achieving precision, recall, and F1-score metrics of 92.7%, 94.7%, and 93.7%, respectively.The NB classifier in the "Rolling" category demonstrated strong performance with precision, recall, and F1-score values of 96.4%, 95.3%, and 96.1%, respectively, indicating its reliability in identifying rolling accidents.The NB classifier demonstrated high precision, recall, and F1-score rates of 94.6%, 95.4%, and 94.7%, respectively, for scenarios classified as "No-accident," showing its ability to identify instances without accidents accurately.The NB classifier performs strongly in various accident categories in the AADC system, indicating its effectiveness in accurately detecting and classifying accidents.effectively detected "Fall-off" accidents with precision, recall, and F1-score metrics of 90.8%, 89.4%, and 89.4%, respectively.The DT classifier showed strong performance in the "Rolling" category with precision, recall, and F1-score values of 92.7%, 93.6%, and 92.6%, respectively, indicating its reliability in detecting rolling accidents.The DT classifier demonstrated strong precision, recall, and F1-score rates of 86.7%, 88.7%, and 87.1%, respectively, for scenarios classified as "No-accident," showing its ability to classify instances where no accident took place accurately.The DT demonstrates strong performance in various accident categories in the AADC system, indicating its effectiveness in accurately detecting and classifying accidents.

Conclusion
This study introduces an IoT-enabled Automotive Accident Detecting and Categorization (IoT-AADC) method that combines a smartphone's internal and external sensors to identify and categorize the kind of accident.The mobile device handles most of the computation.Smartphone processing significantly reduces internet resource consumption by sending only pertinent information like location, name, and type of accident to the IoT server.After evaluating the present scenario, the IoT server sends urgent notifications to different emergency medical services, the nearby police station, family members, and friends.SVM classifier gave the best classification performance with precision, recall, and F1-score of 97.6%, 99.2%, and 98.7%, respectively, in the "Crash" category.

Fig. 4 .
Fig. 4. NB classifier performance for the proposed AADC Fig.4depicts the NB classifier performance for the proposed AADC.The NB classifier showed impressive precision, recall, and F1-score of 96.3%, 98.2%, and 97.4% for "Crash" incidents, demonstrating its accuracy in identifying crash events.The classifier demonstrated its effectiveness in detecting "Fall-off" accidents by achieving precision, recall, and F1-score metrics of 92.7%, 94.7%, and 93.7%, respectively.The NB classifier in the "Rolling" category demonstrated strong performance with precision, recall, and F1-score values of 96.4%, 95.3%, and 96.1%, respectively, indicating its reliability in identifying rolling accidents.The NB classifier demonstrated high precision, recall, and F1-score rates of 94.6%, 95.4%, and 94.7%, respectively, for scenarios classified as "No-accident," showing its ability to identify instances without accidents accurately.The NB classifier performs strongly in various accident categories in the AADC system, indicating its effectiveness in accurately detecting and classifying accidents.

Fig. 5 .
Fig. 5. DT classifier performance for the proposed AADC Fig. 5 shows the DT classifier performance for the proposed AADC.The DT classifier in the "Crash" category demonstrated precision, recall, and F1-score values of 86.4%, 87.6%, and 86.9%, respectively, showing its ability to identify crash events accurately.The classifier