# A Cloud-Based Ambulance Detection System Using YOLOv8 for Minimizing Ambulance Response Time
## 1 Introduction  
In today's fast-paced environment, we require devices that can respond swiftly to real-time emergency calls. Ambulance vehicles, for example, face a serious, systemic challenge in determining the best route to the desired destination. No matter how hard the optimal path algorithms try, traffic light jamming will always be one of the ambulance's obstacles. By creating a model that can detect an ambulance before it arrives at the traffic light and provide a green signal to the traffic control system to clear the road, it can pass without having to wait and the ambulance's travel time can be cut down to the absolute minimum [1; 2; 3; 4]. This approach requires two sides of implementation: one side is for building the model that detects the ambulances, and the other side is the system that uses this model to detect the ambulances and takes the results, and sends them to the traffic controller. Delay in hospitalization is the most frequent and substantial cause of fatality in traffic accidents [1; 5; 6; 7]. The injured may pass away before they reach the hospital ifthere is even a one-minute delay. Research in [7; 8; 9] found that if immediate aid is delayed, the victim may pass away before reaching the hospital. Since a 6% gap in reaction time necessitates immediate treatment for the sufferers, it is critical to arrive at the hospitals as soon as possible. To address this issue and identify ambulance vehicles as quickly as feasible, numerous advancements in this field have been investigated and tested in several scenarios. Ambulance vehicles can be found using security cameras by employing machine learning models. A number of techniques, including a Motion History Image (MHI), K-Nearest Neighbor (KNN), Hidden Markov Model (HMM), Multi-Layer Perceptron (MLP), Convolutional Neural Network (CNN), Artificial Neural Network (ANN), Recurrent Neural Network (RNN), Support Vector Machine (SVM), Long Short-Term Memory network (LSTM), and others, can be used to automatically detect ambulance vehicles [1; 10; 11; 12; 13; 14; 15]. The proper detection of ambulance vehicles will help emergency services to keep up with evolving emergency calls [16; 17]. To develop a proper ambulance vehicle detection system that can detect ambulances and distinguish them from other objects, the work is heavily dependent on data collection and training the model to detect the required objects through the camera [1; 18; 19; 20]. The YOLOv8 model is fed with a large number of object (i.e., in this case, ambulance vehicle) values. After training the model, we will create a system that can run the model, pass values (i.e., a video live feed or images), and return values as a detection signal as well as information about the detection signal. Therefore, we gathered data using crawling techniques from 10 different countries. In the early stages, we managed to collect 40,000 images, and later we filtered them to finally have 3000 images from 10 countries. These countries include Saudi Arabia, Japan, Italy, Russia, the United Kingdom, Sweden, Turkey, Germany, Spain, and Norway. Then, the 3000 images were cropped, and each image was renamed for the country that it belongs to, including a name and a number. These images were trained with two types of models; one is a pre-trained model, which is generally known as a faster way to train because the first layers of the network were trained before, and the model can now know what object to look for instead of trying to identify the shape and color of that object, which in our paper is the ambulance. The second model is training from scratch; this approach generally will have less accuracy than the pre-trained one. On some occasions, all of them may have the same accuracy only if the non-pre-trained model is given the maximum epochs that it needs, but in our case, we chose 100 epochs, so there is room left to compare both sides.