Skip to content

This repo contains the code to host pretrained License Plate Recognition model as a flask microservice

Notifications You must be signed in to change notification settings

amithkc3/lpr-flask-api

Repository files navigation

License Plate Detection and Recognition API

The LPR pipeline used in this repo consists of :

  1. YOLOV3 for Plate detection and localization
  2. Contour detection using opencv for character segmentation
  3. 35 class ConvNet classifier for character recognition on a pretrained dataset

System Architecture


LPR block diagram image

LPR block diagram (License/Number Plate Recognition service):


LPR block diagram image

This repo contains the code to host pretrained lpr model as a flask microservice

Dataset : https://www.kaggle.com/amithkumarc3/license-plate-recognition
Download the dataset and place the WEIGHTS folder in the project root dir.

Prerequisite (Requirements)

pip3 install tensorflow==1.14
pip3 install opencv-python
pip3 install pillow 
sudo apt-get install libsm6 libxrender1 libfontconfig1 libxext6 

To run the flask server:

export FLASK_APP=app.py

python3 -m flask run --host=0.0.0.0

Test the server using:

python3 request.py

To run the lpr on a image

change the image path in the execution block of the code ( in lpr.py ) and run
python3 lpr.py

About

This repo contains the code to host pretrained License Plate Recognition model as a flask microservice

Topics

Resources

Stars

Watchers

Forks

Languages