2025年04月05日 星期六

广西师范大学学报(自然科学版) ›› 2025, Vol. 43 ›› Issue (2): 83-94.doi: 10.16088/j.issn.1001-6600.2024051302

• 智能信息处理 • 上一篇    下一篇

基于改进YOLOv8n的轻量化织物疵点检测算法

刘玉娜1,2, 马双宝1,2*   

  1. 1.武汉纺织大学 机械工程与自动化学院, 湖北 武汉 430200;
    2.湖北省数字化纺织装备重点实验室(武汉纺织大学), 湖北 武汉 430200
  • 收稿日期:2024-05-13 修回日期:2024-08-27 出版日期:2025-03-05 发布日期:2025-04-02
  • 通讯作者: 马双宝(1979—), 男, 湖北武汉人, 武汉纺织大学副教授, 博士。E-mail: 2006118@wtu.edu.cn
  • 基金资助:
    国家自然科学基金(62103309);湖北省数字化纺织装备重点实验室公开项目(DTL2022007)

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

摘要: 为应对织物疵点目标检测中背景纹理复杂以及硬件资源有限问题,本文提出一种基于改进YOLOv8n的轻量化织物疵点检测算法(GSL-YOLOv8n)。首先,为减少YOLOv8n模型参数量与网络结构复杂度,结合Ghost思想构建C2fGhost模块,并用Ghost卷积层替换YOLOv8n网络结构的普通卷积(Conv);其次,在主干网络末端嵌入无参注意力机制SimAM,去除冗余背景,增强小目标语义信息和全局信息,增强网络特征提取能力;最后,设计轻量化共享卷积检测头LSCDH,运用Scale层对特征进行缩放,在保证模型轻量化的同时尽可能减少精度损失。改进后的算法GSL-YOLOv8n相比原YOLOv8n模型平均精度提升0.60%,达到98.29%,检测速度FPS基本保持不变,模型体积、计算量和参数量分别减少66.7%、58.0%和67.4%,满足纺织工业生产对织物疵点检测的应用要求。

关键词: 织物疵点, YOLOv8, GhostNet, 注意力机制, 轻量化, 目标检测

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

中图分类号:  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] 郭翔羽, 石天怡, 陈燕楠, 南新元, 蔡鑫. 基于YOLO-CDBW模型的列车接触网异物检测研究[J]. 广西师范大学学报(自然科学版), 2025, 43(2): 56-69.
[2] 苏春海, 夏海英. 抗噪声双约束网络的面部表情识别[J]. 广西师范大学学报(自然科学版), 2025, 43(2): 70-82.
[3] 戴林华, 黎远松, 石睿, 何忠良, 李雷. HSED-YOLO:一种轻量化的带钢表面缺陷检测模型[J]. 广西师范大学学报(自然科学版), 2025, 43(2): 95-106.
[4] 余快, 宋宝贵, 邵攀, 余翱. 基于层级尺度交互的U-Net遥感影像建筑物提取方法[J]. 广西师范大学学报(自然科学版), 2025, 43(2): 121-132.
[5] 卢家辉, 陈庆锋, 王文广, 余谦, 何乃旭, 韩宗钊. 基于多尺度注意力的器官图像分割方法[J]. 广西师范大学学报(自然科学版), 2024, 42(6): 138-148.
[6] 涂智荣, 凌海英, 李帼, 陆声链, 钱婷婷, 陈明. 基于改进YOLOv7-Tiny的轻量化百香果检测方法[J]. 广西师范大学学报(自然科学版), 2024, 42(5): 79-90.
[7] 杜帅文, 靳婷. 基于用户行为特征的深度混合推荐算法[J]. 广西师范大学学报(自然科学版), 2024, 42(5): 91-100.
[8] 田晟, 胡啸. 基于Transformer模型的车辆轨迹预测[J]. 广西师范大学学报(自然科学版), 2024, 42(3): 47-58.
[9] 吕辉, 吕卫峰. 基于改进YOLOv5的眼底出血点检测算法[J]. 广西师范大学学报(自然科学版), 2024, 42(3): 99-107.
[10] 王天雨, 袁嘉伟, 齐芮, 李洋. 多类型知识增强的微博立场检测模型[J]. 广西师范大学学报(自然科学版), 2024, 42(1): 79-90.
[11] 肖宇庭, 吕晓琪, 谷宇, 刘传强. 基于拆分残差网络的糖尿病视网膜病变分类[J]. 广西师范大学学报(自然科学版), 2024, 42(1): 91-101.
[12] 曾亮, 胡谦, 杨腾飞, 谭微微. 基于L-ConvNeXt网络的变电站人员安全操作检测方法[J]. 广西师范大学学报(自然科学版), 2024, 42(1): 102-110.
[13] 席凌飞, 伊力哈木·亚尔买买提, 刘雅洁. 基于改进YOLOv5的铝型材表面缺陷检测方法[J]. 广西师范大学学报(自然科学版), 2024, 42(1): 111-119.
[14] 宋冠武, 陈知明, 李建军. 基于ResNet-50的级联注意力遥感图像分类[J]. 广西师范大学学报(自然科学版), 2023, 41(6): 80-91.
[15] 郭嘉梁, 靳婷. 基于语义增强的多模态情感分析[J]. 广西师范大学学报(自然科学版), 2023, 41(5): 14-25.
Viewed
Full text
0
HTML PDF
Just accepted Online first Issue Just accepted Online first Issue
0 0 0 0 0 0


Abstract
3
Just accepted Online first Issue
0 0 3
  From Others
  Times 3
  Rate 100%

Cited

Web of Science  Crossref   ScienceDirect  Search for Citations in Google Scholar >>
 
This page requires you have already subscribed to WoS.
  Shared   
  Discussed   
No Suggested Reading articles found!
版权所有 © 广西师范大学学报(自然科学版)编辑部
地址:广西桂林市三里店育才路15号 邮编:541004
电话:0773-5857325 E-mail: gxsdzkb@mailbox.gxnu.edu.cn
本系统由北京玛格泰克科技发展有限公司设计开发