Authors: Aishwarya W, Mrs. Sheelavathi A, Jhanani R.S, Karthika D R, Keerthana P
Certificate: View Certificate
The number of vehicles has increased in recent days. Managing this huge number of vehicles is a tedious process. Traffic Signals are used to control the flow of the vehicles in an orderly manner. Sometimes an ambulance may need to wait for long time in a traffic signal and if it waits for too long, it would put the patient’s life at risk. Traffic police can manually identify an ambulance and try to clear the traffic jam, but it is not possible with today’s enormous vehicles. Detection of Ambulance using Computer Vision is an application of computer vision and image processing which is capable of extracting images of vehicles and detecting ambulance. It is implemented using Python, OpenCV, TensorFlow and CNN. It captures the live feed of traffic using a camera and extract the vehicles. Then it is classified as an ambulance or non-ambulance vehicle. By automating this process, it is possible to clear a way for an ambulance that is waiting in a traffic signal.
Emergency vehicles play an important role in every life-threatening situation. Traffic jam takes more than 20% patient lives in an ambulance but when the patient’s condition is very serious the percentage of patient death is increased. These are situations when an emergency patient needs to go to the hospital immediately and the ambulance got stuck in the traffic jam. This scenario is dangerous in case of heart patients who needed to be rushed to hospital in time. In traffic jams, many people do not bother to give pass-way for the emergency vehicle and also traffic police can’t see which lane they should clear for the ambulance. Therefore, many patients lose their lives before reaching hospitals.
We can reduce these problems by introducing an intelligent automated system integrated with a traffic control system that will detect and give priority to emergency vehicles. We need to a build a system to detect cars and classify it as an emergency or regular car. After detecting every vehicle, they have classified it into an emergency vehicle and regular vehicles. If an emergency vehicle is found, the computer can notify the traffic police or an automated system to clear its way.
A. Existing System
Traffic problems now days are increasing because of the growing number of vehicles and the limited resources provided by current infrastructures. The simplest way of controlling a traffic light uses timer for each phase in round robin fashion. Another way is to use electronic sensors to capture the location of the vehicle and check whether it is waiting in a signal or not. This method requires installing some sensors in that particular vehicle which is not possible for the huge number of vehicles available.
The use of RFIDs and Bluetooth in the existing work has been used in vehicle detection for a long time. These devices however have a few drawbacks when being used for detecting vehicles:
B. Proposed System
In our work, the only piece of hardware we propose to use is the surveillance camera itself. The system will detect vehicle through images instead of using electronic sensors embedded in the pavement. A camera will be installed within certain distances from the traffic light it will capture the footage of the vehicles at regular intervals. The captured footage is then converted to frames and YOLO algorithm is used to extract the vehicles. The extracted images is then processed by our CNN model to detect whether it is an ambulance or not.
Advantages of Proposed System:
II. LITERATURE SURVEY
 K Agrawal1, M K Nigam1, S Bhattacharya1 ,Sumathi G1 published a paper work in 2021, for Ambulance Detection using Image Processing and Neural Network which is a vehicle detection and tracking system, that recognizes the vehicle (i.e., Ambulance in this case) amidst the traffic congestion.According to their work, The Ambulance tracking system is activated at the mapped junctions and that program detects the ambulance coming close to it and turns the traffic light to Green for the next 15 seconds. Geocoding is the practice of transforming addresses (like a physical address) to location information (like longitude and latitude) that can be used to locate a label on a map or to mark a grid. They plan to provide ambulances with this software to make it easy to transform addresses into a programmable format for review and retrieval. This data is converted to a system that shows all the crossings it must pass to meet the endpoint.
 In 2018, Shuvendu Roy1, Md. Sakif Rahman2 have proposed an automated system to detect emergency cars from CCTV footage using the deep convolutional neural network. Their method has shown good result in detecting and classifying emergency cars.
 Huansheng Song,Haoxiang Liang,Huaiyu Li,Zhe Dai Xu Yun in 2019 , published their work that discusses the challenges that directly affects the accuracy of vehicle counts, due to the different sizes of vehicles. To address this,they have proposed a vision-based vehicle detection and counting system. A new high definition highway vehicle dataset with a total of 57,290 annotated instances in11,129 images is published in this study. Compared with the existing public datasets, the proposed dataset contains annotated tiny objects in the image, which provides the complete data foundation for vehicle detection based on deep learning. The experimental results verify that using the proposed segmentation method can provide higher detection accuracy, especially for the detection of small vehicle objects. Moreover, the novel strategy described in this article performs notably well in judging driving direction and counting vehicles. This paper has general practical significance for the management and control of highway scenes.
 In 2019, K.Rubini, M.Vidhya, S.R Yeshawini, A.Gowthami proposed their idea that focuses on controlling the speed of the surrounding vehicles near ambulance, and hence the ambulance can reach the hospital on time. It can be done by using RSSI (Received Signal strength Indication) which works based on Message Queuing Telemetry Transport algorithm. Node MCU acts as transmitter and server acts as receiver. Node MCU has the inbuilt Wi-Fi module (EP8266). It receives the signal from server and identifies that signals strength which is used to reduce the speed of other vehicles within the particular limit. An APR voice module is used to provide intimation to the surrounding vehicles about the arrival of ambulance. Also the traffic signals are made automated for ambulance so that the signals will go green thus providing a clear path for the ambulance to reach without time lag. The original signal is again restored once the ambulance moves over a particular distance from the signal that has been fixed earlier.
 Kapileswar Nellore and Gerhard P. Hancke proposed their idea in 2016. This paper presents an approach to schedule emergency vehicles in traffic. The approach combines the measurement of the distance between the emergency vehicle and an intersection using visual sensing methods, vehicle counting and time sensitive alert transmission within the sensor network. The distance between the emergency vehicle and the intersection is calculated for comparison using Euclidean distance, Manhattan distance and Canberra distance techniques.
