Journal of Textile Research ›› 2026, Vol. 47 ›› Issue (04): 145-153.doi: 10.13475/j.fzxb.20250501101

• Textile Engineering • Previous Articles     Next Articles

Research on lightweight lace fabric surface defect detection method based on improved YOLOv9s

DU Xiaoguang1, JING Junfeng1(), WANG Yongbo2   

  1. 1 School of Electronics and Information, Xi'an Polytechnic University, Xi'an, Shaanxi 710048, China
    2 School of Textile Science and Engineering, Xi'an Polytechnic University, Xi'an, Shaanxi 710048, China
  • Received:2025-05-12 Revised:2025-11-27 Online:2026-04-15 Published:2026-06-24
  • Contact: JING Junfeng E-mail:413066458@qq.com

Abstract:

Objective To ensure the quality of lace products, it is of great significance to achieve accurate and efficient surface defect detection during the lace fabric production process. To further reduce the computational complexity of the lace fabric surface defect detection models based on deep learning and make them more suitable for embedded devices with low computing power, a lightweight detection method named MosYOLO is proposed by improving the YOLOv9s model.

Method The improved MobileNetv3-Small lightweight network was adopted as the backbone network of YOLOv9s model to reduce the number of parameters and the amount of calculation. The improved Efficient Channel Attention mechanism was introduced into the backbone network to enhance the model's ability to recognize defect features. Aiming at the imbalanced proportion between the difficult and easy samples in the training data, the Focaler-CIoU loss was introduced to replace the original CIoU loss. The Focal Modulation module was applied to the neck network to further enhance the model's ability to extract defect information.

Results In this study, a dataset was constructed using lace fabric images collected from real industrial sites, including four types of surface defects, namely jacquard holes, broken yarns, holes and edging. The image size was all 512 pixels × 512 pixels. This dataset was used to train and test the model. By introducing multiple evaluation indicators for a comprehensive assessment of the model performance, it was learnt from the experiments that the mean Average Precision of improved MosYOLO model reached 91.0%, and the F1 score reached 88.4%. Compared with the baseline YOLOv9s model, mean Average Prescision and F1 score increased by 1.5% and 1.3%, respectively. Moreover, both the number of parameters and the amount of calculation of the model decreased by 27.1%, and the detection speed reached 37.9 frames per second. From the visualization results, the detection effect of MosYOLO model was superior to that of YOLOv9s for lace fabric surface defect detection, and it showed stronger detection ability for small defect. Compared with the Faster R-CNN, SSD, YOLOv4-Tiny, MobileNetv2-SSDLite, YOLOv7-Tiny and YOLOv7 object detection models, MosYOLO model achieved a better balance among detection accuracy, parameter quantity, computational cost and detection speed. By optimizing and accelerating MosYOLO model using TensorRT framework, the detection speed of the model and its deployment performance on edge device have been greatly improved. The ablation experiment results of improved model showed that after replacing the backbone network of YOLOv9s with the improved MobileNetv3-Small, the number of parameters, computational cost and volume of the model were significantly reduced. After introducing the Efficient Channel Attention mechanism in the shallow network stage, the mean Average Precision was improved. When the Focaler-CIoU bounding box regression loss was adopted, the mean Average Precision of the model became better than that of the CIoU loss. After using the lightweight Focal Modulation module in the neck network, the computational complexity of the model was further reduced, and the mean Average Precision was improved, making the model more efficient and more suitable for deployment on edge device.

Conclusion A lightweight method MosYOLO based on improved YOLOv9s model is proposed for the detection of lace fabric surface defects. The MosYOLO method significantly reduces the number of parameters, computational cost and volume of the model while ensuring the detection accuracy. By replacing the backbone network of YOLOv9s model with the improved MobileNetv3-Small, the improved Efficient Channel Attention mechanism, Focaler-CIoU bounding box regression loss and Focal Modulation module are introduced. MosYOLO outperforms YOLOv9s and other mainstream object detection models in multiple indicators such as the mean Average Precision and detection speed. The MosYOLO method can be deployed in edge device, better meeting the demands of the lace fabric industrial production site and enhancing production efficiency and product quality.

