 The proposed method provides a solution to the problem of distinguishing between occluded and unoccluded apples in an apple tree image. It uses a modified version of the YOLOV 5S network architecture, which has been optimized to improve the accuracy of detecting graspable and ungraspable apples. This modification includes replacing the bottleneck CSP module with a new bottleneck CSP2 module, inserting a visual attention module, SE, into the backbone architecture, improving the bonding fusion mode of feature maps, and increasing the initial anchor box size. The experimental results show that the proposed method achieves higher accuracy than the original YOLOV 5S network, with a map of 86.75%. Additionally, the average recognition speed per image is 0.015 seconds, which is faster than the original YOLOV 5S model. This article was authored by Bin Yen, Pan Fan, Xiaoyan Lei, and others. We are article.tv, links in the description below.