Universal Robust Vehicle Identification System for Monitoring Using YOLOv12 and DeepSORT
Highlights
- A semi-automated synthetic dataset generation technique significantly reduced manual annotation requirements while improving model robustness across varying camera viewpoints.
- The integrated YOLOv12–DeepSORT framework achieved 96.67% accuracy for vehicle counting, 90% for seven-category vehicle-type prediction, and up to 97% for public/private vehicle class prediction.
- The universal approach enables system application across different locations without extensive location-specific retraining.
- The system demonstrates feasibility for deployment in real-world intelligent transportation systems for traffic monitoring and policy formulation in the Philippines.
Abstract
1. Introduction
2. Materials and Methods
2.1. System Training and Fine-Tuning
Model Fine-Tuning with Real-World Data
2.2. Blind Evaluation Protocol
2.3. System Operation
- Read the input CCTV video and extract frames sequentially.
- Apply YOLOv12 to each frame to generate vehicle detections and class probabilities.
- Perform non-maximum suppression to remove duplicate overlapping detections.
- Pass the filtered detections to DeepSORT for track initialization, ID assignment, and track updating across frames.
- Evaluate track centroids against the predefined counting lines or ROIs to update lane-wise and total vehicle counts.
- Extract each detected vehicle region and assign a color label using the HSV-based rule set.
- Aggregate recent vehicle-count trends over the defined time window and estimate the traffic state for each lane and for the full scene.
- Render the output annotations and write the detection, tracking, counting, and summary results to the output video and log files.
2.3.1. Vehicle Detection
2.3.2. Vehicle Tracking and Counting
2.3.3. Color Recognition
2.3.4. Traffic Condition Classification
2.3.5. Output Generation
2.4. System Integration and Deployment
3. Results
3.1. Vehicle Classification
3.1.1. Initial Performance on Video 1
3.1.2. Fine-Tuning and Performance Improvement
3.2. Blind Evaluation Without On-the-Fly Retraining
4. Discussion
4.1. Robustness
4.2. Speed
4.3. Comparison with Baseline Models
4.4. Limitations
5. Conclusions
Author Contributions
Funding
Data Availability Statement
Acknowledgments
Conflicts of Interest
Abbreviations
| YOLOV12 | “You Only Look Once” version 12 |
| DeepSORT | Deep Simple Online and Real-Time Tracking |
| CNN | Convolutional Neural Network |
| Faster R-CNN | Faster Region-based CNN |
| SSD | Single-Shot Multibox Detector |
| SVM | Support Vector Machine |
| HSV | Hue, Saturation, Value color space |
| BGR | Blue, Green, Red color space |
| ROI | Region of Interest |
| IoU | Intersection of Union |
| COCO | Common Objects in Context |
| mAP | Mean Average Precision |
| fps | Frames per second |
| MMDA | Metropolitan Manila Development Authority |
| DPWH | Department of Public Works and Highways |
References
- Ambata, L.U.; del Castillo, I.A.P.; Jacinto, J.R.H.; Santos, C.M.T. Public and Private Vehicle Quantification and Classification using Vehicle Detection and Recognition. In Proceedings of the 2019 IEEE 11th International Conference on Humanoid, Nanotechnology, Information Technology, Communication and Control, Environment, and Management (HNICEM); IEEE: New York, NY, USA, 2019; pp. 1–6. [Google Scholar] [CrossRef]
- Tilakaratna, D.S.B.; Watchareeruetai, U.; Siddhichai, S.; Natcharapinchai, N. Image analysis algorithms for vehicle color recognition. In Proceedings of the 2017 International Electrical Engineering Congress (iEECON); IEEE: New York, NY, USA, 2017; pp. 1–4. [Google Scholar] [CrossRef]
- Tang, Y.; Zhang, C.; Gu, R.; Li, P.; Yang, B. Vehicle detection and recognition for intelligent traffic surveillance system. Multimed. Tools Appl. 2017, 76, 5817–5832. [Google Scholar] [CrossRef]
- Ambata, L.U.; Dalangin, R.E.A.; Duaqui, I.A.M.; Saavedra, J.V.V.; Veloria, M.J.V.; Abayan, J.J.A.; Bandala, A.A.; Agulto, R.P. A Jetson TX2-Based License Plate Recognition and GPS Tracking System for Vehicular Surveillance. In Proceedings of the 2025 IEEE International Conference on Future Machine Learning and Data Science (FMLDS); IEEE: New York, NY, USA, 2025; pp. 219–224. [Google Scholar] [CrossRef]
- Madhumitha, M.; Dhivya, P. Vehicle Recognition and Compilation in Database Software. In Proceedings of the 2020 International Conference on System, Computation, Automation and Networking (ICSCAN); IEEE: New York, NY, USA, 2020; pp. 1–5. [Google Scholar] [CrossRef]
- Zhou, C.; Fan, T. A Vehicle Recognition Method Based on Multi-Camera Information. In Proceedings of the 2019 Chinese Control Conference (CCC); IEEE: New York, NY, USA, 2019; pp. 7835–7839. [Google Scholar] [CrossRef]
- Shvai, N.; Hasnat, A.; Meicler, A.; Nakib, A. Accurate Classification for Automatic Vehicle-Type Recognition Based on Ensemble Classifiers. IEEE Trans. Intell. Transp. Syst. 2020, 21, 1288–1297. [Google Scholar] [CrossRef]
- Ma, Z.; Chang, D.; Xie, J.; Ding, Y.; Wen, S.; Li, X.; Si, Z.; Guo, J. Fine-Grained Vehicle Classification With Channel Max Pooling Modified CNNs. IEEE Trans. Veh. Technol. 2019, 68, 3224–3233. [Google Scholar] [CrossRef]
- Rothmeier, T.; Huber, W.; Knoll, A.C. Time to Shine: Fine-Tuning Object Detection Models with Synthetic Adverse Weather Images. In Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision (WACV); IEEE: New York, NY, USA, 2024. [Google Scholar]
- Staniszewski, M.; Kempski, A.; Marczyk, M.; Socha, M.; Foszner, P.; Cebula, M.; Labus, A.; Cogiel, M.; Golba, D. Searching for the Ideal Recipe for Preparing Synthetic Data in the Multi-Object Detection Problem. Appl. Sci. 2025, 15, 354. [Google Scholar] [CrossRef]
- Fei, L.; Han, B. Multi-Object Multi-Camera Tracking Based on Deep Learning for Intelligent Transportation: A Review. Sensors 2023, 23, 3852. [Google Scholar] [CrossRef] [PubMed]
- Kumar, S.; Singh, S.K.; Varshney, S.; Singh, S.; Kumar, P.; Kim, B.G.; Ra, I.H. Fusion of Deep Sort and Yolov5 for Effective Vehicle Detection and Tracking Scheme in Real-Time Traffic Management Sustainable System. Sustainability 2023, 15, 16869. [Google Scholar] [CrossRef]
- Bui, T.; Wang, G.; Wei, G.; Zeng, Q. Vehicle Multi-Object Detection and Tracking Algorithm Based on Improved You Only Look Once 5s Version and DeepSORT. Appl. Sci. 2024, 14, 2690. [Google Scholar] [CrossRef]
- Ji, A.; Ma, X. Vehicle Detection and Classification for Traffic Management and Autonomous Systems Using YOLOv10. Alex. Eng. J. 2025, 127, 804–816. [Google Scholar] [CrossRef]
- Mohd Ali, N.; Md Rashid, N.K.A.; Mustafah, Y.M. Performance Comparison between RGB and HSV Color Segmentations for Road Signs Detection. Appl. Mech. Mater. 2013, 393, 550–555. [Google Scholar] [CrossRef]
- Kim, K.J.; Kim, P.K.; Lim, K.T.; Chung, Y.S.; Song, Y.J.; Lee, S.I.; Choi, D.H. Vehicle Color Recognition via Representative Color Region Extraction and Convolutional Neural Network. In Proceedings of the 2018 Tenth International Conference on Ubiquitous and Future Networks (ICUFN); IEEE: New York, NY, USA, 2018; pp. 89–94. [Google Scholar] [CrossRef]
- Dallalzadeh, E.; Guru, D.S. Content-based classification of traffic videos using symbolic features. In Proceedings of the 2014 International Conference on Advances in Computing, Communications and Informatics (ICACCI); IEEE: New York, NY, USA, 2014; pp. 288–294. [Google Scholar] [CrossRef]












| Parameter | Setting |
|---|---|
| Input size | |
| Optimizer | SGD |
| Initial learning rate | |
| Batch size | 16 |
| Initial training epochs | 10 |
| Augmentations | HSV hue/saturation/value adjustment; rotation; translation; scaling; shear; perspective transformation; flipping; mosaic; mixup |
| Framework | Python 3.12.3, PyTorch 2.6.0 |
| Hardware | NVIDIA RTX 2070 |
| Video | Duration | Time of Day | Traffic Density | Reference Vehicles | Role in Study |
|---|---|---|---|---|---|
| Video 1 | 5 min | Morning | Common lanes: heavy; bus lane: light | Not explicitly reported | First real-world refinement round |
| Video 2 | 5 min | Noon | Common lanes: heavy; bus lane: light | Not explicitly reported | Second real-world refinement round |
| Video 3 | 5 min | Afternoon | Common lanes: heavy; bus lane: light | 300 | Final post-refinement evaluation |
| Vehicle Class | ||||
| Class | Accuracy | Precision | Recall | F1 Score |
| Public | 0.88 | 0.70 | 0.88 | 0.78 |
| Private | 0.99 | 1.00 | 0.99 | 0.99 |
| Average | 0.94 | 0.85 | 0.94 | 0.89 |
| Vehicle Type | ||||
| Type | Accuracy | Precision | Recall | F1 Score |
| Sedan | 0.66 | 0.50 | 0.66 | 0.57 |
| Jeepney | 1.00 | 1.00 | 1.00 | 1.00 |
| SUV | 0.36 | 0.69 | 0.36 | 0.47 |
| Motorcycle | 1.00 | 0.98 | 1.00 | 0.99 |
| Bus | 0.88 | 0.78 | 0.88 | 0.82 |
| Tricycle | 1.00 | 1.00 | 1.00 | 1.00 |
| Truck | 0.92 | 0.42 | 0.92 | 0.58 |
| Average | 0.83 | 0.62 | 0.83 | 0.78 |
| Vehicle Color | ||||
| Color | Accuracy | Precision | Recall | F1 Score |
| White | 0.88 | 0.94 | 0.88 | 0.91 |
| Silver/Gray | 0.92 | 0.61 | 0.92 | 0.73 |
| Black | 0.92 | 0.77 | 0.92 | 0.84 |
| Red | 0.81 | 1.00 | 0.81 | 0.90 |
| Orange | 0.60 | 1.00 | 0.60 | 0.75 |
| Yellow | 0.80 | 1.00 | 0.80 | 0.89 |
| Green | 1.00 | 1.00 | 1.00 | 1.00 |
| Blue | 0.73 | 1.00 | 0.73 | 0.84 |
| Violet | 1.00 | 1.00 | 1.00 | 1.00 |
| Average | 0.81 | 0.84 | 0.81 | 0.83 |
| Vehicle Class | ||||
| Class | Accuracy | Precision | Recall | F1 Score |
| Public | 1.00 | 0.85 | 1.00 | 0.92 |
| Private | 0.99 | 1.00 | 0.99 | 1.00 |
| Average | 1.00 | 0.93 | 1.00 | 0.96 |
| Vehicle Type | ||||
| Type | Accuracy | Precision | Recall | F1 Score |
| Sedan | 0.81 | 0.91 | 0.81 | 0.86 |
| Jeepney | 1.00 | 1.00 | 1.00 | 1.00 |
| SUV | 0.93 | 0.80 | 0.93 | 0.86 |
| Motorcycle | 1.00 | 1.00 | 1.00 | 1.00 |
| Bus | 1.00 | 0.85 | 1.00 | 0.92 |
| Tricycle | 1.00 | 1.00 | 1.00 | 1.00 |
| Truck | 0.57 | 0.94 | 0.57 | 0.71 |
| Average | 0.90 | 0.93 | 0.90 | 0.91 |
| Vehicle Color | ||||
| Color | Accuracy | Precision | Recall | F1 Score |
| White | 0.91 | 0.95 | 0.91 | 0.93 |
| Silver/Gray | 0.75 | 1.00 | 0.75 | 0.86 |
| Black | 0.93 | 0.81 | 0.93 | 0.87 |
| Red | 0.71 | 1.00 | 0.71 | 0.83 |
| Orange | 0.80 | 1.00 | 0.80 | 0.89 |
| Yellow | 0.85 | 1.00 | 0.85 | 0.92 |
| Green | 1.00 | 1.00 | 1.00 | 1.00 |
| Blue | 0.67 | 1.00 | 0.67 | 0.80 |
| Violet | 1.00 | 1.00 | 1.00 | 1.00 |
| Average | 0.82 | 0.93 | 0.82 | 0.86 |
| Vehicle Class | ||||
| Class | Accuracy | Precision | Recall | F1 Score |
| Public | 0.94 | 1.00 | 0.94 | 0.97 |
| Private | 1.00 | 1.00 | 1.00 | 1.00 |
| Average | 0.97 | 1.00 | 0.97 | 0.99 |
| Vehicle Type | ||||
| Type | Accuracy | Precision | Recall | F1 Score |
| Sedan | 0.98 | 0.90 | 0.98 | 0.94 |
| Jeepney | 1.00 | 1.00 | 1.00 | 1.00 |
| SUV | 0.91 | 0.82 | 0.91 | 0.87 |
| Motorcycle | 1.00 | 1.00 | 1.00 | 1.00 |
| Bus | 0.94 | 1.00 | 0.94 | 0.97 |
| Tricycle | 1.00 | 1.00 | 1.00 | 1.00 |
| Truck | 0.48 | 0.88 | 0.48 | 0.62 |
| Average | 0.90 | 0.94 | 0.90 | 0.91 |
| Vehicle Color | ||||
| Color | Accuracy | Precision | Recall | F1 Score |
| White | 0.95 | 0.98 | 0.95 | 0.97 |
| Silver/Gray | 0.89 | 0.53 | 0.89 | 0.67 |
| Black | 0.94 | 0.87 | 0.94 | 0.91 |
| Red | 0.80 | 1.00 | 0.80 | 0.89 |
| Orange | 0.75 | 0.60 | 0.75 | 0.67 |
| Yellow | 0.89 | 0.89 | 0.89 | 0.89 |
| Green | 1.00 | 1.00 | 1.00 | 1.00 |
| Blue | 0.73 | 1.00 | 0.73 | 0.84 |
| Violet | 0.50 | 1.00 | 0.50 | 0.67 |
| Average | 0.82 | 0.87 | 0.82 | 0.82 |
| Vehicle Class | ||||
| Class | Accuracy | Precision | Recall | F1 Score |
| Public | 0.89 | 1.00 | 0.89 | 0.94 |
| Private | 0.95 | 0.99 | 1.00 | 0.99 |
| Average | 0.95 | 1.00 | 0.95 | 0.97 |
| Vehicle Type | ||||
| Type | Accuracy | Precision | Recall | F1 Score |
| Sedan | 0.99 | 0.93 | 0.99 | 0.96 |
| Jeepney | N/A | N/A | N/A | N/A |
| SUV | N/A | N/A | N/A | N/A |
| Motorcycle | 1.00 | 1.00 | 1.00 | 1.00 |
| Bus | 0.89 | 1.00 | 0.89 | 0.94 |
| Tricycle | N/A | N/A | N/A | N/A |
| Truck | 0.24 | 0.67 | 0.24 | 0.35 |
| Average | 0.78 | 0.90 | 0.78 | 0.81 |
| Average Accuracy | |||
|---|---|---|---|
| Features | Video 1 | Video 2 | Video 3 |
| Class | 94% | 100% | 97% |
| Type | 83% | 90% | 90% |
| Color | 81% | 82% | 82% |
| Count | 92.67% | 93.00% | 96.67% |
| Metric | Zero-Shot Blind Real-World | Adapted Blind Real-World | Existing Staged Post-Refinement |
|---|---|---|---|
| Public/Private Class Accuracy | 92.43% | 95.16% | 97.00% |
| Vehicle-Type Accuracy | 86.17% | 88.62% | 90.00% |
| Color Accuracy | 74.50% | 79.87% | 82.00% |
| Count Accuracy | 91.22% | 94.00% | 96.67% |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.
Share and Cite
Ambata, L.; Dadios, E.J. Universal Robust Vehicle Identification System for Monitoring Using YOLOv12 and DeepSORT. Smart Cities 2026, 9, 85. https://doi.org/10.3390/smartcities9050085
Ambata L, Dadios EJ. Universal Robust Vehicle Identification System for Monitoring Using YOLOv12 and DeepSORT. Smart Cities. 2026; 9(5):85. https://doi.org/10.3390/smartcities9050085
Chicago/Turabian StyleAmbata, Leonard, and Elmer Jose Dadios. 2026. "Universal Robust Vehicle Identification System for Monitoring Using YOLOv12 and DeepSORT" Smart Cities 9, no. 5: 85. https://doi.org/10.3390/smartcities9050085
APA StyleAmbata, L., & Dadios, E. J. (2026). Universal Robust Vehicle Identification System for Monitoring Using YOLOv12 and DeepSORT. Smart Cities, 9(5), 85. https://doi.org/10.3390/smartcities9050085