Key words: lace fabric, deep learning, surface defect detection, lightweight model, attention mechanism

CLC Number: 

  • TP391.4

Fig.1

MosYOLO network structure"

Fig.2

Improved Bottleneck module"

Fig.3

Structural details of improved ECA mechanism"

Fig.4

Lace fabric image acquisition"

Fig.5

Overall detection process"

Tab.1

Comparison of model detection accuracy"

模型 精度/% 平均精度均
PmAP/%
贾卡漏 牙边 断纱 破洞
Faster R-CNN 76.2 97.8 84.0 66.0 81.0
SSD 59.0 9.6 37.1 42.6 37.1
YOLOv4-Tiny 33.6 89.4 24.2 14.5 40.4
MobileNetv2-SSDLite 59.4 90.7 93.9 81.7 81.4
YOLOv7-Tiny 49.0 68.3 62.2 39.0 54.6
YOLOv7 67.4 95.0 90.8 72.2 81.4
YOLOv9s 60.9 99.5 99.5 98.0 89.5
MosYOLO 66.4 99.5 99.5 98.5 91.0

Tab.2

Comparison of model complexity"

模型 参数量/
106
浮点运算
数/109
模型体
积/MB
F1分数
FS/%
Faster R-CNN 28.3 241.7 108.0 62.2
SSD 12.2 19.2 46.7 5.4
YOLOv4-Tiny 5.9 5.2 22.5 19.2
MobileNetv2-SSDLite 4.1 2.0 15.8 40.0
YOLOv7-Tiny 6.0 4.2 142.0 14.9
YOLOv7 36.5 33.0 23.1 43.0
YOLOv9s 9.6 38.7 19.4 87.1
MosYOLO 7.0 28.2 14.1 88.4

Fig.6

Comparison of defect detection effect of two models. (a)Detection results of YOLOv9s model;(b)Detection results of MosYOLO model"

Fig.7

Detection results of different noise levels. (a)Weak noise;(b)No noise;(c)Strong noise"

Fig.8

Detection results of different light intensities. (a)Weak light environment;(b)Normal environment; (c)Strong light environment"

Tab.3

Comparison of model detection speed"

模型 检测帧率/(帧·s-1) 推理时间/s
Faster R-CNN 10.2 0.098
SSD 18.3 0.055
YOLOv4-Tiny 31.4 0.032
MobileNetv2-SSDLite 17.2 0.058
YOLOv7-Tiny 27.3 0.037
YOLOv7 20.7 0.048
YOLOv9s 33.3 0.030
MosYOLO 37.9 0.026

Tab.4

Comparison of model detection speed on edge device"

模型 检测帧率/(帧·s-1) 推理时间/s
Faster R-CNN 0.3 3.333
SSD 2.0 0.500
YOLOv4-Tiny 5.8 0.172
MobileNetv2-SSDLite 2.3 0.434
YOLOv7-Tiny 4.8 0.208
YOLOv7 1.4 0.714
YOLOv9s 3.4 0.298
本文方法 10.5 0.095

Tab.5

Design of ablation experiment"

实验
编号
模型 改进型
MobileNetv3-
Small
改进型
ECA
Focaler-
CIoU
Focal
Modulation
YOLOv9s × × × ×
YOLOv9s-iMS × × ×
YOLOv9s-iMS-iE × ×
YOLOv9s-iMS-iE-FC ×
MosYOLO

Tab.6

Results of ablation experiment"

