Abstract
This study addresses challenges related to extracting detailed data about vehicle movements in diverse traffic situations, such as those in India. Manual data extraction with the desired precision requires considerable human resources and time, posing a significant obstacle to obtaining the vast amounts of data needed for analysis. To overcome this issue, the study introduces a computer-based offline tool that utilizes advanced technologies, including YOLOv4 deep learning and the SORT algorithm, to analyse recorded traffic videos. This tool can identify vehicle types, track their paths, and calculate speed. The final output of the tool is presented in the form of a spreadsheet. The tool’s accuracy was confirmed by comparing its outputs with manually collected data, demonstrating its reliability in various traffic situations. It is anticipated to be effective in similar traffic conditions in other Asian countries.
Similar content being viewed by others
Data availability
Data will be provided on genuine request as data are still being used in further research.
References
Mallikarjuna C, Phanindra A, Rao KR (2009) Traffic data collection under mixed traffic conditions using video image processing. J Transp Eng 135(4):174–182
Munigety CR, Vicraman V, Mathew TV (2014) Semiautomated tool for extraction of microlevel traffic data from videographic survey. Transp Res Rec 2443(1):88–95
Khan SI, Maini P (1999) Modeling heterogeneous traffic flow. Transp Res Rec 1678(1):234–241
Dhatbale R, Chilukuri BR (2021) Deep learning techniques for vehicle trajectory extraction in mixed traffic. J Big Data Anal Transp 3:141–157
Inigo RM (1989) Application of machine vision to traffic monitoring and control. IEEE Trans Veh Technol 38(3):112–122
Keith R, Tindall J, Yan S (1964) The performance and characteristics of a magnetic loop vehicle detector. In: Australian road research board (ARRB) conference, 2nd, 1964, Melbourne.
MacCarley CA et al (1992) Evaluation of video image processing systems for traffic detection (Abridgment). Transp Res Record (1360). https://onlinepubs.trb.org/Onlinepubs/trr/1992/1360/1360-008.pdf
Wang L, Yung NHC (2012) Three-dimensional model-based human detection in crowded scenes. IEEE Trans Intell Transp Syst 13(2):691–703
Leibe B, Seemann E, Schiele B (2005) Pedestrian detection in crowded scenes. In: 2005 IEEE computer society conference on computer vision and pattern recognition (CVPR’05). IEEE
Wang L, Yung NHC, Xu L (2014) Multiple-human tracking by iterative data association and detection update. IEEE Trans Intell Transp Syst 15(5):1886–1899
Milan A, Roth S, Schindler K (2013) Continuous energy minimization for multitarget tracking. IEEE Trans Pattern Anal Mach Intell 36(1):58–72
Cheng H-Y, Yu C-C (2012) Detecting and tracking vehicles in airborne videos. Int J Comput Inf Eng 6(5):665–668
Choi JH, Lee D, Bang H (2011) Tracking an unknown moving target from uav: Extracting and localizing an moving target with vision sensor based on optical flow. In: The 5th international conference on automation, robotics and applications. IEEE
Miao Q et al (2011) A new framework for on-line object tracking based on SURF. Pattern Recogn Lett 32(13):1564–1571
Chen X et al (2020) High-resolution vehicle trajectory extraction and denoising from aerial videos. IEEE Trans Intell Transp Syst 22(5):3190–3202
Haghighat AK et al (2020) Applications of deep learning in intelligent transportation systems. J Big Data Anal Transp 2:115–145
Koller D, Weber J, Malik J (1994) Robust multiple car tracking with occlusion reasoning. In: Computer vision—ECCV’94: third European conference on computer vision Stockholm, Sweden, May 2–6, 1994 proceedings, Vol I3. Springer
Rothrock RL, Drummond OE (2000) Performance metrics for multiple-sensor multiple-target tracking. In: Signal and data processing of small targets 2000. SPIE
Danescu R, et al. (2009) Tracking multiple objects using particle filters and digital elevation maps. In: 2009 IEEE intelligent vehicles symposium. IEEE
Hue C, Le Cadre J-P, Pérez P (2002) Sequential Monte Carlo methods for multiple target tracking and data fusion. IEEE Trans Signal Process 50(2):309–325
Rodríguez-Canosa GR et al (2012) A real-time method to detect and track moving objects (DATMO) from unmanned aerial vehicles (UAVs) using a single camera. Remote Sens 4(4):1090–1111
Kim Z, et al. (2005) A machine vision system for generating vehicle trajectories over extended freeway segments. In: 12th World congress on intelligent transportation systems.
Xu Y et al (2017) Car detection from low-altitude UAV imagery with the faster R-CNN. J Adv Transp. https://doi.org/10.1155/2017/2823617
Oh J et al (2009) Development of an automatic traffic conflict detection system based on image tracking technology. Transp Res Rec 2129(1):45–54
St-Aubin P et al (2013) Use of computer vision data for detailed driver behavior analysis and trajectory interpretation at roundabouts. Transp Res Rec 2389(1):65–77
Li J et al (2014) Computer vision techniques to collect helmet-wearing data on cyclists. Transp Res Rec 2468(1):1–10
Aubry A et al (2020) Optimal opponent stealth trajectory planning based on an efficient optimization technique. IEEE Trans Signal Process 69:270–283
Gao H et al (2014) Automatic extraction of multi-vehicle trajectory based on traffic videotaping from quadcopter model. Appl Mech Mater. https://doi.org/10.4028/www.scientific.net/AMM.552.232
He K, et al. (2017) Mask R-CNN. In: Proceedings of the IEEE international conference on computer vision.
Apeltauer J et al (2015) Automatic vehicle trajectory extraction for traffic analysis from aerial video data. Int Arch Photogramm Remote Sens Spat Inf Sci 40(3):9
Raveendran B, Arkatkar SS, Vanajakshi LD (2019) Development of a video image processing-based micro-level data extractor for non-lane-based heterogeneous traffic conditions. Transp Dev Econ 5:1–10
Bharadwaj N et al (2016) Traffic data analysis using image processing technique on Delhi–Gurgaon expressway. Curr Sci 110:808–822
Fung GS, Yung NH, Pang GK (2003) Camera calibration from road lane markings. Opt Eng 42(10):2967–2977
Schoepflin TN, Dailey DJ (2003) Dynamic camera calibration of roadside traffic management cameras for vehicle speed estimation. IEEE Trans Intell Transp Syst 4(2):90–98
Wang L-L, Tsai W-H (1991) Camera calibration by vanishing lines for 3-D computer vision. IEEE Trans Pattern Anal Mach Intell 13(4):370–376
Wicaksono DW, Setiyono B (2017) Speed estimation on moving vehicle based on digital image processing. Int J Comput Sci Appl Math 3(1):21–26
Bochkovskiy A, Wang C-Y, Liao H-YM. YOLOv4: optimal speed and accuracy of object detection. Available from https://arxiv.org/abs/2004.10934
Solawetz J (2020) YOLOv4 explained. Available from https://blog.roboflow.com/a-thorough-breakdown-of-yolov4/
Maiya SR (2019) Deepsort: deep learning to track custom objects in a video. Available at https://nanonets.com/blog/object-tracking-deepsort
Lewis C (1982) International and business forecasting methods. Butterworths, London
Puig-Diví A, et al. (2017) Validity and reliability of the kinovea program in obtaining angular and distance dimensions. Preprints
Acknowledgements
The authors thank the Ministry of Education, Government of India for the financial support in the form of stipend given to the research scholars through centrally funded institutes in India.
Author information
Authors and Affiliations
Contributions
Conceptualization was done by Priyanka Diwakar and Dr Udit Jain; methodology was done by Priyanka Diwakar and Pranav Kulkarni.; investigation was done by Priyanka Diwakar and Pranav Kulkarni.; resources were done by Dr. V.S.Landge; writing—original draft preparation were done by Priyanka Diwakar.; supervision was done by Dr. V S Landge and Dr Udit Jain. All authors have read and agreed to the published version of the manuscript.
Corresponding author
Ethics declarations
Conflict of interest
The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.
Ethical approval
The submission has not been previously published. The authors mutually agree with the contents of the article and with the stated authorship.
Informed consent
All participants provided informed consent prior to participation in paper “Automatic traffic data extraction tool for mixed traffic conditions using image processing techniques”.
Appendix: procedure to use tool
Appendix: procedure to use tool
-
1.
Install anaconda
-
2.
Install python 3x
-
3.
Open Anaconda Prompt by typing it in the search bar, open it and go to the work directory with the “cd”command.
Type the below commands in the work directoryFor CPU
-
(a)
conda env create -f conda-cpu.yml
-
(b)
conda activate yolov4-CPU
Note: type the above (b) command every time you open the anaconda prompt in your work directoryFor GPU
-
(a)
conda env create -f conda-gpu.yml
-
(b)
conda activate yolov4-gpu
Note: type the above (b) command whenever you open the anaconda prompt in your work directory
For CPU
pip install -r requirements.txt.
For GPU
pip install -r requirements-gpu.txt.
-
4.
Convert darknet weights to TensorFlow model python save_model.py –model yolov4
Note: Steps 1 to 5 should be executed initially only to create an environment and install dependencies on a workstation.
-
5.
Place video to be processed at “\data\video” location.
-
6.
Open GUI by below command
python OSDetect.py
-
7.
Write the name of the input video file near the “Process Video” button (any format) and the “Save As” filename with the.avi extension in the GUI window.
-
8.
Add the field of view of the camera, the angle of the camera and the height of the camera in the inputfile.
-
9.
Click the “Process Video” button and wait for some time.
-
10.
Observe the anaconda prompt to check for successful detection or any errors.
-
11.
If you want to stop processing, click the “Stop” button.
-
12.
After completion of processing/stop, to view the output file, go to the “output” folder and findthedesired file with the.avi extension.
-
13.
All vehicle detection information is stored in the “record.csv” file after every processing.
Rights and permissions
Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.
About this article
Cite this article
Diwakar, P., Landge, V.S., Jain, U. et al. Automatic traffic data extraction tool for mixed traffic conditions using image processing techniques. Innov. Infrastruct. Solut. 9, 167 (2024). https://doi.org/10.1007/s41062-024-01465-x
Received:
Accepted:
Published:
DOI: https://doi.org/10.1007/s41062-024-01465-x