摘要
针对金属表面缺陷因尺寸和形状多样化导致检出率低,检出形状差异大等问题,提出一种基于改进UNet网络的金属表面缺陷分割网络OCR-UNet,以图像分割的方式检测金属表面缺陷。此方法以UNet网络提取多级多尺度特征,保留缺陷的位置信息,通过融合解码阶段的多级多尺度特征以更适应多尺度缺陷目标的检测;针对提取的特征难以表达全局上下文信息的问题,引入自注意力并使用粗分割与精分割的细化方式,增强特征对像素类别的表达能力,使其更适用于分割金属表面缺陷;同时引入交并比损失和边缘分割损失来改进网络损失,克服缺陷前景与背景样本极度不均衡问题的同时能捕获对缺陷更准确的表示,实现金属表面缺陷的准确分割。在两个表面缺陷分割数据集上的验证结果表明,所提方法的分割精度高于传统的全卷积网络(fully convolutional network,FCN)、DeepLabV3+网络及UNet网络模型,满足金属表面缺陷分割的需求。
Aiming at the issues of low detection rate and inaccurate defect shape detection due to the diversification of size and shape in metal surface defects,for this reason,a improved UNet based-network named OCR-UNet was proposed to detect metal surfaces defect in a manner of image segmentation,which adopts the UNet to extract mutil-level and mutil-scale features,retain the location information of defects,and fuse the mutil-level and mutil-scale features for mutil-scale target detection in the decoding stage.Since the obtained representations are difficult to describe global context information,the self-attention mechanism and the refined method of coarse and fine segmentation were introduced to enhance the pixel characteristic for the category.This characteristic makes it more suitable for segmenting metal surface defects.Meanwhile,the intersection-over-union loss and edge segmentation loss were designed to improve the network performance.Therefore,the proposed model overcomes the extreme imbalance between the defective foreground and background and captures a more accurate representation for the defect.Finally,the accurate segmentation of metal surface defects was achieved.Two surface defect segmentation experiments demonstrate that the segmented accuracy outperforms the traditional fully convolutional network(FCN),DeepLabV3+and UNet with the proposed method,which can meet the requirements of metal surface defect segmentation.
作者
陈德阳
唐智
何牧耕
CHEN Deyang;TANG Zhi;HE Mugeng(College of Mechanical and Vehicle Engineering,Chongqing University,Chongqing 400044,China)
出处
《组合机床与自动化加工技术》
北大核心
2023年第11期169-173,共5页
Modular Machine Tool & Automatic Manufacturing Technique
基金
国家重点研发计划项目(2020YFB2007001)
国家自然科学基金项目(52175077,51975067)。
关键词
缺陷分割
图像分割
多尺度特征
全局上下文
自注意力
defect segmentation
image segmentation
multi-scale features
global context
self-attention