Next Article in Journal
Study of HgCdTe (100) and HgCdTe (111)B Heterostructures Grown by MOCVD and Their Potential Application to APDs Operating in the IR Range up to 8 µm
Next Article in Special Issue
Are You Wearing a Mask? Detecting If a Person Wears a Mask Using a Wristband
Previous Article in Journal
AdPSO: Adaptive PSO-Based Task Scheduling Approach for Cloud Computing
Previous Article in Special Issue
Status Estimation and In-Process Connection of Kanbans Using BLE Beacons and LPWA Network to Implement Intra-Traceability for the Kanban System
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

An All-in-One Vehicle Type and License Plate Recognition System Using YOLOv4

1
Contents Convergence Research Center, Korea Electronics Technology Institute, Mapo-gu, Seoul 03924, Korea
2
Division of Computer Engineering, Hanshin University, Osan-si 18101, Korea
*
Author to whom correspondence should be addressed.
Sensors 2022, 22(3), 921; https://doi.org/10.3390/s22030921
Submission received: 8 December 2021 / Revised: 19 January 2022 / Accepted: 24 January 2022 / Published: 25 January 2022
(This article belongs to the Special Issue Internet of Things for Smart Homes and Industrial Application)

Abstract

:
In smart surveillance and urban mobility applications, camera-equipped embedded platforms with deep learning technology have demonstrated applicability and effectiveness in identifying various targets. These use cases can be found in a variety of contexts and locations. It is critical to collect relevant data from the location where the application will be deployed. In this paper, we propose an integrated vehicle type and license plate recognition system using YOLOv4, which consists of vehicle type detection, license plate detection, and license plate character detection to better support the context of Korean vehicles in multilane highway and urban environments. Using our dataset of one to four multilane images, our system detected six vehicle classes and license plates with mAP of 98.0%, 94.0%, 97.1%, and 84.6%, respectively. On our dataset and a publicly available open dataset, our system demonstrated mAP of 99.3% and 99.4% for the detected license plates, respectively. From 4K high-resolution images, our system was able to detect minuscule license plates as small as 100 pixels wide. We believe that our system can be used in densely populated regions to address the high demands for enhanced visual sensitivity in smart cities and Internet-of-Things.

1. Introduction

