Skip to content

skokec/detectron-traffic-signs

Repository files navigation

Detectron for Traffic Signs

This branch contains fixes for the Detectron code that allows aplication on domains with many small objects, specifically it was designed for traffic sign detection from the "Deep Learning for Large-Scale Traffic-Sign Detection and Recognition" ITS 2019 journal paper.

The following changes are included:

  • integrated Online Hard Negative Minning (OHEM)
  • modifed selection of training ROIs to cover small and large regions evenly
  • added weights to loss of background samples during training (weight of 0.01 for RPN and 0.1 for classification)

YAML definition files of detectron models for the DFG-dataset are available below:

Each zip contains models based on ResNet101_FPN and ResNet50_FPN that have enabled OHEM (OHEM: True), even selection of small and large ROIs (RPN_EVENLY_SELECT_POS_ROIS: True) and weighting of pos/neg classes (RPN_SIZE_WEIGHTED_LOSS: True and CLS_SIZE_WEIGHTED_LOSS: True).

You can download weights trained on DFG-Dataset for the upper model in:

Note: Due to slight update of the DFG dataset the resulty may vary from the ITS 2019 paper

Installation

Our changes to the code require custom WeightedSigmoidCrossEntropyLoss operation (for RPN_SIZE_WEIGHTED_LOSS and CLS_SIZE_WEIGHTED_LOSS options) which is implemented in the DETECTRON_PATH/caffe2-modules/ folder. All files in DETECTRON_PATH/caffe2-modules/* need to be coppied into your caffe2 source (CAFFE2_SRC_PATH/modules/detectron).

export DETECTRON_PATH=/path/to/detectron
export CAFFE2_SRC_PATH=/path/to/caffe2_source

cp $DETECTRON_PATH/caffe2-modules/* $CAFFE2_SRC_PATH/modules/detectron

After copying caffe2-modules/* caffe2 proceed with the instalation instructions for caffe2 and Detectron in INSTALL.md

Citation

Please cite our ITS 2019 paper when using modifications for Detectron from this repository or for the DFG dataset:

 @article{Tabernik2019ITS,
    author = {Tabernik, Domen and Sko{\v{c}}aj, Danijel},
    journal = {IEEE Transactions on Intelligent Transportation Systems},
    title = {{Deep Learning for Large-Scale Traffic-Sign Detection and Recognition}},
    year = {2019},
    doi={10.1109/TITS.2019.2913588}, 
    ISSN={1524-9050}
 }

Detectron

Detectron is Facebook AI Research's software system that implements state-of-the-art object detection algorithms, including Mask R-CNN. It is written in Python and powered by the Caffe2 deep learning framework.

At FAIR, Detectron has enabled numerous research projects, including: Feature Pyramid Networks for Object Detection, Mask R-CNN, Detecting and Recognizing Human-Object Interactions, Focal Loss for Dense Object Detection, Non-local Neural Networks, Learning to Segment Every Thing, and Data Distillation: Towards Omni-Supervised Learning.

Example Mask R-CNN output.

Introduction

The goal of Detectron is to provide a high-quality, high-performance codebase for object detection research. It is designed to be flexible in order to support rapid implementation and evaluation of novel research. Detectron includes implementations of the following object detection algorithms:

using the following backbone network architectures:

Additional backbone architectures may be easily implemented. For more details about these models, please see References below.

License

Detectron is released under the Apache 2.0 license. See the NOTICE file for additional details.

Citing Detectron

If you use Detectron in your research or wish to refer to the baseline results published in the Model Zoo, please use the following BibTeX entry.

@misc{Detectron2018,
  author =       {Ross Girshick and Ilija Radosavovic and Georgia Gkioxari and
                  Piotr Doll\'{a}r and Kaiming He},
  title =        {Detectron},
  howpublished = {\url{https://github.com/facebookresearch/detectron}},
  year =         {2018}
}

Model Zoo and Baselines

We provide a large set of baseline results and trained models available for download in the Detectron Model Zoo.

Installation

Please find installation instructions for Caffe2 and Detectron in INSTALL.md.

Quick Start: Using Detectron

After installation, please see GETTING_STARTED.md for brief tutorials covering inference and training with Detectron.

Getting Help

To start, please check the troubleshooting section of our installation instructions as well as our FAQ. If you couldn't find help there, try searching our GitHub issues. We intend the issues page to be a forum in which the community collectively troubleshoots problems.

If bugs are found, we appreciate pull requests (including adding Q&A's to FAQ.md and improving our installation instructions and troubleshooting documents). Please see CONTRIBUTING.md for more information about contributing to Detectron.

References

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •