## 2 Materials and Methods
### Improved Deeplabv3+ Network Architecture  
Deeplabv3+ is the latest cutting-edge semantic segmentation network in the Google team's Deeplab series [24]. It follows a common encoder-decoder architecture and is based on end-to-end training. Deeplabv3+ utilizes Deeplabv3 [25] as the encoder and employs a deep separable convolution network as the decoder. In the encoder, the backbone network adopts the lightweight Xception [26] architecture for feature extraction, followed by ASPP (Atrous Spatial Pyramid Pooling) [27], which utilizes atrous convolutions with different dilation rates and upsampling to fuse low-level and high-level feature information for multi-scale feature extraction. Simultaneously, during the four-fold upsampling, the low-level features with the same Xception structure from the backbone network are connected and undergo 1 \(\times\) 1 convolution to reduce the number of channels. The features are then fine-tuned using a 3 \(\times\) 3 convolution and four upsampling layers to generate the final prediction map. Deeplabv3+ has achieved good results on commonly used semantic segmentation datasets. In this study, when using our custom tilapia part segmentation dataset, Deeplabv3+ exhibited insufficient clarity in tilapia boundary segmentation and lacked sufficient feature information. There were issues with misclassification of objects and blending of object pixels. The reason for these issues is that the downsampling and upsampling operations in the feature extraction process, while improving computational speed and spatial resolution, also result in the loss of feature information. This leads to inadequate receptive field and blurriness in point and line information in the boundary, resulting in unclear segmentation, especially in complex scenes. In the decoding process, the feature maps obtained from the ASPP module with different sampling rates are fused together using 1 \(\times\) 1 convolution to obtain higher-level semantic features. After completing the upsampling, they are combined with the low-level feature maps. However, this process does not differentiate the importance of each feature channel. There is no distinction between useful and irrelevant features, which can affect the final segmentation accuracy of the model. To address the aforementioned issues, improvements were made to both the encoder and decoder structures of the Deeplabv3+ network in this experiment. The improved model structure is shown in Figure 6, where the gray shaded regions represent the main contributions of this study. To enhance the understanding of image features in the decoder, we introduced the CBAM (Convolutional Block Attention Module) attention mechanism. By adaptively adjusting channel weights and spatial weights, the CBAM module strengthens the understanding of the output feature information. Specifically, after the image passes through the Xception backbone network for feature extraction, we applied the CBAM  
Figure 5: Semantic segmentation steps for tilapia parts. module to the feature maps to enhance the extraction of semantic feature information. Next, the obtained feature maps were processed using dilated convolutions with different dilation rates to extract semantic feature information from deeper layers. After adjusting the number of channels using a \(1\times 1\) convolution, the deep semantic information of the tilapia was obtained and transmitted to the decoder module. The deep features were then passed back to the encoder part, where a SENet (Squeeze-and-Excitation) attention mechanism was introduced. Different weights were assigned to the channel features of different segmentation parts to capture higher-level contextual channel information. Subsequently, the image resolution was increased through four-fold upsampling. Finally, the processed shallow features were fused with the deep features and passed through a \(3\times 3\) convolution to extract features, enabling the segmentation of various parts of the tilapia body.