# An FSFS-Net Method for Occluded and Aggregated Fish Segmentation from Fish School Feeding Images
## 3 Method
### Overall Network Architecture  
This achievement proves that a well-designed U-Net architecture has the ability to perform very well on segmentation tasks. We proposed a solution for fish school feeding behavior quantification, intending to make it accurate, robust, and efficient. In this paper, we use the U-Net method [37] as the baseline for our network, mainly because it is a simple and effective network, and the result is proved in the comparison experiment section. The U-Net method consists of an encoder and decoder. Figure 5A depicts the network structure. The encoder with a depth of 5 extracts features continuously by using two \(3\times 3\) convolutions (\((3\times 3\text{ Conv})\rightarrow(\text{ ReLU})\)) and expands the receptive field to capture contextual information by using four downsampling operations (\(2\times 2\) max pooling). The decoder recovers spatial information through upsampling and uses skip connection to perform feature fusion to compensate for the details lost during the downsampling process.  
The idea of our proposed method is to combine SPSA and the LMSM module to improve algorithm accuracy without data augmentation based on U-Net architecture. Compared with the U-Net baseline, we use \((3\times 3\text{ Conv})\rightarrow(\text{BN})\rightarrow(\text{ReLU})\) to extract features while keeping the encoder/decoder depth and down-sampling/up-sampling times the same as the U-Net structure. To extract more semantic information without reducing the spatial resolution, we propose an LMSM module, which is added to the last encoder convolution block. The purpose of the proposed SPSA module is to lessen the reliance on external information, while also better capturing internal data/feature correlation. Our SPSA module is added to the decoder section, where encoder and upsampling features are transferred to the SPSA module, which then performs the feature fusion process.  
The final architecture is shown in Figure 5B. The input of shape \(360\times 480\times 64\) is first processed by an input block with two \(3\times 3\times 3\) convolution layers, batch normalization, and ReLU activation. Then, the feature map is transformed by 4 blocks, each of which reduces the spatial dimension of the feature map by firstly downsampling with \(2\times 2\) max pooling. The reduced feature maps are then refined by two convolution layers with a kernel size of \(3\times 3\times 3\). Downsampled feature maps have a size of \(22\times 30\times 1024\) at the bottleneck. Then, their feature map is sent to the LMSM module, and the output size remains the same as the input of LMSM. Finally, spatial dimensions are increased by 4 upsampling blocks which consist of the feature fusion module and two convolution layers with a kernel size of \(3\times 3\times 3\). Especially, the first feature fusion module concatenates the output of the encoder and LMSM module. The remaining three feature fusions module concatenate the output of the encoder and decoder. The final output feature map with input size has 3 output channels, where each channel corresponds to a different class.