Deep learning based multi-scale channel compression feature surface defect detection system

基于深度学习的多尺度通道压缩特征表面缺陷检测系统

Deep learning based multi-scale channel compression feature surface defect detection system


简述:首先应用背景分割和模板匹配技术来定义覆盖目标工件的ROI区域。提取的感兴趣区域被均匀地裁剪成若干个图像块,每个块被送到基于CNN的模型,以分类杂乱背景中不同大小的表面缺陷。最后,对空间上相邻且具有相同类别标签的图像块进行合并,以生成各种表面缺陷的识别图。

基于SqueezeNet的CNN模型,该模型结合多个不同核大小的卷积层来提取多尺度特征,并获得更大的感受野。因此,该模型能够更好地处理杂乱的背景和各种大小的缺陷。


Abstract

industrial workpieces commonly contain complex structures, including hallow regions, welding joints, or rivet holes.

工业工件通常包含复杂的结构,包括中空区域、焊接接头或铆钉孔。

we firstly proposed to incorporate multiple convolutional layers with different kernel sizes to increase the receptive field and to generate multi-scale features. As a result, the proposed model can better handle cluttered background and defects of various sizes.

我们首先提出合并具有不同核大小的多个卷积层,以增加感受野并产生多尺度特征。因此,所提出的模型可以更好地处理杂乱的背景和各种大小的缺陷。

Evaluated in a newly constructed surface defect dataset (images contain complex structures and defects of various sizes), our proposed model achieves more accurate recognition results compared with the state-of-the-art surface defect classifiers.

在新构建的表面缺陷数据集(图像包含复杂的结构和各种尺寸的缺陷)上进行评估,与最先进的表面缺陷分类器相比,我们提出的模型获得了更准确的识别结果。

I. INTRODUCTION

fully automatic machine vision-based inspection solutions for assisting or replacing the decisions made by human experts.In the past decades, many machine vision-based surface inspection methods have been proposed for non-contact, non- destructive, and fully automatic defect detection/classification of various surface textures.

基于机器视觉的全自动检测解决方案,用于协助或取代人类专家做出的决策。在过去的几十年中,已经提出了许多基于机器视觉的表面检测方法,用于各种表面纹理的非接触、非破坏性和全自动缺陷检测/分类。

how well the handcrafted features can depict the visual characteristics of surface defects.Given a number of training samples, CNNs automatically construct hierarchical features by assembling low-level features to generate high- level representations.

手工制作的特征能够多好地描绘表面缺陷的视觉特征。在给定大量训练样本的情况下,CNN通过组装低层特征来生成高层表示,从而自动构建层次特征。

A noticeable drawback of the above-mentioned deep CNN models is that they contain a large number of parameters and cannot deliver real-time speed.

上述深度CNN模型的一个明显缺点是包含大量参数,无法提供实时速度。

Yi et al. built up an end-to-end surface defects recognition system which generates saliency maps as the classification results of seven types of steel strip defects [24].Note that the surface defects are typically considered as local anomalies in homogeneous background [27], [25] which not satisfied in many practical industrial inspection tasks.

Yi等人的研究成果,建立了一个端到端的表面缺陷识别系统,该系统生成显著图作为七种带钢缺陷的分类结果[24]。请注意,表面缺陷通常被认为是均匀背景中的局部异常[27]、[25],这在许多实际的工业检测任务中是不能满足的。

Many industrial workpieces contain ob-vious structural interference such as fastener holes, bolt holes, welding joints, and grooves, incurring cluttered background to mislead the classification results.

许多工业零件含有明显的结构干扰,如紧固孔、螺栓孔、焊接接头、凹槽等,导致背景混乱,从而误导分类结果。

In this paper, we propose a surface defect detection and classification framework. It consists of three major processing steps, includ- ing Region of interest (ROI) extraction, defects classification, and defect localization.

