Next Article in Journal
End-to-End Premature Ventricular Contraction Detection Using Deep Neural Networks
Previous Article in Journal
Review of Energy Management Methods for Fuel Cell Vehicles: From the Perspective of Driving Cycle Information
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Smart Parking Locks Based on Extended UNET-GWO-SVM Algorithm

College of Physics and Electronic Information Engineering, Zhejiang Normal University, Jinhua 321000, China
*
Author to whom correspondence should be addressed.
Sensors 2023, 23(20), 8572; https://doi.org/10.3390/s23208572
Submission received: 29 August 2023 / Revised: 18 September 2023 / Accepted: 21 September 2023 / Published: 19 October 2023
(This article belongs to the Section Intelligent Sensors)

Abstract

:
Due to the rapid increase in private car ownership in China, most cities face the problem of insufficient parking spaces, leading to frequent occurrences of parking space conflicts. There is a wide variety of parking locks available on the market. However, most of them lack advanced intelligence and cannot cater to the growing diverse needs of people. The present study attempts to devise a smart parking lock to tackle this issue. Specifically, the smart parking lock uses a Raspberry Pi as the core controller, senses the vehicle with an ultrasonic ranging module, and collects the license plate image with a camera. In addition, algorithms for license plate recognition based on traditional image-processing methods typically require a high pixel resolution, but their recognition accuracy is often low. Therefore, we propose a new algorithm called UNET-GWO-SVM to achieve higher accuracy in embedded systems. Moreover, we developed a WeChat mini program to control the smart parking lock. Field tests were conducted on campus to evaluate the performance of the parking locks. The test results show that the corresponding effective unlocking rate is 99.0% when the recognition error is less than two license plate characters. The average time consumption is controlled at about 2 s. It can meet real-time requirements.

1. Introduction

In recent years, the per capita car ownership in China has been increasing yearly, leading to a shortage of parking spaces in most cities. According to the data from the National Bureau of Statistics of China, in 2022, the total number of private cars reached over 320 million by the end of that year, representing a growth rate of 5.81% compared to the previous year. The existing parking spaces are mainly concentrated in office buildings, recreational areas, and residential areas. Among them, the management of parking spaces in residential areas is the most prominent issue, with frequent incidents of parking space occupation, which has caused significant difficulties in parking management and has compromised the legitimate parking rights of private car owners. On the other hand, parking spaces in residential areas during working hours and office building parking spaces at night are often left unused, resulting in the inefficient allocation of urban parking resources and difficulty in their effective utilization. A survey to address the above issues is provided below.
To effectively manage parking spaces, parking locks (also known as ground locks) have emerged. Common parking lock types are divided into two categories: mechanical manual locks and electronic remote-controlled locks (including remote controllers, mobile apps with Bluetooth, etc.). Traditional manual parking locks require vehicle owners to manually operate the lifting or lowering of the lock support to lock it. This process is both time-consuming and extremely inconvenient. Moreover, most manual locks do not have collision warning features, making them prone to damage and potentially causing damage to the vehicle. With the development of electronic technology, traditional mechanical parking locks have been further upgraded to electronic remote-controlled locks. Users can control the lifting and lowering of the parking lock through a remote controller or a smartphone with Bluetooth, significantly saving time compared to manual unlocking. Additionally, some electronic remote locks utilize sensors installed on vehicles to enable features such as proximity-based automatic unlocking, and they have received positive feedback. However, existing remote-controlled parking locks do not allow for the efficient sharing of parking spaces, resulting in low utilization rates of urban parking spaces.
Furthermore, most parking locks available on the market rely on close-range control by users to open or close them. Once the distance becomes too far, they may malfunction and fail to achieve the remote sharing of parking spaces. With technological advancements and an expanding market, smarter and more energy-efficient parking locks are becoming the trend of industry development. Therefore, designing a smart parking lock that combines the Internet of Things (IoT) and image recognition technology to automatically control the support bracket based on proximity sensing and the recognition of nearby license plates holds significant research value.
The present study attempts to devise an advanced smart parking lock to tackle this problem. Our approach centers around utilizing the Raspberry Pi 3B as the core controller, employing an ultrasonic distance module to detect vehicles, and incorporating a camera to collect license plate information. Traditional image-processing methods for license plate recognition often suffer from low accuracy and need high pixel resolution. To overcome these limitations, we have implemented a new algorithm known as UNET-GWO-SVM. Moreover, our system offers users the convenience of managing their parking spaces through a dedicated WeChat mini program, providing an intuitive and user-friendly interface.
Overall, this paper provides the following contributions:
  • A lightweight license plate localization model has been designed based on the U-Net architecture, which exhibits the precise localization of license plate regions even in complex scenes, demonstrating exceptional robustness.
  • Building upon a comprehensive analysis of license plate character recognition algorithms, we introduced the gray wolf optimization (GWO) algorithm into a character recognition model based on Support Vector Machines (SVMs). As a result, we constructed a GWO-SVM cascade recognition model designed explicitly for domestic license plate characters.
  • In conjunction with the aforementioned license plate recognition method, we propose a machine-vision-based smart parking lock. This parking lock system utilizes the Raspberry Pi development board as its central controller, ensuring seamless integration. Moreover, the lock is equipped with a 4G transmission module, establishing a connection with the IoT platform. This connectivity enables users to conveniently manage the lock via mobile terminals, facilitating efficient parking space sharing.
The rest of this article is organized as follows. In Section 2, we discuss the related work and the technology background. In Section 3, we describe the system architecture and explain the principle of operations. Section 4 shows the experimental results and discussions. Finally, the conclusion of this paper is given in Section 5.

2. Related Work

2.1. Review of Smart Parking Systems

