资源算法detectron2-licenseplates

detectron2-licenseplates

2020-03-05 | |  40 |   0 |   0

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


上一篇:detectron-trainings-visualization

下一篇:Detectron-PYTORCH

用户评价
全部评价

热门资源

  • Keras-ResNeXt

    Keras ResNeXt Implementation of ResNeXt models...

  • seetafaceJNI

    项目介绍 基于中科院seetaface2进行封装的JAVA...

  • spark-corenlp

    This package wraps Stanford CoreNLP annotators ...

  • capsnet-with-caps...

    CapsNet with capsule-wise convolution Project ...

  • inferno-boilerplate

    This is a very basic boilerplate example for pe...