## 3 Materials and Methods
### Lateral Attention Connections  
Promotion in instance segmentation performance requires constructing high-level semantic feature maps at all levels to improve bottom-up and top-down pathways. The lateral connections act on the bottom-up feature extraction structure and provide feature maps with abundant information for the top-down feature enhancement structure, which play a significant connecting role in building high-level semantic mapping. To propagate effective and instance-related feature maps between feature extraction structure and feature enhancement structure, convolutional triplet attention module (CTAM) is added to the lateral connections to obtain useful semantic feature information by capture cross-dimension interaction. The architecture of CTAM is shown in Figure 4. CTAM consists of three branches, two of which focus on the dependencies between the spatial axis and channel axis, and the other branch is used to establish spatial attention. More specifically, the first branch captures the dependencies between the channel dimension and the height dimension of input tensor, the second branch captures the dependencies between the channel dimension and width dimension of input tensor, and the final branch captures the dependencies between the height dimension and width dimension of input tensor. The attention map with the same shape as the input tensor is obtained by averaging the outputs of the three branches of CTAM.  
Figure 4: The architecture of the convolutional triplet attention module (CTAM) [21].  
When input tensor is \(F_{\text{in}}\in\mathbb{R}^{\mathbb{C}\times H\times W}\), the calculation formula of CTAM is as follows:  
\[F_{\text{out}}=\frac{1}{3}(\overline{\hat{F}_{1}\sigma(\psi_{1}(\hat{F}_{1}^{*} ))})+\overline{\hat{F}_{2}\sigma(\psi_{2}(\hat{F}_{2}^{*}))}+F_{\text{in}}\sigma (\psi_{3}(\hat{F}_{3})))=\frac{1}{3}(\overline{F_{\text{out}}^{1}}+\overline{F _{\text{out}}^{2}}+F_{\text{out}}^{3}), \tag{4}\]  
where \(F_{\text{out}}\in\mathbb{R}^{\mathbb{C}\times H\times W}\); \(\overline{F_{\text{out}}^{1}}\in\mathbb{R}^{\mathbb{C}\times H\times W}\); \(\overline{F_{\text{out}}^{2}}\in\mathbb{R}^{\mathbb{C}\times H\times W}\); \(F_{\text{out}}^{3}\in\mathbb{R}^{\mathbb{C}\times H\times W}\); \(\psi(\cdot)\) is the standard two-dimensional convolutional operation; \(\overline{F_{\text{out}}^{1}}\) represents a clockwise rotation of 90 degrees by \(F_{\text{out}}^{1}\) along the height axis; \(\overline{F_{\text{out}}^{2}}\) represents a clockwise rotation of 90 degrees by \(F_{\text{out}}^{2}\) along the width axis; \(\hat{F}_{1}\) is obtained by rotating input tensor 90 degrees anti-clockwise along the height axis; \(\hat{F}_{2}\) is obtained by rotating input tensor 90 degrees anti-clockwise along the width axis; \(\hat{F}_{1}^{*}\) represents the result of Z-pool operation of \(\hat{F}_{1}\); \(\hat{F}_{2}^{*}\) represents the result of Z-pool operation of \(\hat{F}_{2}\); \(\hat{F}_{3}\) represents the result of Z-pool operation of \(\hat{F}_{\text{in}}\).  
The Z-pool operation is applied to decreasing the zeroth dimension to two through concatenating the features generated by average pooling and max pooling across that dimension. For example, the Z-Pool operation of an input tensor of shape (C \(\times\) H \(\times\) W) leads to a tensor of shape (2 \(\times\) H \(\times\) W). It can be formulated by the following equation:  
\[Z_{-pool}(x)=[\sigma_{0d}(x),g_{0d}(x)], \tag{5}\]  
where \(0d\) is the 0 th-dimension across which the max pooling and average pooling operations take place.