计算机工程与应用 ›› 2024, Vol. 60 ›› Issue (9): 90-100.DOI: 10.3778/j.issn.1002-8331.2311-0070

• YOLOv8 改进及应用专题 • 上一篇    下一篇

轻量化YOLOv8的小样本钢板缺陷检测算法

窦智,高浩然,刘国奇,常宝方   

  1. 河南师范大学 计算机与信息工程学院,河南 新乡 453007
  • 出版日期:2024-05-01 发布日期:2024-04-29

Small Sample Steel Plate Defect Detection Algorithm of Lightweight YOLOv8

DOU Zhi, GAO Haoran, LIU Guoqi, CHANG Baofang   

  1. College of Computer and Information Engineering, Henan Normal University, Xinxiang, Henan 453007, China
  • Online:2024-05-01 Published:2024-04-29

摘要: 钢板的表面积较大,表面缺陷非常常见,且呈现多类少量的特点。深度学习很难有效应用于此类小样本缺陷的检测中。为了解决此问题,提出一种基于轻量化YOLOv8的小样本钢板缺陷检测算法,提出一种基于模糊搜索的交互式数据增强算法,可有效解决训练样本缺失导致网络模型无法得到有效训练的问题,使深度学习应用于该领域成为可能。设计LMSRNet(lightweight multi-scale residual networks)网络替换YOLOv8的主干,以实现网络模型的轻量化,并提高其可移植性。提出CBFPN(context bidirectional feature pyramid network)和ECSA(efficient channel spatial attention)模块,使网络能更有效地提取并融合伤痕特征,同时采用Wise-IoU损失函数以提高检测性能。对比实验结果表明,与原YOLOv8算法相比,改进后的网络参数量只有原网络的30%,计算量是原网络的49%,FPS提高了9?帧/s,精确率、召回率、mAP分别提高了2.9、6.5、5.5个百分点,实验结果充分验证了该算法的优势。

关键词: 缺陷检测, 小样本, YOLOv8, 轻量化网络, 注意力机制

Abstract: The surface area of steel plate is large, and the surface defects are very common, and showing the characteristics of multi-class and small amount. Deep learning is difficult to be effectively applied to the detection of such small sample defects. In order to solve this problem, a small sample steel plate defect detection algorithm based on lightweight YOLOv8 is proposed. Firstly, an interactive data augmentation algorithm based on fuzzy search is proposed, which can effectively solve the problem that the network model cannot be effectively trained due to the lack of training samples, making it possible for deep learning to be applied in this field. Then, the LMRNet (lightweight multi-scale residual networks) network is designed to replace the backbone of YOLOv8, to achieve the lightweight of the network model and improve its portability. Finally, the CBFPN (context bidirectional feature pyramid network) and ECSA (efficient channel spatial attention) modules are proposed to make the network more effective in extracting and fusing scar features, and the Wise-IoU loss function is adopted to improve the detection performance. The comparative experimental results show that compared with the original YOLOv8 algorithm, the amount of parameters of the improved network is only 30% of the original network, the amount of calculation is 49% of the original network, the FPS is increased by 9 frame/s. The accuracy rate, recall rate and mAP have increased by 2.9, 6.5 and 5.5 percentage points respectively. Experimental results fully verify the advantages of the proposed algorithm.

Key words: defect detection, small samples, YOLOv8, lightweight networking, attention mechanisms