Nothing Special   »   [go: up one dir, main page]

CN113538342B - A method for detecting the coating quality of aluminum aerosol cans based on convolutional neural network - Google Patents

A method for detecting the coating quality of aluminum aerosol cans based on convolutional neural network Download PDF

Info

Publication number
CN113538342B
CN113538342B CN202110711510.XA CN202110711510A CN113538342B CN 113538342 B CN113538342 B CN 113538342B CN 202110711510 A CN202110711510 A CN 202110711510A CN 113538342 B CN113538342 B CN 113538342B
Authority
CN
China
Prior art keywords
coating
fine tuning
aluminum aerosol
product
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110711510.XA
Other languages
Chinese (zh)
Other versions
CN113538342A (en
Inventor
张兴伟
陈满
张科
郭嘉楠
彭宇瑞
杨海林
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shantou Oriental Technology Co ltd
Shantou University
Original Assignee
Shantou Oriental Technology Co ltd
Shantou University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shantou Oriental Technology Co ltd, Shantou University filed Critical Shantou Oriental Technology Co ltd
Priority to CN202110711510.XA priority Critical patent/CN113538342B/en
Publication of CN113538342A publication Critical patent/CN113538342A/en
Application granted granted Critical
Publication of CN113538342B publication Critical patent/CN113538342B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • G06F18/2415Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on parametric or probabilistic models, e.g. based on likelihood ratio or false acceptance rate versus a false rejection rate
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10004Still image; Photographic image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20081Training; Learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20084Artificial neural networks [ANN]
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Physics & Mathematics (AREA)
  • Evolutionary Computation (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Evolutionary Biology (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Computational Linguistics (AREA)
  • Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Probability & Statistics with Applications (AREA)
  • Quality & Reliability (AREA)
  • Image Analysis (AREA)
  • Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)

Abstract

The invention discloses a convolutional neural network-based aluminum aerosol can coating quality detection method, which comprises the following steps: obtaining a photographing sample of an aluminum aerosol can product on a production line; classifying the photographed samples to finish marking the original image data; performing data enhancement and constructing a sample data set; establishing a grid model: the method comprises the steps of training a Fine tuning-GoogLeNet and a Fine tuning-ResNet18, inputting new image data, carrying out image classification prediction by using a trained defect discrimination model, and taking an image data label with highest prediction probability as a judgment basis. By adopting the invention, the quality detection accuracy of the inner coating and the outer coating of the aluminum aerosol can coating respectively reaches 99.38 percent and 96.4 percent, the efficiency is high, and compared with the manual visual detection, the speed is faster, the accuracy and the reliability are higher; compared with the traditional machine vision detection mode based on feature extraction, the method has stronger scene adaptation capability and better robustness, and can reduce the enterprise cost and improve the efficiency of product quality detection.

Description

一种基于卷积神经网络的铝质气雾罐涂层质量检测方法A method for detecting the coating quality of aluminum aerosol cans based on convolutional neural network

技术领域technical field

本发明涉及产品质量检测技术领域,尤其涉及一种基于卷积神经网络的铝质气雾罐涂层质量检测方法。The invention relates to the technical field of product quality detection, in particular to a method for detecting the coating quality of an aluminum aerosol can based on a convolutional neural network.

背景技术Background technique

铝质气雾罐凭借质量轻、可塑性强等特点备受包装市场青睐,在工业产品、个人防护和化妆产品等领域得到广泛应用。其在生产过程中会在罐体内外表面喷涂和印刷涂层用以屏蔽罐内容物及外界物质与铝的直接接触。因此,其喷涂和印刷工艺直接影响到产品的质量、合格率和生产效率。但在喷涂及印刷过程中受诸多不确定因素的影响,易产生涂层气泡、污渍、罐体凹凸等缺陷,导致产品既不美观,又影响使用(罐体凹凸会影响产品承压能力,导致使用寿命缩短,甚至影响使用者的人身安全),因此对铝质气雾罐涂层质量进行检测具有必要性。Aluminum aerosol cans are favored by the packaging market due to their light weight and strong plasticity, and are widely used in industrial products, personal protection and cosmetic products. During the production process, coatings are sprayed and printed on the inner and outer surfaces of the tank to shield the contents of the tank and foreign substances from direct contact with aluminum. Therefore, its spraying and printing process directly affects the quality, qualification rate and production efficiency of the product. However, due to the influence of many uncertain factors in the spraying and printing process, it is easy to produce defects such as coating bubbles, stains, and unevenness of the tank body, which makes the product not only unsightly, but also affects the use (the unevenness of the tank body will affect the pressure bearing capacity of the product, resulting in The service life is shortened, and even affects the personal safety of users), so it is necessary to detect the coating quality of aluminum aerosol cans.

传统铝质气雾罐涂层质量检测方法目前主要依赖于人眼目测检验,存在检测效率低、人力成本高、准确率低、检测结果不可靠等缺点。机器视觉技术作为人工智能中快速发展的分支,目前在不少自动化检测领域得到了应用,但大多基于传统图像特征识别的方式应用于钢材、铝质易拉罐和平面印刷品的检测,暂无针对铝质气雾罐涂层质量方面的基于卷积神经网络的机器视觉检测系统。Traditional aluminum aerosol can coating quality inspection methods currently mainly rely on human visual inspection, which has disadvantages such as low detection efficiency, high labor costs, low accuracy, and unreliable detection results. As a rapidly developing branch of artificial intelligence, machine vision technology has been applied in many automated inspection fields, but most of them are applied to the detection of steel, aluminum cans and flat printed matter based on traditional image feature recognition methods. Convolutional neural network based machine vision inspection system for aerosol can coating quality.

发明内容Contents of the invention

本发明实施例所要解决的技术问题在于,提供基于卷积神经网络的铝质气雾罐涂层质量检测方法。可实现同时对铝质气雾罐内、外涂层的气泡、凹凸、污渍等缺陷进行检测。The technical problem to be solved by the embodiments of the present invention is to provide a method for detecting the coating quality of an aluminum aerosol can based on a convolutional neural network. It can realize simultaneous detection of defects such as air bubbles, bumps, and stains in the inner and outer coatings of aluminum aerosol cans.

为了解决上述技术问题,本发明实施例提供了一种基于卷积神经网络的铝质气雾罐涂层质量检测方法,包括以下步骤:In order to solve the above technical problems, an embodiment of the present invention provides a method for detecting the coating quality of an aluminum aerosol can based on a convolutional neural network, including the following steps:

S1:获取生产线上的铝质气雾罐产品的拍照样本;S1: Obtain photographic samples of aluminum aerosol cans on the production line;

S2:将所述拍照样本分为内表面图像和外表面图像两大类,并分别进行分类,完成原始图像数据标记;S2: Divide the photographed samples into two types: inner surface images and outer surface images, and classify them respectively to complete the original image data labeling;

S3:进行数据增强并构建铝质气雾罐内外涂层样本数据集;S3: Perform data enhancement and construct a sample data set of inner and outer coatings of aluminum aerosol cans;

S4:调整图像大小;S4: adjust image size;

S5:基于迁移学习的方式,对GoogLeNet和ResNet18模型进行微调,得到两个适用于铝罐冷喷涂涂层图像数据集的卷积神经网络模型:Fine tuning-GoogLeNet和Finetuning-ResNet18;S5: Based on the method of transfer learning, fine-tune the GoogLeNet and ResNet18 models to obtain two convolutional neural network models suitable for the image data set of aluminum can cold spray coating: Fine tuning-GoogLeNet and Finetuning-ResNet18;

S6:调整网络初始训练参数,使用铝质气雾罐内涂层数据集对所述Fine tuning-GoogLeNet 进行模型训练,使用铝质气雾罐外涂层数据集对Fine tuning-ResNet18 进行模型训练,得到经过训练的基于Fine tuning-GoogLeNet和Fine tuning-ResNet18的铝质气雾罐缺陷判别模型;S6: Adjust the initial training parameters of the network, use the aluminum aerosol can inner coating data set to perform model training on the Fine tuning-GoogLeNet, and use the aluminum aerosol can outer coating data set to perform model training on Fine tuning-ResNet18, Obtain a trained aluminum aerosol can defect discrimination model based on Fine tuning-GoogLeNet and Fine tuning-ResNet18;

S7:输入新的图像数据,利用经过训练的缺陷判别模型进行图像分类预测,将预测概率最高的图像数据标签作为判断依据。S7: Input new image data, use the trained defect discrimination model to perform image classification prediction, and use the image data label with the highest prediction probability as the judgment basis.

其中,所述Fine tuning-GoogLeNet为使用铝罐冷喷涂内涂层图像数据,在GoogLeNet InceptionV1网络模型基础上进行调整,调整方法包括:Among them, the Fine tuning-GoogLeNet is to use the image data of the inner coating of the cold spraying of the aluminum can, and adjust it on the basis of the GoogLeNet InceptionV1 network model. The adjustment method includes:

S11:冻结其他层,使输入层接受输入图像大小为227*227*1;S11: freeze other layers, so that the input layer accepts an input image size of 227*227*1;

S12:将原网络中的局部响应归一化层替换为批量归一化层;S12: Replace the local response normalization layer in the original network with a batch normalization layer;

S13:在全连接层的前面设置Dropout;S13: Set Dropout in front of the fully connected layer;

S14:全连接层输出节点设置为3个,全连接层后使用Softmax函数,实现图像分类输出。S14: The output nodes of the fully connected layer are set to 3, and the Softmax function is used after the fully connected layer to realize image classification output.

其中,所述批量归一化层的方法包括:Wherein, the method of the batch normalization layer includes:

S121:对输入的最小批量数据定义规范化后的网络响应为S121: For the input minimum batch data Define the normalized network response as ;

S122:计算每个最小批量数据的均值:S122: Calculate the mean value of each minimum batch of data: ;

S123:计算每个最小批量数据的方差:S123: Calculate the variance of each minimum batch of data: ;

S124:利用所得均值和方差对最小批量数据做归一化处理,使均值为0,方差为1:S124: Use the obtained mean value and variance to perform normalization processing on the minimum batch data, so that the mean value is 0 and the variance is 1:

S125:引入可训练参数,对数据进行放缩和平移:/>S125: Introduce trainable parameters , to zoom and pan the data: /> .

其中,所述Fine tuning-ResNet18在ResNet18网络模型进行调整,包括以下步骤:Wherein, the Fine tuning-ResNet18 is adjusted in the ResNet18 network model, including the following steps:

1)冻结其他层,使输入层接受输入图像大小为224*224*1;1) Freeze other layers so that the input layer accepts an input image size of 224*224*1;

