# Research on Innovative Apple Grading Technology Driven by Intelligent Vision and Machine Learning
## 4 Discussion  
In apple automatic grading systems, research on single traits such as color, fruit diameter, and fruit shape primarily focuses on image processing techniques. Although stem detection is less common, there are reports of its realization through image processing methods. In the study of apple feature extraction, multi-feature fusion, and appearance grading technology based on the four aforementioned indicators, this paper is the first to apply stem detection based on deep learning and fruit segmentation using cluster algorithms, as well as fruit color, fruit diameter, and fruit shape extraction through image processing. Moreover, it integrates these with feature fusion technology based on ensemble learning methods for apple automatic grading. We introduced the stem characteristic into apple grading for the first time and designed a lightweight stem detection algorithm, FDNet-p, which, among various detection models, satisfies actual production requirements both in terms of computational load and detection accuracy, providing a new design approach for detection tasks. Subsequently, we proposed an improved DPC-AWKNN method to enhance fruit segmentation effects, followed by the extraction of three feature information types--color, fruit diameter, and fruit shape. Finally, through extensive comparative experiments, the GBDT algorithm was identified as more reliable for feature fusion and the execution of the apple grading task.  
However, this study acknowledges certain limitations and shortcomings in practical applications, necessitating further improvements and innovations. Primarily, the current apple grading task does not account for surface defects, which are crucial criteria in commercial grading. In commercial standards, Premium Fruit require nearly flawless surfaces, while Grade A Fruit and Grade B Fruit may permit minor surface defects. Therefore, to align apple grading with commercial standards, the extraction of surface defects is an essential issue that must be addressed in future research. Our team is currently exploring deep learning algorithms to analyze surface defect characteristics of apples and has already achieved some preliminary results, as illustrated in Figure 15. In addition, within the context of the apple grading pipeline, our current research primarily focuses on the segmen  
Figure 14: Visualization of apple grading model performance comparison. (**a**) KNN Model. (**b**) SVM Model. (**c**) MLP Model. (**d**) RF Model. (**e**) BC Model. (**f**) GBDT Model.  
tation of individual apples. For multi-object apple segmentation, we plan to explore the use of deep learning-based segmentation algorithms in the future to achieve the segmentation of both single and multiple apples.  
Moreover, the current study focused on feature extraction and subsequent apple grading model experiments based on a small sample size of apples. These apples had already undergone a simple manual grading process before reaching the market, which limited the range of feature information they expressed and consequently restricted the generalizability of the grading model. Therefore, it is crucial to construct a large-scale apple sample dataset, particularly one comprising freshly harvested apples during their peak season, to ensure that the distribution of sample features closely resembles the real conditions found in orchards. In the future, we plan to harvest large quantities of apple samples from orchards to develop a comprehensive and diverse dataset.  
Lastly, this study does not address internal quality grading technologies, such as those assessing apple sweetness, firmness, and watercore disease. Future work will focus on developing grading technologies for internal apple qualities, integrating them with the current study's external quality grading methods to create a non-destructive and multi-criteria apple grading system integrating internal and external quality indicators.