考虑遮挡的吊蔓西瓜果实分割方法

    A Study on Fruit Segmentation for Hanging Watermelons under Occlusion

    • 摘要: 为实现遮挡环境下吊蔓西瓜果实的精准分割与投影面积估算,该研究提出一种融合语义分割与椭圆拟合的方法。首先,采用U-Net模型结合VGG骨干网络提取高精度掩膜;其次,采用边界跟踪算法提取掩膜轮廓,并结合自适应RANSAC最小二乘算法进行椭圆拟合,重建被遮挡区域的完整轮廓;最后,基于拟合轮廓计算果实投影面积。试验结果表明,该方法估算的果实投影面积与人工实测值相比,R2达0.99,均方根误差RMSE为6.35cm2,平均绝对百分比误差MAPE为3.07%。该方法能有效克服遮挡干扰,为复杂场景下果实表型精准解析与产量评估提供了可靠技术手段。

       

      Abstract: Accurate segmentation and projection area estimation of hanging watermelon fruits under occlusion conditions in greenhouse cultivation are critical for achieving precise phenotypic analysis and intelligent yield prediction, forming the technical foundation for automated water and fertilizer management. This study developed and validated a novel hybrid computational framework that integrates deep learning-based semantic segmentation with robust geometrical model fitting to specifically address the significant challenge of reconstructing complete fruit contours from heavily occluded images, where fruits are often partially obscured by leaves, vines, and support nets. The methodology comprised three stages. First, a comparative evaluation was conducted among five representative semantic segmentation models: U-Net with VGG backbone, U-Net with ResNet50 backbone, DeepLabv3 with MobileNet backbone, DeepLabv3 with Xception backbone, and the Pyramid Scene Parsing Network. The best-performing model was selected for generating the initial fruit region masks. Next, a border following algorithm extracted ordered contour coordinates from the binary mask. Finally, a two-stage ellipse fitting process was applied: an adaptive RANSAC algorithm identified true boundary inliers, with automated parameter tuning, followed by least squares optimization on these inliers to determine ellipse parameters. Projected area was calculated from the fitted ellipse. A dedicated, high-quality image dataset was constructed for this study, containing 2,000 images of two prominent hanging watermelon cultivars. The dataset was meticulously designed to include a balanced distribution of various occlusion types (leaf, vine, net bag, identification tag) and severity levels, as well as non-occluded reference samples. Experimental results demonstrated that the U-Net model with a VGG16 backbone achieved superior segmentation performance, with a precision of 99.41%, a recall of 99.36%, and an Intersection over Union (IoU) score of 98.78%, outperforming the other four candidate models and providing an exceptionally reliable foundation for subsequent geometrical processing. The proposed adaptive RANSAC combined with least squares fitting method proved dramatically more robust than conventional least squares fitting applied directly to all contour points. Quantitative evaluation based on the calculated projection area showed that the proposed hybrid method achieved an outstanding coefficient of determination (R2) of 0.99 when compared to meticulously obtained manual ground-truth measurements. The root mean square error (RMSE) was 6.35 cm2, and the mean absolute percentage error (MAPE) was 3.07%. This performance signifies a substantial improvement, with a 64% reduction in RMSE and a 62% reduction in MAPE compared to the traditional least squares fitting baseline. The method's robustness was further confirmed under varying occlusion intensities; when test samples were categorized into mild, moderate, and severe occlusion levels based on the fitted inlier ratio, the MAPE remained consistently low at 2.41%, 3.01%, and 3.97%, respectively. In a comprehensive benchmark against the prominent Segment Anything Model (SAM) operating in both interactive and automatic modes, the proposed method demonstrated decisive advantages for this specific agricultural occlusion problem. It yielded significantly lower estimation errors, with an RMSE of 6.35 cm2, which starkly contrasts with the 21.45 cm2 obtained by interactive SAM and the 25.63 cm2 from auto-prompting SAM. The study presents a practical method for high-precision segmentation of occluded watermelon fruits in greenhouses. By combining U-Net segmentation with adaptive RANSAC-based ellipse fitting, the framework reliably reconstructs complete fruit contours, enabling accurate, automated estimation of phenotypic traits such as projected area. This supports growth monitoring, yield prediction, and cultivation optimization. The approach demonstrates robustness and efficiency, advancing vision-based automation in protected horticulture.

       

    /

    返回文章
    返回