2)在全连接层的前面设置Dropout;2) Set Dropout in front of the fully connected layer;

3)FC层输出节点设置为5个,其后面使用Softmax函数,实现图像分类输出。3) The output nodes of the FC layer are set to 5, and the Softmax function is used behind it to realize the image classification output.

其中,所述步骤S7还包括:若为正常图像标签,则将当前产品记录为正常品,同时记录为已检测产品;否则,记录为标签相应的缺陷产品,同时记录为已检测产品。Wherein, the step S7 further includes: if it is a normal image label, recording the current product as a normal product and simultaneously recording it as an inspected product; otherwise, recording it as a defective product corresponding to the label and simultaneously recording it as an inspected product.

实施本发明实施例,具有如下有益效果:本发明构建了铝质气雾罐缺陷判别模型,实现对产品质量的检测,在已建立的数据集中,内、外涂层质量检测准确率分别达到99.38%和96.4%;在内、外涂层单罐检测速度较快,与人工目测检测相比速度更快、准确率和可靠性更高;比传统基于特征提取的机器视觉检测方式的场景适应能力更强、鲁棒性更好,能降低企业成本和提高产品质量检测的效率。The implementation of the embodiment of the present invention has the following beneficial effects: the present invention builds a defect discrimination model for aluminum aerosol cans, and realizes the detection of product quality. In the established data set, the accuracy of the quality detection of the inner and outer coatings reaches 99.38% respectively. % and 96.4%; inner and outer coating single-can inspection speed is faster, faster, more accurate and more reliable than manual visual inspection; scene adaptability is better than traditional machine vision inspection methods based on feature extraction Stronger and more robust, it can reduce enterprise costs and improve the efficiency of product quality inspection.

