Journal of Guangxi Normal University(Natural Science Edition) ›› 2025, Vol. 43 ›› Issue (2): 83-94.doi: 10.16088/j.issn.1001-6600.2024051302

• Intelligence Information Processing • Previous Articles     Next Articles

Fabric Defect Detection Based on Improved Lightweight YOLOv8n

LIU Yuna1,2, MA Shuangbao1,2*   

  1. 1. School of Mechanical Engineering and Automation, Wuhan Textile University, Wuhan Hubei 430200, China;
    2. Hubei Province Digital Textile Equipment Laboratory (Wuhan Textile University), Wuhan Hubei 430200, China
  • Received:2024-05-13 Revised:2024-08-27 Online:2025-03-05 Published:2025-04-02

Abstract: In order to address the challenges of complex background textures, and limited hardware resources in fabric defect detection, a lightweight fabric defect detection method based on improved YOLOv8n (GSL-YOLOv8n) is proposed. Firstly, to reduce the parameter count and complexity of the YOLOv8n model, a C2f Ghost module is constructed based on the Ghost idea and utilized to replace the regular convolutions (Conv) in the YOLOv8n network structure. Secondly, a parameter-free attention mechanism, SimAM, is embedded at the end of the backbone network to remove redundant background, enhance semantic information of small targets, and improve global information, enhancing the network’s feature extraction capability. Finally, a lightweight shared convolutional detection head (LSCDH) is designed to scale the features using a Scale layer, minimizing accuracy loss while ensuring model lightweightness. Compared with the original YOLOv8n model, the improved algorithm GSL-YOLOv8n achieves an average precision improvement of 0.60%, reaching 98.29%, and the detection speed FPS remains basically the same . The model size, computational complexity, and parameter count are reduced by 66.7%, 58.0%, and 67.4% respectively, meeting the application requirements of fabric defect detection in the textile industry.

Key words: fabric defects, YOLOv8, GhostNet, attention mechanism, lightweight, object detection

CLC Number:  TP391.41
[1] JEYARAJ P R, NADAR E R S. Effective textile quality processing and an accurate inspection system using the advanced deep learning technique[J]. Textile Research Journal, 2020, 90(9/10): 971-980. DOI: 10.1177/0040517519884124.
[2] FOUDA Y M. Integral images-based approach for fabric defect detection[J]. Optics & Laser Technology, 2022, 147: 107608. DOI: 10.1016/j.optlastec.2021.107608.
[3] REN S Q, HE K M, 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.
[4] DIWAN T, ANIRUDH G, TEMBHURNE J V. Object detection using YOLO: challenges, architectural successors, datasets and applications[J]. Multimedia Tools and Applications, 2023, 82(6): 9243-9275. DOI: 10.1007/s11042-022-13644-y.
[5] JIA D Y, ZHOU J L, ZHANG C W. Detection of cervical cells based on improved SSD network[J]. Multimedia Tools and Applications, 2022, 81(10): 13371-13387. DOI: 10.1007/s11042-021-11015-7.
[6] 孙旋,高小淋,曹高帅.基于改进Faster R-CNN的织物疵点检测算法[J].毛纺科技,2022,50(12):77-84.DOI: 10.19333/j.mfkj.20220305708.
[7] 高敏,邹阳林,曹新旺.基于改进YOLOv5模型的织物疵点检测[J].现代纺织技术,2023,31(4):155-163.DOI: 10.19398/j.att.202209017.
[8] 朱磊,王倩倩,姚丽娜,等.改进YOLOv5的织物缺陷检测方法[J].计算机工程与应用,2024,60(20):302-311.DOI: 10.3778/j.issn.1002-8331.2306-0142.
[9] FAN H D, ZHU D Q, LI Y H. An improved yolov5 marine biological object detection algorithm[C] // 2021 2nd International Conference on Artificial Intelligence and Computer Engineering (ICAICE). Los Alamitos, CA: IEEE Computer Society, 2021: 29-34. DOI: 10.1109/ICAICE54393.2021.00014.
[10] 黄汉林,景军锋,张缓缓,等.基于MF-SSD网络的织物疵点检测[J].棉纺织技术,2020,48(12):11-16.DOI: 10.3969/j.issn.1001-7415.2020.12.003.
[11] 李洋,李敏,黄政,等.基于YOLOv5n的轻量级织物疵点检测算法[J].毛纺科技,2024,52(5):87-97.DOI: 10.19333/j.mfkj.20231005811.
[12] 赵英宝,刘姝含,黄丽敏,等.基于轻量化YOLOv7的织物疵点检测算法研究[J].棉纺织技术,2024,52(11):53-61.
[13] 赵洋,刘雪枫,赵锦程,等.面向嵌入式设备部署的轻量化织物瑕疵检测算法[J].毛纺科技,2024,52(7):91-99.DOI: 10.19333/j.mfkj.20231108009.
[14] 涂智荣,凌海英,李帼,等.基于改进YOLOv7-Tiny的轻量化百香果检测方法[J].广西师范大学学报(自然科学版),2024,42(5):79-90.DOI: 10.16088/j.issn.1001-6600.2023120303.
[15] 王小荣,许燕,周建平,等.基于改进YOLOv7的复杂环境下红花采摘识别[J].农业工程学报,2023,39(6):169-176.DOI: 10.11975/j.issn.1002-6819.202211164.
[16] LI X, WANG W H, WU L J, et al. Generalized focal loss: learning qualified and distributed bounding boxes for dense object detection[C] // Proceedings of the 34th International Conference on Neural Information Processing Systems. Red Hook, NY: Curran Associates Inc., 2020: 21002-21012.
[17] HAN K, WANG Y H, TIAN Q, et al. GhostNet: more features from cheap operations[C] // 2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR).Los Alamitos, CA: IEEE Computer Society, 2020: 1577-1586. DOI: 10.1109/CVPR42600.2020.00165.
[18] YANG L X, ZHANG R Y, LI L D, et al. SimAM: a simple, parameter-free attention module for convolutional neural networks[C] // Proceedings of the 38th International Conference on Machine Learning. New York: PMLR, 2021: 11863-11874.
[19] WOO S, PARK J, LEE J Y, et al. CBAM: convolutional block attention module[C] // Computer Vision-ECCV 2018. Cham: Springer, 2018: 3-19. DOI: 10.1007/978-3-030-01234-2_1.
[20] YI D W, AHMEDOV H B, JIANG S Y, et al. Coordinate-aware mask R-CNN with group normalization: a underwater marine animal instance segmentation framework[J]. Neurocomputing, 2024, 583: 127488. DOI: 10.1016/j.neucom.2024.127488.
[21] XIA Z F, PAN X R, SONG S J, et al. Vision transformer with deformable attention[C] // 2022 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR). Los Alamitos, CA: IEEE Computer Society, 2022: 4784-4793. DOI: 10.1109/CVPR52688.2022.00475.
[22] ZHU L, WANG X J, KE Z H, et al. BiFormer: vision transformer with Bi-level routing attention[C] // 2023 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR). Los Alamitos, CA: IEEE Computer Society, 2023: 10323-10333. DOI: 10.1109/CVPR52729.2023.00995.
[23] WAN D H, LU R S, SHEN S Y, et al. Mixed local channel attention for object detection[J]. Engineering Applications of Artificial Intelligence, 2023, 123(Part C): 106442. DOI: 10.1016/j.engappai.2023.106442.
[24] ZHANG X, SONG Y Z, SONG T T, et al. AKConv: convolutional kernel with arbitrary sampled shapes and arbitrary number of parameters[EB/OL]. (2023-11-20)[2024-08-25]. https://arxiv.org/abs/2311.11587v1. DOI: 10.48550/arXiv.2311.11587.
[25] MA N N, ZHANG X Y, ZHENG H T, et al. ShuffleNet V2: practical guidelines for efficient CNN architecture design[C] // Computer Vision-ECCV 2018. Cham: Springer, 2018: 122-138. DOI: 10.1007/978-3-030-01264-9_8.
[26] HOWARD A, SANDLER M, CHEN B, et al. Searching for MobileNetV3[C] // 2019 IEEE/CVF International Conference on Computer Vision (ICCV). Los Alamitos, CA: IEEE Computer Society, 2019: 1314-1324. DOI: 10.1109/ICCV.2019.00140.
[27] 徐彦威,李军,董元方,等.YOLO系列目标检测算法综述[J].计算机科学与探索,2024,18(9):2221-2238.DOI: 10.3778/j.issn.1673-9418.2402044.
[1] GUO Xiangyu, SHI Tianyi, CHEN Yannan, NAN Xinyuan, CAI Xin. Research on Foreign Object Detection in Railway Overhead Contact System Based on YOLO-CDBW Model [J]. Journal of Guangxi Normal University(Natural Science Edition), 2025, 43(2): 56-69.
[2] SU Chunhai, XIA Haiying. Facial Expression Recognition Based on Noise-Resistant Dual Constraint Network [J]. Journal of Guangxi Normal University(Natural Science Edition), 2025, 43(2): 70-82.
[3] DAI Linhua, LI Yuansong, SHI Rui, HE Zhongliang, LI Lei. HSED-YOLO: A Lightweight Model for Detecting Surface Defects in Strip Steel [J]. Journal of Guangxi Normal University(Natural Science Edition), 2025, 43(2): 95-106.
[4] YU Kuai, SONG Baogui, SHAO Pan, YU Ao. Hierarchical-scale Interaction-based U-Net for Remote Sensing Image Building Extraction [J]. Journal of Guangxi Normal University(Natural Science Edition), 2025, 43(2): 121-132.
[5] LU Jiahui, CHEN Qingfeng, WANG Wenguang, YU Qian, HE Naixu, HAN Zongzhao. Multi-scale Attention Learning for Abdomen Multi-organ Image Segmentation [J]. Journal of Guangxi Normal University(Natural Science Edition), 2024, 42(6): 138-148.
[6] TU Zhirong, LING Haiying, LI Guo, LU Shenglian, QIAN Tingting, CHEN Ming. Lightweight Passion Fruit Detection Method Based on Improved YOLOv7-Tiny [J]. Journal of Guangxi Normal University(Natural Science Edition), 2024, 42(5): 79-90.
[7] DU Shuaiwen, JIN Ting. A Deep Hybrid Recommendation Algorithm Based on User Behavior Characteristics [J]. Journal of Guangxi Normal University(Natural Science Edition), 2024, 42(5): 91-100.
[8] TIAN Sheng, HU Xiao. Vehicle Trajectory Prediction Based on Transformer Model [J]. Journal of Guangxi Normal University(Natural Science Edition), 2024, 42(3): 47-58.
[9] LÜ Hui, LÜ Weifeng. Fundus Hemorrhagic Spot Detection Algorithm Based on Improved YOLOv5 [J]. Journal of Guangxi Normal University(Natural Science Edition), 2024, 42(3): 99-107.
[10] XIAO Yuting, LÜ Xiaoqi, GU Yu, LIU Chuanqiang. Classification of Diabetic Retinopathy Based on Split Residual Network [J]. Journal of Guangxi Normal University(Natural Science Edition), 2024, 42(1): 91-101.
[11] ZENG Liang, HU Qian, YANG Tengfei, TAN Weiwei. Substation Personnel Safety Operation Detection Based on L-ConvNeXt Network [J]. Journal of Guangxi Normal University(Natural Science Edition), 2024, 42(1): 102-110.
[12] XI Lingfei, Yilihamu Yaermaimaiti, LIU Yajie. Surface Defect Detection Method for Aluminum Profile Based on Improved YOLOv5 [J]. Journal of Guangxi Normal University(Natural Science Edition), 2024, 42(1): 111-119.
[13] SONG Guanwu, CHEN Zhiming, LI Jianjun. Remote Sensing Image Classification with Cascade Attention Based on ResNet-50 [J]. Journal of Guangxi Normal University(Natural Science Edition), 2023, 41(6): 80-91.
[14] WU Zhengqing, CAO Hui, LIU Baokai. Chinese Fake Review Detection Based on Attention Convolutional Neural Network [J]. Journal of Guangxi Normal University(Natural Science Edition), 2023, 41(5): 26-36.
[15] HUANG Yeqi, WANG Mingwei, YAN Rui, LEI Tao. Surface Quality Detection of Diamond Wire Based on Improved YOLOv5 [J]. Journal of Guangxi Normal University(Natural Science Edition), 2023, 41(4): 123-134.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!