Chen Shuaiting, Zhou Feng, Gao Gan, Ge Xiaole, Wang Rugang
Yancheng Institute of Technology, JiangSu, China.
PeerJ Comput Sci. 2024 Jan 22;10:e1727. doi: 10.7717/peerj-cs.1727. eCollection 2024.
The detection of surface defects on metal products during the production process is crucial for ensuring high-quality products. These defects also lead to significant losses in the high-tech industry. To address the issues of slow detection speed and low accuracy in traditional metal surface defect detection, an improved algorithm based on the YOLOv7-tiny model is proposed. Firstly, to enhance the feature extraction and fusion capabilities of the model, the depth aware convolution module (DAC) is introduced to replace all ELAN-T modules in the network. Secondly, the AWFP-Add module is added after the Concat module in the network's Head section to strengthen the network's ability to adaptively distinguish the importance of different features. Finally, in order to expedite model convergence and alleviate the problem of imbalanced positive and negative samples in the study, a new loss function called Focal-SIoU is used to replace the original model's CIoU loss function. To validate the effectiveness of the proposed model, two industrial metal surface defect datasets, GC10-DET and NEU-DET, were employed in our experiments. Experimental results demonstrate that the improved algorithm achieved detection frame rates exceeding 100 fps on both datasets. Furthermore, the enhanced model achieved an mAP of 81% on the GC10-DET dataset and 80.1% on the NEU-DET dataset. Compared to the original YOLOv7-tiny algorithm, this represents an increase in mAP of nearly 11% and 9.2%, respectively. Moreover, when compared to other novel algorithms, our improved model demonstrated enhanced detection accuracy and significantly improved detection speed. These results collectively indicate that our proposed enhanced model effectively fulfills the industry's demand for rapid and efficient detection and recognition of metal surface defects.
在金属产品生产过程中检测表面缺陷对于确保产品高质量至关重要。这些缺陷在高科技产业中也会导致重大损失。为了解决传统金属表面缺陷检测中检测速度慢和精度低的问题,提出了一种基于YOLOv7-tiny模型的改进算法。首先,为了增强模型的特征提取和融合能力,引入深度感知卷积模块(DAC)来替换网络中的所有ELAN-T模块。其次,在网络头部的Concat模块之后添加AWFP-Add模块,以增强网络自适应区分不同特征重要性的能力。最后,为了加快模型收敛并缓解研究中正负样本不平衡的问题,使用一种名为Focal-SIoU的新损失函数来替换原始模型的CIoU损失函数。为了验证所提模型的有效性,我们的实验采用了两个工业金属表面缺陷数据集GC10-DET和NEU-DET。实验结果表明,改进算法在两个数据集上的检测帧率均超过100 fps。此外,增强后的模型在GC10-DET数据集上的平均精度均值(mAP)达到81%,在NEU-DET数据集上达到80.1%。与原始的YOLOv7-tiny算法相比,这分别代表mAP提高了近11%和9.2%。而且,与其他新颖算法相比,我们改进后的模型展现出更高的检测精度和显著提高的检测速度。这些结果共同表明,我们提出的增强模型有效地满足了行业对快速高效检测和识别金属表面缺陷的需求。