附图说明Description of drawings

图1是铝质气雾罐图像数据集构建流程示意图;Figure 1 is a schematic diagram of the construction process of the aluminum aerosol can image data set;

图2是铝质气雾罐内、外涂层缺陷判别模型训练流程示意图;Fig. 2 is a schematic diagram of the training process of the defect discrimination model of the inner and outer coatings of aluminum aerosol cans;

图3是铝质气雾罐内外涂层质量检测方法流程示意图;Fig. 3 is a schematic flow chart of the method for detecting the quality of the inner and outer coatings of an aluminum aerosol can;

图4是Fine tuning-GoogLeNet网络结构设计示意图;Figure 4 is a schematic diagram of the Fine tuning-GoogLeNet network structure design;

图 5是Fine tuning-ResNet18结构设计示意图;Figure 5 is a schematic diagram of the structure design of Fine tuning-ResNet18;

图6是具有内涂层气泡缺陷的铝质气雾罐内涂层质量检测结果;Fig. 6 is the inspection result of the inner coating quality of an aluminum aerosol can with bubble defects in the inner coating;

图7是具有外涂层收口凹陷缺陷的铝质气雾罐外涂层质量检测结果。Figure 7 shows the quality inspection results of the outer coating of an aluminum aerosol can with the defect of the outer coating concavity.

