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.
- 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
- Install the dependencies
- import the necessary modules
STEP 2 : Plate Detection
- Preprocess the image
- Extract the plate ( using indian_plate.xml haarcascade)
- Save it in an image
STEP 3 : Data Preprocessing/Cleaning
- Collect the images of characters from (0–9, A-Z), dimensions: 28x28
- Save each character images in their own folders
- Create Train and Eval Sets using ImageDataGenerator
STEP 4 : Build and Train the Machine Learning Model
- Using Convolution technique
- Create layers as mentioned in the program(github link: https://github.com/Charan2k/Vehicle-Registration-Details)
- Finally, Compile the model using Adam as Optimizer and Categorical Cross Entropy as Loss function
- Train the model by feeding the Image Data that we Generated in STEP 3
STEP 5 : Now Predict the Things
- Take an Image and Go through the step 2, and get the number plate
- 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. :-)