New website getting online, testing
    • 摘要: 针对金属表面缺陷检测效率低以及检测算法参数量大、精度低的问题,本文提出了一种改进YOLOv8n的金属表面缺陷检测轻量化方法。首先,设计局部卷积倒置交叉融合 (partial inverted bottleneck cross stage partial fusion, PIC2f)模块,该模块通过构造的局部卷积倒置瓶颈 (partial IRMB bottleneck, PIBN)模块替换BottleNeck模块,将部分卷积和倒置残差块组合,从而减少算法的参数量并提升模型的特征提取能力。然后,采用基于注意力尺寸内特征交互 (attention-based intra-scale feature interaction, AIFI)模块,该模块结合位置嵌入和多头注意力机制,增强了模型对小目标的检测能力。最后,使用平均池化下采样 (average pooling down sampling, ADown)模块替换传统卷积作为模型特征缩减模块,通过池化和卷积操作,在不降低检测精度情况下,进一步减少模型的参数量和计算复杂度。实验结果表明,与YOLOv8n算法相比,在NEU-DET钢材缺陷数据集上的PIC2f-YOLO方法的mAP50增加了2.7%,参数量减少了0.403 M。在铝片表面工业缺陷、PASCAL VOC2012和带状合金功能材料表面缺陷数据集上的泛化性实验也验证了PIC2f-YOLO方法的有效性。

       

      Abstract: To address the low efficiency in metal surface defect detection, and the problems related to numerous model parameters and low precision, a lightweight detection method based on an improved YOLOv8n was proposed. The partially inverted bottleneck cross-stage partial fusion (PIC2f) module was introduced, replacing the bottleneck module with a partial IRMB bottleneck (PIBN) module. This combination of partial convolution and inverted residual blocks reduced the algorithm’s parameters and enhanced the model’s feature extraction ability. The attention-based intra-scale feature interaction (AIFI) module was applied, integrating location embedding and multi-head attention to improve the model’s small-target detection performance. Lastly, the average pooling down sampling (ADown) module replaced traditional convolution as the feature reduction module, reducing parameters and computational complexity while maintaining detection accuracy. The experimental results show that, compared to YOLOv8n, the PIC2f-YOLO method improves mAP50 by 2.7% on the NEU-DET steel defect dataset and reduces parameters by 0.403 M. Generalization experiments on aluminum sheet surface industrial defects, PASCAL VOC2012 and surface defects of strip alloy functional material datasets also confirm the method’s effectiveness.