计算机工程与应用 ›› 2025, Vol. 61 ›› Issue (6): 128-140.DOI: 10.3778/j.issn.1002-8331.2401-0382

• YOLOv8 改进及应用专题 • 上一篇    下一篇

基于YOLOv8-S的偏光片表面缺陷检测算法

盛威,周永霞,陈俊杰,赵平   

  1. 中国计量大学 信息工程学院,杭州 310018
  • 出版日期:2025-03-15 发布日期:2025-03-14

Polarizer Surface Defect Detection Algorithm Based on YOLOv8-S

SHENG Wei, ZHOU Yongxia, CHEN Junjie, ZHAO Ping   

  1. School of Information Engineering, China Jiliang University, Hangzhou 310018, China
  • Online:2025-03-15 Published:2025-03-14

摘要: 随着偏光片市场不断扩大,应用愈发广泛,对偏光片的生产要求也愈加严格。针对在偏光片表面缺陷检测中,存在缺陷形态复杂、小尺寸缺陷容易误检漏检的问题,提出一种基于YOLOv8-S偏光片表面缺陷检测改进算法。使用DCNv3替换主干网C2f模块中的普通卷积,同时结合EMA注意力机制,构建DEC2f特征提取模块,提升主干网对复杂缺陷的特征提取能力。基于特征细化模块构建轻量跨尺度特征细化融合模块(LCFRFM),提升通道净化能力并降低参数量,有效跨尺度融合主干网浅层特征。引入ConvMixer Layer构建CMC2f预测头,更大的预测视野带来更强的小尺寸缺陷检测能力。使用SIoU替换CIoU作为边界框回归损失函数,使用AdamW替换SGD作为网络训练时的优化器,提升检测精度和训练收敛速度。实验结果表明,该算法相比YOLOv8-S在mAP50和mAP50:95上分别提升了2.4和2.9个百分点,证明了提出算法的有效性。

关键词: 偏光片表面, 缺陷检测, 特征提取, 跨尺度特征融合, YOLOv8

Abstract: As the polarizer market continues to expand, the application is more and more extensive, the production requirements for polarizer are also more and more stringent. Aiming at the problems of complex defect morphology, small-size defects detection false and missed in polarizer surface defect detection, this paper proposes an improved algorithm based on YOLOv8-S polarizer surface defect detection. DCNv3 is used to replace the ordinary convolution in the C2f module of the backbone network, and at the same time, combining with the EMA , the DEC2f feature extraction module is constructed, which improves the feature extraction capability of the backbone network for complex defects. Lightweight cross-scale feature refinement fusion module (LCFRFM) is constructed based on the feature refinement module to improve the channel purification capability and reduce the number of parameters, and effectively cross-scale fusion of shallow features in the backbone network. The ConvMixer Layer is introduced to construct the CMC2f prediction head, and the larger prediction field of view brings stronger small-size defect detection capability. SIoU is used to replace CIoU as the bounding box regression loss function, and AdamW is used to replace SGD as the optimizer during network training to improve the detection accuracy and training convergence speed. The experimental results show that the proposed algorithm improves 2.4 and 2.9 percentage points on mAP50 and mAP50:95, respectively, compared to YOLOv8-S, which proves the effectiveness of the proposed algorithm.

Key words: polarizer surface, defect detection, feature extraction, cross-scale feature fusion, YOLOv8