System for automatic detection and classification of cars in traffic

Authors

  • Niko Bralić University of Split, Faculty of Electrical Engineering, Mechanical Engineering and Naval Architecture, Split, Croatia
  • Josip Musić University of Split, Faculty of Electrical Engineering, Mechanical Engineering and Naval Architecture, Split, Croatia https://orcid.org/0000-0002-9185-5762

DOI:

https://doi.org/10.48188/so.3.10

Keywords:

object detection, CNN, YOLO, SSD, kNN, Raspberry Pi

Abstract

Objective: To develop a system for automatic detection and classification of cars in traffic in the form of a device for autonomic, real-time car detection, license plate recognition, and car color, model, and make identification from video.

Methods: Cars were detected using the You Only Look Once (YOLO) v4 detector. The YOLO output was then used for classification in the next step. Colors were classified using the k-Nearest Neighbors (kNN) algorithm, whereas car models and makes were identified with a single-shot detector (SSD). Finally, license plates were detected using the OpenCV library and Tesseract-based optical character recognition. For the sake of simplicity and speed, the subsystems were run on an embedded Raspberry Pi computer.

Results: A camera was mounted on the inside of the windshield to monitor cars in front of the camera. The system processed the camera’s video feed and provided information on the color, license plate, make, and model of the observed car. Knowing the license plate number provides access to details about the car owner, roadworthiness, car or license place reports missing, as well as whether the license plate matches the car. Car details were saved to file and displayed on the screen. The system was tested on real-time images and videos. The accuracies of car detection and car model classification (using 8 classes) in images were 88.5% and 78.5%, respectively. The accuracies of color detection and full license plate recognition were 71.5% and 51.5%, respectively. The system operated at 1 frame per second (1 fps).

Conclusion: These results show that running standard machine learning algorithms on low-cost hardware may enable the automatic detection and classification of cars in traffic. However, there is significant room for improvement, primarily in license plate recognition. Accordingly, potential improvements in the future development of the system are proposed.

Additional Files

Published

2022-10-31

Issue

Section

Research Articles

Categories