III. ARCHITECTURAL DESIGN
The Architecture Diagram depicts the overall structure of the software application or model that is to be created or already created architectural diagram. It uses information flow characteristics and maps them into the program structure. Fig 3.1 displays how the images are going to the YOLO program, then it is detecting whether the vehicle is a truck or not. Since we are using CNN, it helps us to generate our dataset, where in the filtered data from the YOLO program comes as input(i.e, trucks).With dataset generated, using CNN, we detect whether the detected truck as an ambulance or not.
The proposed methodology is implemented in Python and packages includes the following:
The implementation is segregated into 4 Modules and considered as 2 Phases as follows:
The videos captured by the camera sensor are converted into images and these images are processed by various algorithms and finally, the program gives the output whether the vehicle detected is an ambulance to not. After that it will alert the user if the ambulance is present or not.
Before the detection of the vehicle and giving output based on the result, the machine must be taught how an ambulance looks like. For this, we created a tiny dataset consisting of a thousand images, and a model must be trained which will be called in the confirmation segment.TensorFlow 2.1.0 algorithm is particularly used to avoid compatibility issues and is installed. Validation and trained images generated after training are stored in their respective folders in google drive and the drive is linked to the training algorithm. Matplotlib is used to give the output graphs.
It takes place in several steps and includes 3 modules:
If the vehicle qualifies as a truck, then a copy of these images is saved in the “detected” folder after adding a bounding box around it.The images are cropped on their bounding boxes and the cropped image is saved in the “crops” folder
V. FUTURE ENHANCEMENT
Although the system shows good performance,there is room for further improvement:
A. The accuracy of the classification model is around 84%. This can be improved to more than 95% for more reliable model
B. An User Interface can be created to use this software with ease
C. Adding a feature for live tracking of the ambulance through the traffic for better navigation.
In this project, an approach is proposed to automate the detection of ambulance in a traffic signal. It is more consistent in detecting vehicles because it uses actual traffic images. Based on the experimental results, it is shown that the system is working fine and produces desired results such as: A. Extracting frames from the video captured B. Detecting vehicles at an given frame of the feed C. Classifying the vehicle as an ambulance or not All these working advantages ensure that the application is widely usable and makes it a reliable alternate to existing ambulance detection system.
 Agrawal, K., Nigam, M., Bhattacharya, S. and Sumathi, G., 2021. Ambulance detection using image processing and neural networks. Journal of Physics: Conference Series, 2115(1), p.012036.  S. Roy and M. Rahman, \"Emergency Vehicle Detection on Heavy Traffic Road from CCTV Footage Using Deep Convolutional Neural Network\", 2019 International Conference on Electrical, Computer and Communication Engineering (ECCE), 2019. Available: 10.1109/ecace.2019.8679295  H. Song, H. Liang, H. Li, Z. Dai and X. Yun, \"Vision-based vehicle detection and counting system using deep learning in highway scenes\", European Transport Research Review, vol. 11, no. 1, 2019. Available: 10.1186/s12544-019-0390-4.  K. Nellore and G. Hancke, \"Traffic Management for Emergency Vehicle Priority Based on Visual Sensing\", Sensors, vol. 16, no. 11, p. 1892, 2016. Available: 10.3390/s16111892.  K.Rubini, M.Vidhya, S.R.Yeshaswini, A.Gowthami, \"Automatic Ambulance Detection And Intimation Using RSSI\", International Journal of Emerging Technologies in Engineering Research (IJETER), vol. 07, no. 03, 2019.  P. Jadhav, P. Kelkar, K. Patil and S. Thorat, \"Smart Traffic Control System Using Image Processing\", International Research Journal of Engineering and Technology (IRJET), vol. 03, no. 03, 2016.
Copyright © 2022 Aishwarya W, Mrs. Sheelavathi A, Jhanani R.S, Karthika D R, Keerthana P. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.