高级检索

一种改进YOLOv5s算法的焊缝表面缺陷 检测方法

A method for weld surface defect detection based on an improved YOLOv5s algorithm

  • 摘要: 针对焊缝缺陷小、目标检测精度低及算法参数庞大难以部署问题,提出一种基于改进YOLOv5s的轻量化焊缝缺陷检测算法. 采用轻量化ShuffleNetv2网络作为主干网络,降低模型的参数量和计算量;改进CBAM注意力机制并嵌入主干网络,增强网络的特征提取能力、提高检测性能;在Head检测层添加小目标检测层,提高算法对小目标缺陷的检测灵敏度;最后,引入Focal EIoU损失函数,增强模型的精确定位能力,并提升回归精度. 结果表明,改进模型的精确率P值、召回率R值和均值平均精度PmAP值较YOLOv5s基准模型分别提高1.9%,2.4%和1.1%,模型参数量、计算量和模型体积则分别减少53.9%,44.9%和47.9%,在保证较高检测精度的同时有效实现了模型轻量化的需求. 改进算法对焊缝表面的气孔、凹陷和砂眼类缺陷展现了较高的检出率和检测精度.

     

    Abstract: To address the problems of small weld defects, low target detection accuracy, and the difficulty in deploying algorithms with massive parameters, a lightweight weld defect detection algorithm based on the improved YOLOv5s was proposed. The lightweight ShuffleNetv2 network was adopted as the backbone network to reduce the number of parameters and calculation amount of the model. The CBAM was improved and embedded into the backbone network to enhance the feature extraction ability of the network and improve the detection performance. A small target detection layer was added to the Head detection layer to improve the detection sensitivity of the algorithm to small target defects. Finally, the Focal EIoU loss function was introduced to enhance the accurate positioning ability of the model and improve the regression accuracy. The results indicate that compared with those of the baseline YOLOv5s model, the precision P value, recall R value, and mean average precision PmAP value of the improved model are increased by 1.9%, 2.4%, and 1.1%, respectively; the number of model parameters, calculation amount, and model volume are reduced by 53.9%, 44.9%, and 47.9%, respectively; the requirements of model lightweighting are effectively realized while ensuring high detection accuracy. The improved algorithm exhibits a high detection rate and detection accuracy for pore, pit, and blowhole defects on the weld surface.

     

/

返回文章
返回