Automated mangosteen size estimation from images using instance segmentation and adaptive mask refinement
摘要
Mangosteen, widely regarded as the queen of fruits, represents one of the most valuable tropical export agricultural products in many countries. Its market competitiveness is dependent on standardized and reliable grading practices. The aim of this study is to develop and evaluate an automated solution for mangosteen size estimation from images, designed as a foundational component for a grading system. A dataset of 696 top view images covering eight commercial grades A to H, with fruit circumferences ranging from approximately 17 to 22 cm, was collected under controlled indoor lighting, with a 1.90 cm calibration sticker per image to ensure precise pixel to centimeter scale conversion. A YOLOv11m segmentation model was trained to detect the fruit body, calyx, and reference sticker, followed by fixed and adaptive mask refinement strategies as preprocessing stages to enhance contour accuracy. Three geometric approximation methods, including circle approximation, perimeter based estimation, and ellipse fitting, were developed and compared against manual ground truth measurements. The proposed pipeline is highly efficient, achieving an inference speed of less than one second per image on a GPU. The findings showed that adaptive mask refinement combined with circle approximation achieved the lowest mean absolute error of 1.41 cm, standard deviation of 0.86 cm, maximum error of 3.26 cm, with performance evaluated across all eight commercial grades, and improvements over fixed refinement were highly significant for perimeter based and ellipse fitting methods,