Enhancing Vision-Based Vehicle Detection and Counting Systems with the Darknet Algorithm and CNN Model

Abdul Haris Rangkuti - Computer Science Department, School of Computer Science, Bina Nusantara University, Bandung Campus, Jakarta, Indonesia
Varyl Hasbi Athala - Computer Science Department, School of Computer Science, Bina Nusantara University, Bandung Campus, Jakarta, Indonesia


Citation Format:



DOI: http://dx.doi.org/10.62527/joiv.9.1.2550

Abstract


This study focuses on developing an algorithm that accurately calculates the volume of vehicles passing through a busy crossroads in Indonesia using object recognition. The high density of vehicles and their proximity often pose a challenge when distinguishing between vehicle types using a camera. Therefore, the proposed algorithm is designed to assign a unique identity (ID) to each vehicle and other objects, such as pedestrians, ensuring that volume calculations are not repeated. The objective is to provide an equitable comparison of road density and the total number of detected vehicles, enabling the determination of whether the road is crowded. To accomplish this, the algorithm incorporates the Non-Max Suppression function, which displays bounding boxes around objects with confidence values and counts the objects within each box. Even when objects are nearby, the algorithm tracks them effectively, thanks to the support of the Darknet Algorithm. The main capabilities of this algorithm for improving vehicle detection include enhanced accuracy, speed, and generalization ability. Typically, it is used in conjunction with the You Only Look Once (YOLO) object detection framework. Five convolutional neural network models are tested to assess the algorithm's accuracy: YOLOv3, YOLOv4, CrResNext50, DenseNet201-YOLOv4, and YOLOv7-tiny. The training process utilizes the Darknet Algorithm. The best-performing models, YOLOv3 and YOLOv4, achieve exceptional accuracy and F1 scores of up to 99%. They are followed by CrResNext50 and DenseNet201-YOLOv4, which achieve accuracy rates of 92% and 98% and F1 scores of 94% and 98%, respectively. The YOLOv7-tiny model achieves an accuracy rate and F1 score of 86% and 88%, respectively. Overall, the results demonstrate the algorithm's success in accurately detecting and calculating the volume of vehicles and other objects in a busy intersection. This makes it a valuable tool for regional government decision-making.


Keywords


Volume; vehicle; object recognition; crossroads; CNN; accuracy; F1 Score

Full Text:

PDF

References


A. Desmi, L. A. Widari, and R. Yanti, “Efektifitas Model Karakteristik Arus Lalu Lintas pada Ruas Jalan Simpang 4 Bireun (Perbandingan dengan Metode Greenshield, Greenberg, Underwood),” Teras Jurnal : Jurnal Teknik Sipil, vol. 9, no. 1, p. 19, Apr. 2019, doi:10.29103/tj.v9i1.178.

G. Prati, V. Marín Puchades, M. De Angelis, F. Fraboni, and L. Pietrantoni, “Factors contributing to bicycle–motorised vehicle collisions: a systematic literature review,” Transport Reviews, vol. 38, no. 2, pp. 184–208, Apr. 2017, doi: 10.1080/01441647.2017.1314391.

J. Guerrero-Ibáñez, S. Zeadally, and J. Contreras-Castillo, “Sensor Technologies for Intelligent Transportation Systems,” Sensors, vol. 18, no. 4, p. 1212, Apr. 2018, doi: 10.3390/s18041212.

M. Won, “Intelligent Traffic Monitoring Systems for Vehicle Classification: A Survey,” IEEE Access, vol. 8, pp. 73340–73358, 2020, doi: 10.1109/access.2020.2987634.

J. Bai and Y. Chen, “A Deep Neural Network Based on Classification of Traffic Volume for Short‐Term Forecasting,” Mathematical Problems in Engineering, vol. 2019, no. 1, Jan. 2019, doi:10.1155/2019/6318094.

J. Liu et al., “Secure intelligent traffic light control using fog computing,” Future Generation Computer Systems, vol. 78, pp. 817–824, Jan. 2018, doi: 10.1016/j.future.2017.02.017.

N. Kumar, S. S. Rahman, and N. Dhakad, “Fuzzy Inference Enabled Deep Reinforcement Learning-Based Traffic Light Control for Intelligent Transportation System,” IEEE Transactions on Intelligent Transportation Systems, vol. 22, no. 8, pp. 4919–4928, Aug. 2021, doi:10.1109/tits.2020.2984033.

A. Boukerche and J. Wang, “Machine Learning-based traffic prediction models for Intelligent Transportation Systems,” Computer Networks, vol. 181, p. 107530, Nov. 2020, doi:10.1016/j.comnet.2020.107530.

J. Wang, X. Guo, and X. Yang, “Efficient and Safe Strategies for Intersection Management: A Review,” Sensors, vol. 21, no. 9, p. 3096, Apr. 2021, doi: 10.3390/s21093096.

H. Wei, G. Zheng, H. Yao, and Z. Li, “IntelliLight: A reinforcement learning approach for intelligent traffic light control,” Proceedings of the 24th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, pp. 2496–2505, Jul. 2018, doi:10.1145/3219819.3220096.

R. I. Meneguette, R. E. De Grande, and A. A. F. Loureiro, Intelligent Transport System in Smart Cities. Springer International Publishing, 2018. doi: 10.1007/978-3-319-93332-0.

A. T. Wecksler, L. Veale, M. Basanta-Sanchez, and M. Bern, “Development of Software Workflow for the Rapid Detection of Cross-Linked Dipeptides,” Journal of the American Society for Mass Spectrometry, vol. 33, no. 3, pp. 598–602, Feb. 2022, doi:10.1021/jasms.1c00312.

S. Pradhan and S. Tripathy, “FRAC: a flexible resource allocation for vehicular cloud system,” IET Intelligent Transport Systems, vol. 14, no. 14, pp. 2141–2150, Dec. 2020, doi: 10.1049/iet-its.2020.0390.

J. Tang, F. Gao, F. Liu, and X. Chen, “A Denoising Scheme-Based Traffic Flow Prediction Model: Combination of Ensemble Empirical Mode Decomposition and Fuzzy C-Means Neural Network,” IEEE Access, vol. 8, pp. 11546–11559, 2020, doi:10.1109/access.2020.2964070.

Y. Chen and Z. Li, “An Effective Approach of Vehicle Detection Using Deep Learning,” Computational Intelligence and Neuroscience, vol. 2022, pp. 1–9, Jul. 2022, doi: 10.1155/2022/2019257.

Q. Abu Al-Haija and M. Krichen, “A Lightweight In-Vehicle Alcohol Detection Using Smart Sensing and Supervised Learning,” Computers, vol. 11, no. 8, p. 121, Aug. 2022, doi: 10.3390/computers11080121.

A. A. Alsulami, Q. Abu Al-Haija, A. Alqahtani, and R. Alsini, “Symmetrical Simulation Scheme for Anomaly Detection in Autonomous Vehicles Based on LSTM Model,” Symmetry, vol. 14, no. 7, p. 1450, Jul. 2022, doi: 10.3390/sym14071450.

S. Chen, M. Klemp, J. Taghia, U. Kühnau, N. Pohl, and R. Martin, “Improved Target Detection Through DNN-Based Multi-Channel Interference Mitigation in Automotive Radar,” IEEE Transactions on Radar Systems, vol. 1, pp. 75–89, 2023, doi:10.1109/trs.2023.3279013.

B. G. Rajagopal, N. Vishakraj, N. U. Kumar, and P. Jothivenkatesh, “Vision-based system for counting of moving vehicles in different weather conditions,” 2017 International conference of Electronics, Communication and Aerospace Technology (ICECA), pp. 86–91, Apr. 2017, doi: 10.1109/iceca.2017.8203649.

M. A. El-Khoreby and S. Abd Rahman Abu-Bakar, “Vehicle detection and counting for complex weather conditions,” 2017 IEEE International Conference on Signal and Image Processing Applications (ICSIPA), pp. 425–428, Sep. 2017, doi:10.1109/icsipa.2017.8120648.

