facebookresearch /detectron2
Detectron2 is a platform for object detection, segmentation and other visual recognition tasks.
★ 34,980⑂ 7,937👁 393⑃ 742● 3,583▤ 10◈ 853
34,980
stars
+0+15+222
7,937
forks
393
watchers
742
prs
3,583
issues
10
releases
853
discussions
README
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.
Learn More about Detectron2
Includes new capabilities such as panoptic segmentation, Densepose, Cascade R-CNN, rotated bounding boxes, PointRend,
DeepLab, ViTDet, MViTv2 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.
See this interview to learn more about the stories behind detectron2.
Installation
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.
License
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.
BibTeX
@misc{wu2019detectron2,
author = {Yuxin Wu and Alexander Kirillov and Francisco Massa and
Wan-Yen Lo and Ross Girshick},
title = {Detectron2},
howpublished = {\url{https://github.com/facebookresearch/detectron2}},
year = {2019}
}Top issues
#21Example for rotated faster rcnn112 comments · 2019-10-12#9Can I install detectron2 on Win10?84 comments · 2019-10-11#4354Panoptic Segmentation Can Not be Exported to ONNX38 comments · 2022-06-23#165How to get coordinates of body parts from DensePose?37 comments · 2019-10-24#1691train Panoptic Segmentation model on custom dataset34 comments · 2020-06-29#3054Implement wrappers around any augmentations in imgaug or albumentations32 comments · 2021-05-18#1496Caffe2 export of quantized model24 comments · 2020-05-29#5453install detectron2 meets some problems18 comments · 2025-03-31
Discussions
#5505Visualizer._convert_boxes produces N x 1 x 4 matrix instead of N x 40 comments · 2026-01-07#5504KeyError: 'res4' using Swin backbone with detectron2 FCOS0 comments · 2025-12-25#5502Detectron2 can detect defects in a vehicle?0 comments · 2025-12-05#5497OpenSUSE Tumbleweed on HP Z Book Ultra G1a (Ryzen AI MAX 390 + Radeon 8050S) install guide.0 comments · 2025-11-12#5496'torch' module Error while installing Detector2 in macbook pro M10 comments · 2025-11-01#5480How to perform inference on detectron2 instance segmentation model trained on custom dataset ?0 comments · 2025-07-23#5473Diagram for new devs to get to know the detectron2 project1 comments · 2025-06-05#5472Quick guide to fine-tune, evaluate, and perform inference with Detectron2's vision transformers.0 comments · 2025-05-27
Latest release
v0.6 v0.6 2021-11-15Pre-built Linux binaries are available for the following environment:
CUDA torch 1.10torch 1.9torch 1.8 11.3 install python -m pip install detectron2==0.6 -f \
https://dl.fbaipublicfiles.com/detectron2/wheels/cu113/torch1.10/index.html
11.1 install python -m pip install detectron2==0.6 -f \
https://dl.fbaipublicfiles.com/detectron2/wheels/cu111/torch1.10/index.html
install python -m pip install detectron2==0.6 -f \
https://dl.fbaipublicfiles.com/detectron2/wheels/cu111/torch1.9/index.html
install python -m pip install detectron2==0.6 -f \
https://dl.fbaipub