The backbone network
Chapter 2 discusses the typical backbone networks for Detectron2. They include ResNet50, ResNet101, ResNeXt101, and their variants. This section inspects the ResNet50 architecture as an example. However, the idea remains the same for other base models (backbone networks). Figure 4.3 summarizes the steps to inspect the backbone network. Specifically, we pass a tensor of data for a single image to the backbone, and the backbone (ResNet50, in this case) gives out a tensor. This output tensor is the extracted salient feature of the input image.
Figure 4.3: The backbone network
Specifically, from the default Detectron2’s predictor, we can access the backbone network using the following code snippet:
backbone = predictor.model.backbone type(backbone)
This code snippet should print out the following:
detectron2.modeling.backbone.resnet.ResNet
The following code snippet reveals the backbone’s architecture:
print...