《计算机应用》唯一官方网站 ›› 2025, Vol. 45 ›› Issue (2): 640-646.DOI: 10.11772/j.issn.1001-9081.2024010140

• 多媒体计算与计算机仿真 • 上一篇    

基于上下文信息的多尺度特征融合织物疵点检测算法

何秋润1, 胡节1,2(), 彭博1, 李天源2   

  1. 1.西南交通大学 计算机与人工智能学院,成都 611756
    2.福建省运动鞋面料重点实验室(福建华峰新材料有限公司),福建 莆田 351164
  • 收稿日期:2024-02-06 修回日期:2024-04-10 接受日期:2024-04-11 发布日期:2024-05-09 出版日期:2025-02-10
  • 通讯作者: 胡节
  • 作者简介:何秋润(2000—),男,四川内江人,硕士研究生,CCF会员,主要研究方向:深度学习、目标检测
    彭博(1980—),女,四川成都人,教授,博士,CCF会员,主要研究方向:图像分割、图像目标识别
    李天源(1966—),男,福建莆田人,高级工程师,主要研究方向:纺织工程。
  • 基金资助:
    四川省重点研发项目(2023YFG0354);福建省运动鞋面料重点实验室开放基金资助项目(SSUM2201)

Fabric defect detection algorithm based on context information and multi-scale feature fusion

Qiurun HE1, Jie HU1,2(), Bo PENG1, Tianyuan LI2   

  1. 1.School of Computing and Artificial Intelligence,Southwest Jiaotong University,Chengdu Sichuan 611756,China
    2.Key Laboratory for Sports Shoes Outside Materials of Fujian Province (Fujian Huafeng New Material Company Limited),Putian Fujian 351164,China
  • Received:2024-02-06 Revised:2024-04-10 Accepted:2024-04-11 Online:2024-05-09 Published:2025-02-10
  • Contact: Jie HU
  • About author:HE Qiurun, born in 2000, M. S. candidate. His research interests include deep learning, object detection.
    PENG Bo, born in 1980, Ph. D., professor. Her research interests include image segmentation, image target recognition.
    LI Tianyuan, born in 1966, senior engineer. His research interests include textile engineering.
  • Supported by:
    Sichuan Science and Technology Program(2023YFG0354);Open Program of Key Laboratory for Sports Shoes Outside Materials of Fujian Province(SSUM2201)

摘要:

针对纺织品疵点边缘特征弱以及极端长宽比导致检测困难的问题,提出基于YOLOv7的上下文信息多尺度特征融合织物疵点检测算法(CMFFD-YOLO)。首先,采用k均值聚类算法得到适应目标尺寸的更好锚框,并通过迁移学习引入主干权重;然后,重新设计主干网络,添加全局上下文信息(GC)模块,从而充分利用局部和全局上下文的信息增强小目标特征的提取能力;最后,设计一种基于多尺度特征融合网络的通道空间注意力渐近特征金字塔网络(CAFPN),采用渐近融合的方式使不同层次的语义信息联系更紧密,且在融合过程中能提取更多有用信息。在天池和ZJU-Leaper这2个纺织面料瑕疵数据集上的实验结果表明,所提算法的平均精度均值(mAP)分别达到了64.6%和61.7%,相较于原始YOLOv7分别提高了12.5和7.8个百分点,并且模型参数量比原始YOLOv7降低了5.013×106,具有更高的检测速度。可见,所提算法能满足企业织物疵点检测对检测精度和速度的需求。

关键词: 织物疵点检测, 小目标检测, YOLOv7, 加强特征提取, 特征融合

Abstract:

In response to the detect difficulty caused by weak edge features and extreme aspect ratios in fabric defects, a Context information Multi-scale feature Fusion Fabric defect Detection algorithm based on improved YOLOv7 (CMFFD-YOLO) was proposed. Firstly, adaptive anchor boxes for the object sizes were obtained using k-means clustering algorithm, and transfer learning was applied to introduce the backbone weights. Secondly, the backbone network was redesigned, and Global Context (GC) module was added to fully utilize local and global context information to enhance feature extraction capability for small targets. Finally, a Channel spatial attention Asymptotic Feature Pyramid Network (CAFPN) based on multi-scale feature fusion network was designed, utilizing progressive fusion to establish tighter connections between semantic information from different levels. And during fusion process, more useful information was extracted effectively. Experimental results on Tianchi and ZJU-Leaper textile fabric defect datasets, demonstrate that the proposed algorithm achieves the mean Average Precision (mAP) of 64.6% and 61.7% respectively. Compared to the original YOLOv7, the proposed algorithm shows improvements of 12.5 and 7.8 percentage points in mAP respectively, and reduces model parameter size by 5.013×106, which means faster detection speed. It can be seen that the proposed algorithm satisfies accuracy and speed requirements for fabric defect detection in enterprise applications.

Key words: fabric defect detection, small target detection, YOLOv7, enhanced feature extraction, feature fusion

中图分类号: