计算机工程与应用 ›› 2025, Vol. 61 ›› Issue (13): 151-164.DOI: 10.3778/j.issn.1002-8331.2411-0399

• 目标检测专题 • 上一篇    下一篇

DMH-YOLO:针对屏幕外观缺陷检测与分割的高效算法

高家源,张新   

  1. 1.西南交通大学 唐山研究院,河北 唐山 063000
    2.西南交通大学 机械工程学院,成都 610031
  • 出版日期:2025-07-01 发布日期:2025-06-30

DMH-YOLO: High-Efficient Algorithm for Screen Appearance Defect Detection and Segmentation

GAO Jiayuan, ZHANG Xin   

  1. 1.Tangshan Institute, Southwest Jiaotong University, Tangshan, Hebei 063000, China
    2.School of Mechanical Engineering, Southwest Jiaotong University, Chengdu 610031, China
  • Online:2025-07-01 Published:2025-06-30

摘要: 随着手机产品的不断更新换代,手机屏幕的生产标准愈发严苛。鉴于传统的人工质检手段已难以适应智能制造的严苛要求,提出了屏幕外观缺陷实例分割模型——双头多用途高效YOLO(double-head multi-purpose high-efficient YOLO,DMH-YOLO)。设计了动态实例分割头DySegment(dynamic segment),实现YOLOv7实例分割功能。在骨干网络的头部,创新性地设计了一个龙虾注意力下采样模块。该模块不仅有效减小特征图的尺寸,还能够在保留更多特征信息的同时,显著提升特征表达能力,为后续网络的特征提取提供更为丰富的特征信息。此外,改进了原网络的下采样方法,采用Haar小波下采样和空间到深度下采样技术。同时,将上采样优化为DySample(dynamic sample)动态上采样,以进一步提升模型的精确度。为降低模型的参数量和计算复杂度,提高计算效率,引入了ELAN-tiny(efficient layer aggregation network-tiny)和简单空间金字塔池化特征融合(simple spatial pyramid pooling with fusion,SimSPPF)到颈部网络中。实验结果表明,DMH-YOLO在经过翻转、高斯模糊以及添加椒盐噪点等增强处理后的屏幕缺陷数据集上,展现出了卓越的性能,其目标检测的平均精度高达98.77%,分割平均精度也达到了96.74%。与语义分割模型相比,实例分割DMH-YOLO在用途上更加广泛,应用方式也更加灵活多变。

关键词: 缺陷检测与分割, YOLO-seg, 多尺度特征融合, 下采样, 上采样

Abstract: With the continuous updating of cell phone products, the production standards of cell phone screens have become more and more stringent. Given that traditional manual quality inspection methods are struggling to meet the rigorous demands of intelligent manufacturing, a screen appearance defects instance segmentation model — i. e. the double-head multi-purpose high-efficient YOLO (DMH-YOLO) is proposed. Firstly, a dynamic segment (DySegment) segmentation head is designed to realize the instance segmentation functionality of YOLOv7. Secondly, an innovative lobster attention downsampling module is incorporated into the head of the backbone network, which not only reduces the size of the feature map but also enhances feature representation capability while retaining more feature information, thus providing richer information for subsequent feature extraction. Furthermore, the original downsampling approach is improved by adopting Haar wavelet transform downsampling and space-to-depth downsampling techniques. Simultaneously, the upsampling is optimized to dynamic sample (DySample) upsampling to further enhance the accuracy. Lastly, to reduce the parameter count and computational complexity while improving computational efficiency, ELAN-tiny and SimSPPF are introduced into the neck network. Experimental results demonstrate that DMH-YOLO exhibits exceptional performance on an enhanced screen defect dataset subjected to augmentation processes such as flipping, Gaussian blurring, and the addition of salt-and-pepper noise. It achieves an average precision of 98.77% for defect detection and 96.74% for semantic segmentation. Compared to semantic segmentation models, instance segmentation DMH-YOLO offers broader applicability and more flexible in its application.

Key words: defect detection and segmentation, YOLO-seg, multiscale feature fusion, downsampling, upsampling