Skip to content

Amshra267/Mosaic-PS2

Repository files navigation

Mosaic-PS2

Indian License Plate Recognition

This repository contains our codes and approach for 2nd Round Problem Statement of Mosiac'21 sponsored by RapidAI.

Problem statement:

The Problem Statement was to detecting and recognizing the licence plate of a car.

  • The main part was to segmenting out characters from a Licenceplate and recognizing them.
  • There was a bonus part of detecting the licence plate in real time video.

For more details on PS, visit Here

Approach:

Segmentation:

  • For character segmentation we have used a Sobel based detector for detecting the edges of the plate.
  • After detecting we have segmented out the plate and then used a four point transformation to change it to Birds eye view.
  • After this we have segmented out the characters from the plate using contour detection.
  • For more accurate seperation of the characters from extreme noisy plates we have used a minima based approach.It calculates the frequency of horizontal projection then used the noise reduction using convolution with moving averages and cutting based on miminas. One downside of this appraoch is that it can detect false positives, which we are trying to rectify.

Training and Prediction:

  • For predicting the letters we have trained a model for the characters.
  • The Confusion Matrix is shown here
  • Can check notebook for training here

Video Processing:

  • Firstly we have detected a car from a video using the YOLOv3 object detection model.
  • Then we have tracked that car using OpenCV KCF Tracker until it goes out of field of view to avoid repeatation.
  • Then we have detected the number plate of the car from the image taken using Haar Cascade detector.


Testing:

  • Install the requirements from the requirements.txt file.
  • For segmenting out characters from a plate run the main.py file. It will ask for an image path whrere you provide the path.
  • For tracking vehicles first download the weights and configuration file from here. Then run the tracking.py file, provide the video path.

OUR TESTING SNAPSHOT

References:

Team ✨✨


Mainak Samanta


Akshat Sood


Aman Mishra