具体实施方式Detailed ways

为使本发明的目的、技术方案和优点更加清楚,下面将结合附图对本发明作进一步地详细描述。In order to make the object, technical solution and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with the accompanying drawings.

本发明实施例的一种基于卷积神经网络的铝质气雾罐涂层质量检测方法,通过以下实施步骤进行。A method for detecting the coating quality of an aluminum aerosol can based on a convolutional neural network in an embodiment of the present invention is implemented through the following implementation steps.

1.采集生产线上的铝质气雾罐产品,包括正常品和带有缺陷的产品,如图1所示。1. Collect aluminum aerosol cans on the production line, including normal products and defective products, as shown in Figure 1.

2.将采集到的产品使用黑白相机分别对其内表面和外表面拍照采样。按所得样本分为内表面图像和外表面图像两大类,每类中又按正常产品和带有不同缺陷产品分为若干小类,完成原始图像数据标记。2. Use a black and white camera to take pictures of the collected products on their inner and outer surfaces. According to the obtained samples, they are divided into two categories: inner surface images and outer surface images, and each category is divided into several subcategories according to normal products and products with different defects, and the original image data marking is completed.

3.对原始图像进行数据增强并构建铝质气雾罐内外涂层样本数据集。使用空间尺度变换(水平翻转、垂直翻转、水平垂直翻转)和添加噪声(高斯模糊处理)的方式,对原始数据进行扩充,增强后续卷积神经网络模型的容错率和鲁棒性。基于增强后的图像数据,构建铝质气雾罐内、外涂层样本数据集,数据集将正常图像和每类带缺陷的涂层图像划分为若干类,对每类图像打上数据标签。3. Carry out data enhancement on the original image and construct a sample data set of inner and outer coatings of aluminum aerosol cans. Using spatial scale transformation (horizontal flip, vertical flip, horizontal-vertical flip) and adding noise (Gaussian blur processing) to expand the original data and enhance the fault tolerance and robustness of the subsequent convolutional neural network model. Based on the enhanced image data, a sample data set of the inner and outer coatings of aluminum aerosol cans is constructed. The data set divides the normal image and each type of coating image with defects into several categories, and labels each type of image.

其中使用的高斯模糊处理方式基于二维高斯分布原理:The Gaussian blur processing method used in it is based on the principle of two-dimensional Gaussian distribution:

对原始图像的,其中/>表示原始图像的坐标点,使用二维高斯函数所构造的高斯卷核,在原始图像/>上进行滑动窗口卷积,其过程可以表示为,得到的/>即为经过高斯模糊处理的图像。to the original image , where /> Represents the coordinate points of the original image, using the Gaussian convolution kernel constructed by the two-dimensional Gaussian function, in the original image /> Sliding window convolution is performed on , and the process can be expressed as , get /> It is the image processed by Gaussian blur.