In recent years, a number of studies have appeared on the security and management issues of smart parking [1]. Tang et al. combined IoT technology with traditional parking locks to design a real-time shared parking management system [2]. This solution provided a time-sharing approach to parking management. The aforementioned smart parking locks and their management solutions have expanded the functionality of parking locks to a certain extent. Xue et al. proposed an innovative bicycle intelligent lock [3]. The proposed method applied the multi-sensor fusion positioning algorithm to determine the location of the parking lot and the appropriateness of the positioning and realized the real-time monitoring and control of the system for bicycle parking through online monitoring and alarming software.
Later, many researchers applied geomagnetic detection technology to parking locks, further enhancing the sensitivity of the devices. Yao et al. designed a smart ground lock based on BLE and geomagnetic detection, improving the stability of the smart ground lock. Li et al. introduced geomagnetic detection technology into the parking detection module, creating a low-power Bluetooth parking lock. Lin et al. innovatively proposed a low-power remote-controlled parking lock powered by compressed air, effectively addressing issues such as the short battery life and the need for frequent battery replacement in conventional parking locks [4]. In recent years, driven by the sharing economy trend, research on smart-parking-lock-sharing technology has gradually increased. Chen et al. designed an embedded network-controllable parking lock that enabled remote management and parking-space-tracking functions. Tai et al. applied ultrasonic ranging technology and QR code technology [5] to design a self-sensing shared parking lock for private parking space sharing. Shi et al. proposed an induction-based wake-up control method, and experimental results demonstrated that the technology effectively reduced the power consumption and latency of the lock.
However, the aforementioned smart parking locks have limitations, such as a short remote control distance and the need for manual app operation, preventing them from achieving full automation. Subsequently, Liu et al. proposed a shared parking lock design combining microcontrollers with license plate recognition technology, further enhancing the intelligence of parking locks. However, there were issues with low recognition accuracy. Floris et al. designed a remote parking control system based on the IoT [6], enabling parking reservation, location navigation, and parking-space-leasing functions. Currently, the market share of [7] smart parking locks is still relatively small, and most locks require manual remote control by the vehicle owner or electronic tags, which causes inconvenience.

2.2. Overview of License Plate Recognition

Several researchers have proposed advanced automatic license plate recognition (ALPR) methods. He et al. developed a real-time and robust Chinese ALPR method [8] to accurately detect and identify inclined and twisted license plates in natural scenes. Pustokhina et al. presented a new OKM-CNN technique [9] that achieved a maximum overall accuracy of 0.981 on the Stanford Cars, FZU Cars, and HumAIn 2019 Challenge datasets. This technique effectively detects and recognizes license plates. Tourani et al. proposed a unified application for vehicle license plate detection and character recognition [10] that achieved high accuracy and real-time performance. The experimental results show that on 5719 images, the end-to-end accuracy reaches 95.05%, and the average time consumption is 119.73 ms. Zou et al. proposed a robust model for license plate recognition in complex environments using Xception, MobileNetV3, spatial attention mechanism, and Bi-LSTM methods. Experimental results show that the algorithm performs well without constraints, demonstrating the effectiveness and robustness of the model [11]. To make the model learn environment-independent and perspective-free semantic features effectively and efficiently, Zhang et al. put forward a shared adversarial training network with the prior knowledge of standard stencil-rendered license plates [12]. The author presented a one-stage ALPRNet [13] for multiple and mixed-style LP recognition, which equally treats LPs and characters as objects to detect and classify and conducts these two tasks simultaneously.
Later, Henry et al. [14] developed a generalized method for multi-country license plate recognition based on the YOLOv3 network to address the limitation that automatic license plate recognition systems can only recognize license plates from a single country. Chen et al. [15] presented an end-to-end multi-branch attention neural network for simultaneous vehicle and license plate detection, which helps solve the problem that vehicle affects license plate detection when simultaneously detecting the vehicle and license plate. In addition, since the breakthrough of deep learning technology, related target detection algorithms have emerged in an endless stream, and the performance is outstanding, such as Faster R-CNN [16,17], SSD [18,19], or YOLO [20,21,22]. Based on the aforementioned technology, the recognition accuracy of the upgraded model is greatly improved. Besides license plate recognition algorithms, image quality is also an important issue [23]. A full-reference quality metric for light-field reconstruction, compression, and display quality evaluation was proposed to improve recognition accuracy [24,25].

3. The Proposed Smart Parking Lock System

3.1. System Architecture

The smart parking lock based on machine vision is an intelligent device that integrates license plate recognition technology with a vehicle lock. It aims to enhance safety and security by implementing an automatic lock function based on license plate recognition. The system uses machine vision algorithms to recognize the license plate numbers of approaching vehicles. By comparing the recognized license plate number with the pre-configured license plate number, the system determines whether to activate the automatic lock mechanism.
The operational mechanism of the smart parking lock, shown in Figure 1, can be described as follows. The user establishes a communication link with the embedded controller by means of a mobile terminal connected to the AliCloud platform. Subsequently, the associated license plate number is configured through the WeChat mini program, and vital information is transferred to the Raspberry Pi via the high-speed 4G mobile network. The controller incorporates the embedded, rapid, real-time license plate recognition algorithm proposed in this study. Once a vehicle is detected approaching the parking spot, the camera is automatically activated, triggering the license plate recognition algorithm to compare the captured license plate with the registered license plate number, thereby determining the unlock status of the vehicle lock. The parking lock also features additional functions, such as remaining battery power indication and occupied parking spot alert.
The Raspberry Pi serves as the core hardware of the smart parking lock and plays a crucial role in data processing and instruction transmission. The primary objective of the 4G transmission module is to establish IoT connectivity, enabling communication with the WeChat mini program and facilitating remote monitoring. The ultrasonic ranging module can detect nearby vehicles, while a camera on the Raspberry Pi captures the vehicle’s license plate, enabling image acquisition. The DC reduction motor controls the smart parking lock. Furthermore, the motor limiter is responsible for constraining the rotation angle and precise positioning of the DC motor. The buzzer serves to avert potential collisions with other vehicles.

3.2. License Plate Location

License plate location usually extracts the license plate area from the image that contains the license plate, according to the license plate features. At present, the standard license plate location algorithms can be divided into four categories: mathematical morphology [25], edge_ [26], color_ [27], and artificial neural networks [28,29,30]. In the traditional approach, mathematical morphological features, edge features, and color features are all prominent features of license plate positioning. However, due to the influence of the illumination and the tilt angle of the license plate, these methods cannot locate the license plate well in some complex scenes, such as those with blur and distortion. With the development of deep learning in recent years, the artificial neural network can effectively extract image features and carry out target tracking and semantic segmentation. License plate location is also a mode of image semantic segmentation, so this paper introduces the lightweight semantic segmentation network U-net for license plate location.
U-net was proposed [31] in the cell image segmentation contest in 2015. The structure of U-net is shown in Figure 2, with a ‘U’ shape. Its design can be divided into the contracting path and the expansive path. The contracting path is used for feature extraction at all levels of the image, and the expansive path uses up-sampling and other operations to fuse these features to locate the target area more accurately.
Compared to other convolutional neural networks, U-Net has several advantages in license plate localization, including its ability to capture contextual information, low sample requirements, end-to-end localization, and excellent image segmentation capabilities. These features make U-Net a powerful tool for processing license plate images and achieving accurate localization. Therefore, introducing the U-Net network into license plate localization is feasible in this section.

3.3. License Plate Character Recognition

After locating the license plate, we need to carry out the following operations: license plate rectangle correction, character segmentation, and character recognition. The license plate correction and character segmentation steps are usually relatively fixed. The character recognition algorithm significantly impacts the overall license plate recognition results, so this section focuses on license plate character recognition. Based on the requirements of low cost and high real-time performance in integration with the parking lock system, the traditional license plate character recognition method was selected in this study among various character recognition algorithms.
Conventional methods can be divided into template matching, SVM, and the neural network. The template-matching algorithm extracts the preprocessed standard binary characters from the database and calculates the similarity between the target and the database template characters to classify characters. This method is simple in principle, poor in anti-interference, and significantly affected by environmental factors and the size of characters. The key to the SVM-based classifier is the decision boundary learned through the training process, which effectively separates the feature vectors of different character classes. This enables the SVM-based classifier to make classification judgments based on the position of the feature vectors relative to the decision boundary when recognizing new, unknown characters. The key to the SVM-based classifier is the decision boundary learned through the training process, which effectively separates the feature vectors of different character classes. This enables the SVM-based classifier to make classification judgments based on the position of the feature vectors relative to the decision boundary when recognizing new, unknown characters. Its graphical representation is shown in Figure 3.
The interval between the support vectors should be more significant to find the best hyperplane. As a result, the value of ω needs to be minimized. The solution of the optimal classification hyperplane can be divided into two cases according to whether the input data are linearly separable. The nonlinear classification problem can be converted into the following formula:
R ω = m i n 1 2 ω 2 + c i = 1 n ξ i , s . t .     y i ω T x i + b 1 ξ i , ξ i 0 ,     i = 1,2 , ,
The standard mathematical expressions of mapping Gaussian kernel function  K x , y  are shown as follows:
K x , y = e ( | | x y | | 2 2 σ 2 ) = e ( g x y 2 )
where σ is the standard deviation of the Gaussian function distribution. After a series of mathematical derivations, the hyperplane classification decision function is as follows:
F k x = s g n j = 1 N α i T y i K x i , x j + b = s g n j = 1 N α i T y i e g x i x j 2 + b , s . t .     c α i 0
where  c  is the penalty factor, and  g  is the kernel parameter, which significantly influences the classification effect of SVM. At the same time, the traditional algorithm generally uses the practical value as its parameter value. Specifically, the value of  c  represents the degree of penalty in SVM. A large value can lead to overfitting, where the model becomes too complex and may fit the training data too closely. On the other hand, a small value can result in underfitting, where the model is too simple and fails to capture the underlying patterns in the data. The kernel parameter  g  represents the clustering degree of Gaussian kernel mapping. If  g  is too large, distinguishing the data after mapping will not be easy. If  g  is too small, the classification will be too fine, resulting in overfitting.
Therefore, we use various swarm intelligence optimization algorithms to find the best parameter combination of the SVM classifier to improve the Chinese character recognition accuracy. Compared with various swarm optimization algorithms, the GWO algorithm was finally selected to optimize the kernel parameter  g  and penalty factor  c  of SVM.
The GWO algorithm is a strategy to search for the optimal target by artificially imitating the hunting mechanism of a gray wolf population to surround, hunt, and attack prey. Among them, α, β, and δ are divided according to the social hierarchy of wolves, which are expressed as superior, sub-optimal, and third-optimal solutions, respectively, and their positions in the search space represent the optimal solution. The remaining individual ω will update its search position according to the relative position and finally search for prey. The specific search process is visualized in Figure 4.
In this study, the widely used Histogram of Oriented Gradients (HOG) was chosen as the feature extraction method for license plate characters [32]. The GWO-SVM classifier is trained to recognize 7-bit license plate characters. In addition, since the stroke structure of Chinese characters is more complex than numbers and letters, a Chinese character sub-classifier is separately trained for 31 provinces in the mainland, and the final license plate character classifier is a cascade of letter and number sub-classifiers. The GWO-SVM model approximates the actual value within the maximum number of iterations by conducting continuous optimization tests. The specific process can be summarized in two steps:
Step 1. The best parameter values (c, g) are used in the search parameter interval of the gray wolf population. The two-dimensional position vector of the gray wolf is set in the search space according to the number of optimization parameters to characterize the target parameter. And the wolf pack position is updated through iteration. Based on the individual functions of the first three wolves, the target position vector is solved approximately.
Step 2. The target position vector solved in the previous step is assigned to the SVM model as the (c, g) parameter. Thus, the SVM model is retrained, and the test set is predicted. An appropriate fitness function is set to characterize the training result, and the wolf pack is traversed to calculate the individual fitness value. The three new leader wolves of the wolf pack are determined through the maximum fitness value, and the gray wolf model parameters are updated.
The SVM parameter values are optimized after continuous loop iteration of the above two steps. Finally, a recognition model suitable for the training dataset is constructed.

3.4. Combination Algorithm

This study uses U-net to locate the license plate area. Then, the traditional horizontal and vertical projection analysis is used to extract and segment characters. This method uses the pixel brightness difference between the license plate characters. It determines the segmentation threshold by analyzing the peaks and troughs of the gray-scale image’s horizontal projection and vertical projection histogram to segment the license plate characters. Finally, the SVM model with optimized parameters can recognize the license plate number.

3.5. System Software Design

The system software design includes the Raspberry Pi control program, the WeChat mini program, and the IoT access platform. The Raspberry Pi control program detects vehicles automatically, captures license plates, recognizes the license plates, accesses the IoT, and sends instructions and other functions. The WeChat mini program allows users to manage parking locks anytime and anywhere. As the data transfer station between the Raspberry Pi and the WeChat mini program, the IoT access platform establishes the communication connection between them. In addition, the system uses the MQTT communication protocol.
The workflow of the smart parking lock system can be summarized as follows:
(1)
Users can log in to the management page through the mobile client (the proposed method uses the WeChat mini program as the management software) and bind the license plate number.
(2)
When the vehicle is close to the parking lock, the ultrasonic ranging module of the parking lock calls the CSI camera to capture the license plate according to the set threshold.
(3)
The Raspberry Pi is utilized to process the collected image data and accurately extract the license plate number as the output.
(4)
The Raspberry Pi controller sequentially compares the recognition result with the bound license plate numbers. If a match is found, the motor is driven to unlock. If there is no match, the alarm is triggered.
The specific flowchart is shown in Figure 5.

4. Experimental Results and Analysis

4.1. License Plate Location Based on U-Net

Due to U-Net’s robustness with smaller training datasets, this study used a dataset of 1300 high-definition blue-and-white license plates as the experimental dataset. The training-to-validation dataset ratio was 4:1. As shown in Figure 6, the training dataset was manually labeled, with the original images used as sample data and the annotated binary images used as labels. The license plates are segmented on the original images during license plate localization.
The computer vision library OpenCV was leveraged to ingest the pre-labeled dataset into U-net while meticulously configuring the requisite model parameters in adherence to the conventional training protocol of deep learning artificial neural networks. Subsequently, repetitive training was conducted based on evaluation metrics and the loss function until convergence was achieved. The network model training flowchart is shown in Figure 7.
The widely used Adam optimizer was used. The default learning rate is 0.001. We used the license plate localization accuracy as an evaluation metric, while the mean square error (MSE) was used as a loss function. The loss value during training is shown in Figure 8.
Moreover, the trend of the accuracy rate of the training set and the validation set is shown in Figure 9.
During the training process, the loss function value of the training set showed a downward trend. In contrast, the loss function value of the verification set initially significantly oscillated and then gradually decreased as the iteration progressed, and it converged from the 75th epoch. The specific loss value gradually stabilized around the 220th epoch, and the verification set loss value stabilized at the 150th epoch. During training, the accuracy of the model training set declined before the 16th epoch and then gradually increased and converged at the 75th epoch to 0.95. After that, the curve stabilized, and the accuracy of the model validation set was zero before the 16th epoch. As the accuracy of the training set increased, it gradually rose and stabilized at 0.97. In summary, the training of U-Net achieves the expected effect.

4.2. Character Recognition Based on SVM

The license plates used in the Chinese mainland consist of 31 Chinese characters, 10 Arabic numbers, and 24 uppercase English letters, excluding the characters ‘O’ and ‘I’, based on their arrangement on the license plate.
In the character recognition stage, the standard character training set employs segmented binary characters as the training set for the SVM model. This helps reduce the computational burden for character training and enhances the distinctive features of the characters. This study utilized a dataset comprising 18,289 images with a resolution of 28 × 28 pixels. Among these, 13,177 images were selected as the training set, while 5112 images were designated as the test set. The maximum iteration number was set to 100, and the number of gray wolves was set to 20. The optimization boundary range was between 0.01 and 100 based on the reference values of the traditional penalty factor ‘c’ and the kernel parameter ‘g’. Subsequently, the GWO-SVM model was trained using the parameter values of the GWO algorithm, and the resulting experimental data were analyzed.
This paper presents a comparative analysis of various metaheuristic algorithms, namely, the genetic algorithm, particle swarm algorithm, firefly algorithm, cuckoo algorithm, and gray wolf algorithm. The experimental results are presented in Table 1.
The test result conclusively demonstrates that GWO-SVM yields the highest accuracy in character recognition. Due to the fact that the recognition accuracies of uppercase letters and Arabic numerals are close to each other, we trained the Chinese and English classifiers separately. Then, they were cascaded into the license plate character recognizer, which helps to improve the overall parameter optimization classification effect. In addition, the GWO-SVM model has a more powerful global optimization capability and higher recognition accuracy than the above optimization algorithms.
In addition, the optimization speed of the proposed method was tested on 350 samples. The specific experimental data are shown in Table 2.
The results indicate that the GWO-SVM model has the fastest iteration time and optimization speed.

