A Transfer-Learning-Based Approach for Emergency Vehicle Detection

Author: Abubakar M. Ashir1
1Department of Computer Engineering, Faculty of Engineering, Tishk International University, Erbil, Iraq

Abstract: The paper presents a computer-vision based approach for real-time detection of different types of emergency vehicles under heavy traffic conditions. This enables preferential path clearance for emergency vehicles by the traffic controller which has the potential of saving lives, properties and increasing the ability to prevent crimes and drastically reducing the total time required by an emergency vehicle to reach its target destination. The main challenge emergency vehicles faced in and around the cities is heavy traffic jams, which significantly hampers their operations resulting in a disastrous outcome. In most of the cities, emergency vehicles are equipped with unique colors and sound system which enable the traffic police to identify them. As our cities become smarter and transition into an era of artificial intelligence, the old system may not be sustainable due to that fact that it needs humans to constantly monitor emergency vehicle arrival at the intersections and also the sound produces by such vehicles may be nuisance and discomforting to the general public. This paper proposed a method of automatic detection of four different categories of emergency vehicle irrespective of the vehicle’s shapes, models or manufacturers’ using modified version of YOLOv5 object detection algorithm. YOLO is an acronym for (You Only Look Once) and it is an object detection algorithm that divides images into a grid system. Each cell within the grid is responsible for detecting objects within itself. YOLO is one of the most famous object detection algorithms due to its speed and accuracy. YOLO models are used for object detection with high performance which consists of 84 classes to detect and differentiate between 84 different objects. The proposed model developed here is based on 4 classes which are (Firetrucks, Ambulance, Police Car, and Normal Cars) classes. The top layers (fully connected layers) of the YOLO algorithm were re-designed and retrained to get new learned weights while freezing the bottom layers (convolutional layers) and retaining the pre-trained YOLOv5 weights. After retraining with the proposed modified YOLOv5, the model has shown promising results and quite impressive metrics in detecting and classifying emergency vehicles and normal vehicles. Using Mean Average Precision (mAP) metric, for police cars we achieved 98%, 96% for fire trucks, 89% for ambulances and 97% for normal cars.

Keywords: Emergency Vehicle, YOLOv5, Deep Learning, Object Detection, Transfer-Learning

Download the PDF Document

Doi: 10.23918/eajse.v8i1p75

Published: June 2, 2022


Anwar, M., & Ashir, A. M. (2020). An efficient image de-blurring technique using point spread function in high definition medical image. Eurasian Journal of Science & Engineering, 6(1), 27–38.

Ashir, A.M., Ibrahim, S., Abdulghani, M., Ibrahim, A. A., & Anwar, M. S. (2021). Diabetic retinopathy detection using local extrema quantized haralick features with long short-term memory network. International Journal of Biomedical Imaging, 2021. https://doi.org/10.1155/2021/6618666

Ashir, Abubakar M. (2022). Multilevel thresholding for image segmentation using mean gradient. Journal of Electrical and Computer Engineering, 2022. https://doi.org/https://doi.org/10.1155/2022/1254852

Bochkovskiy, A., Wang, C.-Y., & Liao, H.-Y. M. (2020). YOLOv4: Optimal speed and accuracy of object detection. arXiv. https://doi.org/10.48550/ARXIV.2004.10934

Djahel, S., Smith, N., Wang, S., & Murphy, J. (2015). Reducing emergency services response time in smart cities: An advanced adaptive and fuzzy approach. 2015 IEEE First International Smart Cities Conference (ISC2), 1–8. https://doi.org/10.1109/ISC2.2015.7366151

Girshick, R. (2015). Fast R-CNN. arXiv. https://doi.org/10.48550/ARXIV.1504.08083

Girshick, R., Donahue, J., Darrell, T., & Malik, J. (2013). Rich feature hierarchies for accurate object detection and semantic segmentation. arXiv. https://doi.org/10.48550/ARXIV.1311.2524

