## 2 Methods and Materials
### MSEU R-CNN Citrus Crown Instance Segmentation Model
#### 2.3.1 SE-ResNet  
Figure 5(a) shows the ResNet adopted by the Mask R-CNN, which has good feature extractability. Nevertheless, it only focuses on the spatial information of image features and neglects the relationship between feature channels, resulting in insufficient utilization of image-feature information. The SE block provides the attention mechanism structure proposed by [PERSON] et al. [38]. In that paper, the ResNet was optimized by embedding SE blocks to construct a new ResNet feature extraction network. Its structure is shown in Figure 5(b). The SE block recalibrates the weights of different feature channels by modeling the correlations of image features and weighs them based on the previous feature channels via multiplication to enhance the attention layer to the key channel domain and suppresses ineffective feature channels. As shown in the dotted box of Figure 5(b), the SE block structure mainly includes squeeze, excitation, and recalibration parts.  
During the compression operation, the traditional convolution only extracts feature information in the local space, making it difficult to obtain sufficient information to characterize the relationships between channels. SE block uses a compression operation to optimize and compress the global spatial information into one channel using a global average pooling layer to achieve overall spatial feature extraction in a single channel. Mathematically, the channel is formed by compressing the feature map with the spatial dimension. Thus, the element is calculated by the following formula:  
\[Z_{c}=\frac{1}{H\times W}\sum_{i=1}^{H}\sum_{j=1}^{W}X_{c,i,j} \tag{9}\]  
where \(X\) is the input characteristic diagram; \(H\) and \(W\) are the height and width, respectively, of the characteristic diagram, and \(X_{c,i,j}\) represents the elements in the channel row and column characteristic diagram matrix.  
Figure 5: MSEU R-CNN network structure.  
In the excitation operation, the global feature map output of the compression operation is successively passed through the fully connected layer, rectified linear unit (ReLU) activation function, and Sigmoid activation function to generate the corresponding weights per channel without changing the dimensionality of the feature map. The calculation formula is as follows:  
\[V=\sigma(W_{2}\delta(W_{1}\cdot Z)) \tag{10}\]  
where \(V\) is the channel weight; \(\sigma\) is the Sigmoid function; \(\delta\) is the ReLU function; \(W_{1}\) and \(W_{2}\) are the weights learned from the two fully connected layers.  
During the recalibration operation, the weight of the output of the excitation operation is correspondingly weighted to the previous features one-by-one through multiplication. Thus, we can realize the recalibration of the original features of each channel, thereby enhancing the attention to the key channel domain. The calculation formula of recalibration based on the input characteristic map and weight is as follows:  
\[\overline{X}_{C}=V_{c}\cdot X_{c} \tag{11}\]  
where \(\overline{X}_{C}\) is channel feature matrix after recalibration; \(V_{C}\) is the corresponding weight of each channel; \(X_{C}\) is the channel feature matrix corresponding to each feature map.  
The SE block forces the network to pay more attention to the characteristics of the citrus crown while generating a feature map. Simultaneously, via the self-attention network, the semantic information of the crown is enhanced; the complex background information of the orchard is effectively suppressed, and the problem of poor recognition accuracy when the crown is densely distributed is solved. Then the feature map output of the SE-ResNet module is used as the input to the FPN for multiscale feature extraction.