Evaluating Faster R-CNN and YOLOv8 for Traffic Object Detection and Class-Based Counting

Authors

  • Muhammad Talha Jahangir Institute of Computing, MNS University of Engineering and Technology Multan, Pakistan.
  • Tahreem Fatima Institute of Computing, MNS University of Engineering and Technology Multan, Pakistan.
  • Qandeel Fatima Institute of Computing, MNS University of Engineering and Technology Multan, Pakistan.

Keywords:

Deep learning-based traffic object detection, Autonomous vehicle, Real-time Traffic vision system, Precision and Reliability

Abstract

Real-time traffic object detection is a critical component necessary for achieving a fully autonomous traffic system. Traffic object detection, along with background classification, is a significant area of research aimed at enhancing safety on the roads and reducing accidents by accurately identifying vehicles.  This research aims to develop an accurate and efficient system for traffic object detection and classification in real-time traffic environments. It also seeks to minimize false positives and negatives, ensuring that no objects are overlooked in the detection of classes such as cars, buses, bicycles, motorcycles, and pedestrians.  This research aims and focuses on the two following deep learning technologies: YOLO stands for (You Only Look Once) and Faster R- CNN stands for (Region-based Convolutional neural network). YOLO, initially designed as the single-stage approach, emphasizes speed; therefore, it is best suited for real-time uses. However, Faster R-CNN which is a two-stage detector gives better results in object detection and is highly accurate. Both models are trained and tested on the same data set containing 5712 trained images, 570 validation images, and 270 test images using a workstation with RAM 32 GB and NVIDIA GeForce RTX 4080 Super GPU through the help of CUDA version 12.4 to provide the end evaluating results. Since Faster RCNN is a very intensive model it took 22 hours to complete 3 epochs with an accuracy of 55.2% to train the model and YOLO finished the training within 10 epochs with the mAP@0.5 value of 0.931 of all classes.  Our results of traffic object real-time detection indicated that YOLO was vastly better and quicker than Faster R-CNN.

References

Organização Mundial da Saúde, “GLOBAL STATUS REPORT ON ROAD SAFETY 2018 SUMMARY,” World Heal. Organ., no. 1, p. 20, 2018, Accessed: Sep. 30, 2024. [Online]. Available: http://apps.who.int/bookorders.

G. Yu, P. K. Wong, J. Zhao, X. Mei, C. Lin, and Z. Xie, “Design of an Acceleration Redistribution Cooperative Strategy for Collision Avoidance System Based on Dynamic Weighted Multi-Objective Model Predictive Controller,” IEEE Trans. Intell. Transp. Syst., vol. 23, no. 6, pp. 5006–5018, Jun. 2022, doi: 10.1109/TITS.2020.3045758.

C. Liu, S. Li, F. Chang, and Y. Wang, “Machine Vision Based Traffic Sign Detection Methods: Review, Analyses and Perspectives,” IEEE Access, vol. 7, pp. 86578–86596, 2019, doi: 10.1109/ACCESS.2019.2924947.

P. Jiang, D. Ergu, F. Liu, Y. Cai, and B. Ma, “A Review of Yolo Algorithm Developments,” Procedia Comput. Sci., vol. 199, pp. 1066–1073, Jan. 2022, doi: 10.1016/J.PROCS.2022.01.135.

S. P. Rajendran, L. Shine, R. Pradeep, and S. Vijayaraghavan, “Fast and Accurate Traffic Sign Recognition for Self Driving Cars using RetinaNet based Detector,” Proc. 4th Int. Conf. Commun. Electron. Syst. ICCES 2019, pp. 784–790, Jul. 2019, doi: 10.1109/ICCES45898.2019.9002557.

W. Yang and W. Zhang, “Real-Time Traffic Signs Detection Based on YOLO Network Model,” Proc. - 2020 Int. Conf. Cyber-Enabled Distrib. Comput. Knowl. Discov. CyberC 2020, pp. 354–357, Oct. 2020, doi: 10.1109/CYBERC49757.2020.00066.

C. Dewi, R. C. Chen, Y. T. Liu, X. Jiang, and K. D. Hartomo, “Yolo V4 for Advanced Traffic Sign Recognition with Synthetic Training Data Generated by Various GAN,” IEEE Access, vol. 9, pp. 97228–97242, 2021, doi: 10.1109/ACCESS.2021.3094201.

D. Mijic, M. Brisinello, M. Vranjes, and R. Grbic, “Traffic Sign Detection Using YOLOv3,” IEEE Int. Conf. Consum. Electron. - Berlin, ICCE-Berlin, vol. 2020-November, Nov. 2020, doi: 10.1109/ICCE-BERLIN50680.2020.9352180.

W. N. Mohd-Isa, M. S. Abdullah, M. Sarzil, J. Abdullah, A. Ali, and N. Hashim, “Detection of Malaysian Traffic Signs via Modified YOLOv3 Algorithm,” 2020 Int. Conf. Data Anal. Bus. Ind. W. Towar. a Sustain. Econ. ICDABI 2020, Oct. 2020, doi: 10.1109/ICDABI51230.2020.9325690.

A. Avramović, D. Sluga, D. Tabernik, D. Skočaj, V. Stojnić, and N. Ilc, “Neural-network-based traffic sign detection and recognition in high-definition images using region focusing and parallelization,” IEEE Access, vol. 8, pp. 189855–189868, 2020, doi: 10.1109/ACCESS.2020.3031191.

Y. Gu and B. Si, “A Novel Lightweight Real-Time Traffic Sign Detection Integration Framework Based on YOLOv4,” Entropy 2022, Vol. 24, Page 487, vol. 24, no. 4, p. 487, Mar. 2022, doi: 10.3390/E24040487.

“YOLO Algorithm for Object Detection Explained [+Examples].” Accessed: Sep. 30, 2024. [Online]. Available: https://www.v7labs.com/blog/yolo-object-detection

“Faster R-CNN Explained for Object Detection Tasks | DigitalOcean.” Accessed: Sep. 30, 2024. [Online]. Available: https://www.digitalocean.com/community/tutorials/faster-r-cnn-explained-object-detection

A. Gupta, A. Anpalagan, L. Guan, and A. S. Khwaja, “Deep learning for object detection and scene perception in self-driving cars: Survey, challenges, and open issues,” Array, vol. 10, p. 100057, Jul. 2021, doi: 10.1016/J.ARRAY.2021.100057.

T. Diwan, G. Anirudh, and J. V. Tembhurne, “Object detection using YOLO: challenges, architectural successors, datasets and applications,” Multimed. Tools Appl., vol. 82, no. 6, pp. 9243–9275, Mar. 2023, doi: 10.1007/S11042-022-13644-Y/TABLES/7.

A. Boukerche and Z. Hou, “Object Detection Using Deep Learning Methods in Traffic Scenarios,” ACM Comput. Surv., vol. 54, no. 2, Mar. 2021, doi: 10.1145/3434398.

“Kaggle: Your Home for Data Science.” Accessed: Sep. 30, 2024. [Online]. Available: https://www.kaggle.com/datasets/yusufberksardoan/traffic-detection- project/data

“kjr-21-869-g002-l.jpg (1005×407).” Accessed: Sep. 30, 2024. [Online]. Available: https://kjronline.org/ArticleImage/0068KJR/kjr-21-869-g002-l.jpg

M. A. A. Al-qaness, A. A. Abbasi, H. Fan, R. A. Ibrahim, S. H. Alsamhi, and A. Hawbani, “An improved YOLO-based road traffic monitoring system,” Computing, vol. 103, no. 2, pp. 211–230, Feb. 2021, doi: 10.1007/S00607-020-00869-8/METRICS.

“How many images do you need to train a neural network? « Pete Warden’s blog.” Accessed: Sep. 30, 2024. [Online]. Available: https://petewarden.com/2017/12/14/how-many-images-do-you-need-to-train-a-neural-network/

“The PASCAL Visual Object Classes Homepage.” Accessed: Sep. 30, 2024. [Online]. Available: http://host.robots.ox.ac.uk/pascal/VOC/

“Open Images V7.” Accessed: Sep. 30, 2024. [Online]. Available: https://storage.googleapis.com/openimages/web/index.html

“COCO - Common Objects in Context.” Accessed: Sep. 30, 2024. [Online]. Available: https://cocodataset.org/#home

R. Chavan, A. Gulge, and S. Bhandare, “Moving Object Detection and Classification using Deep Learning Techniques,” Tuijin Jishu/Journal Propuls. Technol., vol. 45, no. 01, pp. 3935–3944, Feb. 2024, Accessed: Sep. 30, 2024. [Online]. Available: https://www.propulsiontechjournal.com/index.php/journal/article/view/5000

J. Wang, Y. Chen, Z. Dong, and M. Gao, “Improved YOLOv5 network for real-time multi-scale traffic sign detection,” Neural Comput. Appl., vol. 35, no. 10, pp. 7853–7865, Apr. 2023, doi: 10.1007/S00521-022-08077-5/METRICS.

P. Shinde, S. Yadav, S. Rudrake, and P. Kumbhar, “Smart Traffic Control System using YOLO,” Int. Res. J. Eng. Technol., 2019, Accessed: Sep. 30, 2024. [Online]. Available: www.irjet.net

N. Youssouf, “Traffic sign classification using CNN and detection using faster-RCNN and YOLOV4,” Heliyon, vol. 8, no. 12, Dec. 2022, doi: 10.1016/j.heliyon.2022.e11792.

“Welcome To Colab - Colab.” Accessed: Sep. 30, 2024. [Online]. Available: https://colab.research.google.com/

V. Dalborgo et al., “Traffic Sign Recognition with Deep Learning: Vegetation Occlusion Detection in Brazilian Environments,” Sensors 2023, Vol. 23, Page 5919, vol. 23, no. 13, p. 5919, Jun. 2023, doi: 10.3390/S23135919.

“Roboflow Blog.” Accessed: Sep. 30, 2024. [Online]. Available: https://blog.roboflow.com/what-is-resnet-/

“Intersection over Union (IoU): Definition, Calculation, Code.” Accessed: Sep. 30, 2024. [Online]. Available: https://www.v7labs.com/blog/intersection-over-union-guide

Downloads

Published

2024-10-10

How to Cite

Jahangir, M. T., Tahreem Fatima, & Qandeel Fatima. (2024). Evaluating Faster R-CNN and YOLOv8 for Traffic Object Detection and Class-Based Counting. International Journal of Innovations in Science & Technology, 6(4), 1606–1620. Retrieved from https://journal.50sea.com/index.php/IJIST/article/view/1038