You are on page 1of 10

Automatic Number Plate Recognition System

Using YOLO Detector


Ganesh Kumar Yadav Kushal Singhal
Assistant Prof. Computer Science and Engineering
Department of CSE ABESIT Ghazibad India
Ghaziabad India
kushal2019cs186@abesit.edu.in
ganesh.yadav@abesit.edu.in

Paramhans Pal
Rahul Shah
Computer Science and Engineering
Computer Science and Engineering
Ghazibad India
Ghazibad India
paramhans2019cs176@abesit.edu.in
Mrshah7840@gmail.com

Abstract:- In this paper due to cutting-edge Prediction and a quick intersection-over-union


YOLO object detection the ALPR system evaluation approach.
presented in this research is reliable and effective. Many tests have been done to demonstrate that
For each ALPR step, the Convolutional Neural the proposed strategy outperforms alternative
Networks (CNNs) are trained and improved such state-of-the-art techniques in. The trial versions
that they are resilient under various of commercial solutions had recognition rates
circumstances (e.g., variations in camera, under 70% using our suggested dataset.
lighting, and background). Due to its many useful
uses, automatic license plate recognition (ALPR) Nevertheless, our system beat earlier ones,
has become a popular study subject. We create a obtaining a 35 FPS and a 78.33% identification
two-stage method specifically for character rate.
segmentation and recognition using low-tech data
Keywords:-
augmentation techniques like reversed license
plates (LPs) and flipped characters.  Plate detection,
Unfortunately, they function badly if the analysed  character recognition,
car license plate photos have some rotation due to  YOLO.
human gathering by traffic enforcement or
camera deviation. We propose a CNN-based Introduction: - Owing to their use in advanced
MD-YOLO method for multiple-direction transit arrangement, which have numerous
identification of car license plates. Our suggested installations nations for duties include watching
system may elegantly handle rotational over and upholding traffic laws, Systems for self-
challenges in real-time settings by making use of regulating vehicle plate identification are
precise rotation angle systems are gaining popularity. In addition,
ALPR systems are used to regulate safety ● Width and breath of the plate: A plate's
precautions in controlled situations, like the size can vary in an image of a vehicle.
armed forces camping grounds and safe refuge, ● Plate position: A plate may be found on
collect toll payments, and manage exit and any part of car.
entrance in parking lots. These ALPR systems are ● The back of the plate: Depending on the
frequently used to boost security and prevent vehicle, the background colours of a plate
fraud in particular areas. They can be of can vary. As an example, an official
assistance, for instance, in the search for stolen or vehicle's licence plate background could
missing vehicles. This job calls for a large be unlike any other vehicles in use.
number level of labour, moment, and way— ● Screw: A twist on a plate could be thought
except for ALPR systems. As well, manual of as a part.
involvement in these tasks may lead to improper
interpretations, or this is not to be done in real life
for a human to efficiently be sure or read a in Using image segmentation, a number plate can be
extracted. In a variety of literatures, a variety of
motion vehicle's license plate.
picture dissolution. techniques are applicable. In
An ALPR system typically receives a continuous the greater part of the techniques picture dual is
flow of pictures, clips insert as well as returns the utilized. When converting colour images into
supplied frame’s cars and bike, license plates grey scale picture, some lekhak employ Otsu's
content, typically in the form of text. A camera is image dual method.
used in these systems to take pictures of the
vehicles. Depending on the system's Colour segmentation serves as the foundation for
requirements, these pictures could be colour, some plate segmentation algorithms. discusses a
black-and-white, or coral. To find and read the investigation of the position of licence plates
license plate, tools like object detection, image using colour division. Following an explanation
of common methods for extracting license plates,
processing and pattern recognition are used.
a comprehensive discussion of image
A picture refining method known as self- segmentation strategies utilized in various ANPR
regulating vehicle plate system are work as to or LPR literature follows.
spot the car and bike number plate. The objective
is to develop a fortunate self-regulate permitted
car and bike identification system who made use ● Image Binarization: - Image binarization
of the number plate. is the procedure of turning a picture into a
Based on their various methods, the most of black-and-white version. In this
number plate detection algorithms go into approach, a specific threshold is selected
multiple categories. some factors would be into to distinguish between white and black
thought when attempting to identify vehicle's pixels. In any case the fundamental issue
is the means by which to pick the right
number plate:
edge an incentive for a specific picture.
The optimal threshold value selection can
sometimes be extremely challenging or
impossible. This issue can be resolved
through the use of adaptive thresholding. YOLO3, but these were ineffective because
A threshold may be set by hand way by the license plate size was smaller than the size
the user or without hand by an algorithm, of the input image.
which is called automatic thresholding.
However, this issue was resolved by
YOLOv4. Small license plates that were
● Edge Detection:- The essential feature frequently missed by YOLOv3 or SSD could
method extraction and detection is edge be found by YOLOv4.
detection. In most cases, applying an edge
identifier algorithm result in a boarder of
2. Related Work:-
attached curves for the object. Put in this
method to complex images becomes
2.1 Recognition and detection of car plates
extremely challenging because it may
result in object boundaries without In the field of ALPR, a lot of research has been
attached curves. Edge detection employs done. Detecting license plates creates a frame for
a variety of operators and algorithms, the image's vehicle identification number.
including Canny, Canny-Deroche, Already calculations utilize morphological
Differential, Sobel, Prewitt, and Roberts arrangement philosophies this sort picture in four
Cross. ways: based on boarder, colours, textures, and
● Hough Transform: - Originally utilized characters, respectively. Edge recognition is one
for line sensing, it is a method of feature of the most regularly involved highlights in plate
removal. Later, it was made possible to find location. [1] boarder sensing is workful for
the situation of any position, like an oval and identifying a license plate because it is made up
circle. of a dense array of black dots with a white
background. Edge-based methods determine the
● Blob Detection: - Blob detection is used black's edge density. In the field of ALPR, a lot
to find spot or areas those are differ from the of research has been done. Detecting license
less of the environment relating to brightness plates creates a bounding box for the image's
or colour. The main objective of these vehicle identification number. already
strategy is to identify associated areas that are
calculations utilize morphological arrangement
missed by border or corner detection philosophies that sort the picture in four ways:
algorithms. There are several popular forms based on edges, colours, textures, and characters,
of blob detectors, including (LoG), respectively. Edge recognition is one of the most
(DoG),(DoH), maximally stable extremal regularly involved highlights in plate location.
areas, and Principal curvature based region Edge detection is workful for identifying a
detector. license plate because it is made up of a dense
black dot matrix with a white background. Edge-
For character recognition and license plate based methods determine the black characters'
detection, previous works utilized real-time edge density in comparison to the white
object recognition techniques known as 1- background. The technique for detecting sides is
stage detectors like YOLO and SSD. We sensitive to undesirable sides., despite its rapid
initially trained the model with SSD and computation. This can occur when the image
contains a lot of colors or when edge detection is a variety of methods for detecting LP and linked
hindered by the difference between black and the purpose to the same metrics. Additionally, it
white. [1,5] is utilized with CCA, Euclidean distance
transformation, and signature analysis. As a
An ALPR system typically receives a frame from result, the aforementioned models are utilized to
a movie or picture source as data, and if the frame improve accuracy and avoid failure due to
displays an automobile, it prints the license plates blurring and inadequate illumination.
content, typically in the form of text. A camera is
used in these systems to take pictures of the Babu et al. [8] suggested four major LP analysis
vehicles. Depending on the system's steps. At first, photos were captured by webcams
requirements, these pictures can be colour, black- during pre- procedure, their brightness adjusted,
and-white, or different. To find and read the noise removed, and grey scale images created.
license plate, tools like object detection, image The LP location is then extracted using an
processing and pattern recognition are used. image's edges. In addition, characters in LP were
segmented. As a result, every character in the LP
image has been analysed using it in conjunction
A. LP Detection Techniques with the template matching technique. Rana et al.
[9] have derived a variety of methods for
Lin et al. [5] came up with a novel method as detecting LP and linked the function to the same
finding LPs that may mostly be used to accepted metrics. Additionally, it is utilized with CCA,
vehicles and find LPs for vehicles in order to Euclidean distance transformation, and signature
reduce the count of wrong positives in plate analysis. As a result, the aforementioned models
prediction. With the use of CNN, the value of are utilized to improve accuracy and avoid failure
character recognition has expanded to include due to blurring and inadequate illumination.
noisy and blurry images. Ullah et al. [6] put
emphasis on that mathematical morphological B. Character Segmentation
attributes' ability to predict the LP. Every English Liang et al. [10] randomly segmented The words
LP with a different shape and structure can be derived from the footage characters lines using a
used with the newly presented model. Orman et novel wavelet Laplacian method. It looks for zero
al. [7] proposed a self-operating mechanism for connection link to see how much room there is
analysing LPs by combining the plate detection between words and characters. When there is a lot
techniques of templates mapping, correlation,
of noise in the background, this model's function
and optical character recognition (OCR). Babu et performs at its worst. Additionally, in order to
al. [8] suggested four major LP evaluation steps separate words, a limited number of projections
Prior to prior processing, pictures were taken were made. Khare et al. [11] created a novel
using webcams., their brightness adjusted, noise sharpness-dependent model for segmenting LP
removed, and grey scale images created. The LP image words. For the purpose of the segmenting
location is then extracted using an image's edges. operation, It runs into a precise and slope axis..
In addition, characters in LP were segmented. As As a result, the strategy is referred to as being
a result, every character in the LP image has been extra reactive in enhancing point chossen and dim
analysed using it in conjunction with the template
existence.
matching technique. Rana et al. [9] have defined
Kim et al. [12] used a reliable system to detect LP C. Character Recognition
on various illumination platforms. The characters
in LP were then segmented using it, binarization, Raghunandan et al. [16] projected a Riesz partial
and the high pixel paradigm. The model primarily driven way to deal with upgrading the LP location
targets a single reason; but does not actual for and acknowledgment. It’s work to report the
numerous reasons. In the meantime, Dhar et al. factors that influence LP identification and
[13] proposed deploying a system for LP realize discovery. The results of the experiment show
that improving LP images could improve the
employing edge detection and
realize simulation result, which is not
CNN The Separation of characters within the
initial processing step for LP evaluation has used suitable for present plateform. Al-Shemarry and
it. The newly developed method identifies edge others [17] classified 3L-LBPs in LP recognition
prediction, morphological task, and regional using a collection of Adaboost cascades, specific
features for character segmentation. As a result, it for poor-quality images. It has been recognize
works best with images that have elegant with the texture attributed in this model, which
uses a model for categorization of LP analysis
backgrounds but are unaffected by the included
from photos by a variety of factors and is
complexities.
dependent on the LBP task. As a result, counting
Character feature-based vehicle LP prediction the number of modeled instances and learning
and recognition was used by Ingole and Gundre determine a technique's function. Additionally,
[14]. The process of segmenting characters from the value of text prediction has been restricted;
LP regions is the first step the model takes. The However, the developed method does not end the
method provides profile-centric vertical and recognition. Due to the finding procedure not
horizontal projection features for character being able to obtain the full character forms, text
segmentation. Pictures with difficult detection is simpler than recognition. Few
backgrounds weren't able to gain from the technologies have emerged in recent years that
features mentioned here. Radchenko et al. [ 15] employ a variety of DL approaches for LP
used a CCA-based method for character recognition, despite the robust ability and
segmentation. If the taken picture has been discriminating power of DL methods.
binarized but no character shapes or characters
are present, the CCA performs well. As a result,
it is extremely challenging to implement a
binarization model that divides front and back
data on images with complex backgrounds.
Pictures with difficult backgrounds weren't able
to gain from the features mentioned here.
illumination effects have failed to address
additional issues like blur, touching, and
challenging backgrounds. Likewise, no models
existed with redevelopment in for character
division from LP pictures.
Extranally , Python-tesseract will display the
recognized format when rather than storing it in a
file, it is used as a code.. It can identify more than
100 different languages.

