Journal of Computer Applications

    Next Articles

Wheel hub defect detection method based on perspective correction and lightweight attention mechanism

  

  • Received:2025-06-16 Revised:2025-07-21 Accepted:2025-07-23 Online:2025-08-01 Published:2025-08-01

融合透视校正与轻量注意力机制的轮毂缺陷检测方法

张纾豪1,何坤金2,徐佳晨1,沙河山1,陈正鸣2   

  1. 1. 河海大学
    2. 河海大学常州校区
  • 通讯作者: 何坤金
  • 基金资助:
    国家重点研发计划;中央高校基本科研业务费项目

Abstract: In industrial visual inspection of wheel hub surface defects, geometric distortion caused by viewpoint deviation together with the small scale and complex morphology of defect instances has limited the performance of existing detection methods. To address these challenges, a defect-detection approach that combines perspective rectification with a lightweight attention mechanism was proposed. Firstly, an ellipse was fitted to the rim contour, and its offset from the geometric center was employed to construct a perspective quadrilateral; the corresponding homography matrix was then solved to rectify the image, thereby mitigating distortion during subsequent feature extraction. Secondly, the conventional CBS convolutional blocks in the Backbone and Neck of YOLOv11 were replaced by lightweight Ghost convolution modules to reduce the number of parameters and the overall computational cost. Meanwhile, an Efficient Channel Attention (ECA) mechanism was introduced to enhance the network's sensitivity to tiny defect regions, leading to the construction of the improved model YOLOv11n-GAConv. Experiments on a self-built wheel hub defect dataset showed that the proposed model achieved a mean Average Precision (mAP@0.5) of 84.7 %, with improvements of 2.4 percentage points in mAP@0.5 and 8.6 percentage points in recall compared to YOLOv11n. The number of parameters and computational cost were reduced by 12.4% and 11.1%, respectively, effectively reducing the model complexity while achieving improved detection accuracy.

Key words: YOLOv11, wheel hub defect detection, perspective correction, lightweight structure, ECA mechanism

摘要: 工业视觉下的轮毂表面缺陷检测任务中,由于拍摄视角偏差引发的几何畸变,以及缺陷目标尺度小、形态复杂等因素,导致现有方法的检测性能受限。针对上述问题,提出一种融合透视校正与轻量注意力机制的缺陷检测方法。首先,利用椭圆拟合与轮毂几何中心偏移关系,构建透视变换四边形,求解单应性矩阵完成图像视角校正,消除畸变对后续特征提取的影响;其次,在YOLOv11模型的基础上,采用轻量化的Ghost卷积替换主干网络与颈部结构中的传统CBS卷积模块,降低模型参数量与计算量;同时引入高效通道注意力(ECA)机制,增强网络对微小目标区域的感知能力,构建改进模型YOLOv11n-GAConv。实验表明,在自建轮毂缺陷数据集上,所提模型平均精度均值(mAP@0.5)达到84.7%,较YOLOv11n提升2.4个百分点,召回率(Recall)提升8.6个百分点,模型的参数量与计算量分别下降12.4%与11.1%,在精度保持提升的同时降低了模型复杂度。

关键词: YOLOv11, 轮毂缺陷检测, 透视校正, 轻量化结构, ECA注意力机制

CLC Number: