Fabric defect detection algorithm based on improved YOLOv8

IF 1.6 4区 工程技术 Q2 MATERIALS SCIENCE, TEXTILES
Chang Chen, Qihong Zhou, Shujia Li, Dong Luo, Gaochao Tan
{"title":"Fabric defect detection algorithm based on improved YOLOv8","authors":"Chang Chen, Qihong Zhou, Shujia Li, Dong Luo, Gaochao Tan","doi":"10.1177/00405175241261092","DOIUrl":null,"url":null,"abstract":"Aiming at the problems of low detection accuracy and high leakage rate in traditional detection algorithms, an improved YOLOv8 algorithm is proposed for automatic detection of fabric defects. A swin transformer block was added to the C2f module in the backbone network, which can transfer information between multiple attention layers in parallel to capture fabric defect information and improve the detection accuracy of small-sized defects. To enhance the model’s performance in detecting defects of various sizes, a bidirectional feature pyramid network (BiFPN) was incorporated into the neck. This allows for the assignment of different weights to defect features in different layers. A convolution block attention module (CBAM) was added to the feature fusion layer, enabling the model to automatically increase the weight of essential features and suppress nonessential features during training to solve the problem of leakage detection of small-sized defects due to occlusion and background confusion. The Wise-IoU (WIoU) loss function replaces the conventional loss function, addressing sample imbalance and directing the model to prioritize average-quality samples. This modification contributes to an overall improvement in the model’s performance. The results of the experiment proved that on the self-constructed fabric defect dataset, the algorithm in this paper achieved an accuracy of 97.7%, recall of 95.1%, and mAP of 96.8%, which are 4.4%, 9.4%, and 5.1% higher than those of the YOLOv8 algorithm, respectively. On the AliCloud Tianchi dataset, the algorithm achieves 52.3%, 49.2%, and 49.8% in terms of accuracy, recall, and mAP, respectively, which is an improvement of 4.4% in terms of accuracy, 2.8% in terms of recall, and 2.7% in terms of mAP compared with the baseline algorithm. The improved YOLOv8 algorithm has a high detection accuracy, low leakage rate, and a detection speed of 107.5 FPS, which aligns with the real-time defect detection speed in the industry.","PeriodicalId":22323,"journal":{"name":"Textile Research Journal","volume":"57 1","pages":""},"PeriodicalIF":1.6000,"publicationDate":"2024-07-25","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Textile Research Journal","FirstCategoryId":"88","ListUrlMain":"https://doi.org/10.1177/00405175241261092","RegionNum":4,"RegionCategory":"工程技术","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q2","JCRName":"MATERIALS SCIENCE, TEXTILES","Score":null,"Total":0}
引用次数: 0

Abstract

Aiming at the problems of low detection accuracy and high leakage rate in traditional detection algorithms, an improved YOLOv8 algorithm is proposed for automatic detection of fabric defects. A swin transformer block was added to the C2f module in the backbone network, which can transfer information between multiple attention layers in parallel to capture fabric defect information and improve the detection accuracy of small-sized defects. To enhance the model’s performance in detecting defects of various sizes, a bidirectional feature pyramid network (BiFPN) was incorporated into the neck. This allows for the assignment of different weights to defect features in different layers. A convolution block attention module (CBAM) was added to the feature fusion layer, enabling the model to automatically increase the weight of essential features and suppress nonessential features during training to solve the problem of leakage detection of small-sized defects due to occlusion and background confusion. The Wise-IoU (WIoU) loss function replaces the conventional loss function, addressing sample imbalance and directing the model to prioritize average-quality samples. This modification contributes to an overall improvement in the model’s performance. The results of the experiment proved that on the self-constructed fabric defect dataset, the algorithm in this paper achieved an accuracy of 97.7%, recall of 95.1%, and mAP of 96.8%, which are 4.4%, 9.4%, and 5.1% higher than those of the YOLOv8 algorithm, respectively. On the AliCloud Tianchi dataset, the algorithm achieves 52.3%, 49.2%, and 49.8% in terms of accuracy, recall, and mAP, respectively, which is an improvement of 4.4% in terms of accuracy, 2.8% in terms of recall, and 2.7% in terms of mAP compared with the baseline algorithm. The improved YOLOv8 algorithm has a high detection accuracy, low leakage rate, and a detection speed of 107.5 FPS, which aligns with the real-time defect detection speed in the industry.
基于改进型 YOLOv8 的织物缺陷检测算法
针对传统检测算法存在的检测精度低、泄漏率高等问题,提出了一种改进的 YOLOv8 算法,用于织物缺陷的自动检测。在主干网络的 C2f 模块中增加了一个 swin 变压器块,它可以在多个注意层之间并行传输信息,从而捕捉织物缺陷信息,提高小尺寸缺陷的检测精度。为了提高模型检测各种尺寸疵点的性能,在颈部加入了双向特征金字塔网络(BiFPN)。这样就可以为不同层中的缺陷特征分配不同的权重。在特征融合层中添加了卷积块注意模块(CBAM),使模型在训练过程中能够自动增加基本特征的权重,抑制非基本特征,从而解决由于遮挡和背景混淆造成的小尺寸缺陷漏检问题。Wise-IoU (WIoU) 损失函数取代了传统的损失函数,解决了样本不平衡的问题,引导模型优先处理平均质量的样本。这一修改有助于全面提高模型的性能。实验结果证明,在自建的织物缺陷数据集上,本文算法的准确率达到 97.7%,召回率达到 95.1%,mAP 达到 96.8%,分别比 YOLOv8 算法高出 4.4%、9.4% 和 5.1%。在阿里云天池数据集上,该算法的准确率、召回率和 mAP 分别达到了 52.3%、49.2% 和 49.8%,与基线算法相比,准确率提高了 4.4%,召回率提高了 2.8%,mAP 提高了 2.7%。改进后的 YOLOv8 算法检测准确率高、泄漏率低,检测速度达到 107.5 FPS,与业界的实时缺陷检测速度一致。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
Textile Research Journal
Textile Research Journal 工程技术-材料科学:纺织
CiteScore
4.00
自引率
21.70%
发文量
309
审稿时长
1.5 months
期刊介绍: The Textile Research Journal is the leading peer reviewed Journal for textile research. It is devoted to the dissemination of fundamental, theoretical and applied scientific knowledge in materials, chemistry, manufacture and system sciences related to fibers, fibrous assemblies and textiles. The Journal serves authors and subscribers worldwide, and it is selective in accepting contributions on the basis of merit, novelty and originality.
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术官方微信