Vehicle Registration Details using ML

Charan Vaddepally
2 min readAug 13, 2021

--

We need to build a system that is capable of-

  • Taking in the image/video (series of images) from surrounding:
    at the hardware end, we need a pc (or raspberry pi) along with a camera and at the software end, we need a library to capture and process the data (image). I’ve used OpenCV (4.1.0) and Python (3.6.7) for this project.

Prerequisites:

  • OpenCV: OpenCV is a library of programming functions mainly aimed at real-time computer vision plus its open-source, fun to work with and my personal favourite. I have used version 4.1.0 for this project.
  • Python: I have used version 3.6.7 here.
  • IDE: I’ll be using Jupyter here.
  • Haar cascade: It is a machine learning object detection algorithm used to identify objects in an image or video and based on the concept of ​​ features proposed by Paul Viola and Michael Jones in their paper “Rapid Object Detection using a Boosted Cascade of Simple Features” in 2001. More info
  • Keras: Easy to use and widely supported, Keras makes deep learning about as simple as deep learning can be.

STEP 1 : Environment

Setup the Environment

  1. Install the dependencies
  2. import the necessary modules

STEP 2 : Plate Detection

  1. Preprocess the image
  2. Extract the plate ( using indian_plate.xml haarcascade)
  3. Save it in an image

STEP 3 : Data Preprocessing/Cleaning

  1. Collect the images of characters from (0–9, A-Z), dimensions: 28x28
  2. Save each character images in their own folders
  3. Create Train and Eval Sets using ImageDataGenerator

STEP 4 : Build and Train the Machine Learning Model

  1. Using Convolution technique
  2. Create layers as mentioned in the program(github link: https://github.com/Charan2k/Vehicle-Registration-Details)
  3. Finally, Compile the model using Adam as Optimizer and Categorical Cross Entropy as Loss function
  4. Train the model by feeding the Image Data that we Generated in STEP 3

STEP 5 : Now Predict the Things

  1. Take an Image and Go through the step 2, and get the number plate
  2. Call API of RTO to get the details of the Vehicle Registration

Link for the Code: https://github.com/Charan2k/Vehicle-Registration-Details

Thanks for Reading. :-)

--

--