Arabic-Numbers Recognition System for Car Plates
Arabic-Numbers Recognition System for Car Plates
(ICCCEEE)
Abstract— In the modern era, computers are used to relies on some handcrafted image features that capture
automate most of the operations used to be done by humans. certain morphological, color or textural attributes of the
This leads to higher performance and low cost of operations. license plate [2]. These features can be sensitive to image
The field of traffic management is not an exception. In this
paper, we propose an automatic license plate recognition noises, and may result in many false positives under
system which can extract the license plate number of the complex backgrounds or under different illumination
vehicles using machine learning models and image processing conditions.
algorithms. License plate recognition systems pass through In recent years, convolutional neural networks (CNN)
three successive stages and differ in the techniques used to have been successfully used in many challenging tasks of
achieve the output. In this paper, Locating the license plate in a object detection and recognition. CNNs have demonstrated
given image is the first stage. It is achieved using Faster
Region-Based Convolutional Neural Network, which is capable impressive performance on various tasks including image
of identifying regions with objects based on regions proposal classification, object detection, semantic segmentation, etc.
network. It is also capable of classifying the detected objects. [3]
Second stage is the segmentation of the plate using image Segmentation is depending on image processing
processing algorithms and final stage is to recognize the algorithms to crop every character, which is fed to the
segmented digits using convolutional neural network model. recognition stage where neural networks is the most
Results reveal that the presented system successfully detects
and recognizes the vehicle number plate on real images, commonly used technique for character classification.
achieving an overall accuracy of 93% with a total of 100 In this paper, we investigate the use of neural networks
images. and image processing algorithms for license plate
recognition system. We expecting better results than most of
Index Terms—Convolutional neural networks (CNN), Image the work done in this area.
processing, License plate recognition system. The structure of this paper is as follows. Section II
describes the problem dealt with in this work and discusses
I. INTRODUCTION previous work. Section III describes the developed methods
Due to rapidly growing number of vehicles, traffic has and algorithms used un the system. Experimental results are
presented in Section IV. Section V contains the overall
become more complex to manage. Stolen cars, speed
conclusion.
violation, unregistered cars and parking management are all
examples of problems that are used to be solved manually II. BACKGROUND
by humans. License plate recognition provides a more 1. License plate recognition problem
efficient solution to these problems by using the computer In this section we will have a sight about some of the
to automate required processes. work done in this problem.
The license plate recognition system works in three steps, A. License Plate Detection
the first step is to detect and locate the plate inside a given
License plate detection is the process of locating the
digital image or a video frame, the second step is to
region in the image that contain the license plate and the
segregate the digits of the plate to be fed to the third steps process of extraction and normalization of the plate.
which is to recognize the digits and get a string as an output. Usually, the detection process is designed only to work in
Detection stage is considered the most difficult task in the certain conditions. For example, most of the systems are
license plate recognition systems since plates can be designed to obtain the plate of specific country or region
different in size, shapes and colors, also the angle of the where all plates have the same size and colors, others also
image and the orientation of the plate make it even more constraint the image of the vehicle to be in certain distance
difficult [1]. The existing algorithms for extracting and and angle.
detection of the license can be either done using image The existing algorithms for extracting and detection of
processing techniques or by using neural networks models. the license can be either done using image processing
Image processing algorithms for detection process usually techniques or by using neural networks models. Image
Authorized licensed use limited to: University of Exeter. Downloaded on May 06,2020 at 16:30:45 UTC from IEEE Xplore. Restrictions apply.
processing algorithms for detection process can be roughly classification, where the input character image is classified
classified into four categories [4]: edge-based, color-based, to the best matching character.
texture-based, and character-based. Most of license plates systems use template matching
Edge-based approaches try to find regions with higher algorithm to classify images to correct labels [11].
edge density than elsewhere in the image as license plates. Modifications to template matching technique is done to
Method [5] uses edge detector combining with some increase the efficacy and make it more robust to noisy and
morphological operations to find the rectangles which are distorted input images. That is done in Hui Wu and Bing Li
regarded as a candidate license plate. work [12], where neural networks used to train the system
Edge-based methods are fast in detection speed. for better and faster results.
However, they cannot be applied to complex images as they
are too sensitive to unwanted edges. It is also difficult to 2. RCNN, Fast RCNN & Faster RCNN
find license plates if they are blurry. A typical CNN can only tell you the class of the objects
Color-based approaches are based on the observation that but not where they are located. It is actually possible to
color of the license plate is usually different from that of the regress bounding boxes directly from a CNN but that can
car body. HSI color model is used in [6] to detect candidate only happen for one object at a time. In R-CNN the CNN is
license plate regions, which are later verified by position forced to focus on a single region at a time. Regions in the
histogram. Color-based methods cannot distinguish other R-CNN are detected by one of the region proposal
objects in the image with similar color and size as the algorithms followed by resizing so that the regions are of
license plates. equal size before they are fed to a CNN for classification
Texture-based approaches try to detect license plates and bounding box regression.
according to the unconventional pixel intensity distribution The most straightforward way to generate smaller sub-
in plate regions. Zhang et al. [7] propose a license plate regions (patches) is called the Sliding Window approach.
detection method using both global statistical features and However, the sliding window approach has several
local Haar-like features. Texture-based methods use more limitations. These limitations are overcome by a class of
discriminative characteristics than edge or color, but result algorithms called the “Region Proposal” algorithms.
in a higher computational complexity. Selective Search is a region proposal algorithm used in
Character-based approaches regard the license plate as a object detection. It is based on computing hierarchical
string of characters and detect it via examining the presence grouping of similar regions based on color, texture, size and
of characters in the image. Lin et al. [8] propose to detect shape compatibility. Selective Search starts by over-
license plate based on image saliency. Character-based segmenting the image based on intensity of the pixels using
methods are more reliable. However, the performance is a graph-based segmentation method by Felzenszwalb and
affected by the general text in the image background. Huttenlocher [13].
One approach is described by Chen et al. [9]. Their
method employs a CNN with a single convolutional layer,
applied in a sliding window fashion over small image sub-
region. The CNN was trained to classify individual
characters as text/non-text, with the outputs being merged
and then tested based on aspect ratio and size.
Unfortunately, the authors do not provide enough details
about the algorithm and the evaluation, so it is not possible Figure 1:Selective search algorithm
to reproduce their method for comparison purposes.
RCNN model is based on generating 2000 sub-regions
B. Character Segmentation
using selective search algorithm and then feed them to
Character segmentation is the process of partitioning the ConvNets for generating feature maps which is then fed to
image of the license plate into individual characters that can SVM’s classify them depending on the given classes.
be recognized by the system. The segmentation importance Bounding box regressors is added to predict the object
comes from the fact that a more efficient and accurate coordinates.
segmentation will result easier and more accurate character Due to the large number of regions generated, training is
recognition. expensive in space and time and object detection is slow.
In Karthikeyan, V.J. Vijayalakshmi, and P. Jayakumar
work [10], connected components algorithm is used to
segment the characters based on thresholded binary image.
This algorithm is accurate in case of characters that are
constructed from one component and free of dots and
dashes. Also, this can take more computations than the
projection techniques but will produce a better result in case
of noisy images.
C. Character Recognition
Character recognition is the process of assigning a label to Figure 2: RCNN
a character image representing that character. It is a sort of
Authorized licensed use limited to: University of Exeter. Downloaded on May 06,2020 at 16:30:45 UTC from IEEE Xplore. Restrictions apply.
Fast R-CNN was able to solve the problem of speed, in
this model, the image is first-fed through a ConvNet, After the RPN, there a final classifier and regressor to get
features of the region proposals are obtained from the last the score of the given object classes and the final box
feature map of the ConvNet. coordinates.
III. METHODOLOGY
Figure 4: Faster-RCNN
Authorized licensed use limited to: University of Exeter. Downloaded on May 06,2020 at 16:30:45 UTC from IEEE Xplore. Restrictions apply.
- Generate the TFRecords that serve as input data to Model description:
the TensorFlow training model. x We constructed a sequential model with a first
- Create label map: convolutional layer which has 32 filters and kernel
The label map tells the trainer what each object is size of (3*3). The input shape is fixed at
by defining a mapping of class names to class ID (64*64*3). The activation function used is
numbers. rectified-linear unit (ReLU).
- Configure training: x The second layer is a pooling layer with a pool size
Faster_rcnn_inception_v2 is the model used for of (2*2).
training. The model folder which contains the x The ANN needs individual features in order to be
checkpoints file. Checkpoints will save the weights able to classify thus we need to flatten the output of
of the training after every certain patch. the CNN network into 1D.
- Run the training: x Then we added a hidden layer after the output of
Batch size is set to (1) with a total steps number of the convolutional neural-network. It consists of 64
200,000. Each step of training reports the loss. units and the activation function is also a rectified-
- After the training is complete, the last step is to linear unit.
generate the frozen graph, which contains the x Last layer is the output layer, consists of 11 units
object detection classifier. with a “SoftMax” activation function. The number
- The last step is to use the object-detection classifier of units represents the numbers from 0-9 plus a unit
to test it out on an image, either captured image, to recognize the region which contains “ ﺟﻤﻬﻮﺭﻳﺔ
live image using webcam or a video. ”ﺍﻟﺴﻮﺩﺍﻥthen printing zero if it appeared.
Authorized licensed use limited to: University of Exeter. Downloaded on May 06,2020 at 16:30:45 UTC from IEEE Xplore. Restrictions apply.
Figure 12: Validation loss & validation accuracy for the recognition model
Authorized licensed use limited to: University of Exeter. Downloaded on May 06,2020 at 16:30:45 UTC from IEEE Xplore. Restrictions apply.
[2] S. Du, M. Ibrahim, M. Shehata, and W. Badawy, “Automatic license
plate recognition (alpr): A state-of-theart review,” IEEE Trans.
Circuits Syst. Video Technol., vol. 23, no. 2, pp. 311–325, 2013.
[3] R. Girshick, J. Donahue, T. Darrell, and J. Malik, “Rich feature
hierarchies for accurate object detection and semantic segmentation,”
in Proc. IEEE Conf. Comp. Vis. Patt. Recogn., 2014. [Online].
Available: http://arxiv.org/abs/1311.2524
[4] S. Du, M. Ibrahim, M. Shehata, and W. Badawy, “Automatic license
plate recognition (alpr): A state-of-theart review,” IEEE Trans.
Circuits Syst. Video Technol., vol. 23, no. 2, pp. 311–325, 2013.
[5] H. Bai and C. Liu, “A hybrid license plate extraction method based on
edge statistics and morphology,” in Proc. IEEE Int. Conf. Patt.
Recogn. pp. 831–834, 2004.
[6] K. Deb and K. Jo, “Hsi color based vehicle license plate detection,”
in Proc. Int. Conf. Cont. Autom. Syst., pp. 687–691, 2008.
[7] H.Zhang, W.Jia, X.He, and Q.Wu, “Learning-based license plate
detection using global and local features,” in Proc. IEEE Int. Conf.
Patt. Recogn., pp. 1102–1105, 2006.
[8] K. Lin, H. Tang, and T. Huang, “Robust license plate detection using
image saliency,” in Proc. IEEE Int. Conf. Patt. Recogn., pp. 3945–
3948, 2010.
[9] Ying-Nong Chen, Chin-CHuan Han, Cheng-Tzu Wang, Bor- Shenn
Jeng, and Kuo-Chin Fan, “The application of a convolution neural
network on face and license plate detection,” in International
Conference on Pattern Recognition (ICPR), pp. 552–555,2006.
[10] V. Karthikeyan, V. J. Vijayalakshmi, and P. Jeyakumar, “License
Plate Segmentation Using Connected Component Analysis,” J.
Electron. Commun. Eng., vol. 4, no. 5, pp. 18–24, 2013.
[11] P. Kulkarni, A. Khandebharad, D. Khope, and P. U. Chavan, “License
Plate Recognition: A review,” Fourth Int. Conf. Adv. Comput., pp. 1–
8, 2012.
[12] H. Wu and B. Li, “License plate recognition system,” 2011 Int. Conf.
Multimed. Technol. ICMT 2011, no. 0, pp. 5425–5427, 2011.
[13] Pedro F. Felzenszwalb and Daniel P. Huttenlocher. Efficient Graph-
Based Image Segmentation.
[14] Faster R-CNN: Towards Real-Time ObjectDetection with Region
Proposal NetworksShaoqing Ren, Kaiming He, Ross Girshick, and
Jian Sun
Authorized licensed use limited to: University of Exeter. Downloaded on May 06,2020 at 16:30:45 UTC from IEEE Xplore. Restrictions apply.