Detect car license plates using PyTorch and detectron2. The model is trained on a custom dataset of license plates created by hand annotating image search results.
This repository contains the full dataset and annotations, along with the source code for training and testing.
- [Optional] Create new virtual environment using pyenv-virtualenv.
pyenv virtualenv detectron2-license-plate-detection-env
pyenv activate detectron2-license-plate-detection-env
- Install required packages using pip.
pip install -r requirements.txt
- Run training script.
cd src
python train.py
- Run testing script. The model is now run on a test image and a test video and bounding box is drawn around detected license plates along with confidence value.
python test.py