Open-source project
facebookresearch/detectron2 avatar
facebookresearch/detectron2

Detectron2 guide: FAIR's detection and segmentation library, its model zoo, and a release tag stuck at v0.6

Detectron2 is a platform for object detection, segmentation and other visual recognition tasks.

34,985 stars7,939 forksPythonApache-2.0

At a glance

What is it?
Detectron2 is Facebook AI Research's Apache-2.0 library for object detection, segmentation and related vision tasks, and the successor to Detectron and maskrcnn-benchmark. The code keeps receiving commits, but the newest tagged release is v0.6 from November 2021, and install steps, tutorials and benchmarks all live on its Read the Docs site.
Who is it for?
Detectron2 suits researchers and engineers who want FAIR's implementations of detection and segmentation methods such as Cascade R-CNN, PointRend, panoptic segmentation and ViTDet, pretrained baselines from the model zoo, and a codebase meant to be extended through its projects directory. It suits teams less well if they require frequent versioned releases or deployment targets beyond TorchScript and Caffe2.
Can I use it commercially?
Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 17 days ago.
What is it written in?
Mainly Python, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on November 13, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • facebookresearch/detectron234,985 ★ · +314
Star history
Repository2026-08-182026-11-13
facebookresearch/detectron234.7k35k

314 Stars in the last 87 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

The successor to Detectron and maskrcnn-benchmark

Detectron2 is Facebook AI Research's next generation library for detection and segmentation algorithms. It replaces two earlier FAIR codebases, the original Detectron and maskrcnn-benchmark, so code or papers built on either of those point here for continued work. FAIR uses it to support a number of computer vision research projects and production applications inside Facebook, which explains its two personalities: a research library meant to be extended, and a codebase expected to export models for deployment.

It is released under Apache-2.0 and written in Python, with documentation hosted at detectron2.readthedocs.io. If you are citing it in research, the project asks you to cite the Detectron2 entry by Yuxin Wu, Alexander Kirillov, Francisco Massa, Wan-Yen Lo and Ross Girshick from 2019, which also covers the baseline results published in its Model Zoo.

Methods included: panoptic segmentation, DensePose, PointRend, ViTDet and more

Compared with its predecessors, Detectron2 adds a set of newer capabilities in the same library: panoptic segmentation, DensePose, Cascade R-CNN, rotated bounding boxes, PointRend, DeepLab, ViTDet and MViTv2. The list ends with etc., so it is not exhaustive.

The practical value is that these methods share one codebase, one configuration approach and one training loop, instead of being separate research repositories with their own conventions. If you want to compare an instance segmentation model with a panoptic one, or move from a convolutional backbone to a ViTDet or MViTv2 setup, you stay inside one framework. The project also claims that it trains much faster, and links a benchmarks page on its documentation site for the comparison. Read that page for the conditions behind the claim before relying on it for planning.

Installation and first steps live on Read the Docs

There is no install command on the repository's front page. Installation is handed to a single page, detectron2.readthedocs.io/tutorials/install.html, and first usage to the Getting Started with Detectron2 tutorial and a Colab notebook that walks through basic usage.

For a reader, this has a direct consequence. Whatever you find in a blog post or answer about pip installing Detectron2, building it on Windows, or setting it up on Ubuntu or Colab, the authoritative steps are on that installation page, and they can change without anything changing in the README. Check the page at the time you install, and note which commit or tag the instructions assume. The Colab notebook is the lowest-effort way to see the library run before you set up a local environment, because it skips local installation entirely.

The newest tagged release is v0.6, from November 2021

The release history is short and old. v0.4 was tagged on March 13, 2021, v0.5 on July 23, 2021, and v0.6 on November 15, 2021. Nothing has been tagged since. The repository itself has not stopped: the most recent push to the main branch was on October 27, 2026.

That split matters for anyone who builds reproducible environments. If you pin a released version, you are pinning code from late 2021 and missing every change made since, including the additions of methods such as ViTDet and MViTv2 if they landed after v0.6. If you track the main branch instead, you get recent fixes but no version number to communicate, no release notes boundary, and the risk that two installs a month apart differ. The workable answer is to pin a specific commit hash and record it alongside your trained weights.

Pretrained baselines come from MODEL_ZOO.md

Detectron2 ships a large set of baseline results and trained models, listed in `MODEL_ZOO.md` in the repository. This is where you get pretrained weights to fine-tune or to run inference without training from scratch, and where the published baseline numbers live.

Two cautions follow. First, the baselines were produced with particular code and configurations, so if you run a model from the zoo on a newer main branch commit, small differences from the published numbers are something to check rather than assume away. Second, if your paper reports against those baselines, the project asks you to cite Detectron2 for them. Keep the zoo entry name, the config file and the weights file together in your own records, because those three together define what you actually evaluated.

Deployment means exporting to TorchScript or Caffe2

For moving trained models into production, Detectron2 supports export to two formats: TorchScript and Caffe2. Those are the deployment routes the project names.

If your serving stack takes TorchScript, the path is direct. If it expects another runtime, Detectron2 does not hand you that format, and you will be converting from one of the two supported exports or writing your own wrapper. That is real work for detection models, which carry post-processing steps that do not always survive format conversion intact. Teams planning edge or browser deployment should prototype the export of their exact model early, before investing in training, since the export path is where research code and production requirements meet and where problems show up last if left to the end.

Research code is expected to live in projects/, built on the library

Detectron2 is meant to be used as a library for building research projects, and the `projects/` directory holds examples that are built on top of it. That is the intended pattern: you write your new model or training trick as a separate project that imports Detectron2, instead of editing the core library.

The benefit is that your research code stays small and the shared components stay shared. The cost is that your project depends on Detectron2's internal interfaces, and with no tagged release since v0.6, those interfaces are defined by whatever commit you built against. Pin that commit. The documentation site at detectron2.readthedocs.org, the blog post on Meta's AI site and an interview about the history behind the library are the further reading the project points to.

Editorial conclusion

Detectron2 suits researchers and engineers who want FAIR's implementations of detection and segmentation methods such as Cascade R-CNN, PointRend, panoptic segmentation and ViTDet, pretrained baselines from the model zoo, and a codebase meant to be extended through its projects directory. It suits teams less well if they require frequent versioned releases or deployment targets beyond TorchScript and Caffe2. Before committing, decide whether you will pin the v0.6 tag or a specific main branch commit, and follow the current installation page for your platform.

Frequently asked questions

What is Detectron2?

Detectron2 is Facebook AI Research's library of detection and segmentation algorithms and the successor to Detectron and maskrcnn-benchmark. It supports research projects and production applications at Facebook.

What is Detectron2 used for?

It is used for object detection, segmentation and other visual recognition tasks, including panoptic segmentation, DensePose, rotated bounding boxes and PointRend. It also serves as a base library for research projects and can export models to TorchScript or Caffe2.

Is Detectron2 open source?

Yes. Detectron2 is released under the Apache 2.0 license, and its code is on GitHub at facebookresearch/detectron2.

Is Detectron2 still maintained?

The repository was last pushed on October 27, 2026, so commits are still landing. The newest tagged release, however, is v0.6 from November 15, 2021.

How do I install Detectron2?

Follow the installation instructions at detectron2.readthedocs.io/tutorials/install.html. For a first run without local setup, the project also provides a Colab notebook.

Official sources

  1. Official documentation
  2. Official README
  3. Project repository
  4. Release notes
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/facebookresearch-detectron2.svg)](https://hysenlabs.com/projects/facebookresearch-detectron2)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/facebookresearch-detectron2.svg)](https://hysenlabs.com/projects/facebookresearch-detectron2)

Was this useful?