4.调整图像大小。将内涂层数据图像像素大小调整为[227,227],外涂层数据图像像素大小调节为[224,224]。4. Resize the image. The image pixel size of the inner coating data is adjusted to [227,227], and the pixel size of the outer coating data image is adjusted to [224,224].

5.构建分类卷积神经网络。基于迁移学习的方式,对GoogLeNet和ResNet18模型进行微调,得到两个适用于铝罐冷喷涂涂层图像数据集的卷积神经网络模型:Fine tuning-GoogLeNet和Fine tuning-ResNet18,如图2、4、5所示。5. Build a classification convolutional neural network. Based on the transfer learning method, the GoogLeNet and ResNet18 models were fine-tuned to obtain two convolutional neural network models suitable for the aluminum can cold spray coating image data set: Fine tuning-GoogLeNet and Fine tuning-ResNet18, as shown in Figures 2 and 4 , 5 shown.

Fine tuning-GoogLeNet的网络结构是针对铝罐冷喷涂内涂层图像数据,在GoogLeNet InceptionV1网络模型基础上进行调整,调整的方法为:The network structure of Fine tuning-GoogLeNet is adjusted based on the GoogLeNet InceptionV1 network model for the image data of the inner coating of aluminum can cold spraying. The adjustment method is as follows:

1)冻结其他层,使输入层接受输入图像大小为227*227*1;1) Freeze other layers so that the input layer accepts an input image size of 227*227*1;

2)将原网络中的局部响应归一化层(Local Response Normalization,LRN)替换为批量归一化层(Batch Normalization, BN);2) Replace the local response normalization layer (Local Response Normalization, LRN) in the original network with the batch normalization layer (Batch Normalization, BN);

其中,BN层的算法流程如下:Among them, the algorithm flow of BN layer is as follows:

对输入的最小批量数据(mini-batch),定义规范化后的网络响应为/>The minimum batch of input data (mini-batch) , define the normalized network response as /> .

a)首先计算每个mini-batch的均值:a) First calculate the mean of each mini-batch: ;

b)计算每个mini-batch的方差:b) Calculate the variance of each mini-batch: ;

c)利用所得均值和方差对mini-batch做归一化处理,使均值为0,方差为1:c) Use the obtained mean and variance to normalize the mini-batch so that the mean is 0 and the variance is 1:

d)d) ;

e)引入可训练参数,对数据进行放缩和平移:/> e) Introduce trainable parameters , to zoom and pan the data: />

3)在全连接层的前面设置Dropout(临时隐藏神经元);3) Set Dropout (temporarily hidden neurons) in front of the fully connected layer;

4)全连接层(Fully connected layer,FC)输出节点设置为3个,全连接层后使用Softmax函数,实现图像分类输出。4) The output nodes of the fully connected layer (FC) are set to 3, and the Softmax function is used after the fully connected layer to realize image classification output.

该网络可以对内涂层三类图像(正常、气泡、内表面凸起)进行训练和分类。The network can be trained and classified on three types of images of inner coatings (normal, air bubbles, raised inner surface).

Fine tuning-ResNet18网络结构是针对铝罐冷喷涂外涂层数据集,基于ResNet18网络模型进行调整,方法为:The Fine tuning-ResNet18 network structure is adjusted based on the ResNet18 network model for the aluminum can cold spray coating data set. The method is as follows:

1)冻结其他层,使输入层接受输入图像大小为1) Freeze the other layers so that the input layer accepts an input image of size ;

2)在全连接层的前面设置Dropout;2) Set Dropout in front of the fully connected layer;

3)FC层输出节点设置为5个,其后面使用Softmax函数,实现图像分类输出。3) The output nodes of the FC layer are set to 5, and the Softmax function is used behind it to realize the image classification output.

该网络可以对外涂层五类图像(正常、气泡、罐体凹陷、收口凹陷、污渍)进行训练和分类。The network can be trained and classified on five categories of images of the exterior coating (normal, air bubbles, tank dents, cuff dents, and stains).

