The architecture of the segmentation models
Chapter 4 dived deep into the architecture of Faster R-CNN implemented in Detectron2 for object detection tasks in computer vision. Detectron2 implements Mask R-CNN for object segmentation tasks. It has the same components as Faster R-CNN architecture and one other head for the segmentation task. Figure 10.1 shows the Faster R-CNN architecture as listed in Chapter 4.
Figure 10.1: The architecture of the Detectron2 object detection application
The code to explore the architecture of Detectron2 implementation for object segmentation tasks remains the same as that for the object detection tasks. Therefore, this section only covers some discrepancies between the two. The first difference is that we must select a pre-trained model with configuration for the object segmentation task instead of the detection task. Therefore, we change the corresponding paths for the configuration and model weights as follows:
config_file...