Total Pageviews

Sunday, 16 June 2024

Detectron2

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

https://detectron2.readthedocs.io/en/latest/

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

Explain Like I’m 5: Detectron2 Using Machine Learning with Detectron2
Explain Like I’m 5: Detectron2 Using Machine Learning with Detectron2

What's New

  • 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 and learn about 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.

from https://github.com/facebookresearch/detectron2

------

Installation

Requirements

  • Linux or macOS with Python ≥ 3.7

  • PyTorch ≥ 1.8 and torchvision that matches the PyTorch installation. Install them together at pytorch.org to make sure of this

  • OpenCV is optional but needed by demo and visualization

Build Detectron2 from Source

gcc & g++ ≥ 5.4 are required. ninja is optional but recommended for faster build. After having them, run:

python -m pip install 'git+https://github.com/facebookresearch/detectron2.git'
# (add --user if you don't have permission)

# Or, to install it from a local clone:
git clone https://github.com/facebookresearch/detectron2.git
python -m pip install -e detectron2

# On macOS, you may need to prepend the above commands with a few environment variables:
CC=clang CXX=clang++ ARCHFLAGS="-arch x86_64" python -m pip install ...

To rebuild detectron2 that’s built from a local clone, use rm -rf build/ **/*.so to clean the old build first. You often need to rebuild detectron2 after reinstalling PyTorch.

Install Pre-Built Detectron2 (Linux only)

Choose from this table to install v0.6 (Oct 2021):

CUDA torch 1.10torch 1.9torch 1.8
11.3
install


11.1
install
install
install
10.2
install
install
install
10.1

install
cpu
install
install
install

Note that:

  1. The pre-built packages have to be used with corresponding version of CUDA and the official package of PyTorch. Otherwise, please build detectron2 from source.

  2. New packages are released every few months. Therefore, packages may not contain latest features in the main branch and may not be compatible with the main branch of a research project that uses detectron2 (e.g. those in projects).

    from https://detectron2.readthedocs.io/en/latest/tutorials/install.html

 ---------------------------------------------------------------------------------------------

相关帖子:

https://briteming.blogspot.com/2024/06/paddledetection.html

 

No comments:

Post a Comment