This project demonstrates the use of Detectron2 by Facebook AI Research to detect and isolate number plates from vehicles.
Dataset: Custom dataset
- Detectron2 by Facebook AI Research
- PyTorch deep learning framework.
- Cython
- Google Colab
- LabelMe
- CocoAPI
For PyTorch, use the command
pip install torch===1.4.0 torchvision===0.5.0 -f https://download.pytorch.org/whl/torch_stable.html
For Cython, use the command
pip3 install Cython
Then clone the detectron repo and cocoapi repo, using the commands
pip install -U 'git+https://github.com/facebookresearch/fvcore.git'
cd detectron2_repo
python setup.py build develop
git clone https://github.com/philferriere/cocoapi
cd .\cocoapi\PythonAPI\
Then unzip the plates_coc.zip
in the main folder
First train the model using
python .\training.py
Then view the inferences by running
python .\inference.py
There might be some packages missing in case you're not running this on colab. Mostly pertaining to missing packages, which can easily be identified
You can access a pretrained model here, in case you want to avoid training
Outputs of some images and their extracted plates
Considering that the dataset had a meager 414 images with annotations, the results were decent
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update the tests as appropriate.