Part-I : using a Pre-Trained Keras Model for License Plate Detection

4 Part blog series : Documenting the learnings of my experimentation on Object Detection using Keras, Tensorflow

Karan Singh
2 min readMar 28, 2021
License Plate Detection using a pre-trained Keras Model
License Plate Detection using a pre-trained Keras Model

Recently i was working with my friends at RHT on an interesting use case of Deep Learning. This blog series is a collection of “how to do” certain things that i learned during my ML experimentation. Here is the library of all my blogs under this series

Introduction

I used a pre-trained model called wpod-net for detecting license plate. I would like to thank Quang Nguyen , my experimentation uses Quang’s work as the base.

Keras separates the concerns of saving your model architecture and saving your model weights.

  • Model weights : are saved to HDF5 format (*.h5) . This is a grid format that is ideal for storing multi-dimensional arrays of numbers.
  • Model Structure : Also known as model architecture, which are described and saved in JSON format (also in YAML format if you prefer)

You can find wpod-net keras model weight and structure files wpod-net.h5and wpod-net.json in my repository. In this blog post we will learn how to use this pre-trained model and detect license plate from an input car image. If you like to follow along, refer to 1_use_pre_trained_model.ipynb jupyter notebook from my repository

Assuming you have installed all the required python libraries, Once you run this notebook in your jupyter environment, you should be able to detect number plates from the supplied input image, as shown below

License Plate Detection using a pre-trained Keras Model
License Plate Detection using a pre-trained Keras Model

Don’t get disheartened if this model is unable produce results you are looking for. It’s not perfectly trained model , refer to the sample images that i have provide in dataset directory for detection purpose.

Summary

  • We were successfully able to use pre-trained keras model that comes as two independent files wpod-net.h5which is the keras model file and architecture/configuration file wpod-net.json . usingble to detect number plate from the car image.
  • In the next blog we will learn how to save both keras model file (*.h5) as well as the configuration file (*.json) into one single file (*.h5) and make sure that works well

--

--

Karan Singh

Co-Founder & CTO @ Scogo ♦ I Love to solve problems using Tech