Girshick, R., Iandola, F., Darrell, T., & Malik, J. (2014). Deformable part models are convolutional neural networks. arXiv. https://doi.org/10.48550/ARXIV.1409.5403

Glenn Jocher. (2021). GitHub.YOLOV5-Master (No. V5). GitHub.YOLOV5-Master. https://doi.org/https://github.com/ultralytics/yolov5/

Huang, Y.-S., Shiue, J.-Y., & Luo, J. (2015). A traffic signal control policy for emergency vehicles preemption using timed petri nets. IFAC-PapersOnLine, 48(3), 2183–2188. https://doi.org/https://doi.org/10.1016/j.ifacol.2015.06.412

Humayun, M., Almufareh, M. F., & Jhanjhi, N. Z. (2022). Autonomous traffic system for emergency vehicles. electronics, 11(4). https://doi.org/10.3390/electronics11040510

Karpis, O. (2012). System for vehicles Classification and emergency vehicles detection. IFAC Proceedings Volumes, 45(7), 186–190. https://doi.org/https://doi.org/10.3182/20120523-3-CZ-3015.00037

Li, Z., Tian, X., Liu, X., Liu, Y., & Shi, X. (2022). A two-stage industrial defect detection framework based on improved-YOLOv5 and optimized-inception-resnetV2 models. Applied Sciences, 12(2). https://doi.org/10.3390/app12020834

Lin, T.-Y., Maire, M., Belongie, S., Hays, J., Perona, P., Ramanan, D., Dollár, P., & Zitnick, C. L. (2014).

Microsoft COCO: Common Objects in Context. In D. Fleet, T. Pajdla, B. Schiele, & T. Tuytelaars (Eds.), Computer Vision — ECCV 2014 (pp. 740–755). Springer International Publishing.

Nellore, K., & Hancke, G. P. (2016). Traffic management for emergency vehicle priority based on visual sensing. Sensors, 16(11). https://doi.org/10.3390/s16111892

Redmon, J., Divvala, S., Girshick, R., & Farhadi, A. (2015). You only look once: Unified, real-time object detection. arXiv. https://doi.org/10.48550/ARXIV.1506.02640

Redmon, J., & Farhadi, A. (2016). YOLO9000: Better, faster, stronger. arXiv. https://doi.org/10.48550/ARXIV.1612.08242

Redmon, J., & Farhadi, A. (2018). YOLOv3: An incremental improvement. arXiv. https://doi.org/10.48550/ARXIV.1804.02767

Ren, S., He, K., Girshick, R., & Sun, J. (2015). Faster R-CNN: Towards real-time object detection with region proposal networks. arXiv. https://doi.org/10.48550/ARXIV.1506.01497

Roy, S., & Rahman, M. S. (2019). 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), 1–6. https://doi.org/10.1109/ECACE.2019.8679295

Simonyan, K., & Zisserman, A. (2014). Very deep convolutional networks for large-scale image recognition. arXiv. https://doi.org/10.48550/ARXIV.1409.1556

Singh, A. (2020). Emergency vehicles identification dataset. Kaggle. https://www.kaggle.com/datasets/abhisheksinghblr/emergency-vehicles-identification

Sun, H., Liu, X., Xu, K., Miao, J., & Luo, Q. (2021). Emergency vehicles audio detection and localization in autonomous driving. arXiv. https://doi.org/10.48550/ARXIV.2109.14797

Szegedy, C., Vanhoucke, V., Ioffe, S., Shlens, J., & Wojna, Z. (2015). Rethinking the inception architecture for computer vision. arXiv. https://doi.org/10.48550/ARXIV.1512.00567

Tran, V.-T., & Tsai, W.-H. (2020). Acoustic-based emergency vehicle detection using convolutional neural networks. IEEE Access, 8, 75702–75713. https://doi.org/10.1109/ACCESS.2020.2988986