Skip to content

rish-hyun/anpr-tf-ssd_mobilenet_v2

Repository files navigation

anpr-tf-ssd_mobilenet_v2

Automatic number-plate recognition built using tf-ssd_mobilenet_v2


  • The tf-ssd_mobilenet_v2 model is trained using transfer learning (fine-tuned).
  • The annotated dataset used for learning is taken from kaggle.
  • Trained steps --num_train_steps=10000

Trained model is evaluated in TF_OD.py

import cv2
from TF_OD import predict


for sample in ['sample_images/Cars_01',
               'sample_images/Cars_02',
               'sample_images/Cars_03']:

    img, box = predict(f'{sample}.png')
    cv2.imshow(sample, img)
    # cv2.imshow(f'{sample}_number_plate', img[box[0]:box[1], box[2]:box[3]])
    cv2.waitKey(0)

Results


In the next step, OCR can be applied to ROI (number-plate detected region)

  • For this, any model can be used such as such as KerasOCR, PyTesseract, EasyOCR, etc.
  • I trained a simple OCR model from scratch using MNIST and Kaggle datasets of handwritten digits and alphabets.

The code for training OCR can be found in OCR.ipynb

Final Note

OCR Model is not at its best. A trained Attention OCR Model would perform a lot better.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published