Apple surface diseases are crucial factors affecting the quality and yield of apples. Traditional manual inspection methods suffer from low efficiency and poor real-time performance. To address these issues, this paper proposes an apple surface disease detection method based on an improved YOLOv11s. Firstly, three groups of GAM attention mechanisms are integrated into the neck structure of the YOLOv11s to enhance the efficiency of feature fusion and the capability of semantic information transmission. Secondly, the original convolutional downsampling in the backbone network is replaced with a Haar-based feature downsampling module, enabling the model to retain more high-frequency detail information during the downsampling process. In addition, the WFU module is introduced to realize the dynamic allocation of feature weights, enhancing the model’s ability to recognize multi-scale defect features. Finally, the PIOUv2 loss function is adopted to optimize bounding box regression, improving the model’s detection performance for tiny defect spots. In addition, various data augmentation methods for small datasets are employed to improve the model training performance and effectively avoid the problem of data overfitting. The experimental results demonstrate that the F1-score of the proposed model is increased by 4.2%, and the mAP@50:95 is boosted by 2.4%. The detection performance outperforms various comparative models, which verifies the effectiveness and superiority of the proposed method.
Liu et al. (Mon,) studied this question.