In the domain of food science, apple grading holds significant research value and application potential. Currently, apple grading predominantly relies on manual methods, which present challenges such as low production efficiency and high subjectivity. This study marks the first integration of advanced computer vision, image processing, and machine learning technologies to design an innovative automated apple grading system. The system aims to reduce human interference and enhance grading efficiency and accuracy. A lightweight detection algorithm, FDNet-p, was developed to capture stem features, and a strategy for auxiliary positioning was designed for image acquisition. An improved DPC-AWKNN segmentation algorithm is proposed for segmenting the apple body. Image processing techniques are employed to extract apple features, such as color, shape, and diameter, culminating in the development of an intelligent apple grading model using the GBDT algorithm. Experimental results demonstrate that, in stem detection tasks, the lightweight FDNet-p model exhibits superior performance compared to various detection models, achieving an mAP@0.5 of 96.6%, with a GFLOPs of 3.4 and a model size of just 2.5 MB. In apple grading experiments, the GBDT grading model achieved the best comprehensive performance among classification models, with weighted Jacard Score, Precision, Recall, and F1 Score values of 0.9506, 0.9196, 0.9683, and 0.9513, respectively. The proposed stem detection and apple body classification models provide innovative solutions for detection and classification tasks in automated fruit grading, offering a comprehensive and replicable research framework for standardizing image processing and feature extraction for apples and similar spherical fruit bodies.
Read full abstract