Please wait a minute...
浙江大学学报(工学版)  2025, Vol. 59 Issue (12): 2556-2565    DOI: 10.3785/j.issn.1008-973X.2025.12.010
计算机技术     
基于高精多尺度集成的轻量织物缺陷检测方法
张捷皓(),张进峰,吴威涛,向忠*()
浙江理工大学 机械工程学院,浙江 杭州 310018
Lightweight fabric defect detection method based on high precision multi-scale integration
Jiehao ZHANG(),Jinfeng ZHANG,Weitao WU,Zhong XIANG*()
College of Mechanical Engineering, Zhejiang Sci-Tech University, Hangzhou 310018, China
 全文: PDF(8138 KB)   HTML
摘要:

织物缺陷形态尺寸多样,尤其是极端大纵横比缺陷会对检测构成巨大挑战. 为了实现在计算资源有限的情况下提高检测精度,提出高精多尺度集成的轻量织物缺陷检测方法. 设计坐标并行深度卷积(CPDConv),通过添加坐标为卷积提供图像中每个像素点的绝对位置,又通过并行多尺寸卷积核提取不同尺寸特征图,拼接多尺度、多视野的显著缺陷特征;基于CPDConv重构新瓶颈块CPDBottleneck,使高质量特征提取模块C3CPD具备获取更多特征信息的能力;构建多尺度逐步特征融合网络(MSFPN),减少非相邻层间特征信息在传递过程中的损失;引入基于辅助边界框的Powerful IoU(Inner-PIoU)避免预测框膨胀并加快其回归速度. 实验结果表明,在自建的织物数据集上,对比原版YOLOv5s,由上述模块改进的YOLOv5s在mAP50上提高了3.2个百分点,参数量和计算量分别下降约24.3、16.9个百分点,每秒帧数仅下降约1.9,能够满足工业织物缺陷检测中精度与速度的要求.

关键词: 深度学习多特征整合关键特征保留YOLO纺织织物    
Abstract:

Fabric defects with various shapes and sizes, especially those with extremely large aspect ratio, pose a great challenge to detection. In order to improve detection accuracy with limited computational resources, a lightweight fabric defect detection method with high-precision multiscale integration was proposed. Firstly, coordinate parallel depthwise convolution (CPDConv) was designed to provide the absolute position of each pixel point in the image by adding coordinates to the convolution, as well as extract different-scale feature maps, and splice significant defect features with multi-scale and multi-fields of view through parallel multiscale convolution kernels. New bottleneck block CPDBottleneck was reconstructed based on CPDConv, so that high-quality feature extraction module C3CPD had the ability to obtain more feature information. Secondly, a multiscale stepwise feature pyramid network (MSFPN) was constructed, which reduced the loss of feature information between non-adjacent layers during transmission. Finally, a powerful IoU (Inner-PIoU) based on auxiliary bounding boxes was introduced to avoid the expansion of prediction boxes and accelerate their regression speed. The experimental results showed that, on the self-constructed fabric dataset, compared with the original YOLOv5s, the mAP50 of the YOLOv5s improved by the above modules was increased by 3.2 percentage points, its parameters and computational complexity were reduced by about 24.3 percentage points and 16.9 percentage points, respectively, and its frames per second decreased by only about 1.9. The proposed method can meet the requirements of accuracy and speed in industrial fabric defect detection.

Key words: deep learning    multi-feature integration    key feature preservation    YOLO    textile fabrics
收稿日期: 2024-11-20 出版日期: 2025-11-25
CLC:  TP 391  
基金资助: 国家自然科学基金资助项目(52575602);国家重点研发计划资助项目(2024YFB4614200);浙江省“尖兵领雁”科技计划资助项目(2025C01088).
通讯作者: 向忠     E-mail: zszhangjh1999@163.com;xz@zstu.edu.cn
作者简介: 张捷皓(1999—),男,硕士生,从事深度学习研究. orcid.org/0009-0007-9725-6238. E-mail:zszhangjh1999@163.com
服务  
把本文推荐给朋友
加入引用管理器
E-mail Alert
作者相关文章  
张捷皓
张进峰
吴威涛
向忠

引用本文:

张捷皓,张进峰,吴威涛,向忠. 基于高精多尺度集成的轻量织物缺陷检测方法[J]. 浙江大学学报(工学版), 2025, 59(12): 2556-2565.