Approach:-

● Identify each curve in the picture.


● Each contour's bounding area should be
located.
Fig.1:Main stages in a license plate recognition ● Verify and compare each bounding
system. rectangle's area and sides relation with a
typical license plate.
● Use image segmentation to identify the
characters in the image that is under the
confimed contour.
3. Proposed System ● Use OCR to recognize letters.
In this proposed solution, our system is highly
Through this proposed solution we are providing
effective to first detect the license plate and then
an interface which is divided into two modules-
segment the characters in the plate and recognise
Firstly there is plate detection and then character
it effectively.
segmentation and recognition.

In plate detection it would detect a number plate


from an image file. It will draw a boundary 4. Methodology:-
around the number plate, blur it and slow the text
for identification. The proposed methodology for our application is
as follows:-
A security system that relies on camera
surveillance must perform the critical job of ● To reduce noise, the input image must
recognizing a vehicle's license plate. Using some first be blurred with a Gaussian Blur before being
computer vision methods, From a photograph, transformed to grayscale.
the number plate can be taken out, and the licence ● Identify the image's vertical borders.
number can subsequently be determined using ● We must binarize the image in order to
optical character recognition. Py-tesseract is a show the plate. Apply Otsu's
tool for OCR (optical character recognition) in Thresholding to the picture of the vertical
Python. In other words, it will identify and "read" edge for this. Other thresholding
any writing that is present in images. Google's techniques require us to select a threshold
Tesseract-OCR Engine is wrapped in Python- value in order to binarize the picture, but
tesseract. As a result of its ability to handle all Otsu's Thresholding chooses the
image formats, including jpeg, png, gif, bmp, and threshold value for us.
tiff, it is also used as a standalone script.
● On the thresholded picture, apply Closing
Morphological Transformation. In a
thresholded image, closing is helpful for
filling in tiny black spaces between white
areas. It makes the registration plate's
rectangular, white box visible.
● We must locate image contours in order
to locate the plate. Before locating ● Image segmentation is required for
contours, the image must be binarized and precise license plate character
morphed in order for it to locate fewer, recognition. The first thing that needs to
more relevant contours. It would look like be done is to add the worth channel from
this if you drew all of the extracted the plate image's HSV design. It would
contours on the original image: appear to be.
● Now, to binarize and reveal the characters
in the plate's value channel image, apply
adaptive thresholding. Due to the fact that
adaptive thresholding uses different
threshold values for various regions based
on the brightness of the pixels in the
region surrounding it, the plate image
may have different lighting conditions in
different areas. In this case, adaptive
thresholding may be more suitable for
binarization.

Fig.2 Locating image contours in order to


locate the plate ● Build a veil to show all the person parts
and afterward track down shapes in the
cover. Take the largest contour after
extracting it, locate its bounding
● Now verify the rotate the side and region
rectangle, and verify the side ratios.
of the minimum area rectangle enclosed
● Find the contour's convex hull and draw it
by each contour. Plate's minimum and
on the character candidate mask after
maximum dimensions are first 4500 and
validating the side ratios. The mask would
second 30000 .
appear to:
● Now, locate the region's confirmed
● Next, extract the contour areas from the
outlines and verify the side ratios and area of
value thresholded image of the plate by
the largest contour's bounding rectangle.
locating each contour in the character
You'll get a perfect license plate contour after
candidate mask.
you validate. Now, take that contour out of
the real image. You will receive the plate's
picture:
The segment_chars function, which can be found
Fig. 1 YOLO System Architecture
below in the full source code, is responsible for
carrying out steps 8 to 13. The class PlateFinder's
method check_plate contains the driver code for
the functions in steps 6 to 13. Now, each Result:-
character can be identified using OCR.
Here, the outcomes of applying the suggested
tasks are discussed. On running the algorithm on
sample images, we got to know that our
application is accurately detecting and
identifying the license plate.
You Only Look Once (YOLO)
With regard to the 36 category 10 numerical
A actual time detection of objects algorithm
word, 25 words, and one plate class we create a
called YOLO that outperforms all other models
single-class sensor with windows that slide. The
in terms of speed and accuracy. To detect objects,
system performance is assessed using sample
all other algorithms, with the exception of
photos from the AC, LE, and RP categories of the
YOLO, use multiple parts of the picture that have
AOLP dataset.
a high likelihood of having the object. They do
not see the entire image. The integral over the precision p is the average
mean average precision (mAP) (o).
YOLO, on the other hand, employs only a single
neural network, which divides the picture into mAP = ∫₀ p(o)do
various regions in order to determine the image's
bounding boxes and probabilities. This saves a lot Where, the precision of the license plate
of time because the YOLO algorithm reduces the recognige is denoted by p(o).
thousands of neural networks required by all
other models to just one neural network, which Precision is symbolized by:
can make The algorithm outperforms all others
by a factor of 100. Images can be processed at a Precision = =
persentage of 45 frames per second by YOLO.
Where TP stands for True Positives, FP stands for
False Positives, and N stands for the total number
of objects retrieved (TP + FP).
accuracy and efficiency than single-stage
methods. The requirements for practical
Table.1 mAP and AP performance. benchmark datasets have been identified by
conducting a thorough comparison of the relevant
Average Class Value
studies in this paper. In addition, we have
Digits 0.729882 suggested future ALPR solution research
directions and described the unsolved difficulties.
Letters 0.775544
Future Scope:-
Plate 09900999
Further applications of ANPR include vehicle
mAP 0.83184 location tracking, vehicle speed control, vehicle
model identification, and traffic control. For
poor-quality picture, some upgrade algorithms,
such as super quality, should be targeted. It can
be done manually and is costly for any nation.
The majority of ANPR focus on processing a only
one car or bike number plate; however, while
images are being captured in real time, multiple
vehicle number plates may be shown. Images of
the vehicle's number plate are taken into account
for ANPR in multiple systems, but in most other
systems, offline images of the vehicle taken from
an online database are used as data, so the final
results may differ. A coarse-to-fine method might
be useful for separating multiple vehicle number
plates.

Conclusion:-
Reference:-
The creation of an automated license plate
[1] Shashirangana, Jithmi, Heshan Padmasiri,
recognition system (ALPR) necessitates the
Dulani Meedeniya, and Charith Perera. A study
careful selection of specifications and methods to
work within various hardware and operational of approaches and strategies for "automated
constraints. The current approaches and methods licence plate recognition." IEEE Access 9, 11203-
used in ALPR solutions have been examined and 11225 (2020).
analyzed in this survey paper. With a variety of
[3]Denis Alexandrovich Pustokhin, Ashish
datasets, the single-stage deep learning-based
Khanna, Joel JPC Rodrigues, Irina Valeryevna
solutions have demonstrated high performance.
Pustokhina,K. Shankar, Changho Seo, and
Although multi-stage object detection-based
deep learning solutions can be pre-trained on Gyanendra Prasad Joshi are the authors of the
large datasets, they have demonstrated lower study. The statement "Automatic vehicle licence
plate recognition for intelligent transportation geometrical and mathematical features." Pages
systems using optimal K-means with 836–840 in CSCI 2016, the International
convolutional neural network." Access 8, Ieee Conference on Computational Science and
(2020), 92907-92917. Computational Intelligence. IEEE, 2016.

[4] Sung, Ju-Yeong, and Saet-Byeol Yu. [10] Wu, B-F., S-P. Lin, and C-C. Chiu. Extraction
International Conference on Consumer of outer characters from real automobile licence
Electronics (ICCE-Asia 2020), pp. 1-3.YOLOv4- plates. IET Computer Vision 1, no. 1 (2007): 2–
based real-time automated licence plate 10.
recognition system, IEEE, 2020.
[11] Aghdasi, F., and H. Ndungo."System for
[5] Chen, Rung-Ching.2019: 47–56 for Image and automatically recognising licence plates." 7th
Vision Computing 87.Through sliding-window Africon Conference in Africa, 2004 IEEE Africon
darknet-YOLO deep learning, automatic licence (IEEE Cat. No. 04CH37590), vol. 1, pp. 45–50.
plate recognition is possible. IEEE, 2004.

[6] Kessentini, Yousri, Sourour Ammar, [12] The group included Luo, Weiping Zhou, Hao
Mohamed Dhia Besbes, and Achraf Chabbouh."A Sun, and Limin Luo.Locating licence plates is a
two-stage deep neural network for multi-norm good idea. 1st International Conference on
licence plate detection and recognition." Expert Information Science and Engineering, 2009,
Systems with Applications, Volume 136 (2019), 770–773. IEEE, 2009.
Pages 159–170.
[13] Cho, B. K., S. H. Ryu, D. R. Shin, and J. I. Jung.
[7] Laroca, Rayson, Evair Severo, Luiz A. the phrase "Vehicle violations at a railway level
Zanlorensi, Luiz S. David Menotti,William Robson crossing identified using licence plate extraction
Schwartz, Oliveira, Oliveira, Gabriel Resende method." International Journal of Automotive
Gonçalves, and David Menotti. Based on the Technology 12 (2011): 281-289.
YOLO detector, a reliable real-time automated
[14] Redmon, Joseph, Santosh Divvala, Ross
licence plate identification system. Pages. 1–10
Girshick, and Ali Farhadi."You only need to look
in International Joint Conference on Neural
once: Unified, real-time object detection." 2016;
Networks, 2018. IEEE, 2018.
pp.In the IEEE Conference on Computer Vision
[8] Bulan, Orhan, Vladimir Kozitsky, Palghat and Pattern Recognition Proceedings, pages
Ramesh, and Matthew Shreve.Recognition of 779–788.
licence plates with deep localisation, failure
[15] Redmon, Joseph, and Ali Farhadi. Better,
identification, and segmentation- and
quicker, stronger: YOLO9000. 2017;
annotation-free. Journal of Intelligent
Transportation Systems, 18(9), 2351-2363, 2017. Proceedings of the IEEE Conference on
Computer Vision and Pattern Recognition, pages
[9] Ullah, Ihsan, and Hyo Jong Lee."A method of
7263–7271.
locating Korean licence plates based on

You might also like