# Object-Environment Fusion of Visual System for Automatic Pear Picking
## 3 Results
### Instance Segmentation Experiment
#### 3.2.3 Experimental Results  
The comparison results are shown in Table 1, where Bbox represents the bounding box; Mask represents the segmentation mask; and the inference time is for each image. From Table 1, it can be seen that Mask R-CNN(Swin Tiny) had better advantages in terms of the AP(Bbox) and AP(Mask). Figure 10 visualizes the results generated by Mask R-CNN(Swin Tiny). In the S1 dataset, the AP(Bbox) and AP(Mask) of Mask R-CNN(Swin Tiny) were 0.94 and 0.93. In the S2 dataset, the AP(Bbox) and AP(Mask) of Mask R-CNN(Swin Tiny) were 0.83 and 0.79. However, Mask R-CNN(Swin Tiny) had more network parameters and a longer inference time than the other networks.  
Table 2 shows the comparison of the different networks in the S2 dataset under the conditions of multiple fruit overlaps, branch occlusion, leaf occlusion, excessive illumination, and insufficient illumination. It can be observed that the AP(Bbox) and AP(Mask) of all networks decreased, with the most obvious decline under the condition of insufficient illumination. Figures 11-14 display the experimental results of Mask R-CNN(Swin Tiny), YOLOv5, YOLOv8, and Mask R-CNN(ResNet-50) under the different conditions. It can be seen that Mask R-CNN(Swin Tiny) was capable of effectively addressing the problems of occlusion and illumination. However, YOLOv5, YOLOv8, and Mask R-CNN(ResNet-50) exhibited a higher rate of missed detection and incomplete segmentation.  
\begin{table}
\begin{tabular}{c c c c c c c} \hline \hline  & \multicolumn{2}{c}{**S1 Dataset**} & \multicolumn{2}{c}{**S2 Dataset**} & \\ \hline
**Network** & **AP(Bbox)** & **AP(Mask)** & **AP(Bbox)** & **AP(Mask)** & **Weight Size** & **Inference Time** \\ \hline
**Mask R-CNN** & & & & & & \\
**(Swin Tiny)** & 0.94 & 0.93 & 0.83 & 0.79 & 569.01 MB & 580.02 ms \\
**YOLOv5** & 0.92 & 0.84 & 0.79 & 0.77 & 15.12 MB & 30.73 ms \\
**YOLOv8** & 0.87 & 0.92 & 0.78 & 0.76 & 23.90 MB & 36.88 ms \\
**Mask R-CNN** & & & & & & \\
**(ResNet-50)** & 0.86 & 0.82 & 0.69 & 0.56 & 176.50 MB & 203.26 ms \\ \hline \hline \end{tabular}
\end{table}
Table 1: Performance comparison of different networks for pear instance segmentation.  
Figure 11: Instance segmentation results of Mask R-CNN(Swin Tiny) under the different conditions.  
\begin{table}
\begin{tabular}{c c c c c c c} \hline \hline  & \multicolumn{2}{c}{**Multiple Fruit**} & \multicolumn{1}{c}{**Leaf**} & \multicolumn{1}{c}{**Branch**} & \multicolumn{1}{c}{**Excessive**} & \multicolumn{1}{c}{**Insufficient**} \\  & \multicolumn{1}{c}{**Overlaps**} & \multicolumn{1}{c}{**Occlusion**} & \multicolumn{1}{c}{**Occlusion**} & \multicolumn{1}{c}{**Illumination**} & \multicolumn{1}{c}{**Illumination**} \\ \hline
**Mask R-CNN** & **AP(Bbox)** & 0.72 & 0.82 & 0.71 & 0.70 & 0.68 \\
**(Swin Tiny)** & **AP(Mask)** & 0.65 & 0.72 & 0.63 & 0.61 & 0.59 \\
**YOLOv5** & **AP(Bbox)** & 0.60 & 0.70 & 0.63 & 0.62 & 0.52 \\
**AP(Mask)** & 0.48 & 0.60 & 0.47 & 0.48 & 0.40 \\
**AP(Bbox)** & 0.57 & 0.68 & 0.53 & 0.60 & 0.51 \\
**YOLOv8** & **AP(Mask)** & 0.39 & 0.55 & 0.40 & 0.40 & 0.39 \\
**Mask R-CNN** & **AP(Bbox)** & 0.54 & 0.62 & 0.50 & 0.51 & 0.48 \\
**(ResNet-50)** & **AP(Mask)** & 0.35 & 0.54 & 0.33 & 0.34 & 0.32 \\ \hline \hline \end{tabular}
\end{table}
Table 2: Performance comparison of networks in the S2 dataset under different conditions.  
Figure 10: Instance segmentation results of Mask R-CNN(Swin Tiny).