# On Combining DeepSnake and Global Saliency for Detection of Orchard Apples
## 4 Results and Discussion
### Experimental Results of Each Stage of the Algorithm  
Aiming at the application scenario where the picking robot automatically detects the apple target on the tree in the natural environment, the DeepSnake algorithm capable of real-time processing is used for instance segmentation. The algorithm effectively learns contour features through cyclic convolution, which further reduces the time cost required for model training. Because the DeepSnake algorithm is sensitive to the initial detection results, it is necessary to improve the accuracy of the initial detection results. Considering that the actual picking time is daytime, the light is sufficient in most cases, and the image brightness feature has a certain influence on the detection of the target. In addition, the time complexity of calculating the brightness contrast difference is less than other saliency detection algorithms [30], which can realize fast processing. On the other hand, the Lab color space can better reflect the color and brightness characteristics of the picture. Therefore, the contrast calculation of the L channel pixel value is calculated as the brightness contrast difference calculation to generate a saliency map. Taking into account the color composition of the picture and the function of the histogram back projection algorithm to detect areas similar to the template image, the saliency detection, color difference method and histogram back projection algorithm are combined to obtain a brighter and complete saliency map of the fruit. Finally, a dynamic adaptive positioning method is used to separate the overlapping fruits, the target fruits are marked with rectangular boxes, and the detection results are further optimized by the DeepSnake algorithm. This paper combines the saliency detection, color difference method and histogram back projection algorithm to obtain the fusion improvement salient graph. Figure 3 shows each stage in the fusion improvement saliency map. It can be seen that from column (a) to column (c), the brightness of the fruit part is increasing and the fruit part is more complete. The improvement of salient graph is not particularly obvious after the histogram backprojection algorithm is integrated. In Figure 3, the optimized salient graph is circled with a rectangular box. Its improvement on the saliency graph is evident in the PR curve. Further from the PR curve in Figure 4, it can be seen that the curves of the prominent image fusion chromatic aberration method and the histogram backprojection algorithm are located at the upper right and the BEP value is largest. Therefore, each step of improving salient graph based on fusion is an optimization of the previous step. Uses dynamic threshold segmentation, opening operation, and hole filling for the saliency map to obtain optimized binary results, and proposes a dynamic adaptive overlapping target separation algorithm to effectively separate overlapping fruits realizes rapid and accurate initial labeling of target fruits, and uses the detection result as the input of the DeepSnake algorithm to obtain the final detection result. The results of each stage of the article algorithm are shown in Figure 5. The dark detection box in the figure is the optimized result of the white initial detection box. On the basis of the initial detection box, the DeepSnake algorithm is introduced to obtain a more accurate fruit edge, and then the circumscribed rectangle of the edge is obtained as the final detection result. It can be seen that the proposed algorithm can effectively separate overlapping fruits and accurately label the target fruits in the original image. For some apple images whose initial detection is not accurate, the introduction of DeepSnake algorithm can significantly optimize the initial detection results.