# SMR-RS: An Improved Mask R-CNN Specialized for Rolled Rice Stubble Row Segmentation
## 2 Materials and Methods
### Simplified Mask R-CNN for Rolled Rice Stubble Row Segmentation
#### 2.2.3 Simplification of Backbone Network for SMR  
The backbone network of SMR is a combination of ResNet [50] + FPN [47], as shown in Figure 4. ResNet on the left is the feature extractor, and FPN on the right merges the features and finally outputs a 5-level feature map P2-P6. Here two sections are input into all feature maps, the RPN network and RoI Align [43], but in practice, not all feature maps need to be used for the task of segmenting the rolled rice stubble rows, and the use of feature maps in these two sections is described below.  
1. In the RPN, all feature maps are used to generate anchors as shown in part (a) of Figure 3, but in practice, for the segmentation task of rolled stubble rows, the higher scoring region proposals are only associated with the feature maps P5 and P6 and are most related to P5, the others do not contribute in a positive way in the process of inference. (See Section 3.4 for details).
2. In the second stage of RoI Align, feature maps are used to generate masks. Research has shown that the larger an object is in a picture, the larger the receptive field required  
Figure 4: Before and after simplification of SMR’s backbone network. 1 \(\times\) 1, 3 \(\times\) 3 indicates convolution kernel size, 0.5\(\times\) indicates downsampling, 2\(\times\) indicates upsampling.  
Figure 3: Visualization from feature maps to mask in SMR. (**a**): the process by which feature maps are used to generate anchors in the first stage. (**b**): the process by which feature maps are used to generate masks in the second stage. Please refer to the Figure 2 for the distinction between the first and the second stage.  
to recognize it [51], and for the five feature maps P2-P6 in SMR, the receptive field increases in steps, and the size decrease. Based on this, in the RoI Align, different feature maps are selected depending on the area of the RoI (Region of Interest); in SMR, the RoI is the region proposals, and the specific selection rule is as in part (b) of Figure 3. For the 1920 \(\times\) 1080 resolution image used in this paper, the area of the smallest region proposals that can completely enclose the rolled rice stubble rows is typically greater than 4482, corresponding to the use of feature map P5 to generate the mask. It was worth noting that feature map P6 was not presented here because the size of P6 is too small, and despite its large perceptual field, its too-small size leads to a lack of semantic information.  
Based on the above analysis, combined with the need for training, i.e., in order to avoid the use of a single feature map resulting in insufficient samples, which in turn leads to slow loss convergence, feature maps P5 and P6 are used in training and P6 is removed in inference. The simplified structure is shown in Figure 4. The light blue background part is the structure retained after the simplification (the structure in the dashed box will be removed when using only feature map P5), and the simplified backbone network only retains the parts associated with feature maps P5 and P6. The rules for feature map selection remain the same as in Figure 3.  
So far, all the simplifications have been completed, and the SMR after the backbone network simplification is called SMR-RS (abbreviation of simplified Mask R-CNN for rolled rice stubble row segmentation), and its intuitive comparison with Mask R-CNN is shown in Figure 2.