Abstract Accurate identification of blueberry ripeness is crucial for automated harvesting in agriculture, while traditional visual assessment of blueberry ripeness is both time-consuming and error-prone. To address these challenges, this study proposes an ultra-lightweight real-time detection model, Star-YOLOv8s, which aims to significantly improve the efficiency and accuracy of blueberry ripeness detection. The model employs an ultra-lightweight StarNet network in the C2f feature extraction layer of the original YOLOv8s backbone network, and proposes an ultra-lightweight C2f_Star module that aims to reduce the number of parameters in the model. The model incorporates the SimAM attention mechanism before feature fusion and adds a P2 detection head with a resolution of 160 × 160 in the Neck network. This enhancement improves the accuracy and robustness of detecting small blueberry targets. The Wise Intersection Over Union v3 loss function is used instead of the Complete Intersection Over Union loss function to dynamically adjust the weights of the bounding box to optimize the regression ability of the blueberry targets and improve the detection accuracy. The experimental results show that the precision, recall, and mAP@0.5 and mAP@0.5:0.95 are improved by 4%, 2.95%, 3.9%, and 3.6%, respectively, compared with the initial YOLOv8s. In addition, the model reduces the number of parameters by 2.5 × 10 6 . Thus, the Star-YOLOv8s model demonstrates accurate and efficient blueberry ripeness identification, offering a practical solution for automated agricultural harvesting.