在本文中,我们提出了一个表面缺陷检测和分类框架。它包括感兴趣区域(ROI)提取、缺陷分类和缺陷定位三个主要处理步骤。

Firstly, an ROI area is defined in a real-captured image of the target workpiece via background segmentation and template matching techniques.Then, the extracted ROI is uniformly divided into a number of image patches, and each patch is feed to a CNN-based model for surface defect classification.Finally, spatially adjacent image patches with the same class labels are merged to generate a location map to indicate the positions of various surface defects.

首先,通过背景分割和模板匹配技术,在目标工件的实时图像中定义感兴趣区域。然后,将提取的感兴趣区域均匀划分为若干个图像块,每个图像块被馈送到基于CNN的模型进行表面缺陷分类。最后,将具有相同类别标签的空间相邻的图像块合并,以生成位置图来指示各种表面缺陷的位置。

The core of our proposed framework is a compact yet effective SqueezeNet-based model to accurately classify surface defects of various sizes in cluttered background.

我们提出的框架的核心是一个紧凑而有效的基于 SqueezeNet 的模型,用于在杂乱的背景中准确地对各种尺寸的表面缺陷进行分类。

Universal Serial Bus (USB) connectors which are made of reflective stainless steel and contain complex structures (e.g., hallow areas, welding joints, and rivet holes) and defects of various sizes (e.g., Dent, Spot, Bright Line, and Scratch).

通用串行总线(USB)连接器由反光不锈钢制成,包含复杂的结构(例如,中空区、焊接接头和铆钉孔)和各种大小的缺陷(例如,凹痕、斑点、亮线和划痕)。

We propose a SqueezeNet-based CNN model that achieves more accurate recognition results compared with the state-of-the-art defect classifiers [25], [27], [15], [34], [24].It incorporates multiple convolutional layers with different kernel sizes to extract multi-scale features and achieve larger receptive fields. As a result, the proposed model can better handle cluttered background and defects of various sizes.Moreover, we experimentally demonstrate that compressing the size of the extracted multi-scale features leads to better training of defect-related features using a limited number of samples.

我们提出了一种基于SqueezeNet的CNN模型,与现有的缺陷分类器[25]、[27]、[15]、[34]、[24]相比,该模型获得了更准确的识别结果。它结合了多个不同核大小的卷积层来提取多尺度特征,并获得更大的接受场。因此,该模型能够更好地处理杂乱的背景和各种大小的缺陷。此外,我们的实验证明,压缩提取的多尺度特征的大小可以在有限的样本数量下更好地训练与缺陷相关的特征。

II. IMAGE ACQUISITION SYSTEM CONFIGURATION AND USB-SD DATASET

The illumination device provides light stimulation to make the insignificant surface defects visually more obvious.As a result, a blue annular light-emitting diode (LED) lighting deceive with a 60 incident angle is used in our system.

照明装置提供光刺激,以使微不足道的表面缺陷在视觉上更加明显。因此,我们的系统使用了60度入射角的蓝色环形发光二极管(LED)照明欺骗器。

The USB-SD dataset contains 8,100 grayscale images of the normal metallic surface and six typical defects (i.e., Bright Line, Deformation, Dent, Scratch, Spot, and Stain).Since surface defects typically occur in low probability, it is impractical to capture normal and defect images of equal numbers in practical industrial inspection applications.

USB-SD数据集包含正常金属表面和六种典型缺陷(即亮线、变形、凹痕、划痕、斑点和污渍)的8,100个灰度图像。由于表面缺陷通常发生的概率很低,因此在实际工业检测应用中获取相同数量的正常和缺陷图像是不切实际的。

Tab. I shows the number of manually labeled image patches per class (Normal, Bright Line, Deformation, Dent, Scratch, Spot, and Stain) in the USB-SD dataset.

Tab. I 显示了USB-SD数据集中每个类别(正常、亮线、变形、凹陷、划痕、斑点和污渍)手动标记的图像补丁的数量。

We make use of images in the USB-SD dataset to evaluate the performance of different models on classifying surface defects of various sizes in cluttered background.

我们利用USB-SD数据集中的图像来评估不同模型在杂波背景下对不同尺寸的表面缺陷进行分类的性能。

III. PROPOSED METHOD

Fig. 4. Given a full-size input image, we firstly apply background segmen- tation and template matching techniques to define an ROI area which covers the target workpiece.

图4.在给定一幅全尺寸输入图像的情况下,我们首先应用背景分割和模板匹配技术来定义覆盖目标工件的ROI区域。

The extracted ROI is uniformly cropped into a number of image patches, and each patch is feed to a CNN-based model to classify surface defects of various sizes in cluttered background.

提取的感兴趣区域被均匀地裁剪成若干个图像块,每个块被送到基于CNN的模型,以分类杂乱背景中不同大小的表面缺陷。

CNN model is built on the pre-trained SqueezeNet and further fine-tuned using the labeled images in the USB-SD dataset in the training stage.The trained CNN model computes a number of confidence scores to predict the class label (i.e., Normal, Bright Line, Deformation, Dent, Scratch, Spot, and Stain) for each input image patch.

CNN模型建立在预先训练的SqueezeNet上,并在训练阶段使用USB-SD数据集中的标记图像进一步微调。训练好的CNN模型计算多个置信度分数来预测每个输入图像块的类别标签(即,正常、亮线、变形、凹陷、划痕、斑点和污渍)。

Finally, image patches which are spatially adjacent and have the same class label are merged to generate a location map of various surface defects.

最后,对空间上相邻且具有相同类别标签的图像块进行合并,以生成各种表面缺陷的位置图。

A. ROI extraction

We design a simple yet effective image processing method to define a ROI area in which the target workpiece is covered.

我们设计了一种简单而有效的图像处理方法来确定目标工件被覆盖的ROI区域。

Firstly, we apply the OSTU segmentation technique [35] to highlight the image regions corresponding to the target object.The non-parametric OSTU algorithm calculates a single in- tensity threshold by minimizing inter-class intensity variance to divide the input image into foreground and background pixels.Then, we compute the location and orientation of target workpiece in the captured image through template matching of a pre-defined reference frame.The extracted ROI is uniformly divided into a number of image patches, and each patch is feed to the CNN model for defect classification.

首先,我们应用OSTU分割技术[35]来突出显示与目标对象相对应的图像区域。non-parametric OSTU算法通过最小化类间强度方差来计算单个强度阈值,从而将输入图像划分为前景和背景像素。然后,通过对预先定义的参考系进行模板匹配,计算出目标工件在采集图像中的位置和方向,将提取的感兴趣区域均匀地划分为若干个图像块,每个块被送到CNN模型进行缺陷分类。

B. Surface defect classification

The SqueezeNet [21] is a light-weight architecture.It can achieve high-accuracy recognition results using significantly fewer parameters.the SqueezeNet model is easy to fine-tune, less prone to small dataset over- fitting, and suitable for embedded system implementation.we adopt the pre-trained SqueezeNet model as the backbone architecture for accurate surface defect classification.

SqueezeNet[21]是一种轻量级架构,它可以用更少的参数实现高精度的识别结果。SqueezeNet模型易于微调,不易出现小数据集过度拟合的情况,并且适合于嵌入式系统实现。我们采用预先训练好的SqueezeNet模型作为主干结构来实现精确的表面缺陷分类。

Fig. 5, the SqueezeNet contains nine fire modules in which a squeeze convolution layer (using 1×1 filters) and two expand layers (using 1 ×1 and 3×3 filters) are deployed.

图5,SqueezeNet包含9个火灾模块,其中部署了一个挤压卷积层(使用1×1过滤器)和两个扩展层(使用1×1和3×3过滤器)。

we modify the number of output channels in the Conv10 layer to 7 accordingly.The configurations of individual layers/modules in the baseline SqueezeNet model for surface defect classification on the USB-SD dataset are shown in Tab. II.

我们相应地将Conv-10层中的输出通道数修改为7。用于USB-SD数据集表面缺陷分类的Baseline SqueezeNet模型中各个层/模块的配置显示在Tab. II。

To better handle the cluttered background and defects of various sizes, we propose to add a multi-receptive field (MRF) module after the last feature extraction module (Fire 9) to achieve larger receptive fields.

为了更好地处理杂乱的背景和各种大小的缺陷,我们建议在最后一个特征提取模块(Fire 9)之后增加一个多感受野(MRF)模块,以获得更大的感受野。

In CNN models, receptive field defines the region in the input space that a particular neuron of the current convolutional layer is referring to. Therefore, setting a larger receptive field can improve the capability of CNN models to extract semantic features which are more robust to clutter background.

在CNN模型中,感受野定义了输入空间中当前卷积层的特定神经元所指的区域。因此,设置较大的感受野可以提高CNN模型提取语义特征的能力,从而对杂波背景具有更强的鲁棒性。

The short connection is added between multiple-stacked layers to back-propagate gradient signals directly from the higher-level layers to lower-level ones, alleviating the gradient vanish- ing/exploring problem [16].

在多层叠层之间增加了短连接,以将梯度信号直接从较高层反向传播到较低层,从而缓解了梯度消失/探索问题[16]。

incorporating multiple convolutional layers with different kernel sizes to extract multi-scale features and achieve larger receptive fields。compressing the param- eter of the newly added convolutional layers to achieve more efficient training and to alleviate small data over-fitting.

结合不同核大小的多个卷积层提取多尺度特征,获得更大的接受场,对新增加的卷积层的参数进行压缩,以实现更有效的训练,并减轻小数据的过拟合。

IV. IMPLEMENTATION DETAILS

We use 2400 normal and 3,600 defect images (600 samples for each defect cate- gory) for model training.The parameters of modified or newly added convolutional layers, including Conv10, MRF-a, MRF- b, and MRF-c, are randomly initialized with a Gaussian distribution.

我们使用2400幅正常图像和3600幅缺陷图像(每个缺陷类别对应600个样本)进行模型训练。修改或新增加的卷积层的参数,包括Conv10、MRF-a、MRF-b和MRF-c,用高斯分布随机初始化。

In this paper, we propose to reduce the number of parameters in the newly added layers so that they can be efficiently trained using a few hundreds of sample images.

在本文中,我们建议减少新增加的层中的参数数量,以便可以使用数百个样本图像来有效地训练它们。

we design a SN-MRF-CC model by integrating a MRF module (adding convolutional layers with 1×1, 3×3 and 5×5 kernels) to the pre-trained SqueezeNet model and performing feature channel compression (setting the channel number of newly added MRF-a, MRF-b and MRF-c layers to 6).

我们通过在预先训练的SqueezeNet模型中集成一个MRF模块(增加具有1×1, 3×3 and 5×5核的卷积层)并进行特征信道压缩(将新增加的MRF-a、MRF-b和MRF-c层的信道数设置为6)来设计SN-MRF-CC模型。

VII. CONCLUSION

First, we propose to incorporate multiple convolutional layers with different kernel sizes to extract multi-scale fea- tures and achieve larger receptive fields.Second, we reduce the parameter of the newly added convolutional layers to achieve more efficient training and to alleviate small data over-fitting.

首先,我们提出了结合多个不同核大小的卷积层来提取多尺度特征,以获得更大的接受场。其次,我们减少了新增加的卷积层的参数,以实现更有效的训练,并减少小数据的过拟合。

Sample images in USB-SD dataset the contain clut- tered background caused by structural interference, and the size of different surface defects changes significantly.

USB-SD数据集的样本图像中含有结构干扰引起的杂波背景,且不同表面缺陷的大小变化较大。

it is a light-weight CNN model and can process 100fp on a computer equipped with a single NVIDIA TITAN X Graphics Processing Unit (12G memory).

它是一款轻便的CNN模型,可以在配备单个NVIDIA Titan X图形处理器(12G内存)的计算机上处理100fp。

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/468950.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

前端MVC框架之 Angular

一、什么是Angular jQuery,它属于一种类库(一系列函数的集合),以DOM为驱动核心;而Angular是一种 MVC 的前端框架,则是前端框架,以数据和逻辑为驱动核心,它有着诸多特性,最重要的是:模…

C语言关键字(三)

之前的两篇文章 嵌入式Linux:c语言深度解剖(数据类型关键字)​zhuanlan.zhihu.com 嵌入式Linux:c语言深度解剖(入门篇)​zhuanlan.zhihu.com 这篇文件继续讲解C语言关键字 想问大家一个问题&#xff0c…

python bottle框架 运维_python bottle 框架实战教程:任务管理系统 V_1.0版 | linux系统运维...

经过1-2个星期的开发,现在用任务管理功能(添加、删除、修改,详细)、项目管理功能(添加、删除,修改,详细)等,我把现在完成的版本,叫做1.0吧。发布完这个版本后…

form 窗体增加边框_C#控件美化之路(13):美化Form窗口(上)

在开发中最重要的就是美化form窗口,在开发中,大多都是用会用自主美化的窗口开发程序。本文只是点多,分为上中下节。分段讲解。本文主要讲解窗口美化关键步骤。首先美化窗体,就需要自己绘制最大化 最小化 关闭按钮。其次就是界面样…

第四周数据结构

转载于:https://www.cnblogs.com/bgd150809329/p/6650255.html

gdb x命令_gdb基本命令

参考自:gdb基本命令(非常详细)_JIWilliams-CSDN博客_gdb命令​blog.csdn.net本文介绍使用gdb调试程序的常用命令。 GDB是GNU开源组织发布的一个强大的UNIX下的程序调试工具。如果你是在 UNIX平台下做软件,你会发现GDB这个调试工具有比VC、BCB的图形化调试…

YOLOX-PAI: An Improved YOLOX, Stronger and Faster than YOLOv6

YOLOX-PAI:一种改进的YOLOX,比YOLOv6更强更快 原文:https://arxiv.org/pdf/2208.13040.pdf 代码:https://github.com/alibaba/EasyCV 0.Abstract We develop an all-in-one computer vision toolbox named EasyCV to facilita…

安装一直初始化_3D max 软件安装问题大全

纵使3D虐我千百遍,我待3D如初恋!大家好,我是小文。快节奏生活的今天,好不容易有点学习的热情,打开电脑学习下,没想到被简单的软件安装问题浇灭!这不是耽误了一位伟大的世界设计师诞生的节奏吗&a…

TCP/IP 协议栈 -- 编写UDP客户端注意细节

上节我们说到了TCP 客户端编写的主要细节&#xff0c; 本节我们来看一下UDP client的几种情况&#xff0c;测试代码如下&#xff1a; server&#xff1a; #include <stdio.h> #include <sys/socket.h> #include <arpa/inet.h> #include <netinet/in.h>…

RuntimeError: Address already in use

问题描述&#xff1a;Pytorch用多张GPU训练时&#xff0c;会报地址已被占用的错误。其实是端口号冲突了。 因此解决方法要么kill原来的进程&#xff0c;要么修改端口号。 在代码里重新配置 torch.distributed.init_process_group()dist_init_method tcp://{master_ip}:{mast…

Windows环境下的安装gcc

