This software implements the Deep Learning based Vehicle and Persian License Plate Detection and OCR in opencv using Python and C++.
- YOLOv3 multi-type vehicles Detecting
- SORT algorithm for tracking
- EAST text detector fot plate detection
- Convolutional Recurrent Neural Network
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.
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
Build docker image
docker build -t LPR .
Then run it
docker run --gpus all -it --rm -v $(pwd)/IO:/workspace/LPR/IO bash
Run the following commands:
mkdir build
cmake -S . -B build
cmake --build build
./build/LPR
- video processing
- ocr
- gui
- tracker
- time optimization
- memory optimization
- train source code