To enhance the commercial value of cucumbers and reduce the burden of manual grading, this study proposed an automated grading method based on computer vision and deep learning. The method included both equipment and algorithm design. In terms of equipment, a compact grader suitable for rod-shaped agricultural products was developed to provide hardware support for intelligent grading. On the algorithmic side, the study proposed an innovative approach that uses morphological key points to obtain shape parameters of rod-shaped agricultural products, leading to the development of the CukeposeNet model. The method predicts cucumber key point coordinates in an end-to-end manner. By combining geometric computation and threshold-based decisions, six morphological parameters were detected and used for multiple indicators grading. Experimental results showed that CukeposeNet achieved a key point detection accuracy of 98.5% and a processing speed of 50 FPS, outperforming six other key point detection algorithms. The correlation coefficients (R) for length-related parameters (length, neck length, arch height) were all above 0.90, and the mean absolute errors (MAE) for diameter-related parameters (stalk, middle, stem) were all below 0.15 cm, indicating good overall accuracy. The model also demonstrated strong generalization performance in parameter detection of other rod-shaped crops such as bitter melon, green pepper, and luffa; the R reached 0.985. In an online multiple indicators grading experiment, the grader achieved a grading accuracy of 87%, which is 20% higher than manual grading and operated at twice the manual efficiency, thereby meeting production requirements. This study confirmed the feasibility of morphological parameter detection based on key points and provided a practical solution for the online external quality detection and grading of cucumbers and similar agricultural products.
Liu et al. (Fri,) studied this question.