## 2 Materials and Methods
### Model Architecture
#### 2.3.4 Decoding Module  
In the decoding stage, the decoder module restores the feature maps to the original input size. In U-Net, the expansive path involves upsampling of the feature map followed by a 2 \(\times\) 2 convolution that halves the number of feature channels, a concatenation with the corresponding cropped feature map from the contracting path, and two 3 \(\times\) 3 convolutions, each followed by a ReLU. A 1 \(\times\) 1 convolution at the final layer maps the feature vector to the desired number of classes. Our redesigned expansive path is roughly symmetric to the contracting path with a U-shaped architecture. The parallel 1 \(\times\) 1 convolution and 3 \(\times\) 3 convolution replaced by two consecutive 3 \(\times\) 3 convolutions were used to extract multiscale features. Extrusion and excitation feature learning can better represent targetobjects through this process. Furthermore, concatenation of high-dimensional upsampled features can easily lead to confusion regarding the features of objects at different scales, especially when the contour boundaries are blurred and irregular. Therefore, to explicitly learn the position and boundary information from the corresponding encoder blocks and fine-grained feature maps from the previous decoding convolution layer, we designed an LA embedding module to enhance the recognition ability, increase differences among target objects at various scales, and refine the features of different categories of target objects. The LA is calculated using Equations (4) and (5).  
\[LA=AttE(O_{mp},f_{D}) \tag{4}\]  
where \(LA\) is the local attention module, \(AttE(\cdot)\) is the embedding operation for \(LA\), and \(O_{mp},f_{D}\) are the maximum pooling output feature of the encoding module and the corresponding position decoding output feature, respectively. \(LA\) improves feature representation, eliminates redundant information, and establishes a complementary relationship between high- and low-level features. Thus, when high-level features are insufficiently represented, low-level features are strengthened. To ensure that low-level features do not interfere with high-level ones, a residual module is used to emphasise (or de-emphasise) the importance of low-level features. The LA embedding operation is as follows:  
\[LA=\frac{O_{mp}+\alpha_{mp}O_{mp}+f_{D}+\alpha_{Df}}{2} \tag{5}\]  
where \(\alpha_{mp},\alpha_{D}\) are the attention matrices of the encoding and decoding features, respectively. Low-level detailed feature maps capture rich spatial and concrete information that highlights a target's boundaries and morphology; high-level feature maps capture abstract information, which results in the loss of detailed information. Spatial and size differences make it difficult to fuse the high- and low-level features directly and effectively. As a result, we upscaled each decoding output feature map to the original input size of 512 \(\times\) 512 using bilinear interpolation. These three feature maps are added directly to the unchanged channels, which increases the amount of information and reduces the model calculations. Adding the decoder stage output can be computed as:  
\[\left\{\begin{array}{l}O_{out}=UP_{1}(f_{D3})+UP_{2}(f_{D2})+UP_{3}(f_{D1}) \\ Y=SoftMax(Conv_{1\times 1}(O_{out}))\end{array}\right. \tag{6}\]  
The output feature map of the different decoding modules \(f_{D3}\), \(f_{D2}\), and \(f_{D1}\) and bilinear interpolation upscaling operations of the various filter kernels are represented by \(UP_{1}()\), \(UP_{2}()\), and \(UP_{3}()\), respectively; the kernel sizes are 8 \(\times\) 8, 4 \(\times\) 4, and 2 \(\times\) 2. \(O_{out}\) is the total feature plot of the decoded path output.