GitHunt
RA

ravijo/detectron2_tutorial

Tutorial to demonstrate the computation of training and validation loss using Detectron2

detectron2_tutorial

Detectron2 from Facebook is an AI library with state-of-the-art detection and segmentation algorithms. While training AI algorithms, it is essential to keep an eye on training statistics. Unfortunately, some statistics, such as validation loss, is not currently provided but is possible by hacking the codebase (check references, please). Therefore, this tutorial is created to demonstrate the computation of training and validation loss using Detectron2.

Dependencies

  • Detectron2
  • PyTorch

Dataset

Balloon segmentation dataset: Please download it with the following command:

$ wget https://github.com/matterport/Mask_RCNN/releases/download/v2.1/balloon_dataset.zip

Training

$ python3 main.py

Statistics

$ python3 -m tensorboard.main --logdir output

Inference

$ python3 inference.py

Results

  • Training Statistics

    Training Statistics

  • Inference Results

    Inference Results

Issues (or Error Reporting)

Please check here and create issues accordingly.

References

  1. facebookresearch/detectron2#4368
  2. facebookresearch/detectron2#810
  3. https://github.com/facebookresearch/detectron2#getting-started
  4. https://github.com/matterport/Mask_RCNN/tree/master/samples/balloon

Languages

Python100.0%

Contributors

MIT License
Created May 27, 2023
Updated December 13, 2025