Car Plate Number detection & RTO Verification check by Machine Learning using Python

Akanksha Singh
3 min readSep 7, 2021

Many a times in Parking we face issues, people park their cars in different directions/angles and we 😒 yell at ourselves that why we parked our cars besides theirs. 😂

Isn’t it amazing when an application gives car owner details so that we can identify them and ask for help. Just by putting number plate value you can directly verify details from authorized party — RTO.

Let’s check the application and it’s working…

Firstly we need to understand how we get the car number plate values just by scanning number plate. Yes you guessed right, it’s computer vision which will help us in it.

  1. Import some libraries:
Import these python library

Make sure you must have downloaded all using “pip install” command

2. Write function to extract number plate image

Captures image of car

Using cv2 module connect with camera and click the image of car. Here we are opening internal camera using VideoCapture() function, then read image store in variable, convert image in gray format.

On pressing Enter key (13), the camera stops capturing image and the loop ends.

3. Write function extract number plate region from Image.

Filter number plate

Just to filter number plate region we need to identify the coordinates and store the new extracted image in another variable. easyocr python library helps to detect image having text.

4. Lastly get the number plate value in text format function.

Get text from image

After this part you will get the number plate value, copy paste it in the application (Car Number field).

Lets check the html and js code, for backend I have used Python CGI.

Backend code:

JavaScript Code:

HTML code: (Structure of Web Application):

Html code

Lets see how our website looks and works…

◾ Click on html file, it will open in browser:


After entering the number plate value, you will get details replacing “Details” division.

Output screen

Hope this small project help you. Thanks for Reading.

You may connect me on LinkedIn:

For code of this mini project visit:



Akanksha Singh

Platform Engineer | Kubernetes | Docker | Terraform | Helm | AWS | Azure | Groovy | Jenkins | Git, GitHub | Sonar | NMAP and other Scan and Monitoring tool