Jiehao ZHANG,Jinfeng ZHANG,Weitao WU,Zhong XIANG. Lightweight fabric defect detection method based on high precision multi-scale integration. Journal of ZheJiang University (Engineering Science), 2025, 59(12): 2556-2565.

链接本文:

https://www.zjujournals.com/eng/CN/10.3785/j.issn.1008-973X.2025.12.010        https://www.zjujournals.com/eng/CN/Y2025/V59/I12/2556

图 1  CPD-YOLO结构
图 2  CPDConv模块结构
图 3  C3CPD模块结构
图 4  MSFPN结构
图 5  ZY数据集中缺陷例图
类别缺陷类别缺陷
1破洞11吊经
2水渍、油渍、污渍12粗纬
3三丝13纬缩
4结头14浆斑
5花跳板15整经结
6百脚16星跳、跳花
7毛粒17断氨纶
8粗经18稀密档、浪纹档、色差档
9松经19磨痕、轧痕、修痕、烧毛痕
10断经20死皱、云织、双纬、双经、
跳纱、筘路、纬纱不良
表 1  天池数据集中根据成因划分缺陷种类
图 6  天池数据集中部分缺陷图例
实验C3CPDMSFPNInner-PIoUParam/106GFLOPs/109mAP50mAP50:95FPS
17.016.00.8800.62452.9
25.813.90.8990.63951.0
35.715.40.9000.62251.5
47.016.00.8920.61855.3
55.313.30.8980.63348.1
65.313.30.9120.64051.7
表 2  基于ZY数据集的消融实验结果
模型ratiomAP50mAP50:95FPS
Base+CIoU0.8980.63348.1
Base+
Inner-PIoU
1.20.9010.63849.8
1.30.9070.62449.4
1.40.9120.64051.7
1.50.8980.62552.1
表 3  基于ZY数据集的损失函数性能研究
MethodPRF1mAP50mAP50:95Param/106GFOLPs/109FPS
Faster RCNN0.4320.8130.560.6340.250137.0370.311.2
SSD0.5150.4520.480.5200.238105.287.433.7
YOLOv5s0.9650.7900.870.8800.6247.016.052.9
YOLOv70.7470.2520.380.2460.17437.2105.252.7
YOLOv8s0.9450.8010.870.8860.62311.128.751.3
YOLOv9s0.9310.6900.790.8140.3249.940.745.9
YOLOv10s0.8640.8670.870.8790.3358.024.563.5
YOLO11s0.7220.6360.680.6880.3999.421.366.7
CPD-YOLO0.9740.8480.910.9120.6405.313.351.0
表 4  不同模型基于ZY数据集的对比实验结果
图 7  不同模型基于ZY数据集的缺陷检测可视化结果
模型PRF1mAP50mAP50:95Param/106GFOLPs/109FPS
YOLOv5s0.5780.4880.510.4820.2347.116.154.9
YOLOv70.5860.4690.480.4700.22737.3105.462.1
YOLOv8s0.5240.4790.490.4790.24311.128.661.7
YOLOv9s0.5340.4720.470.4710.2409.940.750.0
YOLOv10s0.4830.4060.440.3870.2018.124.563.5
YOLO11s0.4590.3990.430.3890.1839.421.371.4
CPD-YOLO0.5880.4790.520.4910.2305.413.551.8
表 5  不同模型基于天池数据集的对比实验结果
图 8  各模块特征提取效果
图 9  各FPN的Grad-CAM可视化对比
图 10  CPD-YOLO的部分失效案例可视化
1 ZHAO Z, MA X, YANG X, et al. Research on fabric defect detection algorithm based on improved YOLOv5 [C]// IEEE 7th Advanced Information Technology, Electronic and Automation Control Conference. Chongqing: IEEE, 2024: 387–391.
2 XIANG Z, SHEN Y, MA M, et al HookNet: efficient multiscale context aggregation for high-accuracy detection of fabric defects[J]. IEEE Transactions on Instrumentation and Measurement, 2023, 72: 1- 11
3 WANG Y, XIANG Z, WU W, et al MCF-Net: a multi-scale context fusion network for real-time fabric defect detection[J]. Digital Signal Processing, 2025, 167: 105425
doi: 10.1016/j.dsp.2025.105425
4 LI Y, SONG L, CAI Y, et al Research on fabric surface defect detection algorithm based on improved Yolo_v4[J]. Scientific Reports, 2024, 14: 5537
doi: 10.1038/s41598-023-50671-7
5 ZHOU K, JIA J, WU W, et al Space-depth mutual compensation for fine-grained fabric defect detection model[J]. Applied soft computing, 2025, 172: 112869
doi: 10.1016/j.asoc.2025.112869
6 GIRSHICK R. Fast R-CNN [C]// IEEE International Conference on Computer Vision. Santiago: IEEE, 2015: 1440–1448.
7 REN S, HE K, GIRSHICK R, et al Faster R-CNN: towards real-time object detection with region proposal networks[J]. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2017, 39 (6): 1137- 1149
doi: 10.1109/TPAMI.2016.2577031
8 REDMON J, DIVVALA S, GIRSHICK R, et al. You only look once: unified, real-time object detection [C]// IEEE Conference on Computer Vision and Pattern Recognition. Las Vegas: IEEE, 2016: 779–788.
9 REDMON J, FARHADI A. YOLO9000: better, faster, stronger [C]// IEEE Conference on Computer Vision and Pattern Recognition. Honolulu: IEEE, 2017: 6517–6525.
10 REDMON J, FARHADI A. YOLOv3: an incremental improvement [EB/OL]. (2018−04−08)[2024−11−18]. https://arxiv.org/pdf/1804.02767.
11 LIU W, ANGUELOV D, ERHAN D, et al. SSD: single shot MultiBox detector [C]// Computer Vision – ECCV 2016. Cham: Springer, 2016: 21–37.
12 LIU R, LEHMAN J, MOLINO P, et al. An intriguing failing of convolutional neural networks and the CoordConv solution [EB/OL]. (2018−12−03)[2024−11−18]. https://arxiv.org/pdf/1807.03247.
13 YANG G, LEI J, TIAN H, et al Asymptotic feature pyramid network for labeling pixels and regions[J]. IEEE Transactions on Circuits and Systems for Video Technology, 2024, 34 (9): 7820- 7829
doi: 10.1109/TCSVT.2024.3376773
14 LIU B, WANG H, CAO Z, et al PRC-light YOLO: an efficient lightweight model for fabric defect detection[J]. Applied Sciences, 2024, 14 (2): 938
doi: 10.3390/app14020938
15 LUO X, NI Q, TAO R, et al A lightweight detector based on attention mechanism for fabric defect detection[J]. IEEE Access, 2023, 11: 33554- 33569
doi: 10.1109/ACCESS.2023.3264262
16 WANG Y, XU Y, YU Z, et al Color-patterned fabric defect detection based on the improved YOLOv5s model[J]. Textile Research Journal, 2023, 93 (21/22): 4792- 4803
17 GUO Y, KANG X, LI J, et al. Automatic fabric defect detection method using AC-YOLOv5 [J]. Electronics, 2023, 12(13): 2950.
18 LI X, ZHU Y A real-time and accurate convolutional neural network for fabric defect detection[J]. Complex and Intelligent Systems, 2024, 10 (3): 3371- 3387
19 XIANG Z, JIA J, ZHOU K, et al Block-wise feature fusion for high-precision industrial surface defect detection[J]. The Visual Computer, 2025, 41: 9277- 9295
doi: 10.1007/s00371-025-03927-4
20 LIN T Y, DOLLÁR P, GIRSHICK R, et al. Feature pyramid networks for object detection [C]// IEEE Conference on Computer Vision and Pattern Recognition. Honolulu: IEEE, 2017: 936–944.
21 OUYANG D, HE S, ZHANG G, et al. Efficient multi-scale attention module with cross-spatial learning [C]// 2023 IEEE International Conference on Acoustics, Speech and Signal Processing. Rhodes Island: IEEE, 2023: 1–5.
22 ZHANG H, XU C, ZHANG S. Inner-IoU: more effective intersection over union loss with auxiliary bounding box [EB/OL]. (2023−11−14) [2024−11−18]. https://arxiv.org/pdf/2311.02877.
23 LIU C, WANG K, LI Q, et al Powerful-IoU: more straightforward and faster bounding box regression loss with a nonmonotonic focusing mechanism[J]. Neural Networks, 2024, 170: 276- 284
doi: 10.1016/j.neunet.2023.11.041
24 XU S, CHENG S, JIN S, et al Industrial fabric defect-generative adversarial network (IFD-GAN): high-fidelity fabric cross-scale defect samples synthesis method for enhancing automated recognition performance[J]. Engineering Applications of Artificial Intelligence, 2025, 161: 112296
doi: 10.1016/j.engappai.2025.112296
25 TIANCHI. Smart diagnosis of cloth flaw dataset [EB/OL]. (2020−10−21) [2024−11−18]. https://tianchi.aliyun.com/dataset/79336.
26 JOCHER, G. YOLOv5 by Ultralytics (Version 6.0) [EB/OL]. [2024−11−18]. https://doi.org/10.5281/zenodo.3908559.
27 WANG C Y, BOCHKOVSKIY A, LIAO H M. YOLOv7: trainable bag-of-freebies sets new state-of-the-art for real-time object detectors [C]// IEEE/CVF Conference on Computer Vision and Pattern Recognition. Vancouver: IEEE, 2023: 7464–7475.
28 JOCHER G, QIU J, CHAURASIA A. Ultralytics YOLO (Version 8.0. 0) [EB/OL]. [2024−11−18]. https://github.com/ultralytics/ultralytics.
29 WANG C, YEH I, LIAO H. YOLOv9: learning what you want to learn using programmable gradient information [EB/OL]. (2024−02−29) [2024−11−18]. https://arxiv.org/pdf/2402.13616.
[1] 段继忠,李海源. 基于变分模型和Transformer的多尺度并行磁共振成像重建[J]. 浙江大学学报(工学版), 2025, 59(9): 1826-1837.
[2] 王福建,张泽天,陈喜群,王殿海. 基于多通道图聚合注意力机制的共享单车借还量预测[J]. 浙江大学学报(工学版), 2025, 59(9): 1986-1995.
[3] 张弘,张学成,王国强,顾潘龙,江楠. 基于三维视觉的软体机器人实时定位与控制[J]. 浙江大学学报(工学版), 2025, 59(8): 1574-1582.
[4] 周著国,鲁玉军,吕利叶. 基于改进YOLOv5s的印刷电路板缺陷检测算法[J]. 浙江大学学报(工学版), 2025, 59(8): 1608-1616.
[5] 翟亚红,陈雅玲,徐龙艳,龚玉. 改进YOLOv8s的轻量级无人机航拍小目标检测算法[J]. 浙江大学学报(工学版), 2025, 59(8): 1708-1717.
[6] 杨宇豪,郭永存,李德永,王爽. 基于视觉信息的煤矸识别分割定位方法[J]. 浙江大学学报(工学版), 2025, 59(7): 1421-1433.
[7] 何婧瑶,李鹏飞,汪承志,吕振鸣,牟萍. 基于双目视觉和改进YOLOv8的动态三维重建方法[J]. 浙江大学学报(工学版), 2025, 59(7): 1443-1450.
[8] 王圣举,张赞. 基于加速扩散模型的缺失值插补算法[J]. 浙江大学学报(工学版), 2025, 59(7): 1471-1480.
[9] 章东平,王大为,何数技,汤斯亮,刘志勇,刘中秋. 基于跨维度特征融合的航空发动机寿命预测[J]. 浙江大学学报(工学版), 2025, 59(7): 1504-1513.
[10] 刘子豪,张佳欣,薛峰,张俊,陈伟杰,鹿业波. 基于改进YOLO-v8的精密管件表面缺陷检测方法[J]. 浙江大学学报(工学版), 2025, 59(7): 1514-1522.
[11] 蔡永青,韩成,权巍,陈兀迪. 基于注意力机制的视觉诱导晕动症评估模型[J]. 浙江大学学报(工学版), 2025, 59(6): 1110-1118.
[12] 鞠文博,董华军. 基于上下文信息融合与动态采样的主板缺陷检测方法[J]. 浙江大学学报(工学版), 2025, 59(6): 1159-1168.
[13] 王立红,刘新倩,李静,冯志全. 基于联邦学习和时空特征融合的网络入侵检测方法[J]. 浙江大学学报(工学版), 2025, 59(6): 1201-1210.
[14] 徐慧智,王秀青. 基于车辆图像特征的前车距离与速度感知[J]. 浙江大学学报(工学版), 2025, 59(6): 1219-1232.
[15] 曹铭,段武峰,马梦骁,艾凡荣,周奎. 基于改进YOLOv8-Seg模型的生物打印机产物均一性评估[J]. 浙江大学学报(工学版), 2025, 59(6): 1277-1283.