Computer vision applications automate repetitive tasks that require the human ability and attention to continuously monitor and make timely decisions. A profusion of such applications has been developed to detect, identify, and track various objects of interest. Recent advancements in smart city technologies [1] have enabled a plethora of visual sensors to be installed in the intelligent environment and smart infrastructure, such as closed-circuit television (CCTV), visual sensor networks [2], smart surveillance [3], intelligent traffic systems [1,4], security cameras, and black boxes in vehicles. A series of state-of-the-art deep learning techniques for challenging computer vision problems [5] can detect and identify a vast number of diverse objects across categories on a grand scale. Individuals and their vehicles are significant subjects of interest in large cities and metropolitan regions, which smart cameras try to recognize. A large number of license plate recognition (LPR) [6,7,8] and make and model recognition (MMR) [9,10,11] systems have been developed to relieve human operators of the tedious task of explicitly detecting, identifying, and recognizing a wide range of cars, as illustrated in Figure 1.
In this regard, we are particularly motivated to recognize modern Korean vehicle types (VT) and Korean license plates (LP) in areas with high vehicle density in South Korea. The number of cars registered in South Korea exceeded 24 million in 2020, according to the Korean Statistical Information Service, which is roughly equivalent to one car per 2.19 people or 456.6 cars per 1000 people. Furthermore, Seoul (i.e., the capital and largest metropolis of South Korea) is one of the most surveilled cities in the world, boasting 77,564 cameras for 234 square miles or 331.94 cameras per square mile (source: https://www.comparitech.com/vpn-privacy/the-worlds-most-surveilled-cities/, accessed on 7 December 2021). In an ever-increasingly complex urban environment, we propose an all-in-one system named KVT-LPR which stands for Korean vehicle type and license plate recognition system, capable of identifying both VTs and LPs in the same processing pipeline.
Our contributions in this paper are as follows.
  • We propose a two-phase architecture based on YOLOv4 [12] for detecting vehicle types and recognizing Korean LPs in one pipeline.
  • We collect and build a custom dataset for various Korean vehicle types and LPs captured from multilanes to train and validate two custom detectors in the KVT-LPR.
  • We show that the KVT-LPR effectively detects small license plates from 4K high-resolution input images, which is an enhancement over previous detectors.
  • We demonstrate the feasibility and applicability of the KVT-LPR’s practically deployed detection performance in different settings across two datasets (i.e., a custom dataset and a publicly open dataset) and two target platforms (i.e., from a high-end to an embedded solution).

2. Related Work

There have been a series of attempts to build faster and more accurate LPR systems. In recent years, deep learning-based approaches, such as single shot detector (SSD) [13] and You Only Look Once (YOLO)-based models [12,14,15,16], have been used to detect and recognize LPs. YOLO was first designed to provide fast detection speed, but it had low accuracy [14]. Despite the fact that YOLOv2 enhanced the speed and accuracy of object identification over its predecessor [15], the SSD still outperformed for smaller objects. YOLOv3’s accuracy has improved since then, but its detection speed has slowed down [16]. YOLOv4 has improved performance in both speed and accuracy compared to YOLOv3 [12]. Hendry and Chen tweaked the original YOLO to create an automatic license plate recognition (ALPR) system that had a detection accuracy of 98.22% and a recognition accuracy of 78.22% [17]. Laroca et al. developed an ALPR system based on YOLO that outperformed previous systems with a recognition rate of 96.9% when tested on public datasets [18]. Castro-Zunti et al. presented an SSD-based LPR system that accurately recognized 96.23% of the Caltech Cars dataset and 99.79% of the UCSD-Stills dataset [19].
There are several related LPR systems targeting Korean LPs and sharing similar approaches. Han et al. used the cascade structure with AdaBoost learning to offer a real-time LPR identification method for high-resolution videos [20]. Park et al. developed a multinational LPR system that recognizes multiple Korean LP styles (i.e., single-line, double-line, various layout formats) using the K-nearest neighbors method [21]. By adding spatial pyramid pooling to YOLOv3, Kim et al. developed a multiscale vehicle detection that outperformed other detectors [22]. For recognizing multinational LPs, including Korean LPs, Henry et al. presented an ALPR system based on YOLOv3 [23]. LP detection, unified character recognition, and multinational LP layout detection were all included in their system’s architecture. Initially, they have collected and made public their own Korean automobile plate dataset, known as KarPlate. However, due to legal issues, the dataset is no longer available. Sung et al. showed Korean LP identification performance on the NVIDIA Jetson TX2 board with their custom KETI-ALPR dataset that is not open to the public using YOLOv3, YOLOv4, and SSD [24]. To recognize Korean car types, Kim et al. evaluated faster-RCNN, YOLOv4, and SSD object identification approaches [25]. Their findings revealed that YOLOv4 outperformed SSD and faster-RCNN in terms of F1 score, precision, recall, and mAP. To deal with the problem of data sparsity in the training stage, Han et al. synthesized LPs using an ensemble of generative adversarial networks (GAN) [26]. Wang et al. developed a Korean LPR approach using deep learning and KarPlate dataset (when the dataset was still available) to recognize LPs under various conditions (i.e., fog and haze) [27]. Lim and Park proposed an AI machine learning system that can use CCTV images to check illegally parked cars with the LPR function [28].
In contrast to prior research, this study investigates the application of YOLOv4 for LPR and vehicle type recognition in the Korean environment with multilanes and high-resolution cameras. Table 1 compares previous studies in terms of their approaches, datasets, and system support features. Our system aims to better support the Korean context by using multilanes images collected from high-resolution cameras. The size of LPs will be small in high-resolution images. We employ YOLOv4 to recognize small LPs and vehicle types and to show that its performance is embedded-platform-ready.

3. Proposed Methodology

The goal of a typical LPR system is to output numbers and characters on LPs as text. Similarly, a typical MMR system identifies the vehicle’s make and model from several candidates. Our goal was to create an LPR system that could identify Korean LPs and recognize a variety of Korean vehicle types as defined by the Korean vehicle classification criteria. We present an all-in-one Korean vehicle type and LP recognition system, named KVT-LPR, that employs YOLOv4 as the underlying object detector model.
Figure 2 shows the overview of our KVT-LPR using YOLOv4. The KVT-LPR aims to identify vehicle types and recognize license plates from high-resolution (i.e., 4K resolution) and multilane images (i.e., one to four lanes). The details of the KVT-LPR system, including YOLOv4-based object detector and data collection processes, are elaborated in the following subsections. Moreover, detailed procedures of the two custom detectors (VT_LP detector and LPC detector) are visually illustrated in Section 4.

3.1. YOLOv4-Based Vehicle Type and License Plate Recognition

The KVT-LPR system processes a high-resolution input image (i.e., 3840 × 2160) decoded from a high-resolution video. We collected real Korean vehicle types and LPs to build our custom dataset. Then, we used the custom dataset to train using YOLOv4 to build two custom detectors. The first detector is a VT_LP detector, which detects seven classes (i.e., six different Korean vehicle types and LPs) in the input image. The second detector is an LPC detector, which detects 68 different numbers and characters on Korean LPs. The character size of LPs is small in relation to the entire image on a high-resolution image, making character identification more challenging. To overcome this problem, we included an LP cropping procedure to the KVT-LPR, which gives the LPC detector segmented LP regions. In phase 1, vehicle types and occurrences of LPs are detected by the VT_LP detector. If LPs are found, the cropped LP image for each LP is passed into the LPC detector for phase 2. To summarize, the VT_LP detector is called first to detect vehicle types and LPs, followed by the LPC detector for each LP found. If the input image contains a large number of LPs, the KVT-LPR’s overall turnaround time multiplies.

3.2. Dataset Collection and Preprocessing

3.2.1. Vehicle Types and LPs

We installed a camera on a highway overpass to manually record real traffic videos in order to collect various vehicle types and LP images that represent the context and environment of South Korea, as shown in Figure 3.
The camera overlooking the highway (i.e., two-lane, three-lane, and four-lane) captured traffic videos at 3840 × 2160. We also recorded videos with a smartphone camera at 3840 × 2160. Images including one or more vehicles were extracted from the recorded video and used as training data for the custom detectors. Figure 4 shows examples of captured raw images that qualify for training uses.
The collected dataset is manually labeled by using an open-source tool LabelImg (Tzutalin (TzuTa, Canada), LabelImg, Git code (2015). https://github.com/tzutalin/labelImg, accessed on 7 December 2021) to annotate bounding boxes on the target objects. For example, we annotated a bounding box on LPs and the front of a vehicle covering the front window and the bumper, as shown in Figure 5.
To label different vehicle types, we referenced a vehicle classification according to the vehicle size and passenger capacity used by the Korea Expressway Corporation (https://www.ex.co.kr/portal/usefee/selectUseFeeNList.do, accessed on 7 December 2021). We classified vehicles into six categories based on the vehicle size and passenger capacity. The smallest vehicles or compact cars were labeled as ‘compact’. Vehicles capable of holding nine or fewer passengers were labeled as ‘car’. Vehicles with a capacity of 25 or fewer passengers were labeled as ‘mini van’. Big vans with 25 or more passengers were labeled as ‘bus (big van)’. Smaller two-axle freight vehicles were labeled as ‘mini truck’, and three-or-more-axle freight vehicles were labeled as ‘truck’. The six vehicle types we labeled in our dataset are shown in Figure 6. Table 2 shows the collected dataset of six vehicle types and LPs.

3.2.2. LP Numbers and Characters

The recorded videos were also used to manually label Korean LP numbers and characters. We also took additional pictures of LPs with a smartphone camera. LP areas were segmented and used as training data from these sources. In the case of LPs, a bounding box was drawn over the four vertices of an LP. Furthermore, bounding boxes were annotated on each number or character on LPs, as shown in Figure 7.
Over 60,000 occurrences of Korean LP numbers and characters were collected and grouped into 68 classes (i.e., numbers 0 to 9: class 0 to 9, 41 Korean characters: class 10 to 50, and 17 local area prefixes: class 51 to 67). Figure 8 shows different Korean LP styles, including single-line and double-line LPs. Area prefixes and predesignated Korean characters can be found on older LPs and special-purpose vehicles. Table 3 and Table 4 show the collected dataset for Korean LP numbers and characters. Note that we were not able to collect all LP characters, and numerous local area prefixes were left out (highlighted in gray in Table 4).

4. Experiments

To evaluate the feasibility and effectiveness of the KVT-LPR system, we evaluated the KVT-LPR system’s capability of detecting small LPs, detection speed, the performance of vehicle type detection, and the performance of LPR.

4.1. Implementation

To implement our proposed KVT-LPR system, we used YOLOv4 [12] as the underlying object detector. We used an open-source darknet framework to train YOLOv4 to detect our custom set of classes (i.e., vehicle types, LP, and LP characters). We had previously experimented with several image input sizes before settling on a 256 × 256 image input size for YOLOv4 [24]. We discovered a considerable performance decrease on the lower-end embedded platform, despite the fact that a bigger input size, such as 608, increased accuracy.
Figure 9 and Figure 10 show the training loss and the mean average precision at 50% intersection-over-union threshold (mAP @ 0.5). For the VT_LP detector, the collected dataset was used as 70% train, 17.5% validation, and 12.5% test sets for each class. For the LPC detector, we used the collected dataset as 80% train and 20% test sets for all classes.

4.2. Minimum Detectable LP Size

The KVT-LPR aims to recognize multiple vehicle types and LPs in multilane highways. This means that the size of LPs will be small even in high-resolution images (i.e., 4K resolution) when multiple lanes are observed. To see how our system performs on multilane images, we recorded the detected LPs’ sizes by running test images of one-lane, two-lane, three-lane, and four-lane highways, respectively. The recorded LP sizes were sorted in ascending order of width. For brevity of results, we calculated the average of the first 100 ordered LP sizes. Table 5 shows the smallest 20 LP sizes for each lane with the calculated average. The average LP sizes in the different lanes are visualized in Figure 11.

4.3. Detection Speed

To measure the detection speed of the KVT-LPR, we used images that contain one car and one LP per lane. This means that one-lane test images (33 images) contained one car and one LP, and two-lane test images (20 images) contained two cars and two LPs. Likewise, three-lane test images (22 images) contained three cars and three LPs, and four-lane test images (19 images) contained four cars and four LPs. Figure 12 shows the examples of test images.
The detection speed is defined as the time it takes to detect vehicle type and LP (phase 1, VT LP detector) and the time it takes to recognize LP characters from a cropped LP image (phase 2, LPC detector). Two platforms running Ubuntu 18.04 were evaluated: a PC with an RTX3090 graphics card (representing a high-end specification, GeForce RTX3090, NVIDIA CUDA Cores 10496, memory 24 GB, AMD Ryzen 7 3700X 8-core processor, 16 GB main memory) and a Jetson AGX Xavier (representing a low-end or embedded specification, 512-core NVIDIA Volta GPU with 64 tensor cores, 8-core ARM® v8.2 64-bit CPU, 8 MB L2 + 4 MB L3, 32 GB 256-bit LPDDR4x | 137GB/s, 32GB eMMC 5.1). Table 6 and Table 7 show the measured detection speed on two platforms. The detection speed for the VT_LP detector or phase 1 is comparable across different multilanes. However, the detection speed for the LPC detector or phase 2 is significantly reduced. This can be explained by the fact that the VT_LP detector detects only seven classes, whereas the LPC detector detects a magnitude more classes.

4.4. Vehicle Type and LP Detection Performance

In the KVT-LPR, the VT_LP detector detects seven classes (LP and six vehicle types). To evaluate the performance of the VT_LP detector, we used typical metrics used for object detection, including precision (Equation (1)), recall (Equation (2)), F1-score (Equation (3)), average IOU (Equation (4)), average precision (Equation (5)), and mAP (Equation (6)).
Precision ( P ) = T P T P + F P
Recall ( R ) = T P T P + F N
F 1 - score = 2 × P × R P + R
Average IOU = T P T P + F P + T N
Average Precision ( AP ) = n ( R n R n 1 ) P n
mAP = 1 N i = 1 N A P i
We ran the VT_LP detector with 222 one-lane, 140 two-lane, 183 three-lane, and 133 four-lane test set images, respectively. The vehicle type and LP detection results are shown in Table 8 and Table 9. Our detector stably performed for one-lane, two-lane, and three-lane test images, demonstrating mAPs of 98.0%, 94.0%, and 97.1%, respectively. The most complicated scenario, four-lane, yielded an mAP of 84.6%. The most common cause of failure on three- and four-lane highways is incorrect detection of partially contained vehicles in the upper zone. This can be avoided by pushing the recognition area to the center of the image.
Figure 13 shows examples of successfully detected vehicle types with the VT_LP detector.

4.5. License Plate Recognition Performance

Phase 2 of the proposed KVT-LPR system was evaluated according to the same metrics. The LPC detector detects 68 classes (i.e., numbers 0 to 9, 17 local area prefixes, and 41 Korean characters). First, we used our custom dataset to evaluate the performance of the LPC detector. As mentioned earlier, our dataset does not include several local area prefixes (i.e., 광주 (Gwangju), 대전 (Daejeon), 세종 (Sejong), 울산 (Ulsan), 전남 (Jeonnam), 전북 (Jeonbuk), 제주 (Jeju) ). Additionally, we used a publicly available LP dataset from AI-Hub (https://aihub.or.kr/aidata/27727, accessed on 7 December 2021). This open dataset includes 100,000 cropped car number plates in JPG format. We excluded local area prefixes not collected in our dataset. We tried to gather another open dataset, such as KarPlate dataset [23], but it was no longer available due to legal issues. There are other approaches, such as synthetically generating LPs [26] and synthetic LP dataset (https://www.idai.or.kr/user/data_market/detail.do?id=63af9c70-ce79-11eb-ba8d-eb1fdd80455f, accessed on 7 December 2021), but we only evaluated our detector with the real data. Figure 14 shows LPR results on our custom dataset. Figure 15 shows LPR results on the AI-Hub dataset.
Table 10 shows the performance of the LPC detector according to the evaluation metrics, and Table 11 shows the detailed per-class results. With relatively few false positives and false negatives, the LPC detector had an adjusted mAP (i.e., eliminating classes with no or sparse data) of 99.30% for our custom dataset and 99.41% for the publicly open AI-Hub dataset.

4.6. Discussion

Typical LPR systems use the camera view to monitor and check the LP of a single vehicle. The throughput (i.e., the number of LPs detected) of an LPR system can be enhanced and the deployment cost can be decreased if it can check multiple vehicles in several lanes. The proposed KVT-LPR showed that using multilane high-resolution images for LPR and vehicle type detection is possible. Table 5 shows how our system successfully detected small LP sizes of about 100 pixels. The KVT-LPR can be deployed on an embedded platform such as Jetson AGX. Table 7 shows that a standalone KVT-LPR configuration is feasible, but a networked-system (i.e., sending images to servers for recognition) approach can compensate for its shortcomings.
Our approach has some limitations. First, not all possible Korean LP styles and characters were collected in our dataset. Due to the geographical distance between other regions (i.e., cities and provinces) and our data collection location, several LPs with local area prefixes were left out. More data on those missing locations can be collected to improve our dataset. Second, the vehicle type detection can be improved by disregarding partially visible vehicles in images. In three-lane and four-lane images, those partially visible vehicles often resulted in failure cases. Third, our method assumes that the front view of the vehicle is captured. When the vehicle’s rearview is used for recognition, vehicle type detection using the VT_LP detector is not possible due to this constraint. Regardless, LPR via the LPC detector works in both frontal and rear views. Lastly, as with many previous LPR studies, our dataset is not disclosed for legal reasons (i.e., obtaining the vehicle owner’s consent for distribution and reuse).

5. Conclusions

This paper proposed KVT-LPR, a two-phase LPR system based on YOLOv4 for Korean vehicles and LPs. Using 4K high-resolution input images, six vehicle types and LPs are detected by the VT_LP detector, followed by the LPC detector for LPR. The KVT-LPR is applicable to settings (i.e., highly populated and multilane highways in Korea) where the size of LPs is small. Across two datasets (our custom dataset and an open public dataset) and two target systems (RTX3090 and Jetson AGX), two custom detectors in the KVT-LPR demonstrated LPR performance suitable for both high-end and embedded platforms.
Our approach has limitations and drawbacks discussed in previous sections that deserve further research. For example, our dataset can be extended to include national coverage and special purpose vehicles. Moreover, to optimize LPR performance in designated settings (i.e., standalone, over-the-network, on edge devices), various network parameters, including image input size for YOLOv4 or other object detectors, can be compared, and trade-offs can be analyzed. Nonetheless, we have demonstrated the merits of our proposed KVT-LPR to effectively address Korean LPR with vehicle type detection that can be used in various complex smart city applications.

Author Contributions

Conceptualization, S.-H.P. and H.Y.; methodology, S.-H.P., S.-B.Y. and J.-A.K.; software, S.-B.Y. and J.-A.K.; validation, S.-H.P., S.-B.Y. and H.Y.; formal analysis, S.-B.Y. and H.Y.; investigation, S.-B.Y. and H.Y.; resources, S.-H.P.; data curation, J.-A.K. and S.-B.Y.; writing—original draft preparation, S.-H.P., S.-B.Y. and H.Y.; writing—review and editing, H.Y.; visualization, S.-B.Y. and H.Y.; supervision, S.-H.P. and H.Y.; project administration, S.-H.P.; funding acquisition, S.-H.P. All authors have read and agreed to the published version of the manuscript.

Funding

This work was supported by the IT R&D program of MOTIE/KEIT (10077018, Development of integrated embedded platform and commercial prototype equipped with high-speed LPR function).

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

All the participants are the authors themselves.

Acknowledgments

We thank the members of the Contents Convergence Research Center at KETI for their help in labeling the data we obtained for experiments. In Figure 1, photos with a free license to use were included for illustrative purposes.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Gharaibeh, A.; Salahuddin, M.A.; Hussini, S.J.; Khreishah, A.; Khalil, I.; Guizani, M.; Al-Fuqaha, A. Smart Cities: A Survey on Data Management, Security, and Enabling Technologies. IEEE Commun. Surv. Tutor. 2017, 19, 2456–2501. [Google Scholar] [CrossRef]
  2. Winkler, T.; Rinner, B. Security and Privacy Protection in Visual Sensor Networks: A Survey. ACM Comput. Surv. 2014, 47, 2. [Google Scholar] [CrossRef]
  3. Baran, R.; Rusc, T.; Fornalski, P. A smart camera for the surveillance of vehicles in intelligent transportation systems. Multimed. Tools Appl. 2016, 75, 10471–10493. [Google Scholar] [CrossRef] [Green Version]
  4. Won, M. Intelligent Traffic Monitoring Systems for Vehicle Classification: A Survey. IEEE Access 2020, 8, 73340–73358. [Google Scholar] [CrossRef]
  5. Liu, L.; Ouyang, W.; Wang, X.; Fieguth, P.; Chen, J.; Liu, X.; Pietikäinen, M. Deep learning for generic object detection: A survey. Int. J. Comput. Vis. 2020, 128, 261–318. [Google Scholar] [CrossRef] [Green Version]
  6. Anagnostopoulos, C.E.; Anagnostopoulos, I.E.; Psoroulas, I.D.; Loumos, V.; Kayafas, E. License Plate Recognition From Still Images and Video Sequences: A Survey. IEEE Trans. Intell. Transp. Syst. 2008, 9, 377–391. [Google Scholar] [CrossRef]
  7. Shashirangana, J.; Padmasiri, H.; Meedeniya, D.; Perera, C. Automated License Plate Recognition: A Survey on Methods and Techniques. IEEE Access 2020, 9, 11203–11225. [Google Scholar] [CrossRef]
  8. Du, S.; Ibrahim, M.; Shehata, M.; Badawy, W. Automatic license plate recognition (ALPR): A state-of-the-art review. IEEE Trans. Circuits Syst. Video Technol. 2013, 23, 311–325. [Google Scholar] [CrossRef]
  9. Hsieh, J.; Chen, L.; Chen, D. Symmetrical SURF and Its Applications to Vehicle Detection and Vehicle Make and Model Recognition. IEEE Trans. Intell. Transp. Syst. 2014, 15, 6–20. [Google Scholar] [CrossRef]
  10. Siddiqui, A.J.; Mammeri, A.; Boukerche, A. Real-Time Vehicle Make and Model Recognition Based on a Bag of SURF Features. IEEE Trans. Intell. Transp. Syst. 2016, 17, 3205–3219. [Google Scholar] [CrossRef]
  11. Manzoor, M.A.; Morgan, Y.; Bais, A. Real-Time Vehicle Make and Model Recognition System. Mach. Learn. Knowl. Extr. 2019, 1, 611–629. [Google Scholar] [CrossRef] [Green Version]
  12. Bochkovskiy, A.; Wang, C.-Y.; Liao, H.-Y.M. Yolov4: Optimal speed and accuracy of object detection. arXiv 2020, arXiv:2004.10934. [Google Scholar]
  13. Liu, W.; Anguelov, D.; Erhan, D.; Szegedy, C.; Reed, S.; Fu, C.-Y.; Berg, A.C. SSD: Single shot MultiBox detector. In Proceedings of the European Conference on Computer Vision, Amsterdam, The Netherlands, 11–14 October 2016; Springer International Publishing: Cham, Switzerland, 2016; pp. 21–37. [Google Scholar]
  14. Redmon, J.; Divvala, S.; Girshick, R.; Farhadi, A. You only look once: Unified, real-time object detection. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Las Vegas, NV, USA, 27–30 June 2016; pp. 779–788. [Google Scholar]
  15. Redmon, J.; Farhadi, A. YOLO9000: Better, faster, stronger. In Proceedings of the 2017 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Honolulu, HI, USA, 21–26 July 2017. [Google Scholar]
  16. Redmon, J.; Farhadi, A. Yolov3: An incremental improvement. arXiv 2018, arXiv:1804.02767. [Google Scholar]
  17. 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]
  18. Laroca, R.; Zanlorensi, L.A.; Gonçalves, G.R.; Todt, E.; Schwartz, W.R.; Menotti, D. An efficient and layout-independent automatic license plate recognition system based on the YOLO detector. IET Intell. Transp. Syst. 2021, 15, 483–503. [Google Scholar] [CrossRef]
  19. Castro-Zunti, R.D.; Yépez, J.; Ko, S.-B. License plate segmentation and recognition system using deep learning and OpenVINO. IET Intell. Transp. Syst. 2020, 14, 119–126. [Google Scholar] [CrossRef]
  20. Han, B.-G.; Lee, J.T.; Lim, K.-T.; Chung, Y. Real-time license plate detection in high-resolution videos using fastest available cascade classifier and core patterns. ETRI J. 2015, 37, 251–261. [Google Scholar] [CrossRef]
  21. Park, S.; Yoon, H.; Park, S. Multi-style license plate recognition system using k-nearest neighbors. KSII Trans. Internet Inf. Syst. (TIIS) 2019, 13, 2509–2528. [Google Scholar]
  22. Kim, K.-J.; Kim, P.-K.; Chung, Y.-S.; Choi, D.-H. Multi-scale detector for accurate vehicle detection in traffic surveillance data. IEEE Access 2019, 7, 78311–78319. [Google Scholar] [CrossRef]
  23. 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]
  24. Sung, J.-Y.; Yu, S.-B.; Park, S.-H. Real-time automatic license plate recognition system using YOLOv4. In Proceedings of the 2020 IEEE International Conference on Consumer Electronics-Asia (ICCE-Asia), Seoul, Korea, 1–3 November 2020. [Google Scholar]
  25. Kim, J.-A.; Sung, J.-Y.; Park, S.-H. Comparison of faster-RCNN, YOLO, and SSD for real-time vehicle type recognition. In Proceedings of the 2020 IEEE International Conference on Consumer Electronics-Asia (ICCE-Asia), Seoul, Korea, 1–3 November 2020. [Google Scholar]
  26. Han, B.-G.; Lee, J.T.; Lim, K.-T.; Choi, D.-H. License plate image generation using generative adversarial networks for end-to-end license plate character recognition from a small set of real images. Appl. Sci. 2020, 10, 2780. [Google Scholar] [CrossRef] [Green Version]
  27. Wang, H.; Li, Y.; Dang, L.-M.; Moon, H. Robust Korean license plate recognition based on deep neural networks. Sensors 2021, 21, 4140. [Google Scholar] [CrossRef]
  28. Lim, D.; Park, D. AI analysis of illegal parking data at Seocho city. In Data Science and Digital Transformation in the Fourth Industrial Revolution, Studies in Computational Intelligence; Springer: Cham, Switzerland, 2021; Volume 929, pp. 165–178. [Google Scholar]
Figure 1. Pervasive visual sensors capture complex urban dynamics in smart cities.
Figure 1. Pervasive visual sensors capture complex urban dynamics in smart cities.
Sensors 22 00921 g001
Figure 2. The overview of the KVT-LPR system.
Figure 2. The overview of the KVT-LPR system.
Sensors 22 00921 g002
Figure 3. Data collection settings. Vehicles and LPs are captured using a camera fixed on a highway overpass with a residing operator controlling the data collection station.
Figure 3. Data collection settings. Vehicles and LPs are captured using a camera fixed on a highway overpass with a residing operator controlling the data collection station.
Sensors 22 00921 g003
Figure 4. Examples of captured raw images from the installed camera.
Figure 4. Examples of captured raw images from the installed camera.
Sensors 22 00921 g004
Figure 5. Labeling of vehicle types and license plates to be used for phase 1.
Figure 5. Labeling of vehicle types and license plates to be used for phase 1.
Sensors 22 00921 g005
Figure 6. Classification of six vehicle types.
Figure 6. Classification of six vehicle types.
Sensors 22 00921 g006
Figure 7. Labeling of LP numbers and characters to be used for phase 2.
Figure 7. Labeling of LP numbers and characters to be used for phase 2.
Sensors 22 00921 g007
Figure 8. Different Korean LP styles, including single- and double-line LPs containing Korean characters and numbers listed in Table 3 and Table 4.
Figure 8. Different Korean LP styles, including single- and double-line LPs containing Korean characters and numbers listed in Table 3 and Table 4.
Sensors 22 00921 g008
Figure 9. Training loss (blue) and mAP @ 0.5 (red) of the VT_LP detector in phase 1.
Figure 9. Training loss (blue) and mAP @ 0.5 (red) of the VT_LP detector in phase 1.
Sensors 22 00921 g009
Figure 10. Training loss (blue) and mAP @ 0.5 (red) of the LPC detector in phase 2.
Figure 10. Training loss (blue) and mAP @ 0.5 (red) of the LPC detector in phase 2.
Sensors 22 00921 g010
Figure 11. License plate sizes in one-lane, two-lane, three-lane, and four-lane images, represented to scale on 3840 × 2160 resolution.
Figure 11. License plate sizes in one-lane, two-lane, three-lane, and four-lane images, represented to scale on 3840 × 2160 resolution.
Sensors 22 00921 g011
Figure 12. Examples of multilane test images for measuring detection speed.
Figure 12. Examples of multilane test images for measuring detection speed.
Sensors 22 00921 g012
Figure 13. Examples of successfully detected vehicle types (car, mini van, mini truck, truck, bus) with the VT_LP detector in phase 1.
Figure 13. Examples of successfully detected vehicle types (car, mini van, mini truck, truck, bus) with the VT_LP detector in phase 1.
Sensors 22 00921 g013
Figure 14. Output examples of the LPC detector in phase 2 using our dataset which reads as `Yeong Gyeonggi 06 Jo 6435’, `92 Gu 4772’, `07 Bo 7291’, `Seoul 81 Sa 7477’, and `28 So 8691’, respectively.
Figure 14. Output examples of the LPC detector in phase 2 using our dataset which reads as `Yeong Gyeonggi 06 Jo 6435’, `92 Gu 4772’, `07 Bo 7291’, `Seoul 81 Sa 7477’, and `28 So 8691’, respectively.
Sensors 22 00921 g014
Figure 15. Output examples of the LPC detector in phase 2 using the AI-Hub dataset which reads as `03 Ma 9890’, `158 Ma 5155’, `Yeong Gyeonggi 06 So 8683’, `Seoul 84 Ba 1930’, and `02 Na 2509’.
Figure 15. Output examples of the LPC detector in phase 2 using the AI-Hub dataset which reads as `03 Ma 9890’, `158 Ma 5155’, `Yeong Gyeonggi 06 So 8683’, `Seoul 84 Ba 1930’, and `02 Na 2509’.
Sensors 22 00921 g015
Table 1. Comparison of recent Korean LPR systems.
Table 1. Comparison of recent Korean LPR systems.
SystemApproachDataset (Resolution)Korean LPMultilanesSmall LPVehicle TypeEmbedded Platform
Han et al. (2015) [20]Cascade StructureCustom (1624 × 1224)OXXXX
Park et al. (2019) [21]KNNCustom (1920 × 1080)OXXXX
Kim et al. (2019) [22]YOLOv3UA-DETRAC (960 × 540)XOXXX
Henry et al. (2020) [23]YOLOv3KarPlate (1920 × 1080)OXXXX
Sung et al. (2020) [24]YOLOv3KETI-ALPR (3840 × 2160)OXOXO
Kim et al. (2020) [25]Faster-RCNN, YOLOv4, SSDCustom (N/A)XXXOX
Han et al. (2020) [26]LP-GAN, YOLOv2Real + Synthetic (N/A)XXXXX
Wang et al. (2021) [27]YOLOv5, WPOD-NETKarPlate (1920 × 1080)OXOXX
Lim and Park (2021) [28]DNNCCTV images (N/A)OXXXX
Proposed (2021)Two phase YOLOv4Custom (3840 × 2160)OOOOO
Table 2. Our dataset of six vehicle types and LPs with corresponding distribution ratio.
Table 2. Our dataset of six vehicle types and LPs with corresponding distribution ratio.
ClassesMultilanes
TwoThreeFourTotalRatio (%)
License Plate40632411374687857.1
Car17571159230314626.1
Mini Truck563275418797.3
Compact292170385004.2
Mini Van28297153943.3
Truck11059121811.5
Bus48135660.6
Total7115418471512,044100.0
Table 3. Collected data for Korean LP numbers.
Table 3. Collected data for Korean LP numbers.
ClassCharacterTrainingValidationTestTotal
0045608716866117
1149789667446688
2238506805835113
3341717896085568
4436446575104811
5537757185585051
6634315985104539
7735447104874741
8834496354734557
9930815774344092
Total38,4837201559351,277
Table 4. Collected data for Korean LP characters; classes 55, 57, 60, 61, 63, 64, and 67 were not sufficiently collected (highlighted in gray).
Table 4. Collected data for Korean LP characters; classes 55, 57, 60, 61, 63, 64, and 67 were not sufficiently collected (highlighted in gray).
ClassCharacterTrainingValidationTestTotal
10가 (Ga)1373125193
11거 (Geo)1503626212
12고 (Go)1453527207
13구 (Gu)1403224196
14나 (Na)1513526212
15너 (Neo)1513527213
16노 (No)1413126198
17누 (Nu)1443226202
18다 (Da)1423225199
19더 (Deo)1453524204
20도 (Do)1423226200
21두 (Du)1802821229
22라 (Ra)1403125196
23러 (Reo)1732620219
24로 (Ro)1362821185
25루 (Ru)2173527279
26마 (Ma)1852620231
27머 (Meo)1543527216
28모 (Mo)1822620228
29무 (Mu)1533527215
30바 (Ba)656168120944
31배 (Bae)3310649
32버 (Beo)1413226199
33보 (Bo)1641916199
34부 (Bu)1631513191
35사 (Sa)1062721154
36서 (Seo)126119146
37소 (So)124129145
38수 (Su)1151311139
39아 (A)2595246357
40어 (Eo)1151815148
41영 (Yeong)5412975
42오 (O)1241715156
43우 (U)13288148
44자 (Ja)2645337354
45저 (Jeo)1161412142
46조 (Jo)1151611142
47주 (Ju)1371310160
48하 (Ha)1251513153
49허 (Heo)1171717151
50호 (Ho)1343219185
51강원 (Gangwon)1363522193
52경기 (Gyeonggi)1874438269
53경남 (Gyeongnam)1062516147
54경북 (Gyeongbuk)5111971
55광주 (Gwangju)5005
56대구 (Daegu)982216136
57대전 (Daejeon)0000
58부산 (Busan)205328
59서울 (Seoul)2836752402
60세종 (Sejong)0000
61울산 (Ulsan)3003
62인천 (Incheon)1653929233
63전남 (Jeonnam)5016
64전북 (Jeonbuk)3003
65충남 (Chungnam)3317660467
66충북 (Chungbuk)111113
67제주 (Jeju)0000
Total78321535118010,547
Table 5. Successfully detected smallest LPs in ascending order of their widths.
Table 5. Successfully detected smallest LPs in ascending order of their widths.
One-LaneTwo-LaneThree-LaneFour-Lane
Single-Line LPDouble-Line LPSingle-Line LPDouble-Line LPSingle-Line LPDouble-Line LPSingle-Line LPDouble-Line LP
WidthHeightWidthHeightWidthHeightWidthHeightWidthHeightWidthHeightWidthHeightWidthHeight
12869425013714949119729632102361133610659
23093425814915948125709625102441133610643
33649025813716440133759732102591153510651
43725426114016434133659922102541153310852
53728726213816536133779926102501183510858
637496262143165381347510030102441183211144
737890266126166381366510025102501193511265
838235267133166441377510026102461193711654
938481270142166271376810127103551193511667
1038489270147166371377010126103531193511762
1138496272119167321397310127103411203711754
1238752273118167381406810126103551202711844
1338889274153168331407010116103521213511975
1439195276156169341406710232103561213411958
1539189278155169411406910233103371213511960
1639284278156170391406310229103541213712275
1739398280136170351417510427103571213412265
1839391280143170351416810421103521213612364
1939595280151170401429010428103511212912471
2039565280152171381437110427103481223212458
Average40889304155176391537310827105541263514069
Table 6. Detection speed on a PC with RTX3090.
Table 6. Detection speed on a PC with RTX3090.
One-LaneTwo-LaneThree-LaneFour-Lane
Elapsed Time
(ms)
FPSElapsed Time
(ms)
FPSElapsed Time
(ms)
FPSElapsed Time
(ms)
FPS
VT_LP detector7.16139.717.28137.347.99125.088.33120.10
LPC detector17.7056.5129.8133.5544.2222.6254.4218.38
Table 7. Detection speed on Jetson AGX.
Table 7. Detection speed on Jetson AGX.
One-LaneTwo-LaneThree-LaneFour-Lane
Elapsed Time
(ms)
FPSElapsed Time
(ms)
FPSElapsed Time
(ms)
FPSElapsed Time
(ms)
FPS
VT_LP detector60.6816.4861.7416.2063.3515.7964.2515.56
LPC detector133.447.49220.264.54309.443.23375.082.67
Table 8. Vehicle type and LP detection, mAP at IOU = 0.5.
Table 8. Vehicle type and LP detection, mAP at IOU = 0.5.
ClassAverage Precision
One-LaneTwo-LaneThree-LaneFour-Lane
License Plate99.499.998.195.2
Car99.993.994.595.0
Mini Truck99.499.697.298.4
Compact87.575.098.175.0
Mini Van99.490.094.669.4
Truck100.0100.0100.075.0
Bus100.0100.0100.0100.0
mAP98.094.097.184.6
Table 9. Performance of the VT_LP detector.
Table 9. Performance of the VT_LP detector.
One-LaneTwo-LaneThree-LaneFour-Lane
Precision0.980.920.920.87
Recall0.990.970.980.94
F1-score0.990.950.950.90
Average IOU (%)90.387.590.877.8
Table 10. Performance of the LPC detector.
Table 10. Performance of the LPC detector.
Our DatasetAI-Hub Dataset
Precision0.991.00
Recall1.001.00
F1-Score0.991.00
Average IOU (%)92.8499.41
Table 11. Performance of the LPC detector per class; classes highlighted in gray are excluded for adjusted results.
Table 11. Performance of the LPC detector per class; classes highlighted in gray are excluded for adjusted results.
ClassOur DatasetAI-Hub Dataset
APTPFPAPTPFP
099.65868299.9344703
199.829651499.94553811
299.83679499.83505126
399.87788499.9555999
499.40654399.7644515
598.68718898.8047244
699.83597099.8747425
799.86709999.80442122
8100.00635099.9448246
999.83575199.8641860
가 (Ga)100.0031299.901980
거 (Geo)97.0734098.491975
고 (Go)100.0035199.001980
구 (Gu)100.0032097.501950
나 (Na)97.14340100.001990
너 (Neo)99.6835199.992003
노 (No)96.7730198.961972
누 (Nu)100.0032098.511980
다 (Da)100.0032099.491992
더 (Deo)97.0633096.501930
도 (Do)100.0032298.501973
두 (Du)100.0028099.8520010
라 (Ra)100.00310100.001980
러 (Reo)100.0026099.471966
로 (Ro)89.70251196.261932
루 (Ru)92.1432998.9219813
마 (Ma)100.0026099.001981
머 (Meo)99.8635096.051954
모 (Mo)100.0025098.791973
무 (Mu)100.0035098.171971
바 (Ba)100.00168198.802492
배 (Bae)100.00100000
버 (Beo)100.0032099.992004
보 (Bo)100.0019099.992004
부 (Bu)100.0015099.992015
사 (Sa)99.8726093.731982
서 (Seo)100.0011099.9820022
소 (So)100.0012099.991994
수 (Su)100.0013099.992004
아 (A)100.0052097.132030
어 (Eo)100.0018096.961933
영 (Yeong)98.81112000
오 (O)100.0017097.6619817
우 (U)100.008098.991971
자 (Ja)100.0053090.042080
저 (Jeo)100.0014097.8419825
조 (Jo)100.001601002010
주 (Ju)100.0013098.481950
하 (Ha)100.0015099.482002
허 (Heo)100.0017099.311987
호 (Ho)100.0032089.591781
강원 (Gangwon)97.14340000
경기 (Gyeonggi)100.0044396.361590
경남 (Gyeongnam)99.70241000
경북 (Gyeongbuk)100.00110000
광주 (Gwangju)000000
대구 (Daegu)100.00220000
대전 (Daejeon)000000
부산 (Busan)100.0050000
서울 (Seoul)99.9866197.837242
세종 (Sejong)000000
울산 (Ulsan)000000
인천 (Incheon)100.00390000
전남 (Jeonnam)000000
전북 (Jeonbuk)000000
충남 (Chungnam)96.00743000
충북 (Chungbuk)100.0010000
제주 (Jeju)000000
Total89.0887038373.8756,648251
Adjusted99.3087038399.4156,648251
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Park, S.-H.; Yu, S.-B.; Kim, J.-A.; Yoon, H. An All-in-One Vehicle Type and License Plate Recognition System Using YOLOv4. Sensors 2022, 22, 921. https://doi.org/10.3390/s22030921

AMA Style

Park S-H, Yu S-B, Kim J-A, Yoon H. An All-in-One Vehicle Type and License Plate Recognition System Using YOLOv4. Sensors. 2022; 22(3):921. https://doi.org/10.3390/s22030921

Chicago/Turabian Style

Park, Se-Ho, Saet-Byeol Yu, Jeong-Ah Kim, and Hyoseok Yoon. 2022. "An All-in-One Vehicle Type and License Plate Recognition System Using YOLOv4" Sensors 22, no. 3: 921. https://doi.org/10.3390/s22030921

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