基于改进YOLOv5s的苹果表面缺陷检测

打开文本图片集
中图分类号:S126:TP391.4 文献标识号:A 文章编号:1001-4942(2025)06-0149-09
AbstractAiming at the problems of low detection accuracy and miss and false detection caused by overlapping or obscured apples in apple surface defects detection,an improved apple surface defect detection method with YOLOv5s algorithm was proposed in this study.Firstly,the convolutional block atention module (CBAM)was added to the Backbone part of the YOLOv5s model to enhance the detection model's attention to the information of important regions of images,so as to improve the model's abilityto detect defects on the surface of apple. Secondly,a weighted bidirectional feature pyramid network(BiFPN)was introduced to fully integrate the apple surface defect features at diferent scales in orderto reduce missed and false detections.Finally,the Soft-NMS algorithm was used instead of the NMS algorithm in the original network to optimize the redundant bounding box screening conditions and further reduce the miss detection rate of the model.The experimental results showed that the proposed algorithm in this paper achieved 95.5% of mean average precision (mAP),which improved by 3.3 percentage point compared to the original algorithm,and the recall rate was improved by 4.6 percentage points,so it could be beter used to detect the surface defects of apples.
KeywordsApple surface defect detection; YOLOv5s; Convolutional atention mechanism;Weightedbidirectional feature pyramid network(BiFPN)
苹果生长、采摘、运输以及筛选过程中常会遭遇鸟啄食、病虫害以及磕碰、腐烂等情况,严重影响苹果品质、产量及经济价值,因此对苹果表面缺陷进行精准检测有着重要的意义。(剩余10014字)