/detectron2-tutorial

A brief introductory tutorial to the Detectron2 library.

Primary LanguageJupyter NotebookMIT LicenseMIT

Detectron2 Tutorial

A brief introductory tutorial to the Detectron2 library.

For more information, refer to the blog post

By Sebastian Castro, 2020


Getting Started

First, you will need a Linux or macOS environment set up with Python 3.6 or higher.

  • Create a new Python virtual environment, e.g., python3 -m venv .virtualenvs/detectron2

  • Activate the virtual environment, e.g., source .virtualenvs/detectron2/bin/activate

  • pip install wheel

  • pip install jupyter torch torchvision

  • Install Detectron2 as outlined in the Detectron2 install guide. For Torch 1.7 / CUDA 11.0 (which is what was used for developing this tutorial), the command is:

python -m pip install detectron2 -f \
  https://dl.fbaipublicfiles.com/detectron2/wheels/cu110/torch1.7/index.html

Labeling Data

We have used coco-annotator to manually label our data and export it to the popular COCO data format.

This repository includes a small dataset in the data folder so you can try Detectron2 without having to collect and label your own data.


Using Detectron2 for Object Detection

Once your environment is set up, you can follow along the notebooks in this repository.