Computer Vision
  • Introduction
    • Neural network basics
    • MLE and Cross Entropy
    • Convolution basics
    • Neural Network Categories
  • 2D Backbones
    • ResNet
    • Transformer
      • Recurrent Neural Network
      • Vision Transformer
      • SwinTransformer
  • Methods for Object Detection
  • Object Detection
    • The R-CNN family
    • ROI pool & ROI align
    • FCOS
    • Object Detection in Detectron2
  • Segmentation
    • Fully Convolutional Network
    • Unet: image segmentation
  • Video Understanding
    • I3D: video understanding
    • Slowfast: video recognition
    • ActionFormer: temporal action localization
  • Generative models
    • Autoregressive model
    • Variational Auto-Encoder
    • Generative Adversarial Network
    • Diffusion Models
    • 3D Face Reconstruction
Powered by GitBook
On this page
  1. Object Detection

Object Detection in Detectron2

The details

PreviousFCOSNextSegmentation

Last updated 2 years ago

Here is a list of the parameters that you can try to play around with in Detectron2.

Process

  1. Region Proposal Network (RPN): The RPN is responsible for generating object proposals in an image. It takes an image as input and outputs a set of bounding box proposals, along with their objectness scores. These proposals serve as potential regions of interest (ROIs) for further processing.

    • MODEL.RPN.PRE_NMS_TOPK_TRAIN: The RPN proposals are ranked based on their objectness scores. This configuration option determines the number of top-scoring RPN proposals to keep before applying non-maximum suppression (NMS) during training. It limits the number of proposals to reduce computational overhead.

    • MODEL.RPN.NMS_THRESH: This option sets the IoU (Intersection over Union) threshold for NMS during training. Proposals with IoU higher than this threshold are considered redundant and suppressed, keeping only the highest-scoring proposal.

  2. ROI Heads: The ROI Heads module takes the region proposals generated by the RPN and performs object classification and bounding box regression on these proposals to obtain the final predictions.

    • MODEL.ROI_HEADS.IOU_THRESHOLDS: This configuration option specifies a list of IoU thresholds to assign ground-truth labels to the region proposals during training. For example, if the IoU threshold is set to 0.5, any proposal with an IoU greater than or equal to 0.5 with a ground-truth box will be labeled as a positive sample.

    • MODEL.ROI_HEADS.NMS_THRESH_TEST: After classification and bounding box regression, NMS is applied to the predicted boxes to remove redundant detections during testing. This option sets the IoU threshold for NMS during inference.

    • MODEL.ROI_HEADS.SCORE_THRESH_TEST: This option sets the minimum confidence score threshold for retaining detections during inference. Detections with scores lower than this threshold are discarded as false positives.

detectron2/defaults.py at 654e2f40b07f40c9cb7be2e0c2266a59a7c9f158 · facebookresearch/detectron2GitHub
Logo
Digging into Detectron 2Medium
For more implementation details, check out this awesome guide.
Logo