4.3. License Plate Recognition Experiment

Based on the proposed method, we designed a lightweight license plate recognition model suitable for embedding. Moreover, the user software graphical user interface based on the license plate recognition algorithm is shown in Figure 10.
Figure 10 shows that the single-frame time for license plate identification running on a CPU is about 300 ms. The recognition of license plate images with excessive tilt angles takes only 300 ms, which meets the real-time requirements.
In addition, we also carried out an algorithm comparison experiment and selected a set of 175 challenging license plate pictures as the test dataset. The images in the dataset have some problems, such as tilt, license plate distortion, and character blur, and the size and resolution of the pictures are different, which significantly increases the difficulty of license plate recognition. The experiments were run in the TensorFlow environment of the computer. The investigation involved the UNET-GWO-SVM algorithm, traditional image-processing recognition algorithm, and Chinese open-source neural network hyper-LPR model. The specific test data are shown in Table 3.
The comparative test of the above algorithms shows that the license plate recognition algorithm based on image processing has low recognition accuracy for challenging test samples, which is above 70.0%. However, the recognition speed is fast, and the average single-frame time is 50 ms~70 ms. The license plate recognition algorithm based on the neural network has high accuracy. However, the average recognition time is also longer. The experimental results show that the hyper-LPR algorithm, a domestic high-performance, open-source algorithm, has high recognition accuracy for a license plate with a slight inclination angle. However, it also consumes many resources and takes a long time. Compared with the hyper-LPR model, the UNET-GWO-SVM model designed in this paper dramatically improves the positioning accuracy and recognition speed. On the other hand, there is still a gap compared with different end-to-end neural network recognition algorithms [41,42,43,44]. However, they consider the applicability of embedded hardware. The license plate recognition algorithm designed in this paper still has excellent application prospects and can fully meet the functional requirements of a smart parking lock.
Finally, we integrated the above algorithm into a parking lock to complete a smart parking lock. The parking lock equipment comprises a mechanical device and a control center. The automatic device includes a modified motor drive module, drive power supply, bracket lock, and drive motor. The control center encapsulates the extended Raspberry Pi controller [45]. The parking lock device automatically detects and recognizes the license plate number through the Raspberry Pi controller and sends instructions to the mechanical device to control the opening and closing of the ground lock. A physical picture of the hardware device package is shown in Figure 11.
Based on the device, this study carried out a function test for 102 blue cars in the campus parking lot and collected the relevant data on license plate recognition and the effective opening of the parking lock. Table 4 shows the results of the experiments.
The results show that the system can correctly recognize 96 blue brand vehicles in the recognition test of 102 blue brand vehicles on campus. When the recognition error is less than two license plate characters, the number of cars recognized by the system even reaches 101. The corresponding effective unlocking rate is 99.0%, and the average time consumption is controlled at about 2 s, which can meet the real-time requirements.
On the one hand, considering the limitations of the character segmentation and character recognition algorithms, the error rate of single-character recognition, especially Chinese character recognition, is high. On the other hand, this system can pass the license plate determination if it is similar to the license plate number used as a template for string comparison. However, in reality, the possibility of nontarget license plate numbers and binding license plate numbers being similar in charge is very low. Therefore, this paper takes the similarity of license plate characters as the basis of unlocking, and unlocking occurs when it reaches a 70% matching degree to improve parking lock unlocking efficiency.

5. Conclusions

This paper mainly focuses on two aspects: the design of an efficient license plate recognition algorithm for lightweight embedded hardware and the implementation of smart parking locks. Based on the study of existing license plate recognition algorithms and combined with the application requirements of parking locks, a medical image segmentation network U-net is introduced to improve the license plate positioning accuracy; the gray wolf algorithm (GWO) is introduced to optimize the SVM model, and a GWO-SVM-based character recognition model is established to improve the license plate character recognition accuracy with balanced resources and performance. Combining the above positioning and character recognition algorithms, a UNET-GWO-SVM license plate recognition algorithm that can be applied to embedded systems is proposed, and a smart parking lock based on machine vision is designed and implemented in combination with the mechanics of traditional parking locks.
The main research work of this paper can be summarized as follows:
(1) Given the limitations of embedded hardware performance, this study aims to improve existing license plate recognition algorithms. Specifically, to address the issue of inaccurate license plate localization in complex scenarios, the U-net network is introduced for image segmentation, leading to the development of a lightweight localization model. Comparative tests were conducted between this localization model and traditional localization algorithms to demonstrate the effectiveness of the proposed approach.
(2) To address the issue of using empirical values and the lack of targeted optimization for the parameters in the traditional SVM model, the GWO (gray wolf optimizer) algorithm is introduced to optimize the penalty factor and kernel parameters. As a result, the GWO-SVM recognition model is established. The GWO-SVM model exhibits an average improvement of over 5% in recognition accuracy compared to the original model. Additionally, the GWO-SVM model demonstrates fast convergence during iterations and achieves high accuracy in character recognition.
(3) A smart parking space lock based on machine vision was designed using a Raspberry Pi development board as the core controller. The parking space lock can automatically detect the vehicle driving in and collect the license plate information, and then it calls the UNET-GWO-SVM model for license plate recognition and automatically controls the ground lock. The test results show that the complete recognition success rate reaches 97% in a campus parking lot, and the average time is about 2 s, which meets actual needs.

Author Contributions

Conceptualization, Y.X.; validation, Y.X.; investigation, W.C.; data curation, W.C.; writing—original draft, Y.X. and H.D.; writing—review and editing, J.S. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Not applicable.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Lai, C.; Li, Q.; Zhou, H.; Zheng, D. SRSP: A Secure and Reliable Smart Parking Scheme with Dual Privacy Preservation. IEEE Internet Things J. 2021, 8, 10619–10630. [Google Scholar] [CrossRef]
  2. Tang, Z.; Jiang, Y.; Yang, F. Online stochastic weighted matching algorithm for real-time shared parking. Int. Trans. Oper. Res. 2023, 30, 3578–3596. [Google Scholar] [CrossRef]
  3. Xue, Z.; Lin, L.; Ma, Y.; Dong, W.; Dou, Z.; Zhao, J.; Zhao, Y.; Zhang, Y.; Zhang, X. A Shared Bicycle Intelligent Lock Control and Management System Based on Multisensor. IEEE Internet Things J. 2020, 7, 5426–5433. [Google Scholar] [CrossRef]
  4. Lin, L. Low power consumption and reliability of wireless communication network in intelligent parking system. J. Ambient. Intell. Humaniz. Comput. 2021, 12, 1305–1313. [Google Scholar] [CrossRef]
  5. Tai, Z.; Yu, X.; He, B. Locked down through virtual disconnect: Navigating life by staying on/off the health QR code during COVID-19 in China. Convergence 2021, 27, 1648–1662. [Google Scholar] [CrossRef]
  6. Floris, A.; Porcu, S.; Atzori, L.; Girau, R. A Social IoT-based platform for the deployment of a smart parking solution. Comput. Netw. 2022, 205, 108756. [Google Scholar] [CrossRef]
  7. Wang, H.; Xiao, N. Underwater Object Detection Method Based on Improved Faster RCNN. Appl. Sci. 2023, 13, 2746. [Google Scholar] [CrossRef]
  8. He, M.-X.; Hao, P. Robust Automatic Recognition of Chinese License Plates in Natural Scenes. IEEE Access 2020, 8, 173804–173814. [Google Scholar] [CrossRef]
  9. Zhai, G.; Min, X. Perceptual image quality assessment: A survey. Sci. China Inf. Sci. 2020, 63, 211301. [Google Scholar] [CrossRef]
  10. Min, X.; Zhou, J.; Zhai, G.; Le Callet, P.; Yang, X.; Guan, X. A Metric for Light Field Reconstruction, Compression, and Display Quality Evaluation. IEEE Trans. Image Process. 2020, 29, 3790–3804. [Google Scholar] [CrossRef]
  11. Min, X.; Ma, K.; Gu, K.; Zhai, G.; Wang, Z.; Lin, W. Unified Blind Quality Assessment of Compressed Natural, Graphic, and Screen Content Images. IEEE Trans. Image Process. 2017, 26, 5462–5474. [Google Scholar] [CrossRef]
  12. Pustokhina, I.V.; Pustokhin, D.A.; Rodrigues, J.J.P.C.; Gupta, D.; Khanna, A.; Shankar, K.; Seo, C.; Joshi, G.P. Automatic Vehicle License Plate Recognition Using Optimal K-Means with Convolutional Neural Network for Intelligent Transportation Systems. IEEE Access 2020, 8, 92907–92917. [Google Scholar] [CrossRef]
  13. Tourani, A.; Shahbahrami, A.; Soroori, S.; Khazaee, S.; Suen, C.Y. A Robust Deep Learning Approach for Automatic Iranian Vehicle License Plate Detection and Recognition for Surveillance Systems. IEEE Access 2020, 8, 201317–201330. [Google Scholar] [CrossRef]
  14. Zou, Y.; Zhang, Y.; Yan, J.; Jiang, X.; Huang, T.; Fan, H.; Cui, Z. A Robust License Plate Recognition Model Based on Bi-LSTM. IEEE Access 2020, 8, 211630–211641. [Google Scholar] [CrossRef]
  15. Zhang, S.; Tang, G.; Liu, Y.; Mao, H. Robust License Plate Recognition with Shared Adversarial Training Network. IEEE Access 2020, 8, 697–705. [Google Scholar] [CrossRef]
  16. Huang, Q.; Cai, Z.; Lan, T. A Single Neural Network for Mixed Style License Plate Detection and Recognition. IEEE Access 2021, 9, 21777–21785. [Google Scholar] [CrossRef]
  17. Henry, C.; Ahn, S.Y.; Lee, S.-W. Multinational License Plate Recognition Using Generalized Character Sequence Detection. IEEE Access 2020, 8, 35185–35199. [Google Scholar] [CrossRef]
  18. Chen, S.-L.; Yang, C.; Ma, J.-W.; Chen, F.; Yin, X.-C. Simultaneous End-to-End Vehicle and License Plate Detection with Multi-Branch Attention Neural Network. IEEE Trans. Intell. Transp. Syst. 2020, 21, 3686–3695. [Google Scholar] [CrossRef]
  19. Sharma, V.; Mir, R.N. Saliency guided faster-RCNN (SGFr-RCNN) model for object detection and recognition. J. King Saud Univ.-Comput. Inf. Sci. 2022, 34, 1687–1699. [Google Scholar] [CrossRef]
  20. Cai, C.; Xu, H.; Chen, S.; Yang, L.; Weng, Y.; Huang, S.; Dong, C.; Lou, X. Tree Recognition and Crown Width Extraction Based on Novel Faster-RCNN in a Dense Loblolly Pine Environment. Forests 2023, 14, 863. [Google Scholar] [CrossRef]
  21. Kim, W.; Dehghan, F.; Cho, S. Vehicle License Plate Recognition System using SSD-Mobilenet and ResNet for Mobile Device. Korean Inst. Smart Media 2020, 9, 92–98. [Google Scholar] [CrossRef]
  22. Castro-Zunti, R.D.; Yépez, J.; Ko, S. License plate segmentation and recognition system using deep learning and OpenVINO. IET Intell. Transp. Syst. 2020, 14, 119–126. [Google Scholar] [CrossRef]
  23. Hendry; Chen, R.-C. Automatic License Plate Recognition via sliding-window darknet-YOLO deep learning. Image Vis. Comput. 2019, 87, 47–56. [Google Scholar] [CrossRef]
  24. Jamtsho, Y.; Riyamongkol, P.; Waranusast, R. Real-time Bhutanese license plate localization using YOLO. ICT Express 2020, 6, 121–124. [Google Scholar] [CrossRef]
  25. Min, W.; Li, X.; Wang, Q.; Zeng, Q.; Liao, Y. New approach to vehicle license plate location based on new model YOLO-L and plate pre-identification. IET Image Process. 2019, 13, 1041–1049. [Google Scholar] [CrossRef]
  26. Lin, H.; Zhao, J.; Li, S.; Qiu, G. License plate location method based on edge detection and mathematical morphology. In Proceedings of the 2020 IEEE 4th Information Technology, Networking, Electronic and Automation Control Conference (ITNEC), Chongqing, China, 12–14 June 2020. [Google Scholar] [CrossRef]
  27. Davix, X.A.; Christopher, C.S.; Christine, S.S. License Plate Detection Using Channel Scale Space and Color Based Detection Method. In Proceedings of the 2017 IEEE International Conference on Circuits and Systems (ICCS), Thiruvananthapuram, India, 20–21 December 2017. [Google Scholar] [CrossRef]
  28. Mahmood, Z.; Khan, K.; Khan, U.; Adil, S.H.; Ali, S.S.A.; Shahzad, M. Towards Automatic License Plate Detection. Sensors 2022, 22, 1245. [Google Scholar] [CrossRef] [PubMed]
  29. Zhang, J.; Li, Y.; Li, T.; Xun, L.; Shan, C. License Plate Localization in Unconstrained Scenes Using a Two-Stage CNN-RNN. IEEE Sens. J. 2019, 19, 5256–5265. [Google Scholar] [CrossRef]
  30. Xie, L.; Ahmad, T.; Jin, L.; Liu, Y.; Zhang, S. A New CNN-Based Method for Multi-Directional Car License Plate Detection. IEEE Trans. Intell. Transp. Syst. 2018, 19, 507–517. [Google Scholar] [CrossRef]
  31. Iqbal, A.; Jain, T. Synchrophasor based Data Driven Approach for Fault Identification using Multi-class Support Vector Machine. In Proceedings of the 2020 21st National Power Systems Conference (NPSC), Gandhinagar, India, 17–19 December 2020. [Google Scholar] [CrossRef]
  32. Islam, R.; Islam, M.R.; Talukder, K.H. An efficient method for extraction and recognition of bangla characters from vehicle license plates. Multimed. Tools Appl. 2020, 79, 20107–20132. [Google Scholar] [CrossRef]
  33. Ghahnavieh, A.E.; Amirkhani-Shahraki, A.; Raie, A.A. Enhancing the license plates character recognition methods by means of SVM. In Proceedings of the 2014 22nd Iranian Conference on Electrical Engineering (ICEE), Tehran, Iran, 20–22 May 2014; pp. 220–225. [Google Scholar]
  34. Ye, X.; Li, Y.; Tong, L.; He, L. Remote sensing retrieval of suspended solids in Longquan Lake based on GA-SVM model. In Proceedings of the 2017 IEEE International Geoscience and Remote Sensing Symposium (IGARSS), Fort Worth, TX, USA, 23–28 July 2017; pp. 5501–5504. [Google Scholar]
  35. Song, G.; Zuo, Z. SVM License Plate Recognition Method Based on PSO Algorithm. In Proceedings of the 2022 4th International Academic Exchange Conference on Science and Technology Innovation (IAECST), Guangzhou, China, 9–11 December 2022; pp. 1065–1068. [Google Scholar]
  36. Hu, Y.; Zhang, J.; Jiang, W.; Sun, R. Chinese Pop Music Emotion Classification Based on FA-SVM. In Proceedings of the 2018 International Conference on Control, Automation and Information Sciences (ICCAIS), Hangzhou, China, 24–27 October 2018; pp. 233–237. [Google Scholar]
  37. Yu, X.; Zhang, A.; Mu, W.; Huo, X. Fault Diagnosis of Analog Circuit Based CS_SVM Algorithm. In Proceedings of the 2020 IEEE 9th Data Driven Control and Learning Systems Conference (DDCLS), Liuzhou, China, 20–22 November 2020; pp. 427–431. [Google Scholar]
  38. Dong, J.; Zhang, L.; Liu, Z.; Lin, Z.; Cai, Z. An Action Recognition Method Based on Radar Signal with Improved GWO-SVM Algorithm. In Proceedings of the 2021 IEEE International Conference on Progress in Informatics and Computing (PIC), Shanghai, China, 17–19 December 2021; pp. 415–419. [Google Scholar]
  39. Singh, S.; Sehgal, V.K. A Comprehensive Study: Image Forensic Analysis Traditional to Cognitive Image Processing. In Proceedings of the 2022 8th International Conference on Signal Processing and Communication (ICSC), Noida, India, 1–3 December 2022; pp. 236–243. [Google Scholar]
  40. Awalgaonkar, N.; Bartakke, P.; Chaugule, R. Automatic License Plate Recognition System Using SSD. In Proceedings of the 2021 International Symposium of Asian Control Association on Intelligent Robotics and Industrial Automation (IRIA), Goa, India, 20–22 September 2021; pp. 394–399. [Google Scholar]
  41. Ríos-Vila, A.; Rizo, D.; Iñesta, J.M.; Calvo-Zaragoza, J. End-to-end optical music recognition for pianoform sheet music. Int. J. Doc. Anal. Recognit. (IJDAR) 2023, 26, 347–362. [Google Scholar] [CrossRef]
  42. Peng, H.; Yu, J.; Nie, Y. Efficient Neural Network for Text Recognition in Natural Scenes Based on End-to-End Multi-Scale Attention Mechanism. Electronics 2023, 12, 1395. [Google Scholar] [CrossRef]
  43. Zhao, P.; Lu, C.X.; Wang, B.; Trigoni, N.; Markham, A. CubeLearn: End-to-End Learning for Human Motion Recognition From Raw mmWave Radar Signals. IEEE Internet Things J. 2023, 10, 10236–10249. [Google Scholar] [CrossRef]
  44. Deng, F.; Deng, L.; Jiang, P.; Zhang, G.; Yang, Q. ResSKNet-SSDP: Effective and Light End-To-End Architecture for Speaker Recognition. Sensors 2023, 23, 1203. [Google Scholar] [CrossRef]
  45. Obeidat, Y.M.; Alqudah, A.M. An Embedded System Based on Raspberry Pi for Effective Electrocardiogram Monitoring. Appl. Sci. 2023, 13, 8273. [Google Scholar] [CrossRef]
Figure 1. The system overview of the smart parking lock.
Figure 1. The system overview of the smart parking lock.
Sensors 23 08572 g001
Figure 2. Diagram of network structure.
Figure 2. Diagram of network structure.
Sensors 23 08572 g002
Figure 3. Graphical representation of SVM: (a) complex nonlinear classification problem representation in low-dimensional space and (b) linear classification problem representation in high-dimensional space.
Figure 3. Graphical representation of SVM: (a) complex nonlinear classification problem representation in low-dimensional space and (b) linear classification problem representation in high-dimensional space.
Sensors 23 08572 g003
Figure 4. GWO algorithm diagram.
Figure 4. GWO algorithm diagram.
Sensors 23 08572 g004
Figure 5. The specific flowchart.
Figure 5. The specific flowchart.
Sensors 23 08572 g005
Figure 6. Dataset annotation diagram.
Figure 6. Dataset annotation diagram.
Sensors 23 08572 g006
Figure 7. Training flowchart.
Figure 7. Training flowchart.
Sensors 23 08572 g007
Figure 8. Training loss curve.
Figure 8. Training loss curve.
Sensors 23 08572 g008
Figure 9. Accuracy rate change curve.
Figure 9. Accuracy rate change curve.
Sensors 23 08572 g009
Figure 10. The user software graphical user interface.
Figure 10. The user software graphical user interface.
Sensors 23 08572 g010
Figure 11. Parking lock effect diagram.
Figure 11. Parking lock effect diagram.
Sensors 23 08572 g011
Table 1. Comparison results of character recognition experiments.
Table 1. Comparison results of character recognition experiments.
AlgorithmsChinese CharacterLetterArabic Numerals
SVM [33]87.09%92.00%95.00%
GA-SVM [34]96.88%99.20%99.14%
PSO-SVM [35]95.14%99.42%99.43%
FA-SVM [36]96.16%99.31%99.35%
CS-SVM [37]96.06%98.91%99.09%
GWO-SVM [38]97.97%99.77%99.80%
Table 2. Comparison results of model optimization speed.
Table 2. Comparison results of model optimization speed.
AlgorithmsThe Time for Optimization of Small Samples (s)Parameter Settings
GA-SVM [34]613.04Dataset: 350
Iterations: 20
Population: 10
PSO-SVM [35]243.16
CS-SVM [36]106.46
FA-SVM [37]70.10
GWO-SVM [38]65.37
Table 3. Test results of license plate recognition algorithm.
Table 3. Test results of license plate recognition algorithm.
AlgorithmsRecognition Accuracy (%)Average Time (s)
Traditional image processing [39]72.00.053
Hyper-LPR [40]83.41.204
UNET-GWO-SVM94.30.216
UNET+CNN (AlexNet)93.70.923
Table 4. Field measurement datasheet of the parking lock.
Table 4. Field measurement datasheet of the parking lock.
AlgorithmsExperimental ParametersError = 0Error ≤ 1Error ≤ 2
UNET-GWO-
SVM
Identification quantity96100101
Effective unlocking rate (%)94.1%98.0%99.0%
Average time (s)2.681
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.

Share and Cite

MDPI and ACS Style

Shen, J.; Xia, Y.; Ding, H.; Cabrel, W. Smart Parking Locks Based on Extended UNET-GWO-SVM Algorithm. Sensors 2023, 23, 8572. https://doi.org/10.3390/s23208572

AMA Style

Shen J, Xia Y, Ding H, Cabrel W. Smart Parking Locks Based on Extended UNET-GWO-SVM Algorithm. Sensors. 2023; 23(20):8572. https://doi.org/10.3390/s23208572

Chicago/Turabian Style

Shen, Jianguo, Yu Xia, Hao Ding, and Wen Cabrel. 2023. "Smart Parking Locks Based on Extended UNET-GWO-SVM Algorithm" Sensors 23, no. 20: 8572. https://doi.org/10.3390/s23208572

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop