0% found this document useful (0 votes)
302 views31 pages

"Parkit" - A Parking Space Finder App

This document is a project report submitted by Sanket Mhatre, Mariselvam Thevar, and Pratik Telang for their B.E. in Electronics Engineering. It describes their project titled "ParkIt" - A Parking Space Finder App developed under the guidance of Prof. Akhil Masurkar. The report includes a declaration, certificate of approval, acknowledgements, table of contents, and abstract providing an overview of the project which aims to develop a mobile application to help users find available parking spaces and book them in advance through online payments.

Uploaded by

Reetik Kothari
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
302 views31 pages

"Parkit" - A Parking Space Finder App

This document is a project report submitted by Sanket Mhatre, Mariselvam Thevar, and Pratik Telang for their B.E. in Electronics Engineering. It describes their project titled "ParkIt" - A Parking Space Finder App developed under the guidance of Prof. Akhil Masurkar. The report includes a declaration, certificate of approval, acknowledgements, table of contents, and abstract providing an overview of the project which aims to develop a mobile application to help users find available parking spaces and book them in advance through online payments.

Uploaded by

Reetik Kothari
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 31

“ParkIt” – A Parking Space Finder App

Submitted in partial fulfilment


Of the requirement for the degree of
B.E (Electronics Engineering)

Submitted By

Sanket Mhatre (18103B0018)


Mariselvam Thevar (18103B0013)
Pratik Telang (18103B0002)

Under the Guidance of Prof. Akhil Masurkar Department of


ELECTRONICS ENGINEERING

Vidyalankar Institute of Technology, Wadala(E), Mumbai 400 037

University of Mumbai

2021-22

1
DECLARATION

I declare that this written submission represents my ideas in my own words and where other
ideas or words have been included, I have adequately cited and referenced the original source.
I also declare that I have adhered to all principles of academic honesty and integrity and have
not misrepresented or fabricated or falsified any idea data act/source in my submission. I
understand that any violation of the above will cause for disciplinary action by the Institute
and can also evoke penal action from the sources which have thus not properly cited or from
whom proper permission has not been taken when needed.

Name of student Roll No Signature

2
CERTIFICATE OF APPROVAL

This is to certify that

“ParkIt” – A Parking Space Finder App

is a bona-fide work of

Sanket Mhatre (18103B0018)

Mariselvam Thevar (18103B0013)

Pratik Telang (18103B0002)

In partial fulfilment of degree course in

Electronics Engineering

As laid down by University of Mumbai during the academic year

2021-22

Under the Guidance of Prof. Akhil Masurkar

Signature of Guide Head of Department

Examiner Principal

3
Project Report Approval for B.E.
This project report entitled “ParkIt” – A Parking Space Finder App by

1. Sanket Mhatre (18103B0018)


2. Mariselvam Thevar (18103B0013)
3. Pratik Telang (18103B0002)

is approved for the degree of Bachelor of Engineering in Electronics

Examiners

1.-----------------------------------------

2.-----------------------------------------

Date:
Place:

4
Acknowledgement
We have taken efforts in this project. However, it would not have been possible

without the kind support and help of many individuals and organizations. We would

like to extend our sincere thanks to all of them.

I would like to express my special thanks of gratitude to Prof. Akhil Masurkar who gave us

the opportunity to do this project on the topic “ParkIt” – A Parking Space Finder App which

also helped us in doing a lot of Research and we came to know about so many new things we

are really thankful to him.

I would like to extend my sincere gratitude for the academic and technical staff of the

Electronics Engineering Department for their support throughout my graduate studies

by providing the required resources.

This would be incomplete without acknowledging the love and support of my

parents and Friends who always stood by me at every point of life.

Project Members:

1. Sanket Mhatre (18103B0018)


2. Mariselvam Thevar (18103B0013)
3. Pratik Telang (18103B0002)

5
Table Of Contents

Certificate
Declaration

Certificate of Approval

Project Report Approval

Acknowledgement

List of Figures

List of Tables
Abstract

1. Project Description 8

1.1 Background of the study 8

1.2 Statement of the problem 8


1.3 Purpose of the study. 9
1.4 Limitation of the Study 9
2. Existing System 10
3. Proposed System 12
3.1. Mobile Application and Backend Server 12
3.2.1 Detection of a car and a license plate. 13
3.2.2 Localization of the license plate in the input image. 14
3.2.3 Extraction of the license plate. 15
3.2.4 Optical character recognition. 15
3.3. Block Diagram 16
4. Requirements 17
5. Timeline 19
6. Implementation 20
6.1. Frontend Application 20
6.2. Backend 21
6.3. ML Model 22
7. Conclusion 28

References

6
Abstract

The total number of vehicles on the road as of January 1, 2019, is at 3.49 crore, of which
35.75 lakh vehicles are 10.2% are in Mumbai and its surrounding townships. Finding parking
spaces in metropolitan cities like Mumbai is always a hassle. People always need to travel an
extra mile to find the perfect and safe parking spot for their precious vehicle. The project aims
to tackle the issue of finding parking spaces in urban cities by building a platform where users
can rent a parking space or even put their own parking space for rent to earn some extra cash.

The project makes an attempt to develop an application where users can find nearby available
parking spaces at their desired location and can make advance online payments to book the
parking spot in the advance without having to worry about to were to park after reaching the
distance. Users not only can not only book parking space but also register on the application
to rent their own personal parking spaces to earn some cash. The project aims to be market fit
which can satisfy both the supply and demand. The term convenience is not usually associated
with the task of finding a parking space. The project aims to change this perception.

The method of operating of parking space is remained the same throughout the years and
haven’t seen much innovation other than few security upgrades and is still a manual task. We
want to utilize the existing infrastructure of available security cameras to power up with
machine learning and image processing for object detection and bring automation to the task.

7
Chapter 1- Project Description

1.1 Background of the study

Parking spaces haven’t see much innovation in recent years. Apart from some security
upgrades, the way parking spaces operate has remained the same over the years. Finding a
parking spot in metropolitan cities like Mumbai, is always a hassle. The sheer amount of
vehicles present in the densely crowded city, it is very difficult to find a safe parking space
easily. Drivers have to drive an extra mile to find a parking space which consumes extra time
and fuel for the driver. Commercial and government parking some provide some relief in the
parking situation but most of the time they are always too crowded or expensive or not
available in every location.

Parking and convenience are often considered as mutually exclusive events. Due to lack of
proper infrastructure to support parking needs of metropolitan cities people usually tend to
move to parking on side of the streets which is not safe and even illegal in some places. Street
side parked vehicles are one of the main reasons contributing traffic in the city. With more
than 36 lakhs cars reported in the city as of 2019, road traffic is major problem in the city due
to the sheer number of vehicles. The street side parked cars also play a significant role
contributing to the traffic of the city. Apart from contributing to the city traffic, these street
side parked vehicles are also a prime target of theft and vandalism.

1.2 Statement of the problem

The project aims to bring innovation in the field by proposing a solution to the painstaking
problem of finding a parking space. The project aims to bring convenience to the task which
is not often related while finding a parking space. In addition to ease out the process, the
project aims to provide an array of features to the users.

To describe the project in one line, “An Airbnb for parking spaces”. A platform where users
can find nearby parking spaces. An application with integrated maps to help find the available
parking spaces. The users can book the desired parking space in advance by making easy
online payments through payment gateways also integrated in the application. Users not only
can book parking spaces, but also rent their own parking spaces through the application to
earn some extra cash.
8
The project aims to utilize the power of computer vision to provide security for the users. The
parking space registered on the application will be provided with an on-site server and a
camera if not already available on the site. The camera will be enhanced with machine
learning capabilities using image processing for object detection and number plate detection
to identify and monitor the vehicles. This will also enable us to automate the check-in and
check-out process and charge the users accurately for the time utilized.

1.3 Purpose of the study

Develop an application that aims to achieve a product level performance which can be a great
market and revolutionize the traditional methods of operation of parking spaces. An efficient
and scalable application which is an amalgam of app development, machine learning, IoT,
system design, Cloud Computing and Product Development.

An attempt to provide a platform that brings convenience to the users while finding a parking
space. Users can save their precious time and find a perfect parking spot for their vehicle. A
highly scalable and efficient application with the latest technology standards and best
practices to provide a quality user experience to the users.

Through this project we aim to provide a platform to both type of users, i.e. people looking to
rent and people willing to rent their own parking space. We see this project to be a great
market fit which can satisfy the both supply and demand present. The project aims to be a
potential product for the Indian market.

1.4 Limitation of the Study

The scope of the project is limited to parking spaces which will be only registered on the
application. The aim is not intended to show availability of public parking spaces like road
side parking spots, open grounds, etc.

9
Chapter 2 – Existing System

The existing traditional parking systems have remained untouched in their way of operations
from decades. As of today, there is no such application or platform available to provide the
convenience to users of booking a parking spot in advance for all places in the city. People
need to travel to the location and then begin searching for a parking spot. Even though,
security cameras are present but they still are used for manual monitoring. The addition of
security and automation that machine learning and image processing can bring in is missing in
most places.

To achieve an environment of complete automation, cars can be used as a Proof of Identity


(PoI) and the unique registration plate number provides the opportunity to track the movement
of cars in turn tracing humans that are associated with that car. This was identified in the past
that is why tracing of cars is being used from as early as the 1980s. Advancements in
computer vision techniques now allow us to do that automatically without human
intervention. ‘Feature based license plate localization’ [2] is a technique that is used for
license plate localization. This approach consists of several algorithms developed based on
general features of both, characters, and license plate. For pre-processing, the input gray-scale
image is adaptively converted into binary image using Otsu’s method. A mask having the
shape of inverted ‘L’ and size equal to maximum possible character dimensions is rolled
throughout the binary image. At every increment a position is shortlisted as possible character
location if there is at least a single white pixel in the region and there is at least a single white
pixel on the immediate next row and column of the region. Size of each shortlisted character
calculated. If it is less than half of the maximum possible character size that location
discarded. Subsequently multiple detected portions are discarded using filters such as white
pixel density, height, and width and one final region is decided to recognise characters. If
cases where the license plate script is not in English language or the license plate is barely
visible are excluded then, 82% of the plates were recognized correctly which means in ideal
conditions it was able to predict correct outcome only 82% times. The performances of
individual sections are 87% for license plate localization and 85% for character recognition
and 95% for character segmentation. A SVM (Support Vector Machine) [1] which has been
trained on a chosen data set for most of Indian license Plates. A detailed analysis has been
done before making these SVM which is the first step to finalize if any of the regions in the
video frame has a license plate or not and if it has it will select the exact plate which is
containing the number. In this an image is first pre-processed i.e., it is converted from RGB to
10
grayscale. After that segmentation is applied for detecting license plate location in the image.
For that image is passed through a Sobel edge detection filter to detect horizontal edges. Now
the image applied to Otsu's threshold and binarized. After that, morphological operations are
performed on the image to detect probable license plate regions. All rectangular contours are
selected, and characters are segmented and recognised. Most of the algorithms use features of
license plates to localise the area of number but none of them treats license plate as an object.
We are trying to use object detection algorithms which perform better on low end GPUs and
provide less response time which will allow us to detect in real time.

11
Chapter 3 – Proposed System

3.1. Mobile Application and Backend Server


The system design of the application has been distinguished into 3 parts. A frontend
application, a backend server and a client server. The frontend application will be built using
React Native. A cross-platform application development JavaScript Framework to build
applications for both Android and IOS platforms. The backend of the application will be made
using Flask. Flask is a python-based micro web framework. All the logic and API endpoints
consumed will be implemented and served on Flask. The backend will again consist again of
the other essential component i.e. a Database server. Due to the flexibility and scalability
advantages provided by NoSQL databases we chose to opt for MongoDB considering our use
case and needs aligned with it. Both the Backend server and Database server will be hosted on
the Cloud using an AWS EC2 Instance. AWS being one of the most widely used and trusted
cloud platforms and the benefits it provides to students made it a no-brainer for us. On the
client-side i.e. the parking spot.
A client server will be installed on the site consisting of a Raspberry Pi and a camera unit. The
primary task to establish a communication between the site and the backend server on the
cloud. The on-site client server will capture the camera feed and send it over to the cloud to
bring the image processing in to the picture. The entire application will depend on the 3 way
communication between the frontend application, the backend server and the client server.
The client server will be used mainly to power the image processing tasks, object detection
and license plate recognition.

3.2. ML Model
License plate recognition has been used in various fields like toll booths, traffic courts,
criminal proceedings, etc. We propose to use ALPR in the management of a parking space.
Specifically installed, or pre-installed cameras can be used to detect and recognise license
plates of cars that enter the space. The registration numbers can be used to keep track of the
cars in and out of the space. The data can then be used to identify empty and filled parking
spots and can be updated in real time using subsequent image capture and verifying the
license plates. The car owners can also be charged based on the timestamps of the entry and
exit of the car with a particular license plate.

The license plate recognition consists of 3 steps, they are as follows:

12
1. Detection of a car and a license plate.
2. Localization of the license plate in the input image.
3. Extraction of the license plate.
4. Optical character recognition.

1. Detection of a car and a license plate:


The very first step is to detect the car and license plate in the input image. Consider the
License plate as an object and to recognise it we must use different object detection
algorithms. There are two different concepts which come into picture which are object
classification and localization. Classification is nothing but classifying the type of object like
a car, bike or a person and localization is locating where the object is in the image by drawing
a bounding box over it. Object detection is a combination of both classification and
localization of the object in the image. In this approach, we propose the use of an algorithm
called YOLOv4 (You Only Look Once). It is a real-time, GPU centric object recognition
system that can recognize multiple objects in a single frame. YOLO recognizes objects more
precisely and faster than other recognition systems. It can predict up to 9000 classes and even
unseen classes. The real-time recognition system will recognize multiple objects from an
image and make a boundary box around the object. It can be easily trained and deployed in a
production system. YOLO is based on a single Convolutional Neural Network (CNN) as
opposed to R-CNN. The CNN divides an image into regions and then it predicts the boundary
boxes and probabilities for each region. It simultaneously predicts multiple bounding boxes
and probabilities for those classes. YOLO sees the entire image during training and test time
so it implicitly encodes contextual information about classes as well as their appearance.
When YOLO came into the picture of Deep Learning Object detection algorithms, many
algorithms were proposed to detect the object from the image but YOLO took a completely
different approach. It was not the old classifier again produced to be an object detector. The
fact that YOLO looked only once which the name shows and detected the object attracted
many new deep learning developers. It looked only once but in a clever way.

What is new in YOLOv4?


YOLOv4’s architecture is composed of CSPDarknets53 as a backbone, spatial pyramid
pooling additional module, PANet path-aggregation neck and YOLOv4 head. CSPDarknet is
a novel backbone that can enhance the learning capability of CNN. The spatial pyramid
pooling block is added over CSPDarknet53 to increase the receptive field and separate out the
most significant context features. Instead of Feature pyramid networks (FPN) for object

13
detection used in YOLOv3, the PANet is used as the method for parameter aggregation for
different detector levels.

Improvement over YOLOv3.


YOLOv4 is twice as fast as EfficientDet (competitive recognition model) with comparable
performance. In addition, AP (Average Precision) as FPS (Frames per second) increased by
10% and 12% compared to YOLOv3.

2. Localization of the license plate in the input image.


Localization of license plate is an essential step for character recognition as it reduces the
field for character recognition, thus making the process faster and more efficient. A dataset of
1500 images from the Google Open Image Dataset was prepared using the OIDv4 toolkit. The
dataset consisted of images of cars with license plates in different settings. Some images were
focused images with the license plate in focus, while some images had multiple license plates.
In some images license plates were barely in focus. In these cases, the annotations required
custom attention. Inclusion of out of focus license plates brings a robustness in the system that
can help it work in instances where the input images may be especially unfavourable. A
YOLOv4 darknet was trained on these images using a GPU. We used the GPU provided in
Google Colab (NVIDIA Tesla K80 GPU). We trained the model on Google Colab for
approximately 18 hours (6 hours per 1000 iterations). After every 1000 iterations a weights
file is saved in the virtual environment. This weight file is then used to deploy a TensorFlow
model on the local environment. TensorFlow is a very fast and efficient way of employing the
power of the Darknet without building the darknet every time we run the model. The
TensorFlow model built using the .weights file created on Google Colab gives very promising
results. A localization accuracy of more than 90% was achieved for almost all the testing
instances. The bounding boxes were placed accurately around the license plates in a high
majority of testing instances.
When the algorithm is efficient but with countries like India, we should also take care that the
images we are using should be better and help our algorithm to some extent to improve
accuracy of the overall model. Some of the ideas which we can focus on to improve camera
performance is to focus on different camera settings like the iris size, shutter speed of the
camera, what is the angle of the camera and the position of the camera? Some more things on
which we can focus are the lightning conditions and type and size of lens.

14
3. Extraction of the license plate.

Extraction of license plate from the input image reduces the redundancy in optical character
recognition. When we take an input from field devices like camera, we have an image with
everything from a car in question, as well as parts of other cars, pillars, slot markings, etc. To
run PyTesseract to recognize individual characters from the license plate, many pre-
processing steps are required. These steps reduce the area which is to be scanned for text
recognition.

The number plate typically has a known aspect ratio and a rectangular shape. In this, the
images were first scaled to a fixed aspect ratio. Then evaluated and put to test various
algorithms from the past proposed research and compared the results by implementing it for
the dataset. One of the number plate extraction methods they evaluated is based on the
vertical edge information. It detects the vertical edges using Sobel operator. The number plate
is localized by comparing the preset minimum and maximum lengths with that of the
extracted edges and removing the unwanted ones. Vertical and horizontal edge histogram
information is used for number plate extraction. Testing 50 images of various fonts and light
conditions resulted in 90% extraction accuracy. In some cases, a certainty score of 100% was
achieved using our current YOLOv4 detector. Edge detection algorithms are commonly used
to extract number plates by finding all the rectangles in the acquired images. Mostly, the car
body and number plate area have a clear colour transition. The differentiation between the two
is done by identifying the edges using edge detection filters or algorithms. Edges are detected
by performing vertical edge detection to extract the vertical lines and horizontal edge
detection to get the horizontal lines or simultaneous use of both to extract a complete
rectangular shape. The number plate can be detected by using the geometric attributes by
locating the rectangle lines. Various edge detection filters Sobel, Canny, Gabor & Log-Gabor
filters for ANPR systems are compared in.

4.Optical Character Recognition.

The current approach used by us in this system is an OpenCV + PyTesseract based approach.
Python provides two libraries used for image processing precompiled with hundreds of
functions, making them very effective. A typical ANPR system goes through the general
process of image acquisition (input to the system), number plate extraction (NPE), character
segmentation (CS) and character recognition (CR) (as output from the system). After
15
successful recognition of the vehicle the data can be accessed and used for post processing
operations as required. The vehicles data is sent to the connected back-office (server backend)
system software which is the central repository to all data along with tools to support data
analysis, queries and reporting accordingly. This data collected can be utilized for several
other intelligent transportation applications since ANPR systems not just visually capture the
vehicle images but also record the metadata in their central repository. This can potentially
include vehicle recognition through date and time stamping as well as exact location. We
propose to use this data for making parking entries, exits, etc. We can use the timestamps to
charge the vehicle owners for the parking

3.3.Block Diagram

16
Chapter 4 – Requirements

1. React Native

React native is an open-source framework for building android and iOS applications using
react and the app platform’s native capabilities. With react native, you use JavaScript to
access your platform’s APIs as well as to describe the appearance and behavior of your UI
using react components: bundles of reusable, nest able code.

2. Flask

Flask is considered more Pythonic than the Django web framework because in common
situations the equivalent Flask web application is more explicit. Flask is also easy to get
started with as a beginner because there is little boilerplate code for getting a simple app
up and running. Flask comes with wide array of extension libraries comes at the cost of
having a more complicated project setup. Flask's success created a lot of additional work
in issue tickets and pull requests. Armin eventually created The Pallets Projects
collection of open-source code libraries after he had been managing Flask under his own
GitHub account for several years. The Pallets Project now serves as the community-
driven organization that handles Flask and other related Python libraries such as Lektor,
Jinja and several others.

17
3. MongoDB

MongoDB is a non-relational document database that provides support for JSON-like storage.


The MongoDB database has a flexible data model that enables you to store unstructured data,
and it provides full indexing support, and replication with rich and intuitive APIs. We chose
MongoDB as our database due to its inherent features of scalability and flexibility as being a
NoSQL database.

4. AWS

Amazon Web Services (AWS) is a cloud service from Amazon, which provides services in
the form of building blocks, these building blocks can be used to create and deploy any type
of application in the cloud.

18
Chapter 5 - Timeline

1. Build Front end mock up


Design and build screens for the frontend mobile application. Develop the Frontend
application with React Native and structure the frontend application with state management
libraries like Redux.

2. Back-end development
Build and develop logic for the application by creating APIs to establish communication
between the frontend and the back end and maintain a database for the application. Build
general APIs, Integrate Map in the application, and handle other third party integrations for
payments, auth, etc

3. Build a ML model
Build a Image processing model using SOTA models like yolo v4 and Intel open vino models.
To carry out the task of number plate detection and object detection in real-time. And also
collect and annotate the data to train the model to yield good results.

4. Client-side server on Raspberry Pi


Build a client-side server on a raspberry pi to integrate camera module and establish the
connection with the backend server. The client side server will send image recording to the
backend to carry out further image processing.

19
Chapter 6 – Implementation

1. Frontend Application –

Step 1: Build mock UI Prototype

To initiate the process of application development a mental map was required to develop the
screens of the application. The mock UI Prototype was designed and implemented in Figma.
The Prototypes helped to convert the ideas into code rapidly.

20
Step 2: Coding the Figma Prototypes into working app

Step 3: Map Integration

The next step was to integrate Google Maps into the application.

2. Backend

Step 1: Setup and create Backend Flask environment.

The first step in the backend development was to setup and create the environment for Flask.
Install dependencies, structure the project and make establish necessary connections to
initialize the API development.

Step 2: Connect the Database

After setting up the Flask server the next step was to create a Database. The Database was of
our choice MongoDB because of the inherent advantages provided by NoSQL.

Step 3: Implement Auth APIs

After establishing the connections with the database. The next step was to create auth APIs
i.e. Login and Register. The Register API to collect the user details and create the record in

21
the database and return the permission access in return. The second API was Login API to
take the input from the user and verify it with the database record.

Step 4: Collect Vehicle Dataset

A dataset consisting all Indian cars and their specifications was required to ease out
the vehicle registration process on the application. Multiple datasets were combined to gather
the relevant data.

Step 5: Vehicle APIs

After collecting the required data, vehicle registration APIs were implemented for the vehicle
registration process on the application.

3. ML Model

Step 1: Creation of Dataset.


To make a dataset for the training of the object detector, we had to gather a large number of
images containing different vehicles with license plates, primarily cars. But the dataset also
contains images containing buses, trucks, bikes, etc. For this we used the OIDv4 toolkit which
contains all the necessary functions for gathering, labelling, and annotating the data images.

Fig. Snapshot of the dataset we created.

After collecting the images, they required labelling, and annotating. Annotating the images
implies creation of a text files for every image in the dataset. This text file has same filename

22
as the image itself and contains the location of the license plates found in the images. If the
image has only one license plate, the corresponding text file has only one line that contains
the origin point of the license, the height and width of the license plate.

Fig. YOLOv4 format of class annotation

Step 2: Training the Darknet on Google Colab:


After the creation of the dataset, it had to be compressed and sent to the Colab virtual
environment. The darknet then runs for 6000 iterations, generating an intermediate .weights
file after every 1000 iterations. After running the darknet for approximately 18 hours, the
detector then produced a stagnant iteration to accuracy graph. At this point the training was
stopped and the final .weights file was saved for the TensorFlow model.

Fig. mAP at the start of training. Fig. mAP at the end of 6000 iterations.

Step 3: A TensorFlow model for deployment on local device.


Created by the Google Brain team, TensorFlow is an open-source library for numerical
computation and large-scale machine learning. TensorFlow bundles together a slew of
machine learning and deep learning (aka neural networking) models and algorithms and
makes them useful by way of a common metaphor. It uses Python to provide a convenient
front-end API for building applications with the framework, while executing those
applications in high-performance C++. TensorFlow applications can be run on most any
23
target that’s convenient: a local machine, a cluster in the cloud, iOS and Android devices,
CPUs, or GPUs. If you use Google’s own cloud, you can run TensorFlow on Google’s
custom TensorFlow Processing Unit (TPU) silicon for further acceleration. The resulting
models created by TensorFlow, though, can be deployed on most any device where they will
be used to serve predictions.

Step 4: Localization of license plate.

We have created a virtual environment using in which we have installed all the dependencies
and a CUDA model for compiling, running and testing the TensorFlow model. This is
followed by running a detection on the image of interest. The system can give customized
outputs based on the given commands.

Fig. Customized command designed only to localize the license plate.

Result:

As shown in the fig, the proposed YOLOv4 detector gives more than 95% of accuracy in
localizing the license plate. The model also detects multiple license plates in a single image,
license plates not strictly in a horizontal configuration with promising accuracy.

24
Fig. Localization results in unfavourable configurations.

Step 5: Extraction and character recognition.

After localising the license plate, the image has to be processed to isolate the area bound by
the bounding boxes. Then various filters are applied to make the images suitable for text
recognition. The image is cropped, Gaussian blur is applied, dilated, and then contoured.

1.

Fig. Image after applying Gaussian Blur

2.

Fig. Image after thresholding

3.

Fig. Image after Kernelling and dilating.


25
4.

Fig. Image after character segmentation.

Character segmentation helps the PyTesseract module to interpret the license plate as a list of
individual characters. This then goes as a group of image segments into the module and later
parsed as a single string of images. The range of characters can be limited by input arguments
which can make the module consider only alphanumeric characters. This can reduce the
number of redundant calculations thus increasing the speed of the OCR.

The final image is passed to the PyTesseract ‘image_to_string’ function which then returns
the license plate as a string. This string then can be used by our backend server and the user.
The registration number can be used for profile generation, slot tracking, parking charges

5.Results of the OCR for few of the test cases.

26
27
Chapter 7 – Conclusion

The Existing systems developed for ANPR do not make use of state-of-the-art computer
vision algorithms to detect plates that is why other technologies like RFID are being used on
toll booths which require more investment than simply setting up a computer with GPU.
These algorithms provide a very good accuracy which is comparable to RFID if cameras are
placed in certain angles and right direction. Currently we have tried using the YOLOv4 but in
future there will be other algorithms which will be better than YOLOv4 and can be used for
real time parking management and charging the customers.

28
References:

1. As Efficient and Layout-Independent Automatic License Plate Recognition System Based on


the YOLO detector.
URL - https://arxiv.org/abs/1909.01754

2. Vehicle-Rear: A New Data set to Explore Feature Fusion for Vehicle Identification Using
CNN
URL - https://www.inf.ufpr.br/rblsantos/papers/oliveira2021vehicle-published.pdf

3. End-to-end trainable network for degraded license plate detection via vehicle-plate relation
mining.
URL - https://arxiv.org/abs/2010.14266

29
30
31

You might also like