Optimization of Identification and Localization of Occluded Citrus Based on Improved YOLOv8 Algorithm
In response to the challenges for machine vision to identify citrus fruit and locate the spatial posi-tion of target citrus in orchards due to overlapping fruit and occlusion by branches and leaves,a modified algorithm based on YOLOv8-SAM was proposed. The model's accuracy in identifying occluded citrus fruit was improved by adding BAM (Bottlenet Attention Module) attention mechanism. The contour shape of occluded citrus fruit was identified using SAM (Segment Anything Model) algorithm,and effective con-tour edges were obtained by combining edge detection with a binocular camera's 3D dense point cloud. The complete contour of the occluded citrus fruit was fitted using least squares to determine the more precise spatial coordinate position of the target citrus fruit. The experimental results show that the algorithm can accurately identify and separate the target citrus fruit,and more precisely locate the spatial coordinate of the citrus fruit. The average identification accuracy of the modified YOLOv8-SAM algorithm for occluded citrus fruit in the orchard environment is 91.1%,and the average spatial coordinate positioning error of the citrus fruit's center compared to traditional positioning methods is reduced by 16.22 mm,and the aver-age fruit diameter error is reduced by 7.99%. This algorithm can provide reference for accurate identifica-tion of overlapping and occluded citrus fruit by citrus harvesting robots.