Need help with detectron2?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

154 Stars 41 Forks Apache License 2.0 147 Commits 17 Opened issues


detectron2 windows build

Services available


Need anything else?

Contributors list


  • Python >= 3.6(Conda)
  • PyTorch 1.3
  • torchvision that matches the PyTorch installation. You can install them together at to make sure of this.
  • OpenCV, needed by demo and visualization
  • fvcore:
    pip install git+
  • pycocotools:
    pip install cython; pip install git+
  • VS2019(no test in older version)/CUDA10.1(no test in older version)

several files must be changed by manually.

  {your evn path}\Lib\site-packages\torch\include\torch\csrc\jit\argument_spec.h
    static constexpr size_t DEPTH_LIMIT = 128;
      change to -->
    static const size_t DEPTH_LIMIT = 128;
  {your evn path}\Lib\site-packages\torch\include\pybind11\cast.h
    explicit operator type&() { return *(this->value); }
      change to -->
    explicit operator type&() { return *((type*)this->value); }

Build detectron2

After having the above dependencies, run: ``` conda activate {your env}

"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat"

git clone

cd detectron2

python build develop ``` Note: you may need to rebuild detectron2 after reinstalling a different build of PyTorch.

Detectron2 is Facebook AI Research's next generation software system that implements state-of-the-art object detection algorithms. It is a ground-up rewrite of the previous version, Detectron, and it originates from maskrcnn-benchmark.

What's New

  • It is powered by the PyTorch deep learning framework.
  • Includes more features such as panoptic segmentation, densepose, Cascade R-CNN, rotated bounding boxes, etc.
  • Can be used as a library to support different projects on top of it. We'll open source more research projects in this way.
  • It trains much faster.

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



Quick Start

See, or the Colab Notebook.

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 Detectron

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}

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.