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
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
- Part-I : using a Pre-Trained Keras Model for License Plate Detection
- Part-II : Converting(Saving) Keras Model as a single HDF5 (.h5) file
- Part-III : Convert Keras Model to TensorFlow frozen graph model
- Part-IV : Convert Keras Model to TensorFlow SavedModel Format
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.h5
and 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
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.h5
which is the keras model file and architecture/configuration filewpod-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