Skip to content
Switch branches/tags

Latest commit

The C code in detectron2 are:
* deformable conv & rotated boxes ops
* fast COCO evaluation

So all the core features should be able to work without building any C code.

This PR make D2 (11528ce) usable without compiling C extensions by making some import statements optional. This will make it easier to use D2 (11528ce) where the compilation toolchain & build system is different.

(There is an open internal task about this as well)

Pull Request resolved: #3909

Reviewed By: wat3rBro

Differential Revision: D33713296

Pulled By: zhanghang1989

fbshipit-source-id: e6605367164400546133fd2ab5589c92d7226482

Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Detectron2 is Facebook AI Research's next generation library that provides state-of-the-art detection and segmentation algorithms. It is the successor of Detectron and maskrcnn-benchmark. It supports a number of computer vision research projects and production applications in Facebook.

What's New

  • Includes new capabilities such as panoptic segmentation, Densepose, Cascade R-CNN, rotated bounding boxes, PointRend, DeepLab, etc.
  • Used as a library to support building research projects on top of it.
  • Models can be exported to TorchScript format or Caffe2 format for deployment.
  • It trains much faster.

See our blog post to see more demos and learn about detectron2.


See installation instructions.

Getting Started

See Getting Started with Detectron2, and the Colab Notebook to learn about basic usage.

Learn more at our documentation. And see projects/ for some projects that are built on top of detectron2.

Model Zoo and Baselines

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


Detectron2 is released under the Apache 2.0 license.

Citing Detectron2

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

  author =       {Yuxin Wu and Alexander Kirillov and Francisco Massa and
                  Wan-Yen Lo and Ross Girshick},
  title =        {Detectron2},
  howpublished = {\url{}},
  year =         {2019}