廊坊师范学院学报(自然科学版)2024,Vol.24Issue(3) :53-59.

一种基于YOLOv5的木板材表面缺陷检测方法

A Method of Wood Surface Defect Detection Based on YOLOv5

孙姜珊 朱启玥 孙晓楠
廊坊师范学院学报(自然科学版)2024,Vol.24Issue(3) :53-59.

一种基于YOLOv5的木板材表面缺陷检测方法

A Method of Wood Surface Defect Detection Based on YOLOv5

孙姜珊 1朱启玥 1孙晓楠1
扫码查看

作者信息

  • 1. 安徽理工大学,安徽淮南 232001
  • 折叠

摘要

针对木板材表面缺陷检测精度低、缺陷类型不全面和小目标缺陷检测能力不足等问题,提出一种基于YO-LOv5算法的木板材表面缺陷检测方法.首先在原始YOLOv5算法中使用EfficientViT网络代替原始的骨干网络,能更加有效地利用上下文信息,同时具有更快的推理速度,并提供更强的特征增强能力;其次,在head部分添加ECANet注意力机制增强对全局重要特征的提取,同时抑制无关的特征信息;再次,使用Focal-EIoU损失函数代替原有的CIoU,提高预测缺陷边界框的回归预测精度,加快回归损失函数的收敛速度.实验结果表明:将改进后的算法用于木板材缺陷的检测,在精度上比原始算法提升了 4.3%;改进后模型大小为6.3MB,为原模型大小的一半,提高了缺陷检测的速度.算法在缺陷检测任务中具有很高的实用性和效率.

Abstract

A wood board surface defect detection method is proposed based on YOLOv5 algorithm to solve the problems of low detection accuracy,incomplete defect types and insufficient detection ability of small target defects in wood board surface defect detection.Firstly,in the original YOLOv5 algorithm,the original backbone network is replaced by EfficientViT net-work,which more effectively utilizes contextual information,has faster inference speed,and provides stronger feature en-hancement ability;secondly,the ECANet attention mechanism is added to the head part to enhance the extraction of globally important features,while suppressing the irrelevant feature information;thirdly,the Focal-EIoU loss function is used to re-place the original CIoU,which improves the regression prediction accuracy of the prediction defect bounding box and acceler-ates the convergence speed of the regression loss function.The experimental results show that the accuracy of the improved algorithm is 4.3%higher than that of the original algorithm.The size of the improved model is 6.3MB,which is half of the size of the original model,and the speed of defect detection is improved.The algorithm has high practicability and efficiency in the task of defect detection.

关键词

缺陷检测/YOLOv5/EfficientViT/注意力机制/损失函数

Key words

defect detection/YOLOv5/Efficient Vit/attention mechanism/loss function

引用本文复制引用

基金项目

国家自然基金项目(51274011)

安徽省自然科学基金(2308085MF218)

安徽省高等学校科学研究项目(2022AH040113)

出版年

2024
廊坊师范学院学报(自然科学版)
廊坊师范学院

廊坊师范学院学报(自然科学版)

影响因子:0.215
ISSN:1674-3229
段落导航相关论文