# Target Detection for Coloring and Ripening Potted Dwarf Apple Fruits Based on Improved YOLOv7-RSEs
## 1 Introduction  
Potting cultivated dwarfing rootstock apple [1] is an innovative approach to apple cultivation. It involves reducing the tree size [2; 3; 4], promoting early fruiting, increasing the yield, and facilitating the renewal and management of apple varieties [5]. This method not only enhances the efficiency of natural resources such as land and water but also preserves resources. It provides a new avenue for improving the economic benefits of orchards and promoting the development of rural industries. Concurrently, it fosters the growth of the courtyard economy, which emphasizes ecological balance and environmental protection. Through rational planting and breeding patterns, it can improve soil quality, maintain clean water sources, and enhance biodiversity. Additionally, the courtyard economy can promote the recycling of waste, thereby reducing environmental pollution. In agricultural production, real-time and accurate monitoring of fruit quantity, automatic harvesting [6; 7], and precise yield prediction are beneficial for improving production efficiency and economic benefits [8]. Moreover, they help to drive the innovation and advancement of agricultural technology, promoting the sustainable development of agriculture. Consequently, detectingthe growth conditions of potted dwarfing rootstock apple trees in an effective way holds substantial practical significance for advancing precision agriculture [9]. Apple varieties are typically characterized by attributes such as color, shape, and texture. In China, where apples are a significant horticultural crop, the adoption of machine learning (ML) and computer vision (CV) technologies has advanced the capabilities for apple detection and recognition. This progress supports the intelligent production of apples [10]. For example, [PERSON] et al. proposed a detection algorithm based on image color region segmentation [11]. This algorithm assesses an object's eligibility as a detection target by analyzing its different features. However, traditional algorithms frequently encounter challenges in practical applications due to factors such as foliage occlusion, variable lighting conditions, and fruit entanglement. The boundaries of the corn stover section were effectively extracted using a shape feature-based image segmentation algorithm [12]. In recent years, the YOLO algorithm has been widely adopted in precision agriculture, significantly improving the speed and accuracy of crop detection [13; 14]. YOLOv7, an advanced deep learning algorithm based on machine vision, effectively addresses the challenges of object detection [15]. For example, the improved YOLOv7 has been utilized for the recognition of apple inflorescence morphology [16]. Experimental results indicate that the improved YOLOv7 model achieves a recognition speed of 42.58 frames per second (fps), outperforming other models such as YOLOv5s, the improved YOLOv5, and the original YOLOv7. In [17], the YOLOv7 model was combined with a Squeeze-Excite (SE) network and performed well in a detection task on the PASCAL VOC dataset. The improved model reduced the number of parameters by 12.3% and the FLOPs by 18.86% compared to the original YOLOv7. Furthermore, the advancements in YOLOv3 based on SIoU loss [18] have led to improved accuracy in detecting occluded pedestrians. The YOLOv7 model has demonstrated significant theoretical and practical applications in the detection of potted dwarf apple trees. In this paper, the tree characteristics of potted dwarf anvil apple trees are taken as the subject of the research, emphasizing and analyzing the two key periods for the automated management and yield prediction of fruit trees: the coloring and ripening periods. Fruit farmers and orchard managers can monitor the number and condition of fruits undergoing coloration in real time. This allows them to promptly implement management measures, such as adjusting light exposure, controlling moisture, and applying fertilizers, to optimize the coloration effect of the fruits.