Impact of the preprocessing stage on the performance of offline automatic vehicle counting using YOLO
Keywords:
Image processing, Object tracking, Traffic control, Vehicle detectionAbstract
Vehicle counting systems detect, classify, and count vehicles with sensors or image processing, providing valuable information for road management. Image processing systems provide detailed information on vehicle flow with adequate lighting conditions and a higher computational cost compared to sensor systems. The image processing systems with higher accuracy require higher computational cost. This feature limits the number of application cases in cities with low technology level. This research analyzes urban vehicle counting using an automatic image processing system using YOLOv5 in the vehicle detection-classification stage and the SORT algorithm in the tracking stage. The study used videos recorded from a pedestrian bridge in Popayan, Colombia, for an exploratory study of the influence of preprocessing operations on the performance of a low-tech vehicle counting system. The study performed a comparative statistical analysis to determine the impact of different settings on system performance. An ANOVA analysis evaluates the incidence of frame cut and reshape on YOLO processing. The results indicate that a 30% cut of the image area prior to YOLO processing produces the lowest weighted average error. In addition, the frame reshape only increases the processing time. The study proposes improvements in the performance of an offline automatic vehicle counting system from the video preprocessing stage.
Downloads
References
R. Baldacci, A. Mingozzi, and R. Roberti, “Recent exact algorithms for solving the vehicle routing problem under capacity and time window constraints,” Eur J Oper Res, vol. 218, no. 1, pp. 1–6, 2012. doi.org/10.1016/j.ejor.2011.07.037.
L. Li, R. Jiang, Z. He, X. M. Chen, and X. Zhou, “Trajectory data-based traffic flow studies: A revisit,” Transp Res Part C Emerg Technol, vol. 114, pp. 225–240, 2020. doi.org/10.1016/j.trc.2020.02.016.
C. R. Bennett, H. De Solminihac, and A. Chamorro, “Data collection technologies for road management,” 2006.
H. Yu et al., “Automated vehicle-involved traffic flow studies: A survey of assumptions, models, speculations, and perspectives,” Transp Res Part C Emerg Technol, vol. 127, p. 103101, 2021. doi.org/10.1016/j.trc.2021.103101.
V. Shepelev, S. Aliukov, K. Nikolskaya, and S. Shabiev, “The capacity of the road network: Data collection and statistical analysis of traffic characteristics,” Energies (Basel), vol. 13, no. 7, p. 1765, 2020. doi.org/10.3390/en13071765.
J. Evans, B. Waterson, and A. Hamilton, “Evolution and future of urban road incident detection algorithms,” J Transp Eng A Syst, vol. 146, no. 6, p. 3120001, 2020. doi.org/10.1061/JTEPBS.0000362.
S. D. Khan and H. Ullah, “A survey of advances in vision-based vehicle re-identification,” Computer Vision and Image Understanding, vol. 182, pp. 50–63, 2019. doi.org/10.1016/j.cviu.2019.03.001.
M. Uecker, T. Fleck, M. Pflugfelder, and J. M. Zøllner, “Analyzing Deep Learning Representations of Point Clouds for Real-Time In-Vehicle LiDAR Perception,” arXiv preprint arXiv:2210.14612, 2022. doi.org/10.48550/arXiv.2210.14612.
S. Maity, A. Bhattacharyya, P. K. Singh, M. Kumar, and R. Sarkar, “Last decade in vehicle detection and classification: a comprehensive survey,” Archives of Computational Methods in Engineering, vol. 29, no. 7, pp. 5259–5296, 2022. doi.org/10.1007/s11831-022-09764-1.
N. Arora and Y. Kumar, “Automatic vehicle detection system in Day and Night Mode: challenges, applications and panoramic review,” Evol Intell, vol.16, no.4, pp.1077–1095, 2023. doi.org/10.1007/s12065-022-00723-0.
S. Sivaraman and M. M. Trivedi, “Looking at vehicles on the road: A survey of vision-based vehicle detection, tracking, and behavior analysis,” IEEE Transactions on Intelligent Transportation Systems, vol. 14, no. 4, pp. 1773–1795, 2013. doi: 10.1109/TITS.2013.2266661.
C.-C. R. Wang and J.-J. J. Lien, “Automatic vehicle detection using local features—A statistical approach,” IEEE Transactions on Intelligent Transportation Systems, vol. 9, no. 1, pp. 83–96, 2008. doi: 10.1109/TITS.2007.908572.
N. Arora, Y. Kumar, R. Karkra, and M. Kumar, “Automatic vehicle detection system in different environment conditions using fast R-CNN,” Multimed Tools Appl, vol. 81, no. 13, pp. 18715–18735, 2022. doi.org/10.1007/s11042-022-12347-8.
R. A. Hadi, G. Sulong, and L. E. George, “Vehicle detection and tracking techniques: a concise review,” arXiv preprint arXiv:1410.5894, 2014. doi.org/10.48550/arXiv.1410.5894.
X. Luo et al., “Fast automatic vehicle detection in uav images using convolutional neural networks,” Remote Sens (Basel), vol. 12, no. 12, p. 1994, 2020. doi.org/10.3390/rs12121994.
C.-J. Lin, S.-Y. Jeng, and H.-W. Lioa, “A real-time vehicle counting, speed estimation, and classification system based on virtual detection zone and YOLO,” Math Probl Eng, vol. 2021, pp. 1–10, 2021. doi.org/10.1155/2021/1577614.
M. Majumder and C. Wilmot, “Automated vehicle counting from pre-recorded video using you only look once (YOLO) object detection model,” J Imaging, vol. 9, no. 7, p. 131, 2023. doi.org/10.3390/jimaging9070131.
G. Bhat, M. Danelljan, L. Van Gool, and R. Timofte, “Learning discriminative model prediction for tracking,” in Proceedings of the IEEE/CVF international conference on computer vision, pp. 6182–6191, 2019.
Y. Fang, C. Wang, W. Yao, X. Zhao, H. Zhao, and H. Zha, “On-road vehicle tracking using part-based particle filter,” IEEE transactions on intelligent transportation systems, vol. 20, no. 12, pp. 4538–4552, 2019. doi: 10.1109/TITS.2018.2888500.
Z. Soleimanitaleb, M. A. Keyvanrad, and A. Jafari, “Object tracking methods: a review,” in 2019 9th International Conference on Computer and Knowledge Engineering (ICCKE), pp. 282–288, 2019. doi: 10.1109/ICCKE48569.2019.8964761.
S. Liu, D. Liu, G. Srivastava, D. Połap, and M. Woźniak, “Overview and methods of correlation filter algorithms in object tracking,” Complex & Intelligent Systems, vol. 7, pp. 1895–1917, 2021. doi.org/10.1007/s40747-020-00161-4.
A. Bathija and G. Sharma, “Visual object detection and tracking using yolo and sort,” International Journal of Engineering Research Technology, vol. 8, no. 11, 2019.
X. Hou, Y. Wang, and L.-P. Chau, “Vehicle tracking using deep sort with low confidence track filtering,” in 2019 16th IEEE International Conference on Advanced Video and Signal Based Surveillance (AVSS), 2019, pp. 1–6. doi: 10.1109/AVSS.2019.8909903.
J. Jiao and H. Wang, “Traffic behavior recognition from traffic videos under occlusion condition: a Kalman filter approach,” Transp Res Rec, vol. 2676, no. 7, pp. 55–65, 2022. doi.org/10.1177/03611981221076426.
A. Bisht, K. Ravani, M. Chaturvedi, N. Kumar, and S. Tiwari, “Indigenous design of a Traffic Light Control system responsive to the local traffic dynamics and priority vehicles,” Comput Ind Eng, vol. 171, p. 108503, 2022. doi.org/10.1016/j.cie.2022.108503.
P. Dave, A. Chandarana, P. Goel, and A. Ganatra, “An amalgamation of YOLOv4 and XGBoost for next-gen smart traffic management system,” PeerJ Comput Sci, vol. 7, p. e586, 2021. doi.org/10.7717/peerj-cs.586.
M. U. Arif, M. U. Farooq, R. H. Raza, Z. Lodhi, and M. A. R. Hashmi, “A Comprehensive Review of Vehicle Detection Techniques Under Varying Moving Cast Shadow Conditions Using Computer Vision and Deep Learning,” IEEE Access, 2022. doi: 10.1109/ACCESS.2022.3208568.
H. J. Jeong, K. S. Park, and Y. G. Ha, “Image Preprocessing for Efficient Training of YOLO Deep Learning Networks,” in Proceedings - 2018 IEEE International Conference on Big Data and Smart Computing, BigComp 2018, Institute of Electrical and Electronics Engineers Inc., pp. 635–637, 2018. doi: 10.1109/BigComp.2018.00113.
B. Setiyono, D. A. Amini, and D. R. Sulistyaningrum, “Number plate recognition on vehicle using YOLO - Darknet,” in Journal of Physics: Conference Series, IOP Publishing Ltd, 2021. doi: 10.1088/1742-6596/1821/1/012049.
W. Liu, G. Ren, R. Yu, S. Guo, J. Zhu, and L. Zhang, “Image-Adaptive YOLO for Object Detection in Adverse Weather Conditions,” 2022. [Online]. Available: www.aaai.org. doi.org/10.1609/aaai.v36i2.20072.
J. Redmon, S. Divvala, R. Girshick, and A. Farhadi, “You Only Look Once: Unified, Real-Time Object Detection.” 2016. [Online]. Available: http://pjreddie.com/yolo/
Terven, J.; Córdova-Esparza, D.-M.; Romero-González, J.-A. A Comprehensive Review of YOLO Architectures in Computer Vision: From YOLOv1 to YOLOv8 and YOLO-NAS. Mach. Learn. Knowl. Extr., vol. 5, pp. 1680-1716, 2023. doi.org/10.3390/make5040083.
J. Hurtado-Gómez, J. D. Romo, R. Salazar-Cabrera, Á. P. de la Cruz, and J. M. M. Molina, “Traffic signal control system based on intelligent transportation system and reinforcement learning,” Electronics (Switzerland), vol. 10, no. 19, Oct. 2021, doi: 10.3390/electronics10192363. doi.org/10.3390/electronics10192363.
B., Dwyer, J., Nelson, and T. Hansen, “Roboflow (Version 1.0) [Software].” Accessed: Mar. 25, 2024. [Online]. Available: https://roboflow.com.
A. Gomaa, M. M. Abdelwahab, M. Abo-Zahhad, T. Minematsu, and R. I. Taniguchi, “Robust vehicle detection and counting algorithm employing a convolution neural network and optical flow,” Sensors (Switzerland), vol. 19, no. 20, 2019, doi: 10.3390/s19204588.
A. Gomaa, T. Minematsu, M. M. Abdelwahab, M. Abo-Zahhad, and R. ichiro Taniguchi, “Faster CNN-based vehicle detection and counting strategy for fixed camera scenes,” Multimed Tools Appl, vol. 81, no. 18, pp. 25443–25471, 2022, doi: 10.1007/s11042-022-12370-9.
V. O. Castelló, I. S. Igual, O. D. T. Catalá, and J. C. Perez-Cortes, “High-Profile VRU Detection on Resource-Constrained Hardware Using YOLOv3/v4 on BDD100K,” J Imaging, vol. 6, no. 12, 2020, doi: 10.3390/jimaging6120142.
G. Wieczorek, S. B. ud din Tahir, I. Akhter, and J. Kurek, “Vehicle Detection and Recognition Approach in Multi-Scale Traffic Monitoring System via Graph-Based Data Optimization,” Sensors, vol. 23, no. 3, 2023, doi: 10.3390/s23031731.
G. Doménech-Asensi, M. D. Cano, and V. Morales-Esteras, “On the Use of Bayesian Networks for Real-Time Urban Traffic Measurements: a Case Study with Low-Cost Devices,” J Signal Process Syst, vol. 94, no. 3, pp. 293–304, 2022, doi: 10.1007/s11265-020-01601-7.
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, doi: 10.1186/s12544-019-0390-4.
![](https://latamt.ieeer9.org/public/journals/1/submission_8943_12502_coverImage_en_US.png)