6.网络模型训练。调整网络初始训练参数,分别使用Fine tuning-GoogLeNet和Fine tuning-ResNet18对铝质气雾罐内涂层和外涂层数据集进行模型训练,得到经过训练的基于Fine tuning-GoogLeNet和Fine tuning-ResNet18的铝质气雾罐缺陷判别模型。6. Network model training. Adjust the initial training parameters of the network, use Fine tuning-GoogLeNet and Fine tuning-ResNet18 to perform model training on the inner coating and outer coating data sets of aluminum aerosol cans, and obtain the trained model based on Fine tuning-GoogLeNet and Fine tuning-ResNet18 Defect discrimination model for aluminum aerosol cans.

7.基于训练好的缺陷判别模型,进行检测判断。7. Based on the trained defect discrimination model, detection and judgment are carried out.

8.输入新的图像数据,利用经过训练的缺陷判别模型进行图像分类预测,将预测概率最高的图像数据标签作为判断依据。若为正常图像标签,则将当前产品记录为正常品,同时记录为已检测产品;否则,记录为标签相应的缺陷产品,同时记录为已检测产品,如图3所示。8. Input new image data, use the trained defect discrimination model for image classification prediction, and use the image data label with the highest prediction probability as the basis for judgment. If it is a normal image label, record the current product as a normal product and record it as a detected product at the same time; otherwise, record it as a defective product corresponding to the label and record it as a detected product at the same time, as shown in Figure 3.

应用本发明的方法,对铝质气雾罐内涂层质量检测出具有内涂层气泡缺陷的结果如图6所示,对铝质气雾罐外涂层质量检测出具有外涂层收口凹陷缺陷的结果如图7所示。Applying the method of the present invention, the result of detecting bubble defects in the inner coating of aluminum aerosol cans is as shown in Figure 6, and detecting the quality of the outer coating of aluminum aerosol cans with the concavity of the outer coating The result of the defect is shown in Figure 7.

实施本发明,具有以下优点:Implement the present invention, have the following advantages:

1. 针对铝质气雾罐喷涂和印刷工艺特点的自动化检测方法,是对现有高速铝质气雾罐生产线产品质量检测的有效补充;1. The automatic detection method for the spraying and printing process characteristics of aluminum aerosol cans is an effective supplement to the product quality inspection of the existing high-speed aluminum aerosol can production line;

2.本方法不同于人眼目测检测和传统机器视觉基于特征提取对产品质量进行检测的方法,使用的是基于卷积神经网络和迁移学习的方式,利用Fine tuning-GoogLeNet和Fine tuning-ResNet18网络,构建铝质气雾罐缺陷判别模型,实现对产品质量的检测。在已建立的数据集中,内、外涂层质量检测准确率分别达到99.38%和96.4%;在内、外涂层单罐检测速度较快。与人工目测检测相比速度更快、准确率和可靠性更高;比传统基于特征提取的机器视觉检测方式的场景适应能力更强、鲁棒性更好。能降低企业成本和提高产品质量检测的效率。2. This method is different from human eye detection and traditional machine vision based on feature extraction to detect product quality. It uses a method based on convolutional neural network and transfer learning, using Fine tuning-GoogLeNet and Fine tuning-ResNet18 networks , build a defect discrimination model for aluminum aerosol cans, and realize the detection of product quality. In the established data set, the accuracy rates of inner and outer coating quality inspections reached 99.38% and 96.4% respectively; the single-can inspection speed of inner and outer coatings is faster. Compared with manual visual detection, it has faster speed, higher accuracy and reliability; it has stronger scene adaptability and better robustness than traditional feature extraction-based machine vision detection methods. It can reduce the cost of the enterprise and improve the efficiency of product quality inspection.

以上所揭露的仅为本发明一种较佳实施例而已,当然不能以此来限定本发明之权利范围,因此依本发明权利要求所作的等同变化,仍属本发明所涵盖的范围。The above disclosure is only a preferred embodiment of the present invention, which certainly cannot limit the scope of rights of the present invention. Therefore, equivalent changes made according to the claims of the present invention still fall within the scope of the present invention.

Claims (5)

