[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN114638809A - Multi-scale micro-defect detection method based on PA-MLFPN workpiece surface - Google Patents

Multi-scale micro-defect detection method based on PA-MLFPN workpiece surface Download PDF

Info

Publication number
CN114638809A
CN114638809A CN202210285543.7A CN202210285543A CN114638809A CN 114638809 A CN114638809 A CN 114638809A CN 202210285543 A CN202210285543 A CN 202210285543A CN 114638809 A CN114638809 A CN 114638809A
Authority
CN
China
Prior art keywords
feature
defect
model
mlfpn
scale
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.)
Granted
Application number
CN202210285543.7A
Other languages
Chinese (zh)
Other versions
CN114638809B (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.)
Nanjing Tech University
Original Assignee
Nanjing Tech 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 Nanjing Tech University filed Critical Nanjing Tech University
Priority to CN202210285543.7A priority Critical patent/CN114638809B/en
Publication of CN114638809A publication Critical patent/CN114638809A/en
Application granted granted Critical
Publication of CN114638809B publication Critical patent/CN114638809B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/25Fusion techniques
    • G06F18/253Fusion techniques of extracted features
    • 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/04Architecture, e.g. interconnection topology
    • G06N3/048Activation functions
    • 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/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]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30108Industrial image inspection
    • G06T2207/30164Workpiece; Machine component
    • 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)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • General Engineering & Computer Science (AREA)
  • Evolutionary Computation (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Computational Linguistics (AREA)
  • Mathematical Physics (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Molecular Biology (AREA)
  • Evolutionary Biology (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Software Systems (AREA)
  • Quality & Reliability (AREA)
  • Image Processing (AREA)
  • Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)

Abstract

The application discloses a multi-scale micro-defect detection method based on a PA-MLFPN workpiece surface, which comprises the following steps: and (3) constructing a PA-MLFPN feature extraction model. A VGG16 main feature extraction network model is used as a first model, PA-MLFPN is used as a middle model, and a prediction layer is used as a later model to form a detection model. And training a detection model by taking the surface image of the multi-scale micro-defect target workpiece as input and the defect positioning frame and classification as output. PA-MLFPN uses the hole convolution of different scaled rates to replace the traditional convolution in the TUM coder part at first, and uses the average pooling operation to carry out down-sampling; adding a bottom-up characteristic enhancement path on the basis of the original TUM to interpolate shallow characteristics into a deep layer; introducing an ECA module to carry out weight distribution on a channel at the second stage of the SFAM; the invention can detect the workpiece surface defect target with variable and smaller dimensions.

Description

基于PA-MLFPN工件表面多尺度微小缺陷检测方法Multi-scale micro-defect detection method on workpiece surface based on PA-MLFPN

技术领域technical field

本发明涉及基于PA-MLFPN工件表面多尺度小缺陷检测方法,属于计算机视觉技术领域。The invention relates to a multi-scale small defect detection method based on a PA-MLFPN workpiece surface, and belongs to the technical field of computer vision.

背景技术Background technique

工件表面缺陷检测任务是工件生产中不可缺少的环节,但由于工件生产设备及生产工艺等因素的影响,生产的工件表面往往会存在划痕,凸粉,擦伤等多种类型的缺陷。这些缺陷不仅仅会影响外观,还会对工件接下来的使用埋下诸多隐患,如加速工件的老化进而影响使用寿命,甚至还会影响工件的正常使用。所以使用合适的缺陷检测技术来提高工件的生产质量就显得尤为重要。传统的表面缺陷检测任务通常由人工完成,但人工进行检测往往会受到个人主观经验、工作环境和精神状态等因素的影响从而缺乏规范性。同时,人工方式对高速移动或有较小的缺陷进行检测时很容易出现误检和漏检。The task of workpiece surface defect detection is an indispensable link in workpiece production. However, due to the influence of workpiece production equipment and production technology, the surface of the produced workpiece often has various types of defects such as scratches, bumps, and abrasions. These defects will not only affect the appearance, but also bury many hidden dangers in the subsequent use of the workpiece, such as accelerating the aging of the workpiece and affecting the service life, and even affecting the normal use of the workpiece. Therefore, it is particularly important to use suitable defect detection technology to improve the production quality of workpieces. Traditional surface defect detection tasks are usually done manually, but manual detection is often affected by factors such as personal subjective experience, work environment, and mental state, which lacks normativeness. At the same time, false detection and missed detection are easy to occur when the manual method is used to detect high-speed movement or small defects.

随着深度学习的发展,越来越多的基于卷积神经网络的目标检测算法被提出。但由于卷积网络结构以及工件表面缺陷的特点,我们认为目前基于卷积神经网络完成工件表面缺陷检测任务中仍存在的问题有:(一)工件表面缺陷产生的随机性导致缺陷尺度多变。如两种不同类型的缺陷目标可能具有相近的尺寸,但是其表现的复杂程度可能相差很多,抑或是同一种缺陷类型中,其尺度变化也会相差很大。但是在传统卷积网络模型中,用于检测特定尺寸范围内对象的特征层,主要由单级特征层或相邻两层组成来用于最终检测将致使检测性能欠佳。(二)实际工件表面缺陷检测任务中,缺陷在形状多变的基础上往往小缺陷目标较多。在卷积神经网络中浅层特征层分辨率更高,包含更多有利于小目标检测的位置、细节信息。深层特征具有更强的语义信息,但是分辨率很低,对小目标的感知能力较差。With the development of deep learning, more and more target detection algorithms based on convolutional neural networks have been proposed. However, due to the structure of the convolutional network and the characteristics of the surface defects of the workpiece, we believe that there are still problems in the task of detecting the surface defects of the workpiece based on the convolutional neural network: (1) The randomness of the surface defects of the workpiece leads to the change of the defect scale. For example, two different types of defect targets may have similar sizes, but the complexity of their performance may be very different, or in the same defect type, their scale changes will also be very different. However, in the traditional convolutional network model, the feature layer used to detect objects in a specific size range is mainly composed of a single-level feature layer or two adjacent layers for final detection, which will result in poor detection performance. (2) In the actual workpiece surface defect detection task, the defects often have many small defect targets on the basis of changing shapes. In the convolutional neural network, the shallow feature layer has higher resolution and contains more location and detail information that is conducive to small target detection. Deep features have stronger semantic information, but have low resolution and poor perception of small objects.

发明内容SUMMARY OF THE INVENTION

本发明的目的在于提供基于PA-MLFPN工件表面多尺度微小缺陷检测方法,以解决现有技术中的问题。选择多级特征金字塔网络(Multi-Level Feature Pyramid Network,MLFPN)通过提取多层次多尺度特征的方式解决多尺度缺陷目标问题。并在MLFPN的基础上针对工件表面缺陷检测任务提出改进方法,提出路径增强多级特征金字塔网络(Path-Augmentation Multi-Level Feature Pyramid Network,PA-MLFPN)来对浅层特征进行进一步利用,并嵌入SSD中进行工件表面缺陷检测从而提高对多尺度微小缺陷目标的检测精度。The purpose of the present invention is to provide a multi-scale micro-defect detection method based on the PA-MLFPN workpiece surface, so as to solve the problems in the prior art. The Multi-Level Feature Pyramid Network (MLFPN) is selected to solve the multi-scale defect target problem by extracting multi-level and multi-scale features. On the basis of MLFPN, an improved method is proposed for the task of workpiece surface defect detection, and a Path-Augmentation Multi-Level Feature Pyramid Network (PA-MLFPN) is proposed to further utilize shallow features and embed them. The workpiece surface defect detection is carried out in SSD to improve the detection accuracy of multi-scale small defect targets.

为实现上述目的,本发明提供如下技术方案:基于PA-MLFPN工件表面多尺度微小缺陷检测方法,其特征在于,执行以下步骤A至步骤D,获得工件表面缺陷检测模型,然后基于VGG16主干特征提取网络所获检测目标工件的微小缺陷样本图像,应用工件表面缺陷检测模型,获得目标工件图像中多尺度微小缺陷分别所对应的预设缺陷分类;In order to achieve the above object, the present invention provides the following technical solutions: a multi-scale micro-defect detection method based on the PA-MLFPN workpiece surface, characterized in that the following steps A to D are performed to obtain a workpiece surface defect detection model, and then based on the VGG16 backbone feature extraction The sample images of tiny defects of the target workpiece detected by the network are applied, and the surface defect detection model of the workpiece is applied to obtain the preset defect classifications corresponding to the multi-scale tiny defects in the image of the target workpiece;

步骤A:基于MLFPN模型,以微小缺陷样本图像为输入,以多层特征金字塔为输出,构建PA-MLFPN特征提取模型Step A: Based on the MLFPN model, take the small defect sample image as the input and the multi-layer feature pyramid as the output to construct the PA-MLFPN feature extraction model

步骤B:基于Prediction layer预测层,以微小缺陷图像的多层特征金字塔图像为输入,以图像中多尺度微小缺陷分别所对应的预设缺陷分类为输出,构建分类模型;Step B: Based on the Prediction layer, the multi-layer feature pyramid image of the micro-defect image is used as the input, and the preset defect classification corresponding to the multi-scale micro-defects in the image is used as the output to construct a classification model;

步骤C:以PA-MLFPN特征提取模型在先,分类模型在后顺序连接,且分类模型输入端连接PA-MLFPN特征提取模型输出端,构成以单个缺陷位置的工件表面多尺度微小缺陷的图像为输入,以图像中多尺度微小缺陷分别所对应的预设缺陷分类为输出的检测模型;Step C: The PA-MLFPN feature extraction model is first, the classification model is connected sequentially, and the input end of the classification model is connected to the output end of the PA-MLFPN feature extraction model to form an image of multi-scale tiny defects on the surface of the workpiece at a single defect position. Input, take the preset defect classification corresponding to the multi-scale tiny defects in the image as the output detection model;

步骤D:基于预设数量的各个包含单个缺陷位置的工件表面多尺度微小缺陷样本图像、以及各个工件表面多尺度微小缺陷样本图像分别所对应的预设缺陷分类,以微小缺陷样本图像为输入,以图像中多尺度微小缺陷分别所对应的预设缺陷分类为输出,针对检测模型进行训练,获得工件表面缺陷检测模型。Step D: Based on the preset number of multi-scale micro-defect sample images on the workpiece surface each containing a single defect position, and the preset defect classification corresponding to each multi-scale micro-defect sample image on the workpiece surface, the micro-defect sample image is used as input, The preset defect classification corresponding to the multi-scale tiny defects in the image is used as the output, and the detection model is trained to obtain the workpiece surface defect detection model.

进一步地,前述的工件表面多尺度微小缺陷包含的预设缺陷包括划痕缺陷、凸粉缺陷、擦伤缺陷。Further, the preset defects included in the aforementioned multi-scale micro-defects on the workpiece surface include scratch defects, convex powder defects, and scratch defects.

进一步地,前述的基于PA-MLFPN工件表面多尺度微小缺陷检测方法还包括获得各个包含单个缺陷位置的工件表面多尺度微小缺陷图像,对该工件表面多尺度微小缺陷图像数据集按照预设比例进行数据划分,划分为训练集、测试集和验证集,具体为:在工件生产流水线上,使用一台采样设备在固定位置对每一个工件进行拍照采样;对采集到的工件表面图像通过labelimg进行表面缺陷标注,并且将通过Labelimg进行表面标注过的图像制作为VOC格式的数据集;通过imgaug数据增强对数据集中图像进行数据增强;将增强后的数据集以(训练集+验证集):测试集的比例为9:1,训练集:验证集的比例为9:1进行随机划分。Further, the aforementioned method for detecting multi-scale micro-defects on workpiece surfaces based on PA-MLFPN further includes obtaining images of multi-scale micro-defects on the workpiece surface each including a single defect position, and performing the multi-scale micro-defect image data set on the workpiece surface according to a preset ratio. The data is divided into training set, test set and verification set, specifically: on the workpiece production line, use a sampling device to take pictures and sample each workpiece at a fixed position; Defects are marked, and the images marked on the surface by Labelimg are made into VOC format data sets; data enhancement is performed on the images in the data set through imgaug data enhancement; the enhanced data set is (training set + validation set): test set The ratio is 9:1, and the ratio of training set:validation set is 9:1 for random division.

进一步地,前述的步骤A中,所述PA-MLFPN模型包括FFMv1特征融合模块、基本特征层、多级FFMv2特征融合模块、多级改进的TUM细化U型模块、以及改进的SFAM基于尺度的特征聚合模块,所述FFMv1特征融合模块作为所述PA-MLFPN模型的输入端,所述FFMv1特征融合模块的输出端与基本特征层的输入端相连,所述基本特征层的输出端与各个FFMv2特征融合模块的输入端、以及第一级改进的TUM细化U型模块的输入端分别相连,所述多级FFMv2特征融合模块与多级改进的TUM细化U型模块交替堆叠连接,最后一级的改进的TUM细化U型模块的输出端与改进的SFAM基于尺度的特征聚合模块的输入端相连,所述改进的SFAM基于尺度的特征聚合模块的输出端作为PA-MLFPN模型的输出端;所述对PA-MLFPN模型进行训练的步骤包括以下步骤101至步骤104:Further, in the aforementioned step A, the PA-MLFPN model includes a FFMv1 feature fusion module, a basic feature layer, a multi-level FFMv2 feature fusion module, a multi-level improved TUM refinement U-shaped module, and an improved SFAM scale-based Feature aggregation module, the FFMv1 feature fusion module is used as the input end of the PA-MLFPN model, the output end of the FFMv1 feature fusion module is connected with the input end of the basic feature layer, and the output end of the basic feature layer is connected with each FFMv2 The input end of the feature fusion module and the input end of the first-level improved TUM refinement U-shaped module are respectively connected, and the multi-level FFMv2 feature fusion module and the multi-level improved TUM refinement U-shaped module are alternately stacked and connected. The output end of the improved TUM refinement U-shaped module of the advanced level is connected to the input end of the improved SFAM scale-based feature aggregation module, and the output end of the improved SFAM scale-based feature aggregation module is used as the output end of the PA-MLFPN model ; The described step of training the PA-MLFPN model includes the following steps 101 to 104:

步骤101:基于FFMv1特征融合模块,以conv4_3和conv5_3为输入,以多工件表面多尺度微小缺陷基本特征层为输出,随后进入步骤102;Step 101: Based on the FFMv1 feature fusion module, take conv4_3 and conv5_3 as input, and take the multi-scale micro-defect basic feature layer on the surface of multiple workpieces as the output, then enter step 102;

步骤102:以工件表面多尺度微小缺陷基本特征层为输入,输入至第一级TUM模型进行进一步特征提取,以不同层级输出的六个尺度的微小缺陷基本特征图为输出,随后进入步骤103;Step 102: take the multi-scale micro-defect basic feature layer on the workpiece surface as an input, input to the first-level TUM model and carry out further feature extraction, take the six-scale micro-defect basic feature maps of different levels of output as output, then enter step 103;

步骤103:以基本特征层和第一级TUM模型获得的六个尺度基本特征图中最大特征图为输入,输入至第一级FFMv2特征融合模块,得到第一级融合的特征图;然后以第一级融合的特征图和基本特征层图为输入,输入至第二级FFMv2模型,得到第二级融合特征图,以交替堆叠多级改进的TUM细化U型模型和FFMv2特征融合模块的方式以前一级融合特征图和基本特征层图为输入,以后一级融合特征图为输出,获得浅层特征金字塔特征图,中层特征金字塔特征图和深层特征金字塔特征图,随后进入步骤104;Step 103: the maximum feature map in the six-scale basic feature map obtained by the basic feature layer and the first-level TUM model is an input, input to the first-level FFMv2 feature fusion module, and obtain the first-level fusion feature map; The feature map and basic feature layer map of the first-level fusion are input to the second-level FFMv2 model, and the second-level fusion feature map is obtained, and the multi-level improved TUM refinement U-shaped model and the FFMv2 feature fusion module are stacked alternately. The former-level fusion feature map and the basic feature layer map are used as the input, and the latter-level fusion feature map is used as the output to obtain the shallow-level feature pyramid feature map, the middle-level feature pyramid feature map and the deep-level feature pyramid feature map, and then enter step 104;

步骤104:基于SFAM模块进行特征聚合,以浅层特征金字塔特征图、中层特征金字塔特征图、深层特征金字塔特征图中尺寸相同的金字塔特征层图为输入,以多层特征金字塔图为输出,之后对获得的多层特征金字塔使用ECA模块进行通道上权值的分配。Step 104: carry out feature aggregation based on the SFAM module, take the pyramid feature map with the same size in the shallow feature pyramid feature map, the middle feature pyramid feature map, and the deep feature pyramid feature map as the input, and take the multi-layer feature pyramid map as the output, then The ECA module is used to assign the weights on the channels to the obtained multi-layer feature pyramid.

进一步地,前述的TUM细化U型模型在编码器部分采用dilated rate分别设置为(2,2,3,3,1)的步长为1的3×3空洞卷积来进行特征学习,并且采用步长为2的平均池化操作来进行下采样,并在原U型结构的基础上增加一条从浅层到深层的信息传输路径将浅层特征金字塔特征的细节位置信息插值到深层,即Ti经过卷积核尺寸为3×3,步长为2的卷积,特征图尺寸缩减为原来的一半即Conv(Ti),然后和Ci+1进行逐元素相加,得到的结果再经过一个卷积核尺寸为3×3,步长为1的卷积得到Ti+1,计算公式为。Further, the aforementioned TUM refinement U-shaped model adopts 3×3 hole convolution with dilated rate set to (2, 2, 3, 3, 1) and stride 1 in the encoder part for feature learning, and The average pooling operation with a step size of 2 is used for downsampling, and an information transmission path from the shallow layer to the deep layer is added on the basis of the original U-shaped structure to interpolate the detailed position information of the shallow layer feature pyramid feature to the deep layer, namely Ti After convolution with a kernel size of 3×3 and a stride of 2, the feature map size is reduced to half of the original size, namely Conv(T i ), and then added element by element with C i+1 , and the obtained result is then A convolution with a kernel size of 3×3 and a stride of 1 obtains T i+1 , and the calculation formula is:

Figure BDA0003558061210000041
Figure BDA0003558061210000041

进一步地,前述的基于SFAM对获得的多层特征金字塔图使用ECA模块进行通道上权值的分配,的具体步骤为:Further, the aforementioned SFAM uses the ECA module to assign the weights on the channel to the obtained multi-layer feature pyramid, and the specific steps are:

步骤Ⅴ-1:对于SFAM模块初步聚合的多层特征金字塔图的特征层进行全局平均池化,获得C个通道的权重,随后进入步骤Ⅴ-2;Step Ⅴ-1: Perform global average pooling on the feature layers of the multi-layer feature pyramid graph initially aggregated by the SFAM module to obtain the weights of C channels, and then enter step Ⅴ-2;

步骤Ⅴ-2:通过内核大小为k的一维卷积来实现局部跨通道交互信息来获取C个通道的权重系数,其中内核大小k通过通道数C的函数自适应确定,计算公式为:Step Ⅴ-2: The weight coefficients of C channels are obtained by implementing local cross-channel mutual information through one-dimensional convolution with a kernel size of k, where the kernel size k is adaptively determined by a function of the number of channels C, and the calculation formula is:

Figure BDA0003558061210000042
Figure BDA0003558061210000042

其中,|t|odd表示取最近的奇数,且b与γ分别取1和2,最后将C个通道的权重系数通过Sigmoid函数得到C个0到1之间的值,分别对应原始通道的权重C,并将其与多层特征金字塔图相乘来进行加权然后输出,得到多级特征金字塔特征图。Among them, |t| odd means to take the nearest odd number, and b and γ take 1 and 2 respectively. Finally, the weight coefficients of the C channels are passed through the Sigmoid function to obtain C values between 0 and 1, which correspond to the weights of the original channels respectively. C, and multiply it with the multi-level feature pyramid map for weighting and then output to obtain the multi-level feature pyramid feature map.

进一步地,前述的步骤A中,还包括对获得的PA-MLFPN模型,进行微调训练,具体为:Further, in the aforementioned step A, it also includes performing fine-tuning training on the obtained PA-MLFPN model, specifically:

训练时采用Focal loss计算分类损失,采用Smooth L1计算回归损失,最终采用的损失函数是Focal loss与Smooth L1的结合:During training, Focal loss is used to calculate the classification loss, and Smooth L1 is used to calculate the regression loss. The final loss function used is the combination of Focal loss and Smooth L1:

L=Lfl+LSL1 L=L fl +L SL1

所述分类损失Focal loss计算公式为:

Figure BDA0003558061210000043
其中y′是预测输出,y是真实样本的标签,α是正负样本权重、γ是易分类样本和难分类样本权重;所述回归损失Smooth L1计算公式如下:
Figure BDA0003558061210000044
其中x为预测框与真实框的差值。The classification loss Focal loss calculation formula is:
Figure BDA0003558061210000043
Where y' is the predicted output, y is the label of the real sample, α is the weight of positive and negative samples, γ is the weight of easy-to-classify samples and hard-to-classify samples; the regression loss Smooth L1 is calculated as follows:
Figure BDA0003558061210000044
where x is the difference between the predicted box and the ground-truth box.

进一步地,前述的针对实际样本验证获得满足预设条件的缺陷分类结果,具体为:设定评价指标精确率P和召回率R用于进行模型评估,计算公式为:Further, the aforementioned defect classification results that meet the preset conditions are obtained by verifying the actual samples, specifically: setting the evaluation index precision rate P and recall rate R for model evaluation, and the calculation formula is:

Figure BDA0003558061210000045
Figure BDA0003558061210000045

Figure BDA0003558061210000051
Figure BDA0003558061210000051

其中TP表示正确判断出缺陷区域的数量,TN表示正确判断出背景区域的数量,FP表示将正确背景区域误判为缺陷区域的数量分别,FN表示把缺陷误判为背景的数量;Among them, TP means the number of correctly judged defective areas, TN means the number of correctly judged background areas, FP means the number of correct background areas misjudged as defective areas, FN means the number of faults misjudged as background;

设置平均精度AP用于评价模型在测试集上对各类型缺陷的检测性能,PR曲线与横纵坐标轴围成的面积为该类缺陷的AP,计算公式如下:The average precision AP is set to evaluate the detection performance of the model for various types of defects on the test set. The area enclosed by the PR curve and the abscissa and ordinate axes is the AP of this type of defects. The calculation formula is as follows:

Figure BDA0003558061210000052
Figure BDA0003558061210000052

设置多类别缺陷的检测结果采用平均精度均值mAP,测试结果mAP计算公式如下:The detection results of multi-category defects are set to use the average precision value mAP, and the calculation formula of mAP of the test results is as follows:

Figure BDA0003558061210000053
Figure BDA0003558061210000053

进一步地,前述的基于PA-MLFPN工件表面多尺度微小缺陷检测方法,对微小缺陷图像所对应的预设缺陷分类进行验证,设置循环迭代步数设置为100,首先batch size设置为32,学习率初始化为5e-4,当迭代步数达到50时,重新设置batch size为16,学习率为1e-4。Further, the aforementioned multi-scale micro-defect detection method based on the PA-MLFPN workpiece surface is used to verify the preset defect classification corresponding to the micro-defect image, and the number of loop iteration steps is set to 100. First, the batch size is set to 32, and the learning rate is set to 32. The initialization is 5e-4. When the number of iteration steps reaches 50, the batch size is reset to 16 and the learning rate is 1e-4.

进一步地,前述的针对实际样本验证获得满足预设条件的缺陷分类结果,在训练时采用早停法,且每次迭代都计算验证损失,当验证损失值达到局部最优时,继续迭代6次,如果模型不再收敛就停止训练。Further, for the aforementioned verification of actual samples to obtain defect classification results that meet the preset conditions, the early stopping method is used during training, and the verification loss is calculated in each iteration. When the verification loss value reaches the local optimum, iteration is continued for 6 times. , and stop training if the model no longer converges.

发明所述基于PA-MLFPN工件表面多尺度微小缺陷检测方法,采用以上技术方案与现有技术相比,具有以下技术效果:针对工件表面多尺度及微小缺陷较多的特点,传统目标检测算法无法很好的进行检测。提出了基于路径增强多级特征金字塔网络(PA-MLFPN)的工件表面缺陷检测算法。在提取多层次多尺度缺陷特征的基础上进一步增强小缺陷目标的表征能力,提高了对不同尺度目标的检测精度且有效解决了小缺陷目标的漏检问题。Compared with the prior art, the invention has the following technical effects based on the multi-scale micro-defect detection method on the workpiece surface based on PA-MLFPN. The traditional target detection algorithm cannot Well done detection. A workpiece surface defect detection algorithm based on Path Enhanced Multilevel Feature Pyramid Network (PA-MLFPN) is proposed. On the basis of extracting multi-level and multi-scale defect features, the representation ability of small defect targets is further enhanced, the detection accuracy of different scale targets is improved, and the problem of missed detection of small defect targets is effectively solved.

附图说明Description of drawings

图1是本发明的流程步骤图;Fig. 1 is the flow chart of the present invention;

图2是PA-MLFPN嵌入检测模型中之后的网络模型图;Figure 2 is the network model diagram after PA-MLFPN is embedded in the detection model;

图3是下采样部分使用空洞卷积示意图;Figure 3 is a schematic diagram of the use of hole convolution in the downsampling part;

图4是特征增强路径的特征结合方式示意图;4 is a schematic diagram of a feature combination mode of a feature enhancement path;

图5是改进后的TUM结构图;Fig. 5 is the improved TUM structure diagram;

图6是改进后的SFAM结构图;Figure 6 is an improved SFAM structure diagram;

图7是工件表面缺陷检测结果展示图。FIG. 7 is a display diagram of the detection results of workpiece surface defects.

具体实施方式Detailed ways

为了更了解本发明的技术内容,特举具体实施例并配合所附图式说明如下。In order to better understand the technical content of the present invention, specific embodiments are given and described below in conjunction with the accompanying drawings.

如图1所示,本发明的流程步骤如下:第一步,采集工件表面缺陷图像。As shown in FIG. 1 , the process steps of the present invention are as follows: The first step is to collect images of surface defects of the workpiece.

第二步,进行缺陷标注,并进行数据增强来构建工件表面缺陷数据集,具体为:在工件生产流水线上,使用一台采样设备在固定位置对每一个工件进行拍照采样,构建工件表面缺陷数据集。对采集到的工件表面图像通过labelimg进行表面缺陷标注。对工件表面缺陷数据集按照预设比例进行数据划分,划分为训练集、测试集和验证集,并且将通过Labelimg进行表面标注过的图像制作为VOC格式的数据集;通过imgaug数据增强对数据集中图像进行数据增强;将增强后的数据集以(训练集+验证集):测试集的比例为9:1,训练集:验证集的比例为9:1进行随机划分。The second step is to perform defect annotation and data enhancement to construct a workpiece surface defect data set. Specifically, on the workpiece production line, use a sampling device to take pictures and sample each workpiece at a fixed position to construct workpiece surface defect data. set. The surface defects of the collected workpiece surface images are marked by labelimg. The data set of workpiece surface defects is divided according to the preset ratio, and divided into training set, test set and verification set, and the images marked on the surface by Labelimg are made into a data set in VOC format; the data set is enhanced by imgaug data. Image data enhancement; the enhanced data set is randomly divided with the ratio of (training set + validation set):test set 9:1, and the ratio of training set:validation set is 9:1.

第三步,PA-MLFPN的搭建;基于MLFPN模型,以微小缺陷图像为输入,以微小缺陷图像的多层特征金字塔图像为输出,构建PA-MLFPN特征提取模型;The third step is the construction of PA-MLFPN; based on the MLFPN model, the PA-MLFPN feature extraction model is constructed with the micro-defect image as the input and the multi-layer feature pyramid image of the micro-defect image as the output;

第四步,基于Prediction layer预测层,以微小缺陷图像的多层特征金字塔图像为输入,以图像中多尺度微小缺陷分别所对应的预设缺陷分类为输出,构建分类模型;The fourth step, based on the Prediction layer, takes the multi-layer feature pyramid image of the micro-defect image as the input, and uses the preset defect classification corresponding to the multi-scale micro-defects in the image as the output to construct a classification model;

第五步,基于VGG16主干特征提取网络所获检测目标工件的微小缺陷样本图像,以PA-MLFPN特征提取模型在先,分类模型在后顺序连接,且分类模型输入端连接PA-MLFPN特征提取模型输出端,构成以单个缺陷位置的工件表面多尺度微小缺陷的图像为输入,以图像中多尺度微小缺陷分别所对应的预设缺陷分类为输出的检测模型;The fifth step, based on the small defect sample image of the detected target workpiece obtained by the VGG16 backbone feature extraction network, the PA-MLFPN feature extraction model is first, the classification model is connected sequentially, and the input end of the classification model is connected to the PA-MLFPN feature extraction model. The output end constitutes a detection model that takes the image of the multi-scale micro-defects on the workpiece surface at a single defect position as the input, and uses the preset defect classification corresponding to the multi-scale micro-defects in the image as the output;

第六步,基于预设数量的各个包含单个缺陷位置的工件表面多尺度微小缺陷样本图像、以及各个工件表面多尺度微小缺陷样本图像分别所对应的预设缺陷分类,以微小缺陷样本图像为输入,以图像中多尺度微小缺陷分别所对应的预设缺陷分类为输出,针对检测模型进行训练。获得工件表面缺陷检测模型。In the sixth step, based on the preset number of multi-scale micro-defect sample images on the workpiece surface each containing a single defect position, and the preset defect classification corresponding to each multi-scale micro-defect sample image on the workpiece surface, the micro-defect sample image is used as the input. , take the preset defect classification corresponding to the multi-scale tiny defects in the image as the output, and train the detection model. Obtain the workpiece surface defect detection model.

如图2所示,基于VGG16网络模型,以缺陷图像做为输入,以VGG16中的conv4_3和conv5_3层特征层为输出,构建主干特征提取网络。以PA-MLFPN在先与Prediction layer预测层在后的顺序,串联后形成的网络模型;PA-MLFPN模型包括FFMv1特征融合模块、基本特征层、多级FFMv2特征融合模块、多级改进的TUM细化U型模块、以及改进的SFAM基于尺度的特征聚合模块,通过FFMv1将conv4_3和conv5_3进行初步特征融合得到基本特征层(Basefeature)用于接下来的一系列的进一步特征融合。As shown in Figure 2, based on the VGG16 network model, the defect image is used as the input, and the conv4_3 and conv5_3 feature layers in VGG16 are used as the output to construct the backbone feature extraction network. The network model is formed in series in the order of the PA-MLFPN first and the Prediction layer prediction layer; the PA-MLFPN model includes the FFMv1 feature fusion module, the basic feature layer, the multi-level FFMv2 feature fusion module, and the multi-level improved TUM detail. The U-shaped module and the improved SFAM scale-based feature aggregation module, through FFMv1, the initial feature fusion of conv4_3 and conv5_3 is used to obtain the base feature layer (Basefeature) for the next series of further feature fusions.

所述FFMv1特征融合模块作为所述PA-MLFPN模型的输入端,所述FFMv1特征融合模块的输出端与基本特征层的输入端相连,所述基本特征层的输出端与各个FFMv2特征融合模块的输入端、以及第一级改进的TUM细化U型模块的输入端分别相连,所述多级FFMv2特征融合模块与多级改进的TUM细化U型模块交替堆叠连接,最后一级的改进的TUM细化U型模块的输出端与改进的SFAM基于尺度的特征聚合模块的输入端相连,所述改进的SFAM基于尺度的特征聚合模块的输出端作为PA-MLFPN模型的输出端;所述对PA-MLFPN模型进行训练的步骤包括以下步骤101至步骤104:The FFMv1 feature fusion module is used as the input end of the PA-MLFPN model, the output end of the FFMv1 feature fusion module is connected to the input end of the basic feature layer, and the output end of the basic feature layer is connected with each FFMv2 feature fusion module. The input end and the input end of the first-level improved TUM refinement U-shaped module are respectively connected, the multi-level FFMv2 feature fusion module and the multi-level improved TUM refinement U-shaped module are alternately stacked and connected. The output end of the TUM refinement U-shaped module is connected to the input end of the improved SFAM scale-based feature aggregation module, and the output end of the improved SFAM scale-based feature aggregation module is used as the output end of the PA-MLFPN model; The steps of training the PA-MLFPN model include the following steps 101 to 104:

步骤101:基于FFMv1特征融合模块,以conv4_3和conv5_3为输入,以多工件表面多尺度微小缺陷基本特征层为输出,随后进入步骤102;Step 101: Based on the FFMv1 feature fusion module, take conv4_3 and conv5_3 as input, and take the multi-scale micro-defect basic feature layer on the surface of multiple workpieces as the output, then enter step 102;

步骤102:以工件表面多尺度微小缺陷基本特征层为输入,输入至第一级TUM模型进行进一步特征提取,以不同层级输出的六个尺度的微小缺陷基本特征图为输出,随后进入步骤103;Step 102: take the multi-scale micro-defect basic feature layer on the workpiece surface as an input, input to the first-level TUM model and carry out further feature extraction, take the six-scale micro-defect basic feature maps of different levels of output as output, then enter step 103;

步骤103:具体为:以基本特征层和第一级TUM模型获得的六个尺度基本特征图中最大特征图为输入,输入至第一级FFMv2特征融合模块,得到第一级融合的特征图;然后以第一级融合的特征图和基本特征层图为输入,输入至第二级FFMv2模型,得到第二级融合特征图,以交替堆叠多级改进的TUM细化U型模型和FFMv2特征融合模块的方式以前一级融合特征图和基本特征层图为输入,以后一级融合特征图为输出,获得浅层特征金字塔特征图,中层特征金字塔特征图和深层特征金字塔特征图,随后进入步骤104;Step 103: specifically: the maximum feature map in the six-scale basic feature map obtained by the basic feature layer and the first-level TUM model is an input, input to the first-level FFMv2 feature fusion module, and obtain the first-level fusion feature map; Then, the first-level fusion feature map and basic feature layer map are used as input, and input to the second-level FFMv2 model to obtain the second-level fusion feature map, and the multi-level improved TUM refinement U-shaped model and FFMv2 feature fusion are alternately stacked. The module method takes the former-level fusion feature map and the basic feature layer map as input, and the latter-level fusion feature map as the output, and obtains the shallow-level feature pyramid feature map, the middle-level feature pyramid feature map and the deep-level feature pyramid feature map, and then goes to step 104 ;

步骤104:基于SFAM模块进行特征聚合,以浅层特征金字塔特征图、中层特征金字塔特征图、深层特征金字塔特征图中尺寸相同的金字塔特征层图为输入,以多层特征金字塔图为输出,之后对获得的多层特征金字塔使用ECA模块进行通道上权值的分配。Step 104: carry out feature aggregation based on the SFAM module, take the pyramid feature map with the same size in the shallow feature pyramid feature map, the middle feature pyramid feature map, and the deep feature pyramid feature map as the input, and use the multi-layer feature pyramid map as the output, then The ECA module is used to assign the weights on the channels to the obtained multi-layer feature pyramid.

之后以微小缺陷图像的多层特征金字塔图像为输入,以图像中多尺度微小缺陷分别所对应缺陷分类为输出,输入Prediction layer预测层,获得工件表面微小缺陷所对应的缺陷分类。Then, the multi-layer feature pyramid image of the micro-defect image is used as the input, and the defect classification corresponding to the multi-scale micro-defects in the image is used as the output, and the prediction layer is input to the prediction layer to obtain the defect classification corresponding to the micro-defects on the workpiece surface.

如图3所示,下采样部分使用空洞卷积示意图,TUM细化U型模型在编码器部分采用dilated rate分别设置为(2,2,3,3,1)的步长为1的3×3空洞卷积来进行特征学习,并且采用步长为2的平均池化操作来进行下采样。As shown in Figure 3, the downsampling part uses a schematic diagram of hole convolution, and the TUM refinement U-shaped model uses a dilated rate in the encoder part, which is set to (2, 2, 3, 3, 1) respectively. The step size is 3 × 1 3-hole convolution is used for feature learning, and an average pooling operation with stride 2 is used for downsampling.

如图4所示,特征增强路径的特征结合方式,具体为,在原U型结构的基础上增加一条从浅层到深层的信息传输路径将浅层特征金字塔特征的细节位置信息插值到深层,即Ti经过卷积核尺寸为3×3,步长为2的卷积,特征图尺寸缩减为原来的一半即Conv(Ti),然后和Ci+1进行逐元素相加,得到的结果再经过一个卷积核尺寸为3×3,步长为1的卷积得到Ti+1,计算公式为:

Figure BDA0003558061210000081
As shown in Figure 4, the feature combination method of the feature enhancement path is specifically, on the basis of the original U-shaped structure, an information transmission path from the shallow layer to the deep layer is added to interpolate the detailed position information of the shallow feature pyramid feature to the deep layer, that is, Ti undergoes convolution with a convolution kernel size of 3 × 3 and a stride of 2, and the feature map size is reduced to half of the original size, namely Conv(Ti), and then added element by element with Ci+1, and the obtained result is then passed through a The size of the convolution kernel is 3×3, and the convolution with a stride of 1 obtains Ti+1. The calculation formula is:
Figure BDA0003558061210000081

如图5所示,改进后的TUM结构,TUM细化U型模型在编码器部分采用dilated rate分别设置为(2,2,3,3,1)的步长为1的3×3空洞卷积来进行特征学习,并且采用步长为2的平均池化操作来进行下采样。通过设置不同的dilated rate以获得不同大小的感受野来获取多尺度信息,同时避免了在下采样的连续卷积的过程中造成信息丢失来保留更多的浅层缺陷目标信息,在此基础上通过进一步步长为1,通道数为128的1×1卷积来进行通道数的调整并输出。As shown in Figure 5, the improved TUM structure, the TUM refined U-shaped model uses a 3×3 hole volume with dilated rate set to (2, 2, 3, 3, 1) with a step size of 1 in the encoder part. The product is used for feature learning, and the average pooling operation with stride 2 is used for downsampling. By setting different dilated rates to obtain receptive fields of different sizes, multi-scale information is obtained, and at the same time, information loss in the process of continuous convolution of downsampling is avoided to retain more shallow defect target information. Further, a 1×1 convolution with a stride of 1 and a channel number of 128 is used to adjust the number of channels and output.

如图6所示,改进后的SFAM结构图;改进的SFAM第二阶段采用ECA模块的具体流程为:引入ECA模块进行大小为k的一维卷积来代替两个全连接层,其中k通过通道数C的函数自适应确定。这样不仅避免了降维操作,且通过自适应大小的一维卷积来进行局部跨通道信息的交互。具体地,对于SFAM第一阶段初步聚合的特征层首先进行全局平均池化来得到每个通道的权重,假如有C个通道则一共获得C个通道权重。As shown in Figure 6, the improved SFAM structure diagram; the specific process of using the ECA module in the second stage of the improved SFAM is as follows: the ECA module is introduced to perform a one-dimensional convolution of size k to replace the two fully connected layers, where k passes through The function of the number of channels C is adaptively determined. This not only avoids the dimensionality reduction operation, but also conducts local cross-channel information interaction through one-dimensional convolution of adaptive size. Specifically, for the feature layer initially aggregated in the first stage of SFAM, the global average pooling is first performed to obtain the weight of each channel. If there are C channels, a total of C channel weights are obtained.

再通过大小为k的一维卷积来实现局部跨通道交互信息来获取权重,其中需要自适应确定内核大小k:Then, the weights are obtained by implementing local cross-channel mutual information through a one-dimensional convolution of size k, in which the kernel size k needs to be determined adaptively:

Figure BDA0003558061210000082
其中,|t|odd表示取最近的奇数,且b与γ在实验中分别取1和2。最后将上一步的输出通过Sigmoid函数得到C个0到1之间的值,分别对应原始通道的权重,并将其与输入特征相乘来进行加权然后输出。
Figure BDA0003558061210000082
Among them, |t| odd means to take the nearest odd number, and b and γ are taken as 1 and 2 respectively in the experiment. Finally, the output of the previous step is passed through the Sigmoid function to obtain C values between 0 and 1, which correspond to the weights of the original channels, and are multiplied by the input features for weighting and then output.

构建好的模型在工件表面缺陷数据集上进行微调训练具体为:在训练时采用Focal loss计算分类损失,采用Smooth L1计算回归损失。最终采用的损失函数是Focalloss与Smooth L1的结合:L=Lfl+LSL1,分类损失Focal loss计算公式为:The fine-tuning training of the constructed model on the workpiece surface defect dataset is as follows: during training, Focal loss is used to calculate the classification loss, and Smooth L1 is used to calculate the regression loss. The loss function finally adopted is the combination of Focalloss and Smooth L1: L=L fl +L SL1 , the calculation formula of the classification loss Focal loss is:

Figure BDA0003558061210000083
其中y是预测输出,y是真实样本的标签,α是正负样本权重、γ是易分类样本和难分类样本权重。回归损失Smooth L1计算公式如下:
Figure BDA0003558061210000083
where y is the predicted output, y is the label of the real sample, α is the weight of positive and negative samples, and γ is the weight of easy-to-classify samples and hard-to-classify samples. The regression loss Smooth L1 calculation formula is as follows:

Figure BDA0003558061210000091
其中x为预测框与真实框的差值。
Figure BDA0003558061210000091
where x is the difference between the predicted box and the ground-truth box.

为了评价本文提出算法性能,将相关评价指标精确率(Precision,P)和召回率(Recall,R)用于进行模型评估。In order to evaluate the performance of the algorithm proposed in this paper, the relevant evaluation indicators precision (Precision, P) and recall (Recall, R) are used for model evaluation.

其中TP、TN和FP分别表示正确判断出为缺陷的数量、表示正确判断出背景区域的数量和表示把背景误判为缺陷的数量:Among them, TP, TN and FP respectively represent the number of correctly judged defects, the number of correctly judged background regions and the number of misjudged backgrounds as defects:

Figure BDA0003558061210000092
平均精度(Average Precision,AP)用来评价模型在测试集上对各类型缺陷的检测性能,如下式所示,PR曲线与横纵坐标轴围成的面积为该类缺陷的AP:
Figure BDA0003558061210000093
Figure BDA0003558061210000092
Average Precision (AP) is used to evaluate the detection performance of the model for various types of defects on the test set. As shown in the following formula, the area enclosed by the PR curve and the horizontal and vertical axes is the AP of this type of defect:
Figure BDA0003558061210000093

多类别缺陷的检测结果采用平均精度均值(mean Average Precision,mAP)来评价,本发明的测试结果mAP如式所示:

Figure BDA0003558061210000094
The detection result of the multi-category defect adopts the mean average precision (mean Average Precision, mAP) to evaluate, and the test result mAP of the present invention is as shown in the formula:
Figure BDA0003558061210000094

采用迁移学习的方法来训练网络,通过在VOC数据集预训练得到权重文件,然后再通过在工件表面缺陷数据集进行微调即可。The transfer learning method is used to train the network, and the weight files are obtained by pre-training on the VOC dataset, and then fine-tuned on the workpiece surface defect dataset.

循环迭代步数设置为100,首先batch size设置为32,学习率初始化为5e-4,当迭代步数达到50时,重新设置batch size为16,学习率为1e-4。并且在训练时采用早停法(early stopping)来避免继续训练导致的过拟合,每次迭代都计算验证损失,当验证损失值达到局部最优时,继续迭代6次,如果模型不再收敛就停止训练。The number of loop iteration steps is set to 100. First, the batch size is set to 32, and the learning rate is initialized to 5e-4. When the number of iteration steps reaches 50, the batch size is reset to 16 and the learning rate is 1e-4. And the early stopping method is used during training to avoid overfitting caused by continued training. The validation loss is calculated in each iteration. When the validation loss value reaches the local optimum, iterates for 6 times. If the model no longer converges just stop training.

图7是在具体实施时,输入微小缺陷图像,获得的工件表面缺陷检测结果,具体为划痕缺陷、凸粉缺陷、擦伤缺陷。Fig. 7 shows the detection results of workpiece surface defects obtained by inputting a small defect image, specifically scratch defects, convex powder defects, and scratch defects.

在本发明中参照附图来描述本发明的各方面,附图中示出了许多说明性实施例。本发明的实施例不局限于附图所示。应当理解,本发明通过上面介绍的多种构思和实施例,以及详细描述的构思和实施方式中的任意一种来实现,这是因为本发明所公开的构思和实施例并不限于任何实施方式。另外,本发明公开的一些方面可以单独使用,或者与本发明公开的其他方面的任何适当组合来使用。Aspects of the invention are described herein with reference to the accompanying drawings, in which a number of illustrative embodiments are shown. Embodiments of the present invention are not limited to those shown in the accompanying drawings. It should be understood that the present invention can be implemented by any of the various concepts and embodiments described above, as well as the concepts and embodiments described in detail, since the concepts and embodiments disclosed in the present invention are not limited to any embodiment. . Additionally, some aspects of the present disclosure may be used alone or in any suitable combination with other aspects of the present disclosure.

虽然本发明已以较佳实施例揭露如上,然其并非用以限定本发明。本发明所属技术领域中具有通常知识者,在不脱离本发明的精神和范围内,当可作各种的更动与润饰。因此,本发明的保护范围当视权利要求书所界定者为准。Although the present invention has been disclosed above with preferred embodiments, it is not intended to limit the present invention. Those skilled in the art to which the present invention pertains can make various changes and modifications without departing from the spirit and scope of the present invention. Therefore, the protection scope of the present invention should be determined according to the claims.

发明所述基于PA-MLFPN工件表面多尺度微小缺陷检测方法,采用以上技术方案与现有技术相比,具有以下技术效果:针对工件表面多尺度及微小缺陷较多的特点,传统目标检测算法无法很好的进行检测。提出了基于路径增强多级特征金字塔网络(PA-MLFPN)的工件表面缺陷检测算法。在提取多层次多尺度缺陷特征的基础上进一步增强小缺陷目标的表征能力,提高了对不同尺度目标的检测精度且有效解决了小缺陷目标的漏检问题。Compared with the prior art, the invention has the following technical effects based on the multi-scale micro-defect detection method on the workpiece surface based on PA-MLFPN. The traditional target detection algorithm cannot Well done detection. A workpiece surface defect detection algorithm based on Path Enhanced Multilevel Feature Pyramid Network (PA-MLFPN) is proposed. On the basis of extracting multi-level and multi-scale defect features, the representation ability of small defect targets is further enhanced, the detection accuracy of different scale targets is improved, and the problem of missed detection of small defect targets is effectively solved.

Claims (10)

1.基于PA-MLFPN工件表面多尺度微小缺陷检测方法,其特征在于,执行以下步骤A至步骤D,获得工件表面缺陷检测模型,然后基于VGG16主干特征提取网络所获检测目标工件的微小缺陷样本图像,应用工件表面缺陷检测模型,获得目标工件图像中多尺度微小缺陷分别所对应的预设缺陷分类;1. Based on the PA-MLFPN workpiece surface multi-scale micro-defect detection method, it is characterized in that the following steps A to D are performed to obtain a workpiece surface defect detection model, and then based on the VGG16 backbone feature extraction network obtained detection target workpiece micro-defect samples image, applying the workpiece surface defect detection model to obtain the preset defect classification corresponding to the multi-scale tiny defects in the target workpiece image; 步骤A:基于MLFPN模型,以微小缺陷样本图像为输入,以多层特征金字塔为输出,构建PA-MLFPN特征提取模型Step A: Based on the MLFPN model, take the small defect sample image as the input and the multi-layer feature pyramid as the output to construct the PA-MLFPN feature extraction model 步骤B:基于Prediction layer预测层,以微小缺陷图像的多层特征金字塔图像为输入,以图像中多尺度微小缺陷分别所对应的预设缺陷分类为输出,构建分类模型;Step B: Based on the Prediction layer, the multi-layer feature pyramid image of the micro-defect image is used as the input, and the preset defect classification corresponding to the multi-scale micro-defects in the image is used as the output to construct a classification model; 步骤C:以PA-MLFPN特征提取模型在先,分类模型在后顺序连接,且分类模型输入端连接PA-MLFPN特征提取模型输出端,构成以单个缺陷位置的工件表面多尺度微小缺陷的图像为输入,以图像中多尺度微小缺陷分别所对应的预设缺陷分类为输出的检测模型;Step C: The PA-MLFPN feature extraction model is first, the classification model is connected sequentially, and the input end of the classification model is connected to the output end of the PA-MLFPN feature extraction model to form an image of multi-scale tiny defects on the surface of the workpiece at a single defect position. Input, take the preset defect classification corresponding to the multi-scale tiny defects in the image as the output detection model; 步骤D:基于预设数量的各个包含单个缺陷位置的工件表面多尺度微小缺陷样本图像、以及各个工件表面多尺度微小缺陷样本图像分别所对应的预设缺陷分类,以微小缺陷样本图像为输入,以图像中多尺度微小缺陷分别所对应的预设缺陷分类为输出,针对检测模型进行训练,获得工件表面缺陷检测模型。Step D: Based on the preset number of multi-scale micro-defect sample images on the workpiece surface each containing a single defect position, and the preset defect classification corresponding to each multi-scale micro-defect sample image on the workpiece surface, the micro-defect sample image is used as input, The preset defect classification corresponding to the multi-scale tiny defects in the image is used as the output, and the detection model is trained to obtain the workpiece surface defect detection model. 2.根据权利要求1所述的基于PA-MLFPN工件表面多尺度微小缺陷检测方法,其特征在于,工件表面多尺度微小缺陷包含的预设缺陷包括划痕缺陷、凸粉缺陷、擦伤缺陷。2 . The method for detecting multi-scale micro-defects on the workpiece surface based on PA-MLFPN according to claim 1 , wherein the preset defects contained in the multi-scale micro-defects on the workpiece surface include scratch defects, convex powder defects, and scratch defects. 3 . 3.根据权利要求1所述的基于PA-MLFPN工件表面多尺度微小缺陷检测方法,其特征在于,还包括获得各个包含单个缺陷位置的工件表面多尺度微小缺陷图像,对该工件表面多尺度微小缺陷图像数据集按照预设比例进行数据划分,划分为训练集、测试集和验证集,具体为:在工件生产流水线上,使用一台采样设备在固定位置对每一个工件进行拍照采样;对采集到的工件表面图像通过labelimg进行表面缺陷标注,并且将通过Labelimg进行表面标注过的图像制作为VOC格式的数据集;通过imgaug数据增强对数据集中图像进行数据增强;将增强后的数据集以(训练集+验证集):测试集的比例为9:1,训练集:验证集的比例为9:1进行随机划分。3. The multi-scale micro-defect detection method based on the PA-MLFPN workpiece surface according to claim 1, characterized in that, further comprising obtaining a multi-scale micro-defect image on the workpiece surface each comprising a single defect position, and the multi-scale micro-defect image on the workpiece surface is obtained. The defect image data set is divided into a training set, a test set and a verification set according to a preset ratio. Specifically, on the workpiece production line, a sampling device is used to take pictures and samples of each workpiece at a fixed position; The obtained workpiece surface image is marked with surface defects by labelimg, and the surface-marked image by Labelimg is made into a VOC format data set; the data in the data set is enhanced by imgaug data enhancement; the enhanced data set is ( training set + validation set): the ratio of test set is 9:1, and the ratio of training set:validation set is 9:1 for random division. 4.根据权利要求1所述的基于PA-MLFPN工件表面多尺度微小缺陷检测方法,其特征在于,所述步骤A中,所述PA-MLFPN模型包括FFMv1特征融合模块、基本特征层、多级FFMv2特征融合模块、多级改进的TUM细化U型模块、以及改进的SFAM基于尺度的特征聚合模块,所述FFMv1特征融合模块作为所述PA-MLFPN模型的输入端,所述FFMv1 特征融合模块的输出端与基本特征层的输入端相连,所述基本特征层的输出端与各个FFMv2特征融合模块的输入端、以及第一级改进的TUM细化U型模块的输入端分别相连,所述多级FFMv2特征融合模块与多级改进的TUM细化U型模块交替堆叠连接,最后一级的改进的TUM细化U型模块的输出端与改进的SFAM基于尺度的特征聚合模块的输入端相连,所述改进的SFAM基于尺度的特征聚合模块的输出端作为PA-MLFPN模型的输出端;所述对PA-MLFPN模型进行训练的步骤包括以下步骤101至步骤104:4. The multi-scale tiny defect detection method based on the PA-MLFPN workpiece surface according to claim 1, is characterized in that, in described step A, described PA-MLFPN model comprises FFMv1 feature fusion module, basic feature layer, multi-level FFMv2 feature fusion module, multi-level improved TUM refinement U-shaped module, and improved SFAM scale-based feature aggregation module, the FFMv1 feature fusion module is used as the input of the PA-MLFPN model, and the FFMv1 feature fusion module The output end is connected with the input end of the basic feature layer, and the output end of the basic feature layer is connected with the input end of each FFMv2 feature fusion module and the input end of the first-level improved TUM refinement U-shaped module, respectively. The multi-level FFMv2 feature fusion module and the multi-level improved TUM refinement U-shaped module are alternately stacked and connected, and the output of the last stage of the improved TUM refinement U-shaped module is connected to the input of the improved SFAM scale-based feature aggregation module. , the output of the improved SFAM scale-based feature aggregation module is used as the output of the PA-MLFPN model; the step of training the PA-MLFPN model includes the following steps 101 to 104: 步骤101:基于FFMv1特征融合模块,以conv4_3和conv5_3为输入,以多工件表面多尺度微小缺陷基本特征层为输出,随后进入步骤102;Step 101: Based on the FFMv1 feature fusion module, take conv4_3 and conv5_3 as input, and take the multi-scale micro-defect basic feature layer on the surface of multiple workpieces as the output, then enter step 102; 步骤102:以工件表面多尺度微小缺陷基本特征层为输入,输入至第一级TUM模型进行进一步特征提取,以不同层级输出的六个尺度的微小缺陷基本特征图为输出,随后进入步骤103;Step 102: take the multi-scale micro-defect basic feature layer on the workpiece surface as an input, input to the first-level TUM model and carry out further feature extraction, take the six-scale micro-defect basic feature maps of different levels of output as output, then enter step 103; 步骤103:以基本特征层和第一级TUM模型获得的六个尺度基本特征图中最大特征图为输入,输入至第一级FFMv2特征融合模块,得到第一级融合的特征图;然后以第一级融合的特征图和基本特征层图为输入,输入至第二级FFMv2模型,得到第二级融合特征图,以交替堆叠多级改进的TUM细化U型模型和FFMv2特征融合模块的方式以前一级融合特征图和基本特征层图为输入,以后一级融合特征图为输出,获得浅层特征金字塔特征图,中层特征金字塔特征图和深层特征金字塔特征图,随后进入步骤104;Step 103: the maximum feature map in the six-scale basic feature map obtained by the basic feature layer and the first-level TUM model is an input, input to the first-level FFMv2 feature fusion module, and obtain the first-level fusion feature map; The feature map and basic feature layer map of the first-level fusion are input to the second-level FFMv2 model, and the second-level fusion feature map is obtained, and the multi-level improved TUM refinement U-shaped model and the FFMv2 feature fusion module are stacked alternately. The former-level fusion feature map and the basic feature layer map are used as the input, and the latter-level fusion feature map is used as the output to obtain the shallow-level feature pyramid feature map, the middle-level feature pyramid feature map and the deep-level feature pyramid feature map, and then enter step 104; 步骤104:基于SFAM模块进行特征聚合,以浅层特征金字塔特征图、中层特征金字塔特征图、深层特征金字塔特征图中尺寸相同的金字塔特征层图为输入,以多层特征金字塔图为输出,之后对获得的多层特征金字塔使用ECA模块进行通道上权值的分配。Step 104: carry out feature aggregation based on the SFAM module, take the pyramid feature map with the same size in the shallow feature pyramid feature map, the middle feature pyramid feature map, and the deep feature pyramid feature map as the input, and take the multi-layer feature pyramid map as the output, then The ECA module is used to assign the weights on the channels to the obtained multi-layer feature pyramid. 5.根据权利要求3所述的基于PA-MLFPN工件表面多尺度微小缺陷检测方法,其特征在于,所述TUM细化U型模型在编码器部分采用dilated rate分别设置为(2,2,3,3,1)的步长为1的3×3空洞卷积来进行特征学习,并且采用步长为2的平均池化操作来进行下采样,并在原U型结构的基础上增加一条从浅层到深层的信息传输路径将浅层特征金字塔特征的细节位置信息插值到深层,即Ti经过卷积核尺寸为3×3,步长为2的卷积,特征图尺寸缩减为原来的一半即Conv(Ti),然后和Ci+1进行逐元素相加,得到的结果再经过一个卷积核尺寸为3×3,步长为1的卷积得到Ti+1,计算公式为。5. based on the PA-MLFPN workpiece surface multi-scale micro-defect detection method according to claim 3, it is characterized in that, described TUM refinement U-shaped model adopts dilated rate to be respectively set to (2,2,3 in encoder part) , 3, 1) with a stride of 1 for 3×3 atrous convolutions for feature learning, and an average pooling operation with a stride of 2 for downsampling, and on the basis of the original U-shaped structure, a shallow The layer-to-deep information transmission path interpolates the detailed position information of the shallow feature pyramid feature to the deep layer, that is, Ti undergoes convolution with a convolution kernel size of 3 × 3 and a stride of 2, and the feature map size is reduced to half of the original size. Conv(T i ), and then add C i+1 element by element, and the result obtained is obtained through a convolution with a convolution kernel size of 3×3 and a stride of 1 to obtain T i+1 , and the calculation formula is:
Figure FDA0003558061200000021
Figure FDA0003558061200000021
.
6.根据权利要求3所述的基于PA-MLFPN工件表面多尺度微小缺陷检测方法,其特征在于,基于SFAM对获得的多层特征金字塔图使用ECA模块进行通道上权值的分配,的具体步骤为:6. the multi-scale micro-defect detection method based on the PA-MLFPN workpiece surface according to claim 3, is characterized in that, the concrete steps of using ECA module to carry out the distribution of weights on the channel to the multi-layer feature pyramid diagram obtained based on SFAM, for: 步骤Ⅴ-1:对于SFAM模块初步聚合的多层特征金字塔图的特征层进行全局平均池化,获得C个通道的权重,随后进入步骤Ⅴ-2;Step Ⅴ-1: Perform global average pooling on the feature layers of the multi-layer feature pyramid graph initially aggregated by the SFAM module to obtain the weights of C channels, and then enter step Ⅴ-2; 步骤Ⅴ-2:通过内核大小为k的一维卷积来实现局部跨通道交互信息来获取C个通道的权重系数,其中内核大小k通过通道数C的函数自适应确定,计算公式为:Step Ⅴ-2: The weight coefficients of C channels are obtained by implementing local cross-channel mutual information through a one-dimensional convolution with a kernel size of k, where the kernel size k is adaptively determined by the function of the number of channels C, and the calculation formula is:
Figure FDA0003558061200000031
Figure FDA0003558061200000031
其中,|t|odd表示取最近的奇数,且b与γ分别取1和2,最后将C个通道的权重系数通过Sigmoid函数得到C个0到1之间的值,分别对应原始通道的权重C,并将其与多层特征金字塔图相乘来进行加权然后输出,得到多级特征金字塔特征图。Among them, |t| odd means to take the nearest odd number, and b and γ take 1 and 2 respectively. Finally, the weight coefficients of the C channels are passed through the Sigmoid function to obtain C values between 0 and 1, which correspond to the weights of the original channels respectively. C, and multiply it with the multi-level feature pyramid map for weighting and then output to obtain the multi-level feature pyramid feature map.
7.根据权利要求1所述的基于PA-MLFPN工件表面多尺度微小缺陷检测方法,其特征在于,步骤A中,还包括对获得的PA-MLFPN模型,进行微调训练,具体为:7. according to claim 1 based on the PA-MLFPN workpiece surface multi-scale tiny defect detection method, it is characterized in that, in step A, also comprise to the PA-MLFPN model that obtains, carry out fine-tuning training, be specially: 训练时采用Focal loss计算分类损失,采用Smooth L1计算回归损失,最终采用的损失函数是Focal loss与Smooth L1的结合:During training, Focal loss is used to calculate the classification loss, and Smooth L1 is used to calculate the regression loss. The final loss function used is the combination of Focal loss and Smooth L1: L=Lfl+LSL1 L=L fl +L SL1 所述分类损失Focal loss计算公式为:
Figure FDA0003558061200000032
The classification loss Focal loss calculation formula is:
Figure FDA0003558061200000032
其中y′是预测输出,y是真实样本的标签,α是正负样本权重、γ是易分类样本和难分类样本权重;所述回归损失Smooth L1计算公式如下:
Figure FDA0003558061200000033
其中x为预测框与真实框的差值。
Where y' is the predicted output, y is the label of the real sample, α is the weight of positive and negative samples, γ is the weight of easy-to-classify samples and hard-to-classify samples; the regression loss Smooth L1 is calculated as follows:
Figure FDA0003558061200000033
where x is the difference between the predicted box and the ground-truth box.
8.根据权利要求1所述的基于PA-MLFPN工件表面多尺度微小缺陷检测方法,其特征在于,针对实际样本验证获得满足预设条件的缺陷分类结果,具体为:8. The multi-scale tiny defect detection method based on PA-MLFPN workpiece surface according to claim 1, is characterized in that, obtains the defect classification result satisfying preset condition for actual sample verification, is specifically: 设定评价指标精确率P和召回率R用于进行模型评估,计算公式为:The evaluation index precision rate P and recall rate R are set for model evaluation, and the calculation formula is:
Figure FDA0003558061200000034
Figure FDA0003558061200000034
Figure FDA0003558061200000035
Figure FDA0003558061200000035
其中TP表示正确判断出缺陷区域的数量,TN表示正确判断出背景区域的数量,FP表示将正确背景区域误判为缺陷区域的数量分别,FN表示把缺陷误判为背景的数量;Among them, TP means the number of correctly judged defective areas, TN means the number of correctly judged background areas, FP means the number of correct background areas misjudged as defective areas, FN means the number of faults misjudged as background; 设置平均精度AP用于评价模型在测试集上对各类型缺陷的检测性能,PR曲线与横纵坐标轴围成的面积为该类缺陷的AP,计算公式如下:The average precision AP is set to evaluate the detection performance of the model for various types of defects on the test set. The area enclosed by the PR curve and the abscissa and ordinate axes is the AP of this type of defects. The calculation formula is as follows:
Figure FDA0003558061200000041
Figure FDA0003558061200000041
设置多类别缺陷的检测结果采用平均精度均值mAP,测试结果mAP计算公式如下:The detection results of multi-category defects are set to use the average precision value mAP, and the calculation formula of mAP of the test results is as follows:
Figure FDA0003558061200000042
Figure FDA0003558061200000042
.
9.根据权利要求1所述的基于PA-MLFPN工件表面多尺度微小缺陷检测方法,其特征在于,所述对微小缺陷图像所对应的预设缺陷分类进行验证中,设置循环迭代步数设置为100,首先batch size设置为32,学习率初始化为5e-4,当迭代步数达到50时,重新设置batch size为16,学习率为1e-4。9. The multi-scale micro-defect detection method based on the PA-MLFPN workpiece surface according to claim 1, characterized in that, in the verification of the preset defect classification corresponding to the micro-defect image, the set cycle iteration step number is set to 100. First, the batch size is set to 32, and the learning rate is initialized to 5e-4. When the number of iteration steps reaches 50, the batch size is reset to 16 and the learning rate is 1e-4. 10.根据权利要求1所述的基于PA-MLFPN工件表面多尺度微小缺陷检测方法,其特征在于,针对实际样本验证获得满足预设条件的缺陷分类结果,在训练时采用早停法,且每次迭代都计算验证损失,当验证损失值达到局部最优时,继续迭代6次,如果模型不再收敛就停止训练。10. The multi-scale micro-defect detection method based on the PA-MLFPN workpiece surface according to claim 1, characterized in that, for actual sample verification, a defect classification result that satisfies a preset condition is obtained, an early stop method is used during training, and each The validation loss is calculated for each iteration. When the validation loss value reaches the local optimum, the iteration is continued for 6 times. If the model no longer converges, the training is stopped.
CN202210285543.7A 2022-03-22 2022-03-22 Multi-scale micro-defect detection method on workpiece surface based on PA-MLFPN Active CN114638809B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210285543.7A CN114638809B (en) 2022-03-22 2022-03-22 Multi-scale micro-defect detection method on workpiece surface based on PA-MLFPN

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210285543.7A CN114638809B (en) 2022-03-22 2022-03-22 Multi-scale micro-defect detection method on workpiece surface based on PA-MLFPN

Publications (2)

Publication Number Publication Date
CN114638809A true CN114638809A (en) 2022-06-17
CN114638809B CN114638809B (en) 2024-10-15

Family

ID=81950699

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210285543.7A Active CN114638809B (en) 2022-03-22 2022-03-22 Multi-scale micro-defect detection method on workpiece surface based on PA-MLFPN

Country Status (1)

Country Link
CN (1) CN114638809B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115760990A (en) * 2023-01-10 2023-03-07 华南理工大学 A method for identifying and locating pineapple stamens, electronic equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111768398A (en) * 2020-07-06 2020-10-13 北京瑞莱智慧科技有限公司 Defect detection method and device for photovoltaic module, storage medium and computing equipment
CN113177547A (en) * 2021-05-08 2021-07-27 安徽理工大学 CW-m2det method and system suitable for target detection
CN113205502A (en) * 2021-05-10 2021-08-03 内蒙古大学 Insulator defect detection method and system based on deep learning
CN113221760A (en) * 2021-05-17 2021-08-06 安徽理工大学 Expressway motorcycle detection method
CN113628178A (en) * 2021-07-30 2021-11-09 安徽工业大学 Method for detecting surface defects of steel products with balanced speed and precision

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111768398A (en) * 2020-07-06 2020-10-13 北京瑞莱智慧科技有限公司 Defect detection method and device for photovoltaic module, storage medium and computing equipment
CN113177547A (en) * 2021-05-08 2021-07-27 安徽理工大学 CW-m2det method and system suitable for target detection
CN113205502A (en) * 2021-05-10 2021-08-03 内蒙古大学 Insulator defect detection method and system based on deep learning
CN113221760A (en) * 2021-05-17 2021-08-06 安徽理工大学 Expressway motorcycle detection method
CN113628178A (en) * 2021-07-30 2021-11-09 安徽工业大学 Method for detecting surface defects of steel products with balanced speed and precision

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
QIJIE ZHAO ER AL.: "M2Det: A Single-Shot Object Detector Based on Multi-Level Feature Pyramid Network", 《THE THIRTY-THIRD AAAI CONFERENCE ON ARTIFICIAL INTELLIGENCE (AAAI-19)》, 15 September 2019 (2019-09-15), pages 1 - 8 *
李林蔚: "基于深度学习的苹果缺陷检测技术研究", 《中国优秀硕士学位论文全文数据库 农业科技辑》, no. 06, 15 June 2021 (2021-06-15), pages 1 - 59 *
王陶然: "基于深度学习的轮毂缺陷检测研究", 《中国优秀硕士学位论文全文数据库 工程科技Ⅱ辑》, no. 09, 15 September 2021 (2021-09-15), pages 1 - 71 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115760990A (en) * 2023-01-10 2023-03-07 华南理工大学 A method for identifying and locating pineapple stamens, electronic equipment and storage medium
CN115760990B (en) * 2023-01-10 2023-04-21 华南理工大学 A method for identifying and locating pineapple stamens, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN114638809B (en) 2024-10-15

Similar Documents

Publication Publication Date Title
CN105046277B (en) Robust Mechanism Research Method of Feature Saliency in Image Quality Evaluation
CN111402268A (en) A method for segmentation of liver and its lesions in medical images
CN110570396A (en) A method of industrial product defect detection based on deep learning
CN111179229A (en) Industrial CT defect detection method based on deep learning
CN110263705A (en) Towards two phase of remote sensing technology field high-resolution remote sensing image change detecting method
CN106875373A (en) Mobile phone screen MURA defect inspection methods based on convolutional neural networks pruning algorithms
CN114372955A (en) Casting defect X-ray diagram automatic identification method based on improved neural network
CN116824239A (en) Image recognition method and system based on transfer learning and ResNet50 neural network
CN113239825B (en) High-precision tobacco beetle detection method in complex scene
CN111861906A (en) A virtual augmentation model for pavement crack images and a method for image augmentation
CN112132086B (en) Multi-scale martensite microstructure aging and damage grading method
CN112819063B (en) Image identification method based on improved Focal loss function
CN116883393B (en) Metal surface defect detection method based on anchor frame-free target detection algorithm
CN113850339A (en) A method and device for predicting roughness level based on multi-light source surface images
CN117523394A (en) SAR vessel detection method based on aggregation characteristic enhancement network
CN117011274A (en) Automatic glass bottle detection system and method thereof
CN109859199A (en) A kind of method of the fresh water pipless pearl quality testing of SD-OCT image
CN116129242A (en) Aluminum product surface defect identification method based on improved YOLOv4
CN114638809A (en) Multi-scale micro-defect detection method based on PA-MLFPN workpiece surface
CN112488220A (en) Small target detection method based on deep learning
CN119007018A (en) River channel target identification method and device based on improved YOLOv n model
CN117670844A (en) Steel surface defect detection method based on deep learning
CN114998304B (en) Self-piercing riveting forming quality testing method, device, electronic equipment and storage medium
CN117422691A (en) Concrete crack detection method and system combining linear guide and grid optimization
CN116681686A (en) A Method for Surface Defect Detection of Metal Sheet Based on Improved Faster R-CNN Algorithm

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