针对金属棒材圆弧表面在光照条件下产生高光,易掩盖划痕信息的问题,设计了在多种照明条件下多种曲度棒材的缺陷数据采集实验,以增加样本的多样性和模型的泛化性;针对金属棒材表面划痕的检测问题,提出了一种改进的U2Net的缺陷分割方法,调整了残差模块(residual U blocks,RSU)的混合膨胀卷积的膨胀因子,并在全部RSU的最后一层增加了坐标注意力机制(coordinate attention,CA),缓解了原网络在编码和解码过程中各残差块的影响,提升了模型对划痕的检测效果.实验表明,改进U2Net网络与U2Net网络对比,准确率与召回率的综合评价指标由86.4%上升到了88.5%.
Metal Bar Scratch Defect Detection Based on Improved U2Net
Aiming at the problem that the arc surface of metal bars produces highlight under lighting condi-tions,which easily covers the scratch information,a defect data acquisition experiment of various curvature bar materials under various lighting conditions is designed to improve diversity of samples and generaliza-tion of the model.Aiming at the detection problem of surface scratches of metal bars,an improved U2Net defect segmentation method is proposed,which adjusts the dilation factor of hybrid dilated convolution in residual module(residual U blocks,RSU),and adds coordinate attention mechanism(CA)at the last layer of all RSUs.The proposed method alleviates the influence of each residual block in the encoding and deco-ding process of the original network and improves the model's detection effect on scratches.The experiment shows that compared with U2Net network,the comprehensive evaluation index of accuracy and recall rate of improved U2Net network rises from 86.4%to 88.5%.