ObjectiveImprove the accuracy and robustness of maturity detection of pitaya fruit.MethodsCombining the YOLOv8 object detection model with the PSP-Ellipse segmentation algorithm, an efficient and accurate automatic identification method for pitaya fruit maturity was proposed. First, the real-time target detection function of YOLOv8 was used to locate and identify the pitaya fruit initially. Then the shape recognition capability of PSP-Ellipse was used to further fine classify the shape and maturity of the pitaya fruit.ResultsThe accuracy rate of maturity classification of pitaya fruit was 97.6%, and the robustness was strong.ConclusionThis method can significantly improve the automatic classification efficiency of pitaya fruit under complex backgrounds and various lighting conditions