# Research on Innovative Apple Grading Technology Driven by Intelligent Vision and Machine Learning
## 5 Conclusions  
The study presents a novel architecture for the apple grading task, which, for the first time, organically integrates computer vision, image processing, and machine learning technologies. This innovative approach involves an advanced automated apple grading technology. The apple grading system introduces the stem index for the first time and proposes a high-precision lightweight stem detection algorithm, FDNet-p. It employs the FasterNet network for low-memory-access feature extraction of the stem and includes a DBB-PANet network to integrate stem feature information, thereby enabling rapid stem detection. This allows for the screening out of stemless apples and introduces an auxiliary positioning concept to prevent premature or delayed camera capture. For the apple feature extraction process, an improved DPC-AWKNN segmentation algorithm is proposed, along with an adaptive brightness equalization strategy to enhance fruit segmentation. Image processing techniques are employed to extract multiple apple features: color features are  
Figure 15: Segmentation of apple defect areas.  
extracted via color space transformation and threshold segmentation, while diameter and shape features are extracted using Canny edge detection, minimum enclosing rectangle, and minimum enclosing circle techniques, thus mapping to real-world manual grading scenarios. An intelligent multi-feature grading model for apples was developed based on the GBDT algorithm. Experimental results indicate that in the stem detection task, the proposed lightweight FDNet-p model outperformed numerous mainstream detection models, achieving the best detection effect with an [EMAIL_ADDRESS] value of 96.6%. It has the lowest computational load, with a GFLOPs as low as 3.4 and an FPS value of 499.5, enabling rapid and accurate stem detection. In the apple grading experiments, compared to various classification models, the GBDT grading model demonstrated optimal comprehensive performance, with weighted Jacard Score, Precision, Recall, and F1 Score values of 0.9506, 0.9196, 0.9683, and 0.9513, respectively.  
In the future, we will focus on further innovative designs of stem detection models to enhance the accuracy of stem detection in apple grading tasks. By employing segmentation-based computer vision methods, we will extract defect feature information from apples and advance research on internal grading techniques, enabling the extraction of richer and more comprehensive apple feature data. This work will integrate non-destructive internal and external apple grading technologies, culminating in the development of a complete non-destructive inspection and grading system for apples. This system will be deployed in apple grading production lines in agriculture, aiming to improve product quality, deliver higher economic returns to apple growers, and further enhance food safety standards.  
B.H.: algorithm design, experiments, and writing; J.Z.: supervision and writing--review; R.A., W.S., and T.B.: writing--review; Y.W.: data collection and data organization; W.H. and L.D.: investigation and validation. All authors have read and agreed to the published version of the manuscript.  
This work was supported by the Natural Science Foundation of Xinjiang Uygur Autonomous Region [2022D01A202], the Autonomous Region Postgraduate Research Innovation Project [XJ2024G124], the Science and Technology Innovation 2030--\"New Generation Artificial Intelligence\" Major Project [2022 ZD0115805], and the Xinjiang Uygur Autonomous Region Major Science and Technology Project \"Research on Key Technologies for Farm Digitalization and Intelligitization\" [2022A02011].  
Not applicable.  
The original contributions presented in the study are included in the article, further inquiries can be directed to the corresponding author.  
The authors are very grateful to the editor and reviewers for their valuable comments and suggestions to improve the paper.  
The authors declare no conflicts of interest.