Deep Learning Model For Accident Detection in Smart Cities Using Computer Vision
Deep Learning Model For Accident Detection in Smart Cities Using Computer Vision
Deep Learning Model for Accident Detection in Smart Cities using Computer
Vision
Abstract: In recent years, the concept of smart cities has gained increasing attention, driven by the need to
make urban environments safer, more sustainable, and more efficient. One of the key challenges in achieving
this vision is the management of traffic, which is a major cause of accidents and delays in urban areas.
Traditional methods of accident detection rely on manual reporting or sensor-based systems, which are often
slow and imprecise. To address this challenge, researchers have proposed using computer vision techniques to
automatically detect accidents in real-time. We have developed a deep learning model; CNN is capable of
analyzing real-time video feeds from surveillance cameras installed in strategic locations throughout a city. In
this paper, we will describe the proposed model in detail, including the architecture of the CNNs, the training
process, and the real-time accident detection algorithm. Experimental observations have shown around 89%
of validation accuracy in detecting the accidents based on the live video feed from cameras.
Keywords: smart cities, computer vision, deep-learning, sensor-based, video-feeds
222
Journal of Harbin Engineering University
ISSN: 1006-7043 Vol 44 No. 6
June 2023
Approach to Detection and Classification of Traffic III. System Design and Implementation
Incidents was employed by RazanSendi et al. [3]. The proposed system aims to predict the accident
The vehicle detection and tracking model assigned and alert the nearest emergency services to
a distinct identification number (ID) to each provide timely first aid to the victim and
vehicle and combined the YOLOv5 object detector potentially save their life. To achieve this goal,
with the DeepSORT tracker to detect and monitor Deep Learning techniques based on Convolutional
the movements of the vehicles. The mean average Neural Networks (CNN) will be used. The
precision (mAP) of this model was 99.2%. A human implementation of this system involves collecting a
operator or emergency services would be notified large dataset of accident images or videos, pre-
in the event of an accident utilising a computer processing the data, training the CNN model, and
vision-based deep learning model for accident deploying it to detect accidents and alert
detection in smart cities. emergency services. Fig. 1 shows the system
architecture for the proposed system.
The system architecture for accident detection recognize the features that are indicative of an
using Convolutional Neural Networks (CNN) accident, such as damaged vehicles or debris on
typically involves the following components. the road.
A.Data Collection: A large dataset of images D. Model Training: The CNN model needs to be
and/or videos of accident scenes needs to be trained using the prepared dataset. This involves
collected. This dataset should include a variety of optimizing the model's weights and biases to learn
accidents, including different types of vehicles, to recognize the features that are indicative of an
different road conditions, and different degrees of accident.
damage. E. Model Evaluation: Once the model has been
B. Data Pre-processing: The collected data needs trained, it needs to be evaluated using a separate
to be pre-processed to ensure that it is suitable for set of images and/or videos that were not used
use with the CNN. This may involve tasks such as during training. This is to evaluate the model's
resizing images, normalizing pixel values, and performance on unseen data and ensure that it is
separating the dataset into training, validation, able to generalize to new accident scenarios.
and testing sets. F. Deployment: Once the model has been tested
C. CNN Model Architecture: The CNN model and its performance is satisfactory, it will be
architecture needs to be designed, which typically deployed in a real-world scenario. It would be
involves choosing the number and type of layers, integrated into a traffic monitoring system that
the size of the filters, and the activation functions. analyses live video feeds from traffic cameras to
The model should be designed to learn to detect accidents and alert emergency services.
223
Journal of Harbin Engineering University
ISSN: 1006-7043 Vol 44 No. 6
June 2023
The system receives input from cameras installed accident.The system alerts the nearest police and
in the area that monitor traffic and detect hospital to provide timely first aid and potentially
accidents. It uses computer vision techniques, such save the victim's life.The system tracks the victim's
as object detection and image segmentation, to location and provides real-time updates to
identify accidents in the input data.Once an emergency services until they arrive on the scene.
accident is detected, the system uses a CNN model The graphs given in Fig.3 and Fig.4 shows the
trained on accident images to predict the type of training loss verses training accuracy and
accident, such as car crash or any other type of validation loss verses validation accuracy.
Fig.3 Training loss V/S Training accuracy Fig.4 Validation Loss V/S Validation Accuracy
IV. Results And Discussion the size and position of its wheels, the presence of
When a photo is analyzed using a Convolutional headlights or taillights, and other details that help
Neural Network (CNN) algorithm for car detection, distinguish cars from other objects in the image. It
the algorithm will look for features in the image is shown in Fig. 5 in which car is detected and Fig.
that are commonly associated with cars[6]. These 6 in which accident is not detected.
features might include the shape of the car's body,
224
Journal of Harbin Engineering University
ISSN: 1006-7043 Vol 44 No. 6
June 2023
A video is divided into individual frames to identify non-accident scenarios, so that it can learn to
if an accident has occurred.When a video is distinguish between the two. The algorithm may
analyzed using a Convolutional Neural Network also need to be programmed to recognize
(CNN) algorithm for accident detection, the different types of accidents, such as vehicle
algorithm will look for patterns in the video frames collisions, pedestrian accidents, or fires.
that indicate the presence of an accident. These Once the CNN algorithm has detected an accident
patterns might include sudden changes in the in the photo, it can be used to trigger an alert or
motion of objects in the video, the appearance of notification to a human operator or emergency
smoke or debris, or other visual cues that suggest services. The alert can include details such as the
a collision or other type of incident has location of the accident, the number of vehicles
occurred[14]. To detect accidents, the CNN involved, and any other relevant information that
algorithm will likely need to be trained on a large can assist in responding to the incident. Fig. 7, 8, 9
dataset of videos that include both accident and shows the different frames used.
Fig. 7 Frame 1
225
Journal of Harbin Engineering University
ISSN: 1006-7043 Vol 44 No. 6
June 2023
226
Journal of Harbin Engineering University
ISSN: 1006-7043 Vol 44 No. 6
June 2023
227