There are three main components to Mask2Former:

A Swin backbone accepts an image and creates a low-resolution image feature map from 3 consecutive 3x3 convolutions.

The feature map is passed to a pixel decoder which gradually upsamples the low-resolution features into high-resolution per-pixel embeddings. The pixel decoder actually generates multi-scale features (contains both low- and high-resolution features) with resolutions 1/32, 1/16, and 1/8th of the original image.