高级检索+

基于YOLOv11的草莓外部品质全果面检测及分级

Whole fruit surface detection and grading of strawberry external quality based on YOLOv11

  • 摘要: 针对现有草莓外部品质检测方法存在全果面信息获取不完整、检测实时性不足等问题,该研究提出一种基于改进YOLOv11n-seg的草莓全果面外部品质检测与分级方法。首先,为获取草莓全果面图像,设计了一套多角度视觉悬挂式检测系统。其次,为满足实时检测需求,采用MobileNetV4替换骨干网络实现轻量化、引入卷积块注意力模块(convolutional block attention module,CBAM)注意力机制增强对草莓果肉中微小瘀伤、未成熟区域等关键的特征感知能力、并采用EIoU(efficient intersection over union)损失函数优化边界框定位,对YOLOv11n-seg进行改进,实现对草莓果肉中成熟无瘀伤区、未成熟区及瘀伤区等区域的精准分割。基于分割掩膜提取不同语义区域面积,计算果肉着色率及瘀伤面积占比,以实现成熟度与瘀伤分级;提取果肉几何形态特征参数,并结合多元线性回归(multiple linear regression,MLR)与随机森林(random forest,RF)模型分别实现重量预测与形状分级;最后融合多指标完成草莓品质分级。试验结果表明,改进的YOLOv11n-SMCE模型对草莓果肉中不同语义区域分割掩膜的总类别精确率、召回率、平均精度均值mAP0.5和mAP0.5~0.9分别为95.3%、91.5%、96.2%和68.7%,较原有YOLOv11n-seg模型分别提高了3.8、1.3、1.1、1.7个百分点,浮点运算量由10.4 G降低至8.4 G。草莓成熟度、瘀伤检测准确率分别为94.0%、91.5%;MLR重量预测模型决定系数和均方根误差分别为0.93和2.59 g;RF形状分级模型多视角准确率达89.0%。建立的自动化分级处理系统分级准确率为91.0%,平均单果检测时间为28.8 ms,满足草莓产后自动化分级的实时性与精度需求。研究可为草莓外部品质全果面检测及分级提供参考。

     

    Abstract: This study aimed to develop a whole-surface detection and grading method for strawberry external quality by combining three-view image acquisition with an improved YOLOv11n-seg model. The method was intended to overcome the incomplete surface observation caused by single-view imaging and to realize integrated evaluation of maturity, bruising, weight, and shape for postharvest strawberry grading. A hanging-type online imaging system was developed to acquire strawberry images from three viewpoints under non-occluded conditions. A total of 1,030 strawberries were collected, generating 3,090 images. Among them, 2,490 images from 830 fruits were used to construct the instance segmentation dataset, and 600 images from the remaining 200 fruits were used for grading validation. The original segmentation architecture was improved by replacing the backbone with MobileNetV4, embedding the Convolutional Block Attention Module (CBAM), and introducing the Efficient Intersection over Union (EIoU) loss for localization optimization. The improved model was used to segment ripe bruise-free regions, unripe regions, and bruised regions on the strawberry surface. Based on the segmentation masks obtained from three views, the surface coloration ratio and bruise ratio were calculated. Geometric features were further extracted from the fruit mask after convex hull completion and pose normalization, and were used for weight prediction and shape grading. The three-view acquisition experiment showed that the proposed imaging scheme achieved a repeated area ratio of 7.2% to 7.3%, while no fruit-surface region was missed, indicating effective whole-surface coverage. On the test set, the improved model achieved a precision of 94.7%, a recall of 91.0%, an mAP0.5 of 96.3%, and an mAP0.5-0.9 of 80.8% for the bounding-box branch. For the mask branch, the corresponding values reached 95.3%, 91.5%, 96.2%, and 68.7%, respectively. For ripe bruise-free regions, both branches reached a precision of 99.8%, a recall of 100.0%, and an mAP0.5 of 99.5%. The overall accuracy of strawberry maturity classification reached 94.0%, respectively, and the overall bruise grading accuracy reached 91.5%. For weight prediction, the multiple linear regression model achieved a coefficient of determination of 0.93, and the root mean square error was 2.59 g. For shape grading, the random forest model achieved the highest accuracy of 91.2% when the centroid-distance sequence length was 18. Compared with single-view detection, multi-view detection improved shape grading accuracy by 10.6 percentage points. In the final grading validation using 200 strawberries, the proposed method achieved an overall grading accuracy of 91.0%. After deployment with TensorRT in half-precision mode on a graphics processing unit, the average inference time was 28.8 ms. The results demonstrated that the proposed method effectively realized whole-surface acquisition, fine-grained region segmentation, and multi-index fusion grading for strawberries. The overall grading performance and deployment speed indicated that the method satisfied the practical requirements of accurate and real-time postharvest grading and provided a technical basis for intelligent strawberry quality evaluation and commercial processing.

     

/

返回文章
返回