实验
编号
图像尺寸/
像素
参数量/
106
浮点运算
数/109
模型体
积/MB
平均精度均值
PmAP/%
512×512 9.6 38.7 19.4 89.5
512×512 7.6 28.8 15.2 88.7
512×512 7.6 28.8 15.2 90.0
512×512 7.6 28.8 15.2 90.4
512×512 7.0 28.2 14.1 91.0
[1] LU B Y, XU D, HUANG B Q. Deep-learning-based anomaly detection for lace defect inspection employing videos in production line[J]. Advanced Engineering Informatics, 2022, 51: 101471.
doi: 10.1016/j.aei.2021.101471
[2] 张缓缓, 马金秀, 景军锋, 等. 基于改进的加权中值滤波与K-means聚类的织物缺陷检测[J]. 纺织学报, 2019, 40(12): 50-56.
doi: 10.13475/j.fzxb.20181200407
ZHANG Huanhuan, MA Jinxiu, JING Junfeng, et al. Fabric defect detection method based on improved fast weighted median filtering and K-means[J]. Journal of Textile Research, 2019, 40(12): 50-56.
doi: 10.13475/j.fzxb.20181200407
[3] ZHANG J Q, JING J F, LU P W, et al. Improved MobileNetV2-SSDLite for automatic fabric defect detection system based on cloud-edge computing[J]. Measurement, 2022, 201: 111665.
doi: 10.1016/j.measurement.2022.111665
[4] FANG H, LIN S, HU J W, et al. CPF-DETR: an end-to-end DETR model for detecting complex patterned fabric defects[J]. Fibers and Polymers, 2025, 26(1): 369-382.
doi: 10.1007/s12221-024-00809-9
[5] XU D, LU B Y, HUANG B Q. A multiscale convolutional registration network for defect inspection on periodic lace surfaces[J]. IEEE Transactions on Instrumentation and Measurement, 2022, 71: 5006009.
[6] LI X S, ZHU Y. A real-time and accurate convolutional neural network for fabric defect detection[J]. Complex & Intelligent Systems, 2024, 10(3): 3371-3387.
[7] 景军锋, 张君扬, 张缓缓, 等. 梯度空间下的丝饼表面缺陷检测[J]. 纺织学报, 2020, 41(2): 44-51.
JING Junfeng, ZHANG Junyang, ZHANG Huanhuan, et al. Defect detection on surface of draw texturing yarn packages in gradient space[J]. Journal of Textile Research, 2020, 41(2): 44-51.
doi: 10.1177/004051757104100108
[8] 郑兆伦, 鲁玉军. 基于奇异值分解的双算法织物缺陷检测[J]. 纺织学报, 2022, 43(11): 59-67.
doi: 10.13475/j.fzxb.20210310709
ZHENG Zhaolun, LU Yujun. Dual-algorithm for fabric defect detection based on singular value decomposition[J]. Journal of Textile Research, 2022, 43(11): 59-67.
doi: 10.13475/j.fzxb.20210310709
[9] HUANG Y Q, JING J F, WANG Z. Fabric defect segmentation method based on deep learning[J]. IEEE Transactions on Instrumentation and Measurement, 2021, 70: 5005715.
[10] MA S B, LIU Y N, ZHANG Y P. Fabric defect detection based on improved lightweight YOLOv8n[J]. Applied Sciences, 2024, 14(17): 1-15.
doi: 10.3390/app14010001
[11] XU X M, CHEN J X, ZHANG H D, et al. D4Net: de-deformation defect detection network for non-rigid products with large patterns[J]. Information Sciences, 2021, 547: 763-776.
doi: 10.1016/j.ins.2020.05.050
[12] KANG X J, LI J F. AYOLOv7-tiny: towards efficient defect detection in solid color circular weft fabric[J]. Textile Research Journal, 2024, 94(1/2): 225-245.
doi: 10.1177/00405175231205898
[13] BURRA L R, KARUNA A, TUMMA S, et al. MobileNetV2-based transfer learning model with edge computing for automatic fabric defect detection[J]. Journal of Scientific & Industrial Research, 2022, 82(1): 128-134.
[14] CHEN C, ZHOU Q H, XIAO L, et al. LWFDD-YOLO: a lightweight defect detection algorithm based on improved YOLOv8[J]. Textile Research Journal, 95(9/10): 1125-1142.
doi: 10.1177/00405175241285596
[15] WANG C Y, YEH I H, MARK LIAO H Y. YOLOv9: learning what you want to Learn using programmable gradient information[C]//Computer Vision - ECCV 2024. Cham: Springer, 2025: 1-21.
[16] HOWARD A, SANDLER M, CHEN B, et al.Searching for MobileNetV3[C]//2019 IEEE/CVF International Conference on Computer Vision (ICCV). New York: IEEE, 2019: 1314-1324.
[17] YANG Jianwei, LI Chunyuan, DAI Xiyang, et al. Focal modulation networks[J]. Advances in Neural Information Processing Systems, 2022, 35: 4203-4217.
[18] WANG Q L, WU B G, ZHU P F, et al. ECA-net:efficient channel attention for deep convolutional neural networks[C]//2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR). New York: IEEE, 2020: 11531-11539.
[1] LI Yutong, YU Shijia, HAN Shuguang. Multi-view 3-D human body reconstruction [J]. Journal of Textile Research, 2026, 47(04): 215-224.
[2] FENG Zhengrong, LIU Beifen, CHEN Mengyuan. Style transfer model for floral printed patterns based on multi-scale feature fusion [J]. Journal of Textile Research, 2026, 47(02): 264-272.
[3] LÜ Zebin, LI Ziyin, WANG Xiaodong, YE Fei, LIU Weihong. Classification of down images based on tri-stage residual dynamic focusing network [J]. Journal of Textile Research, 2026, 47(02): 73-83.
[4] FENG Cailing, YU Shijia, HAN Shuguang. Real-time detection model for clothing keypoints based on deep learning [J]. Journal of Textile Research, 2026, 47(01): 196-206.
[5] TUO Wu, LIU Qiongyang, LI Qingxiang, CHEN Qian, FAN Ruige, LI Pei. Automatic size measurement of women's trousers based on machine vision and YOLO11n [J]. Journal of Textile Research, 2025, 46(12): 208-215.
[6] ZHOU Qingqing, CHANG Shuo, MAO Zhiping, WU Wei. Research progress in applications of artificial intelligence in dyeing and finishing industry [J]. Journal of Textile Research, 2025, 46(12): 260-269.
[7] YU Zhicai, YU Xiaona, DING Xiaojun, GU Bingfei. Matching of three-dimensional fabric drape models based on PointNet classification modeling [J]. Journal of Textile Research, 2025, 46(11): 111-117.
[8] ZHU Yaolin, LI Zheng, ZHANG Qiang, CHEN Xin, CHEN Jinni, ZHANG Hongsong. Quantitative detection of wool and cashmere based on near infrared spectroscopy and multi-feature network [J]. Journal of Textile Research, 2025, 46(09): 104-111.
[9] ZHANG Xiaoting, ZHAO Pengyu, PAN Ruru, GAO Weidong. Plaid fabric image retrieval method based on deep feature fusion [J]. Journal of Textile Research, 2025, 46(08): 89-95.
[10] WANG Qing, JIANG Yuefu, ZHAO Tiantian, ZHAO Shihang, LIU Jiayi. Pose estimation and bobbin grasping based on deep learning methods [J]. Journal of Textile Research, 2025, 46(07): 217-226.
[11] LUO Ruiqi, CHANG Dashun, HU Xinrong, LIANG Jinxing, PENG Tao, CHEN Jia, LI Li. Cross-pose virtual try-on based on improved appearance flow network [J]. Journal of Textile Research, 2025, 46(06): 203-211.
[12] GU Mengshang, ZHANG Ning, PAN Ruru, GAO Weidong. Object detection of weaving fabric defects using frequency-domain convolution modules [J]. Journal of Textile Research, 2025, 46(05): 159-168.
[13] BAI Yuwei, XU Jian, ZHU Yaolin, DING Zhanbo, LIU Chenyu. Image detection of cotton nep in carding net based on improved YOLOv8 [J]. Journal of Textile Research, 2025, 46(03): 56-63.
[14] HUANG Xiaoyuan, HOU Jue, YANG Yang, LIU Zheng. Automatic generation of high-precision garment patterns based on improved deep learning model [J]. Journal of Textile Research, 2025, 46(02): 236-243.
[15] CAI Liling, WANG Mei, SHAO Yibing, CHEN Wei, CAO Huaqing, JI Xiaofen. Intelligent customization recommendation for traditional Hanfu based on improved stack-generative adversarial network [J]. Journal of Textile Research, 2024, 45(12): 180-188.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!