摘要
为了提升钢材表面细微复杂缺陷的检测效果,本文提出一种基于多头注意力机制与轻量化YOLOv8模型。首先,在基础检测网络中加入MHSA注意力模块,起到对干扰信息的抑制作用,并增强模型对钢材图像复杂空间关系的理解能力,实现复杂环境中模型的有效特征捕获。然后,针对钢材表面缺陷细微的问题,引入小目标检测层,有效提升模型特征提取能力,进一步提高钢材缺陷检测精度,并在原C2f模块中加入RepGhost网络形成改进轻量化主干网络,大幅度加快了检测速度。与原YOLOv8模型相比,改进后的模型性能更加优越,mAP50值提高了1.9%,P值提高了8.2%,mAP50-95值提高了0.4%,能够为钢材表面缺陷的检测提供一种有效的方案。In this paper, in order to improve the detection effect of subtle and complex defects on the steel surface, a model based on multi-head attention and lightweight YOLOv8 was proposed. Firstly, the MHSA attention module is added to the backbone detection network to suppress the interference information and enhance the model’s ability to understand the complex spatial relationship of steel images, so as to realize the effective feature capture of the model in complex environments. Then, in order to solve the problem of subtle defects on the surface of steel, a small target detection layer was introduced to enhance the feature extraction ability, and the accuracy of steel detection was further improved, and the RepGhost network was added to the C2f module to form a lightweight backbone network, which greatly accelerated the detection speed. Compared with the original YOLOv8 model, the performance of the improved model is superior, the mAP50 value is increased by 1.9%, the P value is increased by 8.2%, and the mAP50-95 value is increased by 0.4%, which can provide an effective solution for the detection of steel surface defects.
出处
《人工智能与机器人研究》
2025年第3期659-669,共11页
Artificial Intelligence and Robotics Research