Please wait a minute...
Journal of ZheJiang University (Engineering Science)  2025, Vol. 59 Issue (12): 2556-2565    DOI: 10.3785/j.issn.1008-973X.2025.12.010
    
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
Download: HTML     PDF(8138KB) HTML
Export: BibTeX | EndNote (RIS)      

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 wordsdeep learning      multi-feature integration      key feature preservation      YOLO      textile fabrics     
Received: 20 November 2024      Published: 25 November 2025
CLC:  TP 391  
Fund:  国家自然科学基金资助项目(52575602);国家重点研发计划资助项目(2024YFB4614200);浙江省“尖兵领雁”科技计划资助项目(2025C01088).
Corresponding Authors: Zhong XIANG     E-mail: zszhangjh1999@163.com;xz@zstu.edu.cn
Cite this article:

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.

URL:

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


基于高精多尺度集成的轻量织物缺陷检测方法

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


关键词: 深度学习,  多特征整合,  关键特征保留,  YOLO,  纺织织物 
Fig.1 Structure of CPD-YOLO
Fig.2 CPDConv module structure
Fig.3 C3CPD module structure
Fig.4 MSFPN structure
Fig.5 Examples of defect images in ZY dataset
类别缺陷类别缺陷
1破洞11吊经
2水渍、油渍、污渍12粗纬
3三丝13纬缩
4结头14浆斑
5花跳板15整经结
6百脚16星跳、跳花
7毛粒17断氨纶
8粗经18稀密档、浪纹档、色差档
9松经19磨痕、轧痕、修痕、烧毛痕
10断经20死皱、云织、双纬、双经、
跳纱、筘路、纬纱不良
Tab.1 Classification of defects by cause in Tianchi dataset
Fig.6 Example of some defect images in Tianchi dataset
实验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
Tab.2 Results of ablation experiments based on ZY dataset
模型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
Tab.3 Loss function performance study based on ZY dataset
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
Tab.4 Comparative experimental results of different models based on ZY dataset
Fig.7 Visualisation results of defect detection based on ZY dataset for different models
模型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
Tab.5 Comparative experimental results of different models based on Tianchi dataset
Fig.8 Feature extraction effect of different modules
Fig.9 Comparison of Grad-CAM visualizations with different FPNs
Fig.10 Visualization of partial failures of 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] Jizhong DUAN,Haiyuan LI. Multi-scale parallel magnetic resonance imaging reconstruction based on variational model and Transformer[J]. Journal of ZheJiang University (Engineering Science), 2025, 59(9): 1826-1837.
[2] Fujian WANG,Zetian ZHANG,Xiqun CHEN,Dianhai WANG. Usage prediction of shared bike based on multi-channel graph aggregation attention mechanism[J]. Journal of ZheJiang University (Engineering Science), 2025, 59(9): 1986-1995.
[3] Hong ZHANG,Xuecheng ZHANG,Guoqiang WANG,Panlong GU,Nan JIANG. Real-time positioning and control of soft robot based on three-dimensional vision[J]. Journal of ZheJiang University (Engineering Science), 2025, 59(8): 1574-1582.
[4] Zhuguo ZHOU,Yujun LU,Liye LV. Improved YOLOv5s-based algorithm for printed circuit board defect detection[J]. Journal of ZheJiang University (Engineering Science), 2025, 59(8): 1608-1616.
[5] Yahong ZHAI,Yaling CHEN,Longyan XU,Yu GONG. Improved YOLOv8s lightweight small target detection algorithm of UAV aerial image[J]. Journal of ZheJiang University (Engineering Science), 2025, 59(8): 1708-1717.
[6] Yuhao YANG,Yongcun GUO,Deyong LI,Shuang WANG. Segmentation and localization method of coal and gangue identification based on visual information[J]. Journal of ZheJiang University (Engineering Science), 2025, 59(7): 1421-1433.
[7] Jingyao HE,Pengfei LI,Chengzhi WANG,Zhenming LV,Ping MU. Dynamic 3D reconstruction method using binocular vision and improved YOLOv8[J]. Journal of ZheJiang University (Engineering Science), 2025, 59(7): 1443-1450.
[8] Shengju WANG,Zan ZHANG. Missing value imputation algorithm based on accelerated diffusion model[J]. Journal of ZheJiang University (Engineering Science), 2025, 59(7): 1471-1480.
[9] Dongping ZHANG,Dawei WANG,Shuji HE,Siliang TANG,Zhiyong LIU,Zhongqiu LIU. Remaining useful life prediction of aircraft engines based on cross-dimensional feature fusion[J]. Journal of ZheJiang University (Engineering Science), 2025, 59(7): 1504-1513.
[10] Zihao LIU,Jiaxin ZHANG,Feng XUE,Jun ZHANG,Weijie CHEN,Yebo LU. Surface defect detection method of precision pipe fittings based on improved YOLO-v8[J]. Journal of ZheJiang University (Engineering Science), 2025, 59(7): 1514-1522.
[11] Yongqing CAI,Cheng HAN,Wei QUAN,Wudi CHEN. Visual induced motion sickness estimation model based on attention mechanism[J]. Journal of ZheJiang University (Engineering Science), 2025, 59(6): 1110-1118.
[12] Wenbo JU,Huajun DONG. Motherboard defect detection method based on context information fusion and dynamic sampling[J]. Journal of ZheJiang University (Engineering Science), 2025, 59(6): 1159-1168.
[13] Lihong WANG,Xinqian LIU,Jing LI,Zhiquan FENG. Network intrusion detection method based on federated learning and spatiotemporal feature fusion[J]. Journal of ZheJiang University (Engineering Science), 2025, 59(6): 1201-1210.
[14] Huizhi XU,Xiuqing WANG. Perception of distance and speed of front vehicle based on vehicle image features[J]. Journal of ZheJiang University (Engineering Science), 2025, 59(6): 1219-1232.
[15] Ming CAO,Wufeng DUAN,Mengxiao MA,Fanrong AI,Kui ZHOU. Uniformity evaluation of bio-printer based on improved YOLOv8-Seg model[J]. Journal of ZheJiang University (Engineering Science), 2025, 59(6): 1277-1283.