Detectron is a high-performance codebase for object detection, covering bounding box and object instance segmentation outputs.
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:
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.
Install Caffe2 with CUDA support. If you already have Caffe2 installed, make sure to update it to a version that includes the Detectron module.
Install Python dependences and the COCO API.
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
Clone the Detectron repository and set up Python modules.
# DETECTRON=/path/to/clone/detectron git clone https://github.com/facebookresearch/detectron $DETECTRON cd $DETECTRON/lib && make
Run inference using pretrained Detectron models, or install datasets and follow advanced directions to train on your own data.