Skip to main content

Detection and recognition of moroccan car licence plates.

Project description

CHARACTER DETECTION PIPLINE OF CAR LICENCE PLATES

In this repository you will find a method to recognize the numbers of a car plate in street view images.

If you want to build a license plate detection model in your country, but couldn't find a pre-trained model or an annotated dataset (bounding boxes on both plates and characters inside the plates) because you have characters in a different language (like Arabic, Chinese, Hindi...). This repository can be useful to you.

The used pipeline for character recognition from car images can be summarized in three steps:

  • find the bounding box of the full licence plate in an image using a trained yolov3.
  • find the bounding box of each character in the plate using a customized yolov3 trained on synthesized data.
  • reconstruct the plate number based on the bounding box positions.

There is a possibility to use classical computer vision methods (canny, thresholding ...) to detect the plate and the characters, but this solutions are not robust, for example the images can contain, different kinds of noise and backgrounds. Also OCR solutions like Tesseract does not work for noisy images.

This is why a neural network based solutions can be a good solution, by training it on a varied dataset.

YOLO (You Only Look Once) is one efficient NN model in object detection, it's performant in terms of accuracy and inference time.

For The first step, we will use a trained yolo model to detect the licence plates in images, the pretrained models can be found here and here.

But For the second step, didn't find any annotated dataset or any trained model annotated dataset that can detect digits and arabic characters of the moroccan plates, so we will create our dataset and train a custumize yolo.

For the creation of datasets, we just take random images as backgrounds and write on top of them characters with different fonts and sizes, then we can use some artifacts (rotations, perspectives, blur, noise ...) in the online data auguementation, then we feed those images to the model.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

moroccan_licence_plate-0.1.1.tar.gz (17.6 kB view hashes)

Uploaded Source

Built Distribution

moroccan_licence_plate-0.1.1-py3-none-any.whl (20.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page