TOOLS

Detectron

Detectron is a high-performance codebase for object detection, covering bounding box and object instance segmentation outputs.

Rapid, flexible research

Detectron was built by Facebook AI Research (FAIR) to support rapid implementation and evaluation of novel computer vision research. It includes implementations for the following object detection algorithms:

  • Mask R-CNN

  • RetinaNet

  • Faster R-CNN

  • RPN

  • Fast R-CNN

  • R-FCN

Detectron can be used out-of-the-box for general object detection or modified to train and run inference on your own datasets. It's written in Python and will be powered by the PyTorch 1.0 deep learning framework.

Detectron example

Get Started

1

Install Caffe2 with CUDA support. If you already have Caffe2 installed, make sure to update it to a version that includes the Detectron module.

2

Install Python dependences and the COCO API.

1
2
3
4
5
6
7
8
9
10
pip install numpy>=1.13 pyyaml>=3.12 matplotlib opencv-python>=3.2 setuptools Cython mock scipy

# COCOAPI=/path/to/clone/cocoapi
git clone https://github.com/cocodataset/cocoapi.git $COCOAPI
cd $COCOAPI/PythonAPI
# Install into global site-packages
make install
# Alternatively, if you do not have permissions or prefer
# not to install the COCO API into global site-packages
python2 setup.py install --user
              

3

Clone the Detectron repository and set up Python modules.

1
2
3
# DETECTRON=/path/to/clone/detectron
git clone https://github.com/facebookresearch/detectron $DETECTRON
cd $DETECTRON/lib && make
              

4

Run inference using pretrained Detectron models, or install datasets and follow advanced directions to train on your own data.

More Tools