1. The method for detecting the quality of the aluminum aerosol can coating based on the convolutional neural network is characterized by comprising the following steps of:
s1: obtaining a photographing sample of an aluminum aerosol can product on a production line;
s2: dividing the shot sample into two major categories of an inner surface image and an outer surface image, and respectively classifying to finish marking of original image data;
s3: carrying out data enhancement and constructing an aluminum aerosol can inner and outer coating sample data set;
s4: adjusting the size of the image;
s5: based on a transfer learning mode, fine tuning is carried out on GoogLeNet and ResNet18 models to obtain two convolutional neural network models suitable for aluminum can cold spray coating image data sets: fine tuning-google net and Fine tuning-ResNet18;
s6: adjusting initial training parameters of a network, performing model training on the Fine tuning-GoogLeNet by using an inner coating data set of an aluminum aerosol can, and performing model training on the Fine tuning-ResNet18 by using an outer coating data set of the aluminum aerosol can to obtain a trained aluminum aerosol can defect judging model based on the Fine tuning-GoogLeNet and the Fine tuning-ResNet18;
s7: inputting new image data, carrying out image classification prediction by using a trained defect discrimination model, and taking an image data label with highest prediction probability as a judgment basis.
2. The convolutional neural network-based aluminum aerosol can coating quality detection method of claim 1, wherein the Fine tuning-google net is based on GoogLeNet InceptionV network model for using aluminum can cold spray inner coating image data, the adjustment method comprises:
s11: freezing other layers to make the input layer accept the input image size of 227 x 1;
s12: replacing the local response normalization layer in the original network with a batch normalization layer;
s13: a Dropout is arranged in front of the full connection layer;
s14: the number of output nodes of the full-connection layer is 3, and after the full-connection layer, the Softmax function is used for realizing the classified output of the images.
3. The convolutional neural network-based aluminum aerosol can coating quality detection method of claim 2, wherein the batch normalization layer method comprises:
s121: for minimum batch data inputDefining normalized network responses as
S122: calculating the mean value of each minimum batch of data:
s123: calculating the variance of each minimum batch of data:
s124: and carrying out normalization processing on the minimum batch data by using the obtained mean value and variance to ensure that the mean value is 0 and the variance is 1:
s125: introducing trainable parametersScaling and translating the data: />
4. The convolutional neural network-based aluminum aerosol can coating quality detection method of claim 1, wherein the Fine tuning-ResNet18 is tuned in a ResNet18 network model, comprising the steps of:
1) Freezing other layers to make the input layer accept the input image with 224 x 1;
2) A Dropout is arranged in front of the full connection layer;
3) The FC layer output nodes are set to 5, and then the Softmax function is used to realize image classification output.
5. The method for detecting the coating quality of an aluminum aerosol can based on a convolutional neural network according to any one of claims 1 to 4, wherein the step S7 further comprises: if the current product is the normal image label, recording the current product as a normal product and recording the current product as a detected product; otherwise, recording the product as the corresponding defect product of the label, and recording the product as the detected product.
CN202110711510.XA 2021-06-25 2021-06-25 A method for detecting the coating quality of aluminum aerosol cans based on convolutional neural network Active CN113538342B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110711510.XA CN113538342B (en) 2021-06-25 2021-06-25 A method for detecting the coating quality of aluminum aerosol cans based on convolutional neural network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110711510.XA CN113538342B (en) 2021-06-25 2021-06-25 A method for detecting the coating quality of aluminum aerosol cans based on convolutional neural network

Publications (2)

Publication Number Publication Date
CN113538342A CN113538342A (en) 2021-10-22
CN113538342B true CN113538342B (en) 2023-08-18

Family

ID=78125857

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110711510.XA Active CN113538342B (en) 2021-06-25 2021-06-25 A method for detecting the coating quality of aluminum aerosol cans based on convolutional neural network

Country Status (1)

Country Link
CN (1) CN113538342B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114092738A (en) * 2021-10-27 2022-02-25 海南大学 Appearance quality classification method and device of sweet potato based on transfer learning
CN115420756B (en) * 2022-11-07 2023-03-21 深圳市志橙半导体材料股份有限公司 Method and device for detecting surface defects of silicon carbide coating graphite plate
CN117288099B (en) * 2023-11-27 2024-01-30 江苏海德曼新材料股份有限公司 Machine vision-based aluminum-plastic composite board production quality detection and analysis method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102331424A (en) * 2010-07-12 2012-01-25 南通全技纺织涂层有限公司 Coating quality on-line detection method based on image recognition technology
CN110349126A (en) * 2019-06-20 2019-10-18 武汉科技大学 A kind of Surface Defects in Steel Plate detection method based on convolutional neural networks tape label
CN111709451A (en) * 2020-05-21 2020-09-25 五邑大学 Wine bottle surface defect detection method, electronic device and storage medium
CN112819748A (en) * 2020-12-16 2021-05-18 机科发展科技股份有限公司 Training method and device for strip steel surface defect recognition model

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2973074A1 (en) * 2016-07-13 2018-01-13 Sightline Innovation Inc. System and method for surface inspection
US10607119B2 (en) * 2017-09-06 2020-03-31 Kla-Tencor Corp. Unified neural network for defect detection and classification

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102331424A (en) * 2010-07-12 2012-01-25 南通全技纺织涂层有限公司 Coating quality on-line detection method based on image recognition technology
CN110349126A (en) * 2019-06-20 2019-10-18 武汉科技大学 A kind of Surface Defects in Steel Plate detection method based on convolutional neural networks tape label
CN111709451A (en) * 2020-05-21 2020-09-25 五邑大学 Wine bottle surface defect detection method, electronic device and storage medium
CN112819748A (en) * 2020-12-16 2021-05-18 机科发展科技股份有限公司 Training method and device for strip steel surface defect recognition model

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
大型储罐防腐蚀涂层厚度智能检测技术分析;张永吉;《全面腐蚀控制》;第34卷(第02期);48-49 *

Also Published As

Publication number Publication date
CN113538342A (en) 2021-10-22

Similar Documents

Publication Publication Date Title
CN113538342B (en) A method for detecting the coating quality of aluminum aerosol cans based on convolutional neural network
CN112085735B (en) An image defect detection method for aluminum material based on adaptive anchor frame
CN103927534B (en) A kind of online visible detection method of coding character based on convolutional neural networks
CN109829893B (en) Defect target detection method based on attention mechanism
CN110175982B (en) A Defect Detection Method Based on Target Detection
CN106875381B (en) Mobile phone shell defect detection method based on deep learning
CN113592845A (en) Defect detection method and device for battery coating and storage medium
CN111340754A (en) A method for detection and classification of surface defects based on aircraft skin
CN111160249A (en) Multi-class target detection method in optical remote sensing images based on cross-scale feature fusion
CN114663346A (en) Strip steel surface defect detection method based on improved YOLOv5 network
CN112990392A (en) New material floor defect target detection system based on improved YOLOv5 algorithm
CN114926407A (en) Steel surface defect detection system based on deep learning
TWI822968B (en) Color filter inspection device, inspection device, color filter inspection method, and inspection method
CN108267455B (en) Device and method for detecting defects of printed characters of plastic film
CN112686833A (en) Industrial product surface defect detecting and classifying device based on convolutional neural network
CN113420776B (en) Multi-side joint detection article classification method based on model fusion
CN112164048B (en) A method and device for automatic detection of surface defects of magnetic tiles based on deep learning
CN115830004A (en) Surface defect detection method, device, computer equipment and storage medium
CN114529839A (en) Unmanned aerial vehicle routing inspection-oriented power transmission line hardware anomaly detection method and system
CN112258490A (en) Low-emissivity coating intelligent damage detection method based on optical and infrared image fusion
CN111667465A (en) Metal hand basin defect detection method based on far infrared image
CN119006469A (en) Automatic detection method and system for surface defects of substrate glass based on machine vision
CN117423040A (en) Visual garbage identification method for unmanned garbage sweeper based on improved YOLOv8
CN114943738A (en) Sensor packaging curing adhesive defect identification method based on visual identification
CN118706336A (en) Soft package sealing detection equipment and method based on vibration and infrared image fusion

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant