This project aims to utilize Machine Learning and Image Processing techniques to detect/extract license plates of vehicle given an image.
You would want to start with the module LP_Detect_main.py. Lets go one by one
This module is aimed to extract features from a license plate/non license plate and store them in the disk (Training Features).
Here, we manually create a small dataset by cropping out License plates from vehicle images and small set of random images (non-license plates).
Usual image processing techniques such as thresholding, standarization, erosion etc. are applied to the images.
We employ Histogram of Oriented Gradients (HOG) as a features extraction technique. In a nutshell, given an image (say 32x32x3) HOG would create a feature vector which can be consumed by a Machine Learning model. You could even experiment with simple features extraction technique such as Edges 32x32 = 1024x1, Flattening the image (32x32x3) into 3072x1 and use these vectors as an input to Machine learning Models.
From step 1 we already have our features, now all we have to do is send these features to a machine learning model to learn a reasonable boundary to separate License plates and Non-License plates.
In our case, the data is not very big, so we use Support Vector Machines as our machine learning model. SVM's with RBF kernel performs excellent with small data size and are robust to overfitting.
Look HERE to get a sense of the directory name, so that you can run the model for yourself.
Training data is manually created by taking a vehicle's image and cropping out the license plate image. Another simple way would be to extract all possible contours form the image (look at /Code/Classify.py) and save them in a directory. Then manually go an select the license plates. Below are some images of License plates used for Training.
For testing, an image containing a vehicle image with its license plate was provided. Given the image we first extracted all the ROI's and then classify each ROI's as a license plate or not a license plate.
A sample of Dataset is provided: Look under the directory folder "/DataSet" to get a sense of the dataset.