Git Product home page Git Product logo

detectron2-licenseplates's Introduction

License plates detection model using Detectron2

For detailed description how to train your own detection model using a custom dataset and evaluate it read the Medium story:

Setup environment

This project is using Conda for project environment management.

Setup the project environment:

$ conda env create -f environment.yml
$ conda activate detectron2-licenseplates

or update the environment if you git pull the repo previously:

$ conda env update -f environment.yml

Training

To launch end-to-end license plates detection training with Faster R-CNN ResNet-50 backbone on 2 GPUs, one should execute:

$ python train.py --config-file configs/lp_faster_rcnn_R_50_FPN_3x.yaml --num-gpus 2

To train the model with RetinaNet ResNet-50 backbone run:

$ python train.py --config-file configs/lp_retinanet_R_50_FPN_3x.yaml --num-gpus 2

Evaluation

Model evaluation is done at the and of the training but you can run it alone:

$ python train.py --config-file configs/lp_faster_rcnn_R_50_FPN_3x.yaml --eval-only MODEL.WEIGHTS output/model_final.pth

or

$ python train.py --config-file configs/lp_retinanet_R_50_FPN_3x.yaml --eval-only MODEL.WEIGHTS output/model_final.pth

Prediction

To execute prediction on some sample data from test dataset with Faster R-CNN ResNet-50 backbone (which is default), run:

$ python predict.py --config-file configs/lp_faster_rcnn_R_50_FPN_3x.yaml MODEL.WEIGHTS output/model_final.pth

or

$ python predict.py --config-file configs/lp_retinanet_R_50_FPN_3x.yaml MODEL.WEIGHTS output/model_final.pth

to run prediction on RetinaNet

Resources and Credits

License

MIT License

detectron2-licenseplates's People

Contributors

jagin avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.