首页|期刊导航|棉纺织技术|基于可变形卷积和注意力机制的生丝疵点检测算法

基于可变形卷积和注意力机制的生丝疵点检测算法OA

Raw silk defect detection algorithm based on deformable convolution and attention mechanism

中文摘要英文摘要

针对生丝疵点小且形态多变导致检测中出现错检漏检的问题,提出一种基于可变形卷积和注意力机制的生丝疵点检测算法.以YOLOv8n为基准模型,首先在主干网络部分将可变形卷积DCNv2融入C2f中形成新的C2f-DCN模块,利用可变形卷积的任意采样形状特性自适应拟合疵点的几何形状,提升模型对不规则疵点的特征提取能力;其次在主干网络末端加入ECA注意力机制,通过跨通道交互抑制背景噪声等无用信息,提高模型对疵点特征信息的关注度;最后在颈部添加一个P2检测头获取浅层语义信息,构建四分支检测层结构,增强对小目标的响应能力.试验结果表明:与原始算法相比,该算法mAP@0.5 和mAP@0.5∶0.95 达到95.4%、75.9%,分别提升了3.3个百分点和9.0个百分点,模型推理速度达到65.2帧/s.该算法能够有效实现疵点检测,降低疵点的错检漏检现象,同时具有较好的检测速度,满足实时检测要求.

In order to solve the problem of false detection and missed detection caused by small raw silk defects and variable morphology,a raw silk defect detection algorithm based on deformable convolution and attention mechanism was proposed.Taking YOLOv8n as the benchmark model,firstly,the deformable convolutional DCNv2 was integrated into C2f to form a new C2f-DCN module in the backbone network,and the arbitrary sampling shape characteristics of the deformable convolution was used to adaptively fit the geometry of the defects,so as to improve the feature extraction ability of the model for irregular defects.Secondly,the ECA attention mechanism was added at the end of the backbone network to suppress useless information such as background noise through cross-channel interaction,so as to improve the attention of the model to the defect feature information.Finally,a P2 detection head was added to the neck to capture shallow semantic information,and a four-branch detection layer structure was constructed to enhance the response ability to small targets.Experimental results showed that the mAP@0.5 and mAP@0.5∶0.95 of the proposed algorithm were reached 95.4%and 75.9%respectively,which were increased by 3.3 percentage points and 9.0 percentage points higher than that of the original algorithm,and the inference speed was 65.2 frames/s.The algorithm not only effectively realizes defect detection and reduces the phenomenon of false detection and missed detection of defects,but also has a better detection speed,which can meet the requirements of real-time detection.

YI Jiaojiao;SUN Weihong;LIANG Man;SHAO Tiefeng

China Jiliang University,Hangzhou,310018,ChinaChina Jiliang University,Hangzhou,310018,ChinaChina Jiliang University,Hangzhou,310018,ChinaChina Jiliang University,Hangzhou,310018,China

轻工纺织

疵点检测可变形卷积YOLOv8n注意力机制目标检测

defect detectiondeformable convolutionYOLOv8nattention mechanismobject detection

《棉纺织技术》 2026 (1)

36-42,7

浙江省基础公益研究计划项目(LGG20E050014)

10.26967/j.issn1000-7415.202501006

评论