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.2.tar.gz (17.9 kB view details)

Uploaded Source

Built Distribution

moroccan_licence_plate-0.1.2-py3-none-any.whl (20.3 kB view details)

Uploaded Python 3

File details

Details for the file moroccan_licence_plate-0.1.2.tar.gz.

File metadata

File hashes

Hashes for moroccan_licence_plate-0.1.2.tar.gz
Algorithm Hash digest
SHA256 0a4acb552f95844af07c1f959e1e8f0a2ec0646f0be651e7004e6b25c908a7fb
MD5 e8401cf89cee48a093364766a857cfa0
BLAKE2b-256 92aacf7ee08ccc89032d883efcbfc6dfacc35e00c9904fba5d18cfd130360087

See more details on using hashes here.

File details

Details for the file moroccan_licence_plate-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for moroccan_licence_plate-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 457fb2631fe3a5c5a81a6ab240ed906795ce09318c7ea9bac23f31516032756d
MD5 43304dc87511f97d3dcc3e790ceb534f
BLAKE2b-256 15429565c8ac0216150d4716164d2814e56d15e6ae73e260c81d56b28a86fbb3

See more details on using hashes here.

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