Windows具有良好的界面和丰富的工具&#xff0c;所以目前linux开发的流程是&#xff0c;windows下完成编码工作&#xff0c;linux上实现编译工作。 为了提高工作效率&#xff0c;有必要在windows环境下搭建一套gcc,gdb,make环境。 MinGW就是windows下gcc的版本。 下载地址ht…

RuntimeError: NCCL error in:XXX,unhandled system error, NCCL version 2.7.8

项目场景&#xff1a; 分布式训练中遇到这个问题&#xff0c; 问题描述 大概是没有启动并行运算&#xff1f;&#xff1f;&#xff1f;&#xff08; 解决方案&#xff1a; &#xff08;1&#xff09;首先看一下服务器GPU相关信息 进入pytorch终端&#xff08;Terminal&#x…

一张倾斜图片进行矫正 c++_专业性文章:10分钟矫正骨盆前倾

如今&#xff0c;骨盆前倾(又称“下交叉综合征”)非常多&#xff0c;大部分是由于以下两个原因而变得越来越突出&#xff1a;经常久坐不良的运动习惯后面我们讲到纠正骨盆前倾的四个基本步骤&#xff0c;让你快速解决&#xff0c;提高生活质量知识型和系统型的内容&#xff0c;…

TypeError: can‘t convert CUDA tensor to numpy. Use Tensor.cpu() to copy the tensor to host memory

项目场景&#xff1a; 运行程序&#xff0c;出现报错信息 TypeError: cant convert CUDA tensor to numpy. Use Tensor.cpu() to copy the tensor to host memory first.。 Traceback (most recent call last):File "tools/demo.py", line 97, in <module>vi…

Secure CRT 自动记录日志

配置自动log操作如下&#xff1a; 1.options ---> Global Options 2、General->Default Session->Edit Default Settings 3、Terminal->Log File 设置如图上所示 点击 日志 &#xff0c;在选项框中 Log file name中填入路径和命名参数&#xff1a; E:\Log\%Y_%M_…

java 异步调用方法_乐字节Java编程之方法、调用、重载、递归

一、概述方法是指人们在实践过程中为达到一定目的和效果所采取的办法、手段和解决方案。所谓方法&#xff0c;就是解决一类问题的代码的有序组合&#xff0c;是一个功能模块。编程语言中的方法是组合在一起来执行操作语句的集合。例如&#xff0c;System.out.println 方法&…

git clone 从GitHub上下载项目到服务器上运行+创建虚拟环境

1. 基础的Linux命令 可先进入需要放置文件的路径之下 pwd # 可看当前路径 cd …/ #返回上一层目录 cd ./xx/ #进入当前路径下的下一个文件2. GitHub项目clone到服务器上运行 # 复制GitHub页面的链接&#xff0c;在服务器后台输入git clone 命令即可 git clone https://githu…

java 调用python_Java平台如何调用Python平台?

1. 问题描述Java平台要调用Pyhon平台已有的算法&#xff0c;为了减少耦合度&#xff0c;采用Pyhon平台提供Restful 接口&#xff0c;Java平台负责来调用&#xff0c;采用HttpJson格式交互。2. 解决方案2.1 JAVA平台侧2.1.1 项目代码public static String invokeAlgorithm(Strin…

C 实现 删除字符串空白符的函数 strtrim

说在前面的话 字符串操作在很多C语言比赛里面都有涉及&#xff0c;最近公众号里面的C语言比赛&#xff0c;都是两个关于字符串操作的题目&#xff0c;希望大家认真看题目。 直接上代码 /*************************************************************************> Fil…

javascript犀牛书_犀牛书作者:最该忘记的JavaScript特性

作者&#xff1a; 李松峰转发链接&#xff1a;https://mp.weixin.qq.com/s/guAN1Cz2gYfKdBhmUpLyVA前言JavaScript这门语言的第一个演示版差不多就在25年前诞生。没记错的话&#xff0c;25年前的今天&#xff0c;1995年5月10日&#xff0c;星期三&#xff0c;我刚刚过了创造Jav…