Automatic License Plate Recognition ALPR Using YOLOv5 Model and Tesseract OCR Engine
Automatic License Plate Recognition ALPR Using YOLOv5 Model and Tesseract OCR Engine
net/publication/377137892
CITATIONS READS
2 36
4 authors, including:
All content following this page was uploaded by Vandana Rawat on 02 December 2024.
a, b, c
Department of Computer Application, Graphic Era Deemed to be University Dehradun, India
a
[email protected], [email protected], [email protected]
D
epartment of Computer Science & Engineering, Symbiosis Institute of Technology, Nagpur Campus, Symbiosis International
(Deemed University), Pune, India
d*
[email protected]
Abstract— Traffic control and identifying vehicle owners are covered in dirt; j) propensity: plates may be slanted; k) Many
significant national problems. It could be difficult to identify more: A plates can also include frame and bolts in add the
motorists who drive too quickly and in violation of the law. Since words [3].
the vehicle's license plate could not be accessible to traffic In general, ANPR systems consist of four steps (shown in Fig.
authorities from a moving vehicle due to its speed, it is impossible
to detain and punish those people. Designing an automatic
1): vehicle picture capture, number plate recognition, object
number plate recognition (ANPR) system is one of the solutions classification, pattern classification, and pictures utilising the
to this issue. There are many ANPR systems on the market right "extra definition" approach [5], [6].
now. Although these systems are based on many techniques, it is
still tricky work since various elements, such as a vehicle's rapid
speed, non-uniform number plate, language of the number, and Vehicle Picture Capture
changing lighting circumstances, can significantly impact the
overall identification rate. The majority of the systems function
with these restrictions. The characteristics of picture size, success
rate, and processing time are discussed in this work along with
several ANPR strategies. An ANPR expansion is proposed at the Number plate recognition
paper's conclusion.
Authorized licensed use limited to: Graphic Era (Deemed to be University). Downloaded on December 02,2024 at 09:17:50 UTC from IEEE Xplore. Restrictions apply.
An overview of several number plate detection methods is fractal areas, and the Basic curve right to be part detector are a
presented in Section 2. Section 4 reviews word segmentation few examples of typical blob detectors.
techniques, while Section 5 reviews character classification
E. Connected Component Analysis
methods. This debate is about what has been completed and
what types of studies are feasible in the paper's conclusion A method to specifically name groups of the related elements
[10]. using specific criteria is called Approx. and blobs removal.
That scans the basic frame that classifies bits according to
II. NUMBER PLATE DETECTION their connectedness, like their southeast, west, north-western,
Based on various methodologies, most license plate and western locations (8-connectivity). 4- Only such north and
detection methods can be divided into more than one group. south friends of an input image are used for connectedness. Its
The following elements must be considered when detecting a algorithm works better and is very beneficial when automatic
vehicle's license plate: (1). Frame size: In an image frame, a picture identification [14][15]. Both plate identification and
plate may be of a variable size. (2). Location of the plate: The element segmentation can be done by using this technique.
plate may be found anywhere on the car. (3). Background of a F. Mathematical Morphology
plate: Depending on the kind of vehicle, a plate may have a
Theory, matrix concept, structure, or odd factors are the basis
completely different colour. For instance, the backdrop of a
for morphological operations. Although it is frequently used
public car license plate may differ from that of other public
with digital photos, it could also be applied to other built
vehicles. (4). Nut: A nut on a plate could be considered a
forms. It was created to treat input images before being
word. Using the picture segmentation technique, a license
expanded to scan colour features or pictures. It includes
plate can be retrieved. The literature contains a variety of
fundamental operators like erode, dilate, closing, or locking.
techniques for segmenting images. Most techniques use
picture classification [11][12]. III. METHODOLOGY
A. Image Binarization The YOLOv5 object detection framework and Tesseract
Black or white picture conversion is known as image character OCR (Optical Character Recognition) engine were combined
segmentation. This procedure uses specific pixel values in to create the automatic license plate recognition (ALPR)
black or transparent pixels or white using a specified limit. system. Tesseract OCR was used to extract and identify the
The critical issue, however, is selecting the appropriate limit characters on the license plates, while YOLOv5 was used for
value for the specific image. Choosing the ideal threshold license plate detection and localisation. The methodology
level may become challenging or unattainable. This issue can employed in the ALPR system can be outlined in Fig 2.
be solved with adaptive thresholding. Auto filter is the process Images
Model
Artifacts
of selecting a threshold digitally rather than directly via an
algorithm [13].
B. Edge Detection
Authorized licensed use limited to: Graphic Era (Deemed to be University). Downloaded on December 02,2024 at 09:17:50 UTC from IEEE Xplore. Restrictions apply.
C. Character Recognition It locates the plate number of a car; the LPR system
The Tesseract OCR engine was used to extract and performs a repeated classification process. The many things
recognise the characters found on the license plates, which is provided in the photo are found and named using the
connection of every cell in the vector to identify the areas of
famous for its accuracy in deciphering text from photos.
the picture and include the license plate [19][20].
Tesseract analysed the extracted ROI and transformed the
character patterns into text using cutting-edge algorithms.
D. Integration and Deployment
After satisfactory performance, the YOLOv5 and Tesseract
OCR models were integrated into the ALPR system. The
system was made to take screenshots or video streams from
cameras, use the YOLOv5 model to detect license plates in
real-time, extract the leaves, and then do character recognition
using the Tesseract OCR engine. A website built using the
Flask framework also included the ALPR system, allowing
users to contribute pictures for license plate identification.
IV. SIMULATION RESULTS
The mathematical model of a created Recognition system is
shown in this section. First, Math is used to connect this lens
to the PC. The computer can be used to connect the camera. Fig. 4: Thresholded binary image
Different photographs of cars with various colour schemes and
body styles are shot and kept on a PC. During the process, the Taking account of the named items, any who share physical
possible impacts of sunshine are again taken into account. Fig. traits with number plate attributes are selected. We have
3 shows the photos saved in RGB image with a height of 400 employed size and height so far, but additional factors like ratio
× 700 pixels [17][18]. are equally viable. The following components can be used to
verify a.me license plate: total number of pixels in an item,
height of blobs (iii). Size of the lumps, (iv) Localized use of
licensed letters
For every item, your limit height and width are given. If the
border of a ratio is between zero and 1.3 and the total pixel
count in the item is more significant than 2000 but less than
8000, it is then regarded as an area, which can include a license
plate.
Its target parts are changed and work fine (renamed) for
connection reasons in the following stage. Then, area items
containing more white pixels above the freezing point are
chosen (equal -1). A limit displays the bare minimal number of
white letters in a single digital word. The volume of selected
objects in the given source image of a plate number is then
Fig. 3: Images taken using a USB camera. computed. If the number, the elements and characters on the
number plate are the same.
A. License Plate Identification
Finding the plate number that could be anywhere in the B. License Plate Characters Extracting
photograph is the most challenging job. The difficulty of this This same element dogs can be located through a variety of
exercise increases if the lighting of the picture changes at one methods. Using vertical boundaries is the easiest method,
photo in each of the LPR tests [I, 2, 31], as shown in Fig. 4. presuming each letter on the number plate is set in the same
area. For all this objective, the input of the number plate chosen
Using the Whiting translation, lines on colour images can in the early state is divided into equal square regions that could
be found. This method makes it easy to list rows made of also include the letter. This method's beauty and freedom from
accumulator cells. Following analysis of these cells, a set of image quality are benefits. The disadvantages of this approach
vertical and horizontal graphs is joined to choose rectangular include some backstory for using the region. After primary
regions. Potential license plate regions are identified by the data, a graph of the total number of pixels at every row and
length of received lines [I]. But border row detection is only column of the plate number can be used. Deleting a part of the
partially appropriate when the license plates are not number plate's background is possible in this case. The
horizontally located on the image, when the border inside the language on the plate number is then defined by the points, as
number plates is corrupted or non-existent due to background shown in Fig. 5. This method, dependent on letter locations, is
noise or unequal light, or in these other situations.
Authorized licensed use limited to: Graphic Era (Deemed to be University). Downloaded on December 02,2024 at 09:17:50 UTC from IEEE Xplore. Restrictions apply.
beneficial depending on the condition of the number plate. The evaluation's findings showed that the system could
However, this method is dependent on the image. accurately detect and identify license plates and extract and
identify the characters on the plates. Following are some
fantastic outcomes produced by the YOLOv5 model and
Tesseract OCR engine's combined performance. Precision-
Recall Curve are shown in Fig. 7.
VI. DISCUSSION
The agents need the system to start working when every car is
detected at the entry. The Web camera is connected to the
computer, and the controller sends a message to the computer
to capture an image. The PC begins the ANPR system and
finds the allowed car. A large number of photos with a
Fig 6: License plate detection resolution of 800 × 600 pixels are used to test the ANPR
system. The results demonstrate that the developed ANPR
Authorized licensed use limited to: Graphic Era (Deemed to be University). Downloaded on December 02,2024 at 09:17:50 UTC from IEEE Xplore. Restrictions apply.
system detects Karnataka standard car license plates in several [7] Kang, Seong-In and Byun, Sang-cheol and Yoon, Yeo-Han and Park, Youn
Sub, Study on Single Camera Based ANPR System for Improvement of
daytime lighting conditions and has a higher detection and Vehicle Number Plate Recognition on Multi-lane Roads (January 10, 2018)
identification rate. It has a set of detection and recognition [8] Shraddha S. Ghadage , Sagar R. Khedkar, 2019, A Review Paper on
skills for license plates. The distance impacts the size of the Automatic Number Plate Recognition System Using Machine Learning
license plate in the picture. Parts on the car number plate are Algorithms, INTERNATIONAL JOURNAL OF ENGINEERING
identified just using our proposed detection techniques, shown RESEARCH & TECHNOLOGY (IJERT) Volume 08, Issue 12 (December
2019),
in Fig. 8.
[9] W. Riaz, A. Azeem, G. Chenqiang, Z. Yuxi, Saifullah and W. Khalid,
"YOLO Based Recognition Method for Automatic License Plate
Recognition," 2020 IEEE International Conference on Advances in
Electrical Engineering and Computer Applications( AEECA), Dalian,
China, 2020, pp. 87-90, doi: 10.1109/AEECA49918.2020.9213506.
[10] R. Shashidhar, A. S. Manjunath, R. Santhosh Kumar, M. Roopa and S. B.
Puneeth, "Vehicle Number Plate Detection and Recognition using YOLO-
V3 and OCR Method," 2021 IEEE International Conference on Mobile
Networks and Wireless Communications (ICMNWC), Tumkur, Karnataka,
India, 2021, pp. 1-5, doi: 10.1109/ICMNWC52512.2021.9688407
[11] Gattawar, Aayush, Sandesh Vanwadi, Jayesh Pawar, Pratik Dhore, and
Harshada Mhaske. "Automatic Number Plate Recognition using YOLO for
Indian Conditions." International Research Journal of Engineering and
Technology (IRJET) 8, no. 01 (2021): 2170.
[12] Gandhi, J., Jain, P. and Kurup, L., 2020. Yolo based recognition of indian
license plates. In Advanced Computing Technologies and Applications:
Fig 8: Text Extraction and License plate detection Proceedings of 2nd International Conference on Advanced Computing
Technologies and Applications—ICACTA 2020 (pp. 411-421). Springer
Singapore.
VII. CONCLUSION [13] Sun, H., Fu, M., Abdussalam, A., Huang, Z., Sun, S. and Wang, W., 2019.
License plate detection and recognition based on the YOLO detector and
This paper presents an automatic car plate system that uses a CRNN-12. In Signal and Information Processing, Networking and
license plate. The system uses various image processing Computers: Proceedings of the 4th International Conference on Signal and
methods to pull the car from the computer's library. The model Information Processing, Networking and Computers (ICSINC) 4th (pp. 66-
study showed that the system may be installed at the entry to a 74). Springer Singapore.
limited area and can regard and identify a vehicle to use its [14] Tang, J., Wan, L., Schooling, J., Zhao, P., Chen, J. and Wei, S., 2022.
Automatic number plate recognition (ANPR) in smart cities: A systematic
number plate under several light levels. Although the code review on technological advancements and application cases. Cities, 129,
functions very well, it has areas for growth. p.103833.
[15] Zhang, H., Chen, P., Zheng, J., Zhu, J., Yu, G., Wang, Y. and Liu, H.X.,
2019. Missing data detection and imputation for urban ANPR system using
VIII. REFERENCES an iterative tensor decomposition approach. Transportation Research Part
C: Emerging Technologies, 107, pp.337-355.
[1] Lubna, Mufti N, Shah SAA. Automatic Number Plate Recognition: A
Detailed Survey of Relevant Algorithms. Sensors (Basel). 2021 Apr [16] Jadhav, A.V., Dongre, O.K., Shinde, T.K., Patil, D.S. and Dewan, J.H.,
26;21(9):3028. doi: 10.3390/s21093028. PMID: 33925845; PMCID: 2022. A Study on Approaches for Automatic Number Plate Recognition
PMC8123416. (ANPR) Systems. In Advances in Data and Information Sciences:
Proceedings of ICDIS 2021 (pp. 647-658). Singapore: Springer Singapore.
[2] R. Laroca et al., "A Robust Real-Time Automatic License Plate
Recognition Based on the YOLO Detector," 2018 International Joint [17] W. -C. Li, T. -H. Hsu, K. -N. Huang and C. -C. Wang, "A YOLO-Based
Conference on Neural Networks (IJCNN), Rio de Janeiro, Brazil, 2018, pp. Method for Oblique Car License Plate Detection and Recognition," 2021
1-10, doi: 10.1109/IJCNN.2018.8489629. IEEE/ACIS 22nd International Conference on Software Engineering,
Artificial Intelligence, Networking and Parallel/Distributed Computing
[3] N. Saleem, H. Muazzam, H. M. Tahir and U. Farooq, "Automatic license (SNPD), Taichung, Taiwan, 2021, pp. 134-137, doi:
plate recognition using extracted features," 2016 4th International 10.1109/SNPD51163.2021.9704935.
Symposium on Computational and Business Intelligence (ISCBI), Olten,
Switzerland, 2016, pp. 221-225, doi: 10.1109/ISCBI.2016.7743288. [18] AG, S.F., 2019. Development of portable automatic number plate
recognition (ANPR) system on Raspberry Pi. International Journal of
[4] Kashyap, A., Suresh, B., Patil, A., Sharma, S., & Jaiswal, A. (2018). Electrical and Computer Engineering, 9(3), p.1805.
Automatic Number Plate Recognition. 2018 International Conference on
Advances in Computing, Communication Control and Networking [19] Rathi R, Sharma A, Baghel N, Channe P, Barve S, Jain S. License plate
(ICACCCN). doi:10.1109/icacccn.2018.8748287 detection using YOLO v4
[5] J. -Y. Sung, S. -B. Yu and S. -h. P. Korea, "Real-time Automatic License [20] Amruta, K., Devayani, K., Awale, R. and Bhimrao, J., 2022, October. Skew
Plate Recognition System using YOLOv4," 2020 IEEE International correction process in automatic number plate recognition (ANPR) system.
Conference on Consumer Electronics - Asia (ICCE-Asia), Seoul, Korea In AIP Conference Proceedings (Vol. 2494, No. 1, p. 050010). AIP
(South), 2020, pp. 1-3, doi: 10.1109/ICCE-Asia49877.2020.9277050. Publishing LLC.
[6] B. Pechiammal and J. A. Renjith, "An efficient approach for automatic [21] Y. Yuan, W. Zou, Y. Zhao, X. Wang, X. Hu and N. Komodakis, "A Robust
license plate recognition system," 2017 Third International Conference on and Efficient Approach to License Plate Detection," in IEEE Transactions
Science Technology Engineering & Management (ICONSTEM), Chennai, on Image Processing, vol. 26, no. 3, pp. 1102-1114, March 2017, doi:
India, 2017, pp. 121-129, doi: 10.1109/ICONSTEM.2017.8261267. 10.1109/TIP.2016.2631901
Authorized licensed use limited to: Graphic Era (Deemed to be University). Downloaded on December 02,2024 at 09:17:50 UTC from IEEE Xplore. Restrictions apply.