Developing a semantic segmentation application
A semantic segmentation task does not detect specific instances of objects but classifies each pixel in an image into some classes of interest. For instance, a model for this task classifies regions of images into pedestrians, roads, cars, trees, buildings, and the sky in a self-driving car application. The following sections detail the steps to develop a semantic segmentation application using Detectron2 pre-trained models.
Selecting a configuration file and getting a predictor
Semantic segmentation is a byproduct of panoptic segmentation. For instance, it groups detected objects of the same class into one if they are in the same region instead of providing segmentation data for every detected object. Therefore, the model for semantic segmentation is the same as that for panoptic segmentation. Therefore, the configuration file, the weights, and the code snippet for getting a predictor are the same as those for the previous panoptic...