# A Real-Time Car Towing Management System Using ML-Powered Automatic Number Plate Recognition
## 1 Introduction  
Automatic Number Plate Recognition (ANPR) is a computer vision technology that automatically recognizes vehicle number plates using high-speed cameras [1]. It involves detecting the position of the plate in the vehicle, identifying the characters and digits in the plate, and converting the captured image to text [2]. ANPR has been used in a wide range of applications such as vehicle access control [3], site security [4], car park management [5], traffic management [6], tolling [7], counter-terrorism [8], etc. In many of these applications, ANPR needs to operate in real-time, which increases the complexity of the plate recognition process. The state-of-the-art approaches for ANPR utilize Machine Learning (ML) models (e.g., Convolutional Neural Networks (CNN) [9], Recurrent Neural Networks (RNN) [10], Bi-Directional Long Short Term Memory (BLSTM) [11] and Support Vector Machine (SVM) [12]) to recognize the text on license plates. However, these ML models require large and robust datasets of plate photos of different sizes, orientations, and shapes across different regions worldwide to train them. Moreover, these datasets may contain sensitive identifying information related to the vehicle, driver, and location, making it a challenging task to acquire [3]. Therefore, there is a need for alternative ANPR approaches that canaccurately identify the plate's area and recognize its alphanumeric characters in real-time without the need for substantial ANPR datasets that may contain sensitive information related to car owners. In this paper, we present a mobile-based ANPR system that uses different approaches and techniques to enhance the accuracy of recognizing number plates (The source code and dataset are available online: [[https://github.com/ahmed-pvamu/Car-Towing-Management](https://github.com/ahmed-pvamu/Car-Towing-Management)]([https://github.com/ahmed-pvamu/Car-Towing-Management](https://github.com/ahmed-pvamu/Car-Towing-Management)), accessed on 10 September 2021). The developed ANPR system has two main modules for detecting the number plate's location on the car body and identifying the plate's alphanumeric characters, respectively. We developed an algorithm for sketching a bounding box around the input image's plate in the first module. The plate box is then fed to the second module, which generates the contours for all alphanumeric characters within the plate box by applying a series of image filters and transformations such as Gaussian filter ([PERSON] et al., 2019), morphological transformation ([PERSON] et al., 2019), etc. We used the K-Nearest Neighbors (KNN) model ([PERSON] et al., 2019) to recognize the actual characters and digits in the number plate. We implemented a case study for smart car towing management based on our ANPR system. We developed an Android mobile app to allow law-enforcement personnel to capture a photo of the towed car. The captured image is then fed to our ANPR system to recognize the actual characters on the number plate, which is automatically recorded into the car towing management system. Car owners can also search for their towed vehicles, check the case status, submit complaints, and pay fines. We used more than 160 car images to calculate the classification accuracy of our ANPR system. Figure 1 shows some examples of the various types of number plates with different sizes, orientations, and shapes across various regions worldwide. Our model achieves a classification accuracy of 95% in recognizing number plates in our testing dataset. We also compared the performance of our ANPR system to some existing ML models (i.e., SVM ([PERSON] et al., 2019)) and computer vision models (i.e., YOLO detector ([PERSON] et al., 2019)). We found that our ANPR system outperforms SVM and YOLO in terms of processing time, which is critical for the ANPR applications which need to operate in real-time. The contributions of this paper are fourfold.