## 3 Methodology
### Cross-Scale Adjacent Semantic Information Aggregation Module (CASAM)  
Although we have incorporated the Multi-Scale Feature Extraction Module (EMF) into the CNN feature extractor, considering that the semantic features of \(ResBlock\_i(i=1,2,3)\) in the backbone network are independent of each other. This implies that there may be information silos among these three \(ResBlock\), resulting in insufficient feature representation and affecting the performance of the model. Therefore, to make full use of the semantic information at different scales extracted by the encoder at various stages and further strengthen the information interaction of multi-scale semantic features, we introduce the CASAM to aggregate cross-scale adjacent semantic information, enabling information interaction and enhancement of multi-level scale features, and helping the network better capture the key features in the image. Since this paper only inputs the features of \(ResBlock\_i(i=1,2,3)\) in the backbone network, adjacent aggregation only occurs in cases of two adjacent scales and three adjacent scales. For this reason, we use three branches to form the entire module. The sizes of the feature maps \(f_{a}\), \(f_{b}\) and \(f_{c}\) are \(2H\,\times\,2W\,\times\,C/2\), \(H\,\times\,W\,\times\,C\), and \(H/2\,\times\,W/2\,\times\,2C\), respectively. As shown in Figure 3.  
The specific implementation of the CASAM is as follows:  
(i) When aggregating two adjacent scales, first perform a \(1\,\times\,1\) convolution on \(f_{b}\) to integrate cross-channel information and introduce a non-linear transformation, optimizing the feature representation while keeping the number of channels unchanged, and output \(f_{b}^{1}\). Meanwhile, on another branch, perform \(1\,\times\,1\) and \(3\,\times\,3\) convolutions, compressing the number of feature channels to half of the original, extracting and enhancing the effective channel information, and output \(f_{b}^{2}\). If aggregating with the next scale, first perform \(1\,\times\,1\)  
Figure 3: The details of the CASAM. MDNet only takes three hierarchical features as input from the backbone network; therefore, cross-scale aggregation involves merely two scenarios: aggregation of two adjacent scales and aggregation of three adjacent scales. To cover these scenarios, the CASAM is equipped with three branches, which can perform targeted fusion of semantic information under different scale combinations. and \(3\times 3\) convolutions on \(f_{c}\), compressing the number of channels to half of the original and enhancing the features, then perform upsampling to restore its size to be consistent with \(f_{b}\), and output \(f_{c}^{1}\). Subsequently, concatenate the two features along the channel dimension to obtain a richer feature map \(f_{d}\), then perform \(1\times 1\) and \(3\times 3\) convolutions to compress the number of channels to \(C\) and extract features, outputting \(f_{e}\). Finally, fuse the feature maps of the two scales by adding \(f_{e}\), \(f_{b}^{1}\) and \(f_{c}^{1}\), enhancing the feature representation ability of the model, and finally output \(f_{f}\) with a size of \(H\times W\times C\). If aggregating with the feature map of the previous scale, perform max-pooling downsampling on \(f_{a}\), then perform a \(3\times 3\) convolution to expand the number of channels to \(C\), effectively extracting local dominant features, and output \(f_{a}^{1}\). The subsequent operations are similar to the above to fuse the feature maps of the two scales, and finally output \(f_{f}\) with the same size of \(H\times W\times C\). (ii) When aggregating the semantic information of three adjacent scales, concatenate \(f_{a}^{1}\), \(f_{b}^{2}\) and \(f_{c}^{1}\) along the channel dimension to form a feature map with a richer number of channels. Then, perform \(1\times 1\) and \(3\times 3\) convolutions to compress the number of channels to \(C\) and further extract feature information, outputting \(f_{e}\).