Performance Evaluation of Lightweight YOLOv5n Models in CARLA Simulator for Autonomous Driving Applications

Main Article Content

Bader N. Awedat

Abstract

Real-time object detection is critical for autonomous driving systems, especially in realistic simulation environments like the CARLA platform. This study aims to evaluate the performance of lightweight models (YOLOv5n) in detecting complex objects, including multi-colored traffic signals, vehicles, and pedestrians, within a CARLA simulation. We trained two models using CARLA-derived datasets to assess the trade-off between accuracy and computational efficiency. Model 1 (YOLOv5n-1864-T): This model was trained on 1,864 training samples. It demonstrated superior accuracy (mAP50 = 0.935) and a faster inference speed (0.022-0.025 seconds per frame). Model 2 (YOLOv5n-1600-TV): This model was trained on 1,600 training samples along with 480 validation and test samples. It achieved better generalization (mAP50 = 0.942) with balanced confidence scores (0.75-0.96), despite a slightly slower inference speed (0.04-0.07 seconds). During inference tests on 8 dynamic CARLA frames, both models achieved high performance (F1-Score: 0.92-0.94). Model 1 excelled at detecting red traffic signals, while Model 2 showed greater adaptability to complex pedestrian angles. The results confirm that lightweight models can compete with heavier models while maintaining high computational efficiency (4.2 GFLOPs). The study recommends integrating validation data with expanded training sets to improve generalization without sacrificing speed, providing a practical framework for deploying such models in simulation-based autonomous driving systems.

Article Details

How to Cite
Awedat, B. N. (2025). Performance Evaluation of Lightweight YOLOv5n Models in CARLA Simulator for Autonomous Driving Applications. Sebha University Conference Proceedings, 4(3), 228–238. https://doi.org/10.51984/sucp.v4i3.4004
Section
Confrence Proceeding

References

Dosovitskiy, A., Ros, G., Codevilla, F., Lopez, A., & Koltun, V. (2017). CARLA: An Open Urban Driving Simulator. Conference on Robot Learning (CoRL).

Redmon, J., Divvala, S., Girshick, R., & Farhadi, A. (2016). You Only Look Once: Unified, Real-Time Object Detection. IEEE Conference on Computer Vision and Pattern Recognition (CVPR).

Lin, T.-Y., et al. (2023). Efficient Deployment of Lightweight Object Detectors on Edge Devices: A Quantization-Aware Training Approach. Journal of Embedded Systems.

Ultralytics. (2020). YOLOv5: A State-of-the-Art Real-Time Object Detection Model. GitHub Repository.

Howard, A., et al. (2021). EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks. Journal of Machine Learning Research.

Raspberry Pi Foundation. (2022). Optimizing AI Models for Edge Deployment on Raspberry Pi. Technical Whitepaper.

Awedat, B. N. (2024). Efficient object detection in autonomous driving systems using YOLOv5 and CARLA simulator. Sebha University Conference Proceedings, 3(3), 1-20. https://doi.org/10.51984/SUCP.V3I3.3694.

Awedat, B. N. (2024). Object detection using artificial intelligence in autonomous vehicles. In Proceedings of the 3rd Scientific International Conference in Science & Engineering (pp. 114–125) . http://bwu.edu.ly/icse2024. Azzaytuna University, Libya.

Alahdal, N. M., Abukhodair, F., Haj Meftah, L., & Cherif, A. (2024). Real-time object detection in autonomous vehicles with YOLO. Procedia Computer Science, 246, 2792–2801. https://doi.org/10.1016/j.procs.2024.09.392

Dontabhaktuni, J., & Peddakrishna, S. (2024). Performance evaluation of YOLOv5-based custom object detection model for campus-specific scenario. International Journal of Experimental Research and Review, 38, 46-60. https://doi.org/10.52756/ijerr.2024.v38.005.

D. Zang, Z. Wei, M. Bao, J. Cheng, D. Zhang, K. Tang, and X. Li, “Deep learning–based traffic sign recognition for unmanned autonomous vehicles,” Proceedings of the Institution of Mechanical Engineers, Part I: Journal of Systems and Control Engineering, vol. 232, no. 5, pp. 497–505, 2018.

S. Malik, M. A. Khan, and H. El-Sayed, “Carla: Car learning to act—an inside out,” Procedia Computer Science, vol. 198, pp. 742–749, 2022.

“CARLA documentation,” Online, available: https://carla.readthedocs.io/en/stable/carlas ettings/. Date access: 31-1-2025.

Liu, H.; Sun, F.; Gu, J.; Deng, L. SF-YOLOv5: A Lightweight Small Object Detection Algorithm Based on Improved Feature Fusion Mode. Sensors 2022, 22, 5817. https: // doi.org/ 10.3390/ s22155817.

Ultralytics. (2020). YOLOv5 Release v5.0. GitHub repository. Retrieved 10,03, 2024, from https://github.com/ultralytics/yolov5/releases/tag/v5.0

Ultralytics. (2021). YOLOv5 Release v6.0. GitHub repository. Retrieved 25,05, 2024, from https://github.com/ultralytics/yolov5/releases/tag/v6.0

Ultralytics. (2021). YOLOv5 Release v6.1. GitHub repository. Retrieved 05,08, 2024, from https://github.com/ultralytics/yolov5/releases/tag/v6.1

Ultralytics. (2023). YOLOv5. GitHub repository. Retrieved 15,12, 2024, from https://github.com/ultralytics/yolov5

ultralytics. (n.d.). *Tips for Best Training Results*. GitHub. Retrieved 5 15, 2024, from https://github.com/ultralytics/yolov5/wiki/Tips-for-Best-Training-Results

Applied Sciences, 12(19), 10051. https://doi.org/10.3390/app121910051

Jocher, G., & Chaurasia, A. (2021). YOLOv5: The world's most popular object detection model. GitHub Repository. https://github.com/ultralytics/yolov5

Redmon, J., & Farhadi, A. (2018). YOLOv3: An incremental improvement. arXiv preprint arXiv:1804.02767. https://arxiv.org/abs/1804.02767

Wang, C., & Zhang, H. (2021). A Comprehensive Review on YOLO: A Real-Time Object Detection System. Journal of Imaging, 7(11), 226. https://doi.org/10.3390/jimaging7110226

Liu, W., Anguelov, D., Erhan, D., Szegedy, C., & Reed, S. (2016). SSD: Single Shot MultiBox Detector. European Conference on Computer Vision (ECCV), 21-37. https://doi.org/10.1007/978-3-319-46448-0_2

Yang, Q., Li, F., Tian, H., Li, H., Xu, S., Fei, J., Wu, Z., Feng, Q., & Lu, C. (2022). A new knowledge-distillation-based method for detecting conveyor belt defects.