S. Sengupta et al., “A review of deep learning with special emphasis on architectures, applications and recent trends,” Knowledge-Based Systems, vol. 194, p. 105596, Apr. 2020, doi:10.1016/j.knosys.2020.105596.

V. K. Sharma and R. N. Mir, “A comprehensive and systematic look up into deep learning based object detection techniques: A review,” Computer Science Review, vol. 38, p. 100301, Nov. 2020, doi:10.1016/j.cosrev.2020.100301.

Z.-Q. Zhao, P. Zheng, S.-T. Xu, and X. Wu, “Object Detection With Deep Learning: A Review,” IEEE Transactions on Neural Networks and Learning Systems, vol. 30, no. 11, pp. 3212–3232, Nov. 2019, doi:10.1109/tnnls.2018.2876865.

J. Zhao et al., “Autonomous driving system: A comprehensive survey,” Expert Systems with Applications, vol. 242, p. 122836, May 2024, doi:10.1016/j.eswa.2023.122836.

A. Theissler, J. Pérez-Velázquez, M. Kettelgerdes, and G. Elger, “Predictive maintenance enabled by machine learning: Use cases and challenges in the automotive industry,” Reliability Engineering & System Safety, vol. 215, p. 107864, Nov. 2021, doi:10.1016/j.ress.2021.107864.

J. Zhao et al., “Improved Vision-Based Vehicle Detection and Classification by Optimized YOLOv4,” IEEE Access, vol. 10, pp. 8590–8603, 2022, doi: 10.1109/access.2022.3143365.

Q. A. Al-Haija, M. Gharaibeh, and A. Odeh, “Detection in Adverse Weather Conditions for Autonomous Vehicles via Deep Learning,” AI, vol. 3, no. 2, pp. 303–317, Apr. 2022, doi: 10.3390/ai3020019.

M. I. Chacon-Murguia and A. Guzman-Pando, “Moving Object Detection in Video Sequences Based on a Two-Frame Temporal Information CNN,” Neural Processing Letters, vol. 55, no. 5, pp. 5425–5449, Nov. 2022, doi: 10.1007/s11063-022-11092-1.

C. Amisse, M. E. Jijón-Palma, and J. A. S. Centeno, “Fine-Tuning Deep Learning Models for Pedestrian Detection,” Boletim de Ciências Geodésicas, vol. 27, no. 2, 2021, doi: 10.1590/s1982-21702021000200013.

T. Chen, M. Xu, X. Hui, H. Wu, and L. Lin, “Learning Semantic-Specific Graph Representation for Multi-Label Image Recognition,” 2019 IEEE/CVF International Conference on Computer Vision (ICCV), pp. 522–531, Oct. 2019, doi: 10.1109/iccv.2019.00061.

G. J. Ansari, J. H. Shah, M. Yasmin, M. Sharif, and S. L. Fernandes, “A novel machine learning approach for scene text extraction,” Future Generation Computer Systems, vol. 87, pp. 328–340, Oct. 2018, doi:10.1016/j.future.2018.04.074.

N. Jahan, S. Islam, and Md. F. A. Foysal, “Real-Time Vehicle Classification Using CNN,” 2020 11th International Conference on Computing, Communication and Networking Technologies (ICCCNT), pp. 1–6, Jul. 2020, doi: 10.1109/icccnt49239.2020.9225623.

K. Khan, S. B. Zaidi, and A. Ali, “Evaluating the Nature of Distractive Driving Factors towards Road Traffic Accident,” Civil Engineering Journal, vol. 6, no. 8, pp. 1555–1580, Aug. 2020, doi: 10.28991/cej-2020-03091567.

P. Tassinari et al., “A computer vision approach based on deep learning for the detection of dairy cows in free stall barn,” Computers and Electronics in Agriculture, vol. 182, p. 106030, Mar. 2021, doi:10.1016/j.compag.2021.106030.