SajjadAemmi / VLPR

Vehicle and License Plate Recognition

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Vehicle and License Plate Recognition

This software implements the Deep Learning based Vehicle and Persian License Plate Detection and OCR in opencv using Python and C++.

Reference

Screenshot

Usage

Python

Install

Python >= 3.6.0 required with all requirements.txt dependencies installed:

cd python
pip install -r requirements.txt

Build lanms

cd source/lanms
make

Back to the root of project and download pretrained models from GoogleDrive and put them to models directory.

Inference

Run following command for process image in command line interface mode:

python3 python/inference_image.py -i IO/input/1.bmp

Run following command for process image in graphical user interface mode:

python3 python/inference_gui.py

Run following command for process video in command line mode:

python3 python/inference_cli.py

Results will save in ./IO/output directory.

Note that these processes run on cpu. For best performance you must build opencv on CUDA or use docker

Docker

Build docker image

docker build -t LPR .

Then run it

docker run --gpus all -it --rm -v $(pwd)/IO:/workspace/LPR/IO bash

C++

Inference

Run the following commands:

mkdir build
cmake -S . -B build
cmake --build build
./build/LPR

ToDo list

  • video processing
  • ocr
  • gui
  • tracker
  • time optimization
  • memory optimization
  • train source code

About

Vehicle and License Plate Recognition


Languages

Language:C++ 93.1%Language:Python 6.5%Language:QMake 0.3%Language:CMake 0.1%Language:Makefile 0.0%Language:Dockerfile 0.0%