## 3 Methods
### Architecture  
**Overview. ** MCDCNet includes three parts: a backbone, encoder, and decoder, shown in Figure 2. For the backbone, a module based on ViT and MSCA [6] is used to fully extract semantic features. Taking an image as the input, the backbone produces four feature maps. As a hybrid of FPN [32] and the proposed SEM, the encoder follows the excellent structure of FPN, where features of different sizes are processed individually before being fused together. To further understand the semantic features and explore the spatial relationships between different pixels within these features, the SEM is applied to process each of the four feature maps separately. To fully integrate features of multiple scales, the processed feature maps are concatenated at the end of the FPN structure and passed through a \(1\times 1\) convolution layer to reduce the channel number to 256, facilitating the computations in the decoder. To overcome the limitations of traditional semantic segmentation decoders, which often handle features in a simplistic manner, the decoder utilizes the IAM-based decoder to handle the features. IAM is a mask classification head designed for instance segmentation. It generates instance activation maps to compute and pair masks for different instances. To adapt it for the semantic segmentation task, we modify its inference component, shown in Figure 3c. **Backbone. ** In the backbone, an image of \(\mathbf{I}\in\mathbb{R}^{3\times H\times W}\) is fed into MSCA, and the architecture setup is consistent with that in the SegNeXt-tiny [6]. The backbone is divided into four parts. After each part, the feature size is reduced proportionally while the channel number increases. The output feature maps from the four parts have sizes of \(\mathbf{F}_{0}\in\mathbb{R}^{C\times\frac{H}{4}\times\frac{W}{4}}\), \(\mathbf{F}_{1}\in\mathbb{R}^{2C\times\frac{H}{4}\times\frac{W}{4}}\), \(\mathbf{F}_{2}\in\mathbb{R}^{4C\times\frac{H}{4}\times\frac{W}{4}}\), and \(\mathbf{F}_{3}\in\mathbb{R}^{8C\times\frac{H}{4}\times\frac{W}{4}}\), respectively. **Encoder. ** This paper combines the structure of FPN with the proposed Spatial Extraction Module to design a new encoder. This encoder combines multi-scale spatial information while effectively processing multi-scale semantic data extracted from the backbone. The encoder is divided into four parts, each consisting of a Spatial Extraction Module. Since the Spatial Extraction Module does not change the size of the input feature, we added extra upsample layers for information transfer between different parts. The resulting sizes of the four feature maps are \(\mathbf{F}_{0}\in\mathbb{R}^{C\times\frac{H}{4}\times\frac{W}{4}}\), \(\mathbf{F}_{1}\in\mathbb{R}^{C\times\frac{H}{4}\times\frac{W}{4}}\), \(\mathbf{F}_{2}\in\mathbb{R}^{2C\times\frac{H}{4}\times\frac{W}{4}}\), and \(\mathbf{F}_{3}\in\mathbb{R}^{4C\times\frac{H}{4}\times\frac{W}{4}}\), respectively. For subsequent calculations, we first resize these four feature maps to a consistent dimension and then combine them along the channel dimension to achieve a feature size of \(\mathbb{R}^{288\times\frac{H}{8}\times\frac{W}{8}}\). Afterward, a \(1\times 1\) convolution layer is applied to fine-tune the number of channels to 256 for further processing by the decoder. **Decoder. ** We chose the IAM-based decoder as the decoder for this network. IAM-based decoder is a mask classification decoder designed for instance segmentation. Unlike previous mask classification methods, rather than representing objects with boxes or centers, it highlights informative object regions using a sparse set of IAMs. The IAM-based decoder integrates more contextual information and conceptually eliminates the issues of incorrect instance feature localization. The decoder has two branches: one named the mask branch for preliminary mask computation, and another named the instance branch for calculating the additional necessary parameters using the instance activation map.