facebookresearch

    facebookresearch/detectron2

    #322 this week

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

    computer-vision
    Python
    Apache-2.0
    34.6K stars
    7.9K forks
    34.6K GitHub watchers
    Updated 6/24/2026
    View on GitHub

    Backblaze Generative Media Hackathon

    Build the next generation of AI media apps with Genblaze, stored on Backblaze B2. $10,000 in prizes.

    Enter the hackathon

    Loading star history...

    Use Cases & Benefits

    • Detectron2 is a Python-based platform for advanced object detection, segmentation, and visual recognition tasks.
    • It features state-of-the-art algorithms like panoptic segmentation, Cascade R-CNN, Densepose, and supports exporting models to TorchScript and Caffe2.
    • Strengths include fast training, modular design, and extensive pre-trained models; limitations may involve complexity for beginners and GPU requirements.
    • Organizations can integrate Detectron2 for production-level computer vision applications, leveraging its model zoo and deployment-ready formats.
    • Ideal use cases include research projects, real-time object detection, image segmentation, and developing custom visual recognition systems.

    About detectron2

    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.

    @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}
    }
    

    Discover Repositories

    Search across tracked repositories by name or description