7

Fine-Tuning Object Detection Models

Detectron2 utilizes the concepts of anchors to improve its object detection accuracy by allowing object detection models to predict from a set of anchors instead of from scratch. The set of anchors has various sizes and ratios to reflect the shapes of the objects to be detected. Detectron2 uses two sets of hyperparameters called sizes and ratios to generate the initial set of anchors. Therefore, this chapter explains how Detectron2 processes its inputs and provides code to analyze the ground-truth boxes from a training dataset and find appropriate values for these anchor sizes and ratios.

Additionally, input image pixels’ means and standard deviations are crucial in training Detectron2 models. Specifically, ...

Get Hands-On Computer Vision with Detectron2 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.