计算机工程与应用 ›› 2024, Vol. 60 ›› Issue (22): 261-270.DOI: 10.3778/j.issn.1002-8331.2404-0332

• 图形图像处理 • 上一篇    下一篇

融合多尺度特征的YOLOv8裂缝缺陷检测算法

赵佰亭,程瑞丰,贾晓芬   

  1. 1.安徽理工大学 电气与信息工程学院,安徽 淮南 232001
    2.安徽理工大学 人工智能学院,安徽 淮南 232001
  • 出版日期:2024-11-15 发布日期:2024-11-14

YOLOv8 Crack Defect Detection Algorithm Based on Multi-Scale Features

ZHAO Baiting, CHENG Ruifeng, JIA Xiaofen   

  1. 1.Institute of Electrical and Information Engineering, Anhui University of Science and Technology, Huainan, Anhui 232001, China
    2.Institute of Artificial Intelligence, Anhui University of Science and Technology, Huainan, Anhui 232001, China
  • Online:2024-11-15 Published:2024-11-14

摘要: 针对井壁裂缝背景复杂,纵横比差异大,导致检测效率低、漏检等问题,提出了一种融合多尺度特征的裂缝缺陷检测模型EDG-YOLO。设计特征提取模块EIRBlock(efficient inverted residual block),并构建C2fEIR增强主干网络对井壁浅层裂缝特征信息的提取能力。在颈部融合CSP_EDRAN(CSP efficient dilated reparam aggregation network)实现对裂缝特征信息的复用,促进浅层与深层语义信息之间的交互。嵌入DAM(dual attention module)注意力机制,增强井壁裂缝特征的表达能力。构建轻量级检测头GDetect,借助GSConv模块进一步轻量化网络。在自制井壁裂缝数据集上的实验结果表明,与YOLOv8相比,EDG-YOLO的平均检测精度达到87.4%,提高了2.3个百分点,模型的参数量和计算量分别降低了33%和47%,单幅图像推理时间为13.2?ms,满足井下场景的实时检测需求。

关键词: 井壁裂缝, 目标检测, YOLOv8, 轻量化, 注意力机制

Abstract: To solve the problems of low detection efficiency and missing detection caused by complex background and large aspect ratio difference of shaft lining cracks, a crack defect detection model EDG-YOLO with multi-scale features is proposed. Firstly, the feature extraction module EIRBlock (efficient inverted residual block) is designed, and C2fEIR is constructed to enhance the ability of backbone network to extract the shallow crack feature information. Secondly, the CSP_EDRAN (CSP efficient dilated reparam aggregation network) is fused in the neck to realize the reuse of the crack feature information, and promote the interaction between the shallow and deep semantic information. Meanwhile, the attention mechanism of DAM (dual attention module) is embedded to enhance the expression ability of shaft lining crack features. Finally, a lightweight detection head GDetect is constructed, and the network is further lightweight with the help of GSConv module. The experimental results on the self-made shaft lining crack dataset show that, compared with YOLOv8, the average detection accuracy of EDG-YOLO is 87.4%, which is increased by 2.3 percentage points, the number of parameters and the amount of calculation of the model are reduced by 33% and 47% respectively. The inference time of a single image is 13.2?ms, which meets the real-time detection requirements of downhole scenes.

Key words: shaft lining crack, object detection, YOLOv8, lightweight, attention mechanism