CN116258175A - Weld defect intelligent recognition model evolution method based on active learning - Google Patents

Weld defect intelligent recognition model evolution method based on active learning Download PDF

Info

Publication number
CN116258175A
CN116258175A CN202211731003.3A CN202211731003A CN116258175A CN 116258175 A CN116258175 A CN 116258175A CN 202211731003 A CN202211731003 A CN 202211731003A CN 116258175 A CN116258175 A CN 116258175A
Authority
CN
China
Prior art keywords
defect
model
sample
weld
samples
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.)
Pending
Application number
CN202211731003.3A
Other languages
Chinese (zh)
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.)
Shenyang Paidelin Technology Co ltd
Original Assignee
Shenyang Paidelin Technology Co ltd
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 Shenyang Paidelin Technology Co ltd filed Critical Shenyang Paidelin Technology Co ltd
Priority to CN202211731003.3A priority Critical patent/CN116258175A/en
Publication of CN116258175A publication Critical patent/CN116258175A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/764Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/77Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
    • G06V10/774Generating sets of training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/82Arrangements for image or video recognition or understanding using pattern recognition or machine learning using neural networks
    • 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)
  • Evolutionary Computation (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Artificial Intelligence (AREA)
  • Health & Medical Sciences (AREA)
  • Software Systems (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Databases & Information Systems (AREA)
  • Multimedia (AREA)
  • Medical Informatics (AREA)
  • Biophysics (AREA)
  • Mathematical Physics (AREA)
  • Data Mining & Analysis (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Computational Linguistics (AREA)
  • Molecular Biology (AREA)
  • General Engineering & Computer Science (AREA)
  • Biomedical Technology (AREA)
  • Quality & Reliability (AREA)
  • Image Analysis (AREA)

Abstract

The invention provides an intelligent weld defect recognition model evolution method based on active learning, and relates to the technical field of artificial intelligent active learning. Firstly, establishing an initial model, carrying out sample marking on a digitized weld negative image, and sending the digitized weld negative image into a target detection model for training iteration to obtain a primary detector; secondly, inputting the detected result into a value sample mining module, and actively screening out a defect sample which influences the detection rate of the model and is easy to produce false detection; thirdly, actively labeling the mined value samples, and establishing a value sample labeling database; and finally, retraining all data sets, and realizing the evolution upgrading of the model by fine tuning model parameters. The method solves the problem that the traditional fixed model has low unknown defect detection capability, and greatly improves the intelligent recognition capability of the long-distance pipeline radiographic image.

Description

Weld defect intelligent recognition model evolution method based on active learning
Technical Field
The invention relates to the technical field of artificial intelligence active learning, in particular to an evolution method of an intelligent weld defect recognition model based on active learning.
Background
The great development of oil gas pipeline construction brings challenges to the quality control of long-distance pipeline connection, the ray detection technology can intuitively display the shape, the size and the distribution of internal defects of a material structure, has unique advantages in the aspect of qualitative defect detection, and is a nondestructive detection technology widely applied to the industrial field. Pipeline digitization comprises informatization, networking, intellectualization and visualization of pipeline data, the application and development of the current artificial intelligence field in the industrial image field are in progress, the machine learning technology is utilized to promote the intellectualization and automation of long-distance pipeline defect identification, the construction of the digitized pipeline can be accelerated, and the safety and reliability of energy transportation engineering are effectively improved.
At present, a large number of intelligent defect identification methods and inventions in the weld quality evaluation process are proposed, and the new technologies greatly promote the intelligent process and improve the defect identification accuracy to a certain extent. However, given the wide variety of weld defects, the welding industry is complex, with current methods being based primarily on fixed deep learning models. The fixed defect intelligent model does not have the capability of evolution and performance improvement, so the intelligent level of unknown defect detection is weakened.
In order to improve the efficiency and accuracy of weld quality assessment, based on the above analysis and the limitations of the current technology, we propose an evolutionary weld defect detection model, so as to accelerate the process of realizing digitization and intellectualization of X-ray images.
Disclosure of Invention
Aiming at the defects of the prior art, the invention provides an intelligent weld defect recognition model evolution method based on active learning.
In order to solve the technical problems, the invention adopts the following technical scheme:
step 1: sending the weld joint radiographic image scanned by the digital negative film and the corresponding defect label into a detection network for training and optimizing to obtain an initial detection model;
step 1.1, marking a weld defect training set based on a digital image, giving pixel coordinates of defects according to a rectangular frame form, and forming the training set:
Figure SMS_1
wherein n represents the number of training set samples, for any given training set image
Figure SMS_2
The defect instance set in any image can be expressed as +.>
Figure SMS_3
Instance labels for each image are noted as
Figure SMS_4
Wherein k represents the number of defects in the image, and the superscript L represents the labeled data;
step 1.2 training set
Figure SMS_5
Data enhancement and augmentation are carried out;
the generalization capability of the model is improved by expanding training samples, the diversity and complexity of samples in unknown scenes are simulated, and the detection precision of the initial model is greatly improved. The image enhancement module adopts Gaussian noise, self-adaptive brightness adjustment, image translation, image folding, image scale scaling and multi-image stitching modes, and adopts the same operation on the instance labels, thereby greatly expanding the data set
Figure SMS_6
Wherein N is the number of defects in the weld image after the data set is expanded;
step 1.3, inputting the weld image into a full convolution detection network in batches, extracting characteristic representation and outputting predicted class probability
Figure SMS_7
Is +.>
Figure SMS_8
Step 1.4 loss L by optimization det Using SGD optimizer, the initial detection model is kept stable, loss L by evaluating constant loss fluctuations det The method comprises two parts, namely classification loss and regression loss, as shown in a formula (1):
Figure SMS_9
wherein BCE (·) is a binary classification cross entropy loss function, DIoU (·) is a bounding box regression loss function,
Figure SMS_10
represents x i Class probability of tag->
Figure SMS_11
Represents x i A frame of the label;
according to the loss value calculated by the formula (1), the optimizer SGD (·) optimizes the network global parameter Θ in the iterative process until the loss function is minimum, as shown in the formula (2):
Figure SMS_12
setting the upper limit e of the training wheel number, stopping the training process when the training wheel number reaches e, and obtaining a primary defect detection model with defect classification and positioning information of reasoning unknown images
Figure SMS_13
Step 2: detection results based on model reasoning, i.e. predicted class probabilities
Figure SMS_14
And target position->
Figure SMS_15
Designing a multi-value sample mining strategy; respectively considering the uncertainty rule based on information entropy to mine a high confidence coefficient to determine a defect sample and a low confidence coefficient to blur the sample, and considering the high similarity (smaller inter-class difference) among weld defects, designing a classification blur sample query rule based on the boundary uncertainty rule, and finally considering the frequency of defect occurrence based on a Bayesian strategy with new posterior statistics to mine the sample;
step 2.1, excavating a determination sample with higher confidence, and adopting a formula for sampling with high confidence for defect cracks, unfused defects and strip defects with larger harm in weld defect identification:
conf(cls i )>δ h (3)
wherein ,clsi Representing crack, bar and unfused defect bounding boxes, conf (·) is the confidence of the category, chosen greater than δ h As a value sample, delta h To set a threshold. By excavating a large number of determined samples, the automatic excavation of the high-credibility damage defect samples is realized, so that the automation level of labeling is improved;
step 2.2, mining information Entropy Samples with large feature judgment divergence, wherein the formula of information Entropy sampling (Entropy Samples) is as follows:
Figure SMS_16
wherein n is the defect class number, p i Is the i-th probability, and the products of all probabilities and logarithms thereof are summed to obtain the expected x of the uncertainty of the category e The information entropy considers the probability conditions of all the categories, and solves the problem that the confidence between the categories is not obvious;
step 2.3, for the problem of high similarity between classes of long-distance pipeline weld defects, boundary sampling considers two classes with similar prediction probabilities in a boundary box, and excavates such samples as follows:
conf(cls i )-conf(cls j )<δ l (5)
wherein ,clsi ,cls j Representing defects of the ith and jth classes, delta l The difference threshold is used for screening out defect types with higher category similarity.
In the process of excavating the value Samples in batches, counting the frequency of defect categories accounting for the total Samples, and calculating posterior probability under category frequency by taking the frequency of the defect categories as an influence factor of category confidence, wherein the formula of Bayes sampling (Bayes Samples) is as follows:
Figure SMS_17
Figure SMS_18
wherein conf (·) is the confidence, equation (4) represents the factor of influence of the category confidence, N is the defect category number, and N represents the total number of samples; in order to prevent the problem that the influence factors are unstable when the mining starts, c is set as a category base, the influence factors are smaller when the category occurrence number is larger, the Bayesian sampling focuses on small category samples with few category occurrence numbers, and the problem of unbalanced samples is solved.
Step 3, the unmarked weld joint image
Figure SMS_19
Feeding into an initial defect detection model->
Figure SMS_20
Classifying the pipeline weld defects and positioning the frame to obtain an unsupervised detection result; inputting the detected result into a value sample mining strategy module in the step 2, and actively screening out a defect sample which influences the detection rate of the model and is easy to be detected by mistake;
step 3.1, the height of the digital negative film is h, whether a single or a plurality of defect marking frames can be cut into h multiplied by h sub-images or not is judged, and the h multiplied by h sub-images are cut into a plurality of h multiplied by h resolution sub-images in a tail zero filling mode;
step 3.2 inputting the plurality of sub-images into the defect detection model
Figure SMS_21
Deducing the category information and the position information of the defects, inputting the category information and the position information into the four sampling strategies in the step 2, and summarizing to obtain valuable weld negative films, so as to realize active mining of samples.
Step 4, in the excavated value sample, sectionally cutting the defects on the digitized negative film of the long-distance pipeline, so that the target detection model can pertinently collect the characteristics of the defects; manually marking the cut long-distance pipeline small pieces by expert, correcting the false detection result, marking the undetected defects to form a value sample with real marking, and based on a defect detection model
Figure SMS_22
Performing fine tuning and retraining to obtain->
Figure SMS_23
Completing one-time evolution of the model;
step 4.1 the valuable weld negative obtained in step 3.2 was noted as
Figure SMS_24
Active labeling is manually carried out by a nondestructive testing expert, and a value sample labeling data set is obtained>
Figure SMS_25
Step 4.2, updating and fine-tuning the detection model; freezing model
Figure SMS_26
To accelerate convergence, i.e
Figure SMS_27
wherein ,
Figure SMS_28
wherein the weights for preparing the update are represented, Θ r Representing the weight of the freeze;
step 4.3 initial data set to be annotated
Figure SMS_29
And mining value sample data sets
Figure SMS_30
Figure SMS_31
Summarizing, then losing L through optimization det Using an SGD optimizer, preserving a stable initial detection model by evaluating constant loss fluctuations; loss L det The method comprises the following steps of respectively detecting loss of an initial data set and detecting loss of a mined sample data set, wherein the loss is shown in a formula (9):
Figure SMS_32
wherein ,
Figure SMS_33
for model evolution loss, ++>
Figure SMS_34
Loss terms for the initial dataset and the value sample, respectively; identification model->
Figure SMS_35
Is in the initial dataset +.>
Figure SMS_36
Obtained by training, thus->
Figure SMS_37
A great deal of knowledge of the original dataset is already available, but for mining the sample dataset
Figure SMS_38
The related knowledge is lacked more; to addThe learning of the strongly excavated sample increases the loss specific gravity of the excavated sample, namely lambda s The assigned weight will be greater than lambda l The method is larger, so that the network learns more knowledge from the mined samples, and the evolutionary upgrading of the model is realized; the optimizer SGD (& gt) optimizes the network global parameter theta in the iterative process until the loss function is minimum, and stops the training process when the training reaches the set round number e, so that an evolution model & gt with the defect classification and positioning information of reasoning unknown images can be obtained>
Figure SMS_39
The beneficial effects of adopting above-mentioned technical scheme to produce lie in: the invention provides an intelligent weld defect recognition model evolution method based on active learning, which can effectively mine potential and high-value samples, and fine-tune model parameters by using the high-value samples to realize model evolution, so that the intelligent defect recognition model has higher precision.
Drawings
FIG. 1 is a diagram of a general architecture of a method according to an embodiment of the present invention;
FIG. 2 is a diagram of a network architecture provided by an embodiment of the present invention;
fig. 3 is a value sample mining structure diagram provided in an embodiment of the present invention.
Detailed Description
The following describes in further detail the embodiments of the present invention with reference to the drawings and examples. The following examples are illustrative of the invention and are not intended to limit the scope of the invention.
The overall method of this embodiment is as shown in fig. 1, in which a YOLOv5 network is used as a baseline model, and an initial training set and a pre-training weight are input into the model to obtain a predicted set; the input is collected and filtered by a sampling strategy, high-value samples are screened out, then a training set updated by the high-value samples is obtained through inquiry and labeling of professionals in the field, a label-free sample pool and pre-training weights are updated, and the model is retrained and fine-tuned to obtain the evolved model. The partial network structure of YOLOv5 is shown in fig. 2. The specific implementation method is as follows:
step 1: sending the weld joint radiographic image scanned by the digital negative film and the corresponding defect label into a detection network for training and optimizing to obtain an initial detection model, wherein each operation of the model is performed in a PC environment shown in the table below;
Figure SMS_40
step 1.1, marking a weld defect training set based on a digital image, giving pixel coordinates of defects according to a rectangular frame form, and forming the training set:
Figure SMS_41
wherein n represents the number of training set samples, for any given training set image
Figure SMS_42
The defect instance set in any image can be expressed as +.>
Figure SMS_43
The example label of each image is denoted +.>
Figure SMS_44
Wherein k represents the number of defects in the image, and the superscript L represents the data with Label (Label);
step 1.2 training set
Figure SMS_45
Data enhancement and augmentation are carried out;
the generalization capability of the model is improved by expanding training samples, the diversity and complexity of samples in unknown scenes are simulated, and the detection precision of the initial model is greatly improved. The image enhancement module adopts the modes of Gaussian noise, self-adaptive brightness adjustment, image translation, image folding, image scale scaling, multi-image splicing and the like, and executes the same operation on the instance label, thereby greatly expanding the data set
Figure SMS_46
Wherein N is the number of defects in the weld image after the data set is expanded;
step 1.3, inputting the weld image into a full convolution detection network in batches, extracting characteristic representation and outputting predicted class probability
Figure SMS_47
Is +.>
Figure SMS_48
Step 1.4 loss L by optimization det Using SGD optimizer, the initial detection model is kept stable, loss L by evaluating constant loss fluctuations det The method comprises two parts, namely classification loss and regression loss, as shown in a formula (1):
Figure SMS_49
wherein BCE (·) is a binary classification cross entropy loss function, DIoU (·) is a bounding box regression loss function,
Figure SMS_50
represents x i Class probability of tag->
Figure SMS_51
Represents x i A frame of the label;
according to the loss value calculated by the formula (1), the optimizer SGD (·) optimizes the network global parameter Θ in the iterative process until the loss function is minimum, as shown in the formula (2):
Figure SMS_52
setting the upper limit e of the training wheel number, in this embodiment, taking e=150, so that the training process is stopped when the training wheel number reaches e, and defect classification and determination with unknown image reasoning can be obtainedPrimary defect detection model for bit information
Figure SMS_53
Step 2: detection results based on model reasoning, i.e. predicted class probabilities
Figure SMS_54
And target position->
Figure SMS_55
Designing a multi-value sample mining strategy, as shown in fig. 3; respectively considering the uncertainty rule based on information entropy to mine a high confidence coefficient to determine a defect sample and a low confidence coefficient to blur the sample, and considering the high similarity (smaller inter-class difference) among weld defects, designing a classification blur sample query rule based on the boundary uncertainty rule, and finally considering the frequency of defect occurrence based on a Bayesian strategy with new posterior statistics to mine the sample;
step 2.1, excavating a determination sample with higher confidence, and adopting a formula for sampling with high confidence for defect cracks, unfused defects and strip defects with larger harm in weld defect identification:
conf(cls i )>δ h (3)
wherein ,clsi Representing crack, bar and unfused defect bounding boxes, conf (·) is the confidence of the category, chosen greater than δ h As a value sample, delta h To set the threshold, the present embodiment takes δ h =0.9. By excavating a large number of determined samples, the automatic excavation of the high-credibility damage defect samples is realized, so that the automation level of labeling is improved;
step 2.2, mining information Entropy Samples with large feature judgment divergence, wherein the formula of information Entropy sampling (Entropy Samples) is as follows:
Figure SMS_56
wherein n is the defect class number, p i Probability of being the i-th class, forThe product of the probabilities and their logarithms is summed to obtain the class uncertainty expectation x e The information entropy considers the probability conditions of all the categories, and solves the problem that the confidence between the categories is not obvious;
step 2.3, for the problem of high similarity between classes of long-distance pipeline weld defects, boundary sampling considers two classes with similar prediction probabilities in a boundary box, and excavates such samples as follows:
conf(cls i )-conf(cls j )<δ l (5)
wherein ,clsi ,cls j Representing defects of the ith and jth classes, delta l Is the difference threshold, delta is taken in this embodiment l =0.1, for screening defect types with high category similarity.
In the process of excavating the value Samples in batches, counting the frequency of defect categories accounting for the total Samples, and calculating posterior probability under category frequency by taking the frequency of the defect categories as an influence factor of category confidence, wherein the formula of Bayes sampling (Bayes Samples) is as follows:
Figure SMS_57
Figure SMS_58
wherein conf (·) is the confidence, equation (4) represents the factor of influence of the category confidence, N is the defect category number, and N represents the total number of samples; in order to prevent the problem that the influence factors are unstable when the mining starts, c is set as a category base, the influence factors are smaller when the category occurrence number is larger, the Bayesian sampling focuses on small category samples with few category occurrence numbers, and the problem of unbalanced samples is solved.
Step 3, the unmarked weld joint image
Figure SMS_59
Feeding into an initial defect detection model->
Figure SMS_60
Classifying the pipeline weld defects and positioning the frame to obtain an unsupervised detection result; inputting the detected result into a value sample mining strategy module in the step 2, and actively screening out a defect sample which influences the detection rate of the model and is easy to be detected by mistake;
step 3.1, the height of the digital negative film is h, whether a single or a plurality of defect marking frames can be cut into h multiplied by h sub-images or not is judged, and the h multiplied by h sub-images are cut into a plurality of h multiplied by h resolution sub-images in a tail zero filling mode;
step 3.2 inputting the plurality of sub-images into the defect detection model
Figure SMS_61
Deducing the category information and the position information of the defects, inputting the category information and the position information into the four sampling strategies in the step 2, and summarizing to obtain valuable weld negative films, so as to realize active mining of samples.
Step 4, in the excavated value sample, sectionally cutting the defects on the digitized negative film of the long-distance pipeline, so that the target detection model can pertinently collect the characteristics of the defects; manually marking the cut long-distance pipeline small pieces by expert, correcting the false detection result, marking the undetected defects to form a value sample with real marking, and based on a defect detection model
Figure SMS_62
Performing fine tuning and retraining to obtain->
Figure SMS_63
Completing one-time evolution of the model;
step 4.1 the valuable weld negative obtained in step 3.2 was noted as
Figure SMS_64
Active labeling is manually carried out by a nondestructive testing expert, and a value sample labeling data set is obtained>
Figure SMS_65
Step 4.2 update and Fine tuning detectionA model; freezing model
Figure SMS_66
To accelerate convergence, i.e
Figure SMS_67
wherein ,
Figure SMS_68
wherein the weights for preparing the update are represented, Θ r Representing the weight of the freeze;
step 4.3 initial data set to be annotated
Figure SMS_69
And mining value sample data set->
Figure SMS_70
Figure SMS_71
Summarizing, then losing L through optimization det Using an SGD optimizer, preserving a stable initial detection model by evaluating constant loss fluctuations; loss L det The method comprises the following steps of respectively detecting loss of an initial data set and detecting loss of a mined sample data set, wherein the loss is shown in a formula (9):
Figure SMS_72
wherein ,
Figure SMS_74
for model evolution loss, ++>
Figure SMS_76
and
Figure SMS_78
Loss terms, lambda, for the initial dataset and the value sample, respectively l and λs Taking 0.5 and 1 respectively; due to the defectIdentification model->
Figure SMS_75
Is in the initial dataset +.>
Figure SMS_77
Obtained by training, thus->
Figure SMS_79
A large amount of knowledge of the initial dataset is already available, but +.>
Figure SMS_80
The related knowledge is lacked more; to enhance the learning of the excavated sample, the loss specific gravity of the excavated sample, i.e., lambda, is increased s The assigned weight will be greater than lambda l The method is larger, so that the network learns more knowledge from the mined samples, and the evolutionary upgrading of the model is realized; the optimizer SGD (& gt) optimizes the network global parameter theta in the iterative process until the loss function is minimum, and stops the training process when the training reaches the set round number 150, so that an evolution model & gt with the defect classification and positioning information of reasoning unknown images can be obtained>
Figure SMS_73
Comparing the model obtained by the invention with a DefectNet method and a TAS-Net on three indexes of precision, recall and average accuracy, wherein the precision represents the ratio of all the correct prediction results to the total prediction, the recall represents the ratio of all the correct prediction results to the total label, and the average accuracy is an consideration of the comprehensive precision and recall. The calculation results of the indexes are shown in the following table:
Figure SMS_81
finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and not for limiting the same; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some or all of the technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the corresponding technical solutions, which are defined by the scope of the appended claims.

Claims (8)

1. An intelligent weld defect recognition model evolution method based on active learning is characterized by comprising the following steps:
step 1, sending a weld joint ray image scanned by a digital negative film and a corresponding defect label into a detection network for training and optimizing to obtain an initial detection model;
step 1.1, marking a weld defect training set based on a digital image, giving pixel coordinates of defects according to a rectangular frame form, and forming the training set:
Figure FDA0004031544770000011
wherein n represents the number of training set samples, for any given training set image
Figure FDA0004031544770000012
The defect instance set in any image can be expressed as +.>
Figure FDA0004031544770000013
The example label of each image is denoted +.>
Figure FDA0004031544770000014
Wherein k represents the number of defects in the image, and the superscript L represents the labeled data;
step 1.2 training set
Figure FDA0004031544770000015
Data enhancement and augmentation are carried out;
by expanding training samplesThe generalization capability of the model is increased originally, the diversity and complexity of samples in unknown scenes are simulated, and the detection precision of the initial model is greatly improved; the image enhancement module adopts Gaussian noise, self-adaptive brightness adjustment, image translation, image folding, image scale scaling and multi-image stitching modes, and adopts the same operation on the instance labels, thereby greatly expanding the data set
Figure FDA0004031544770000016
Wherein N is the number of defects in the weld image after the data set is expanded;
step 1.3, inputting the weld image into a full convolution detection network in batches, extracting characteristic representation and outputting predicted class probability
Figure FDA0004031544770000017
Is +.>
Figure FDA0004031544770000018
Step 1.4 loss L by optimization det Using SGD optimizer, the initial detection model is kept stable, loss L by evaluating constant loss fluctuations det The method comprises two parts, namely classification loss and regression loss, as shown in a formula (1):
Figure FDA0004031544770000019
wherein BCE (·) is a binary classification cross entropy loss function, DIoU (·) is a bounding box regression loss function,
Figure FDA00040315447700000110
represents x i Class probability of tag->
Figure FDA00040315447700000111
Represents x i A frame of the label;
according to the loss value calculated by the formula (1), the optimizer SGD (·) optimizes the network global parameter Θ in the iterative process until the loss function is minimum, as shown in the formula (2):
Figure FDA00040315447700000112
setting the upper limit e of the training wheel number, stopping the training process when the training wheel number reaches e, and obtaining a primary defect detection model with defect classification and positioning information of reasoning unknown images
Figure FDA0004031544770000021
Step 2 detection results based on model reasoning, i.e. predicted class probabilities
Figure FDA0004031544770000022
And target position->
Figure FDA0004031544770000023
Designing a multi-value sample mining strategy; respectively considering the uncertainty rule mining high confidence coefficient determining defect samples and low confidence coefficient fuzzy samples based on information entropy, and considering the high similarity among weld defects, designing a classification fuzzy sample query rule based on the boundary uncertainty rule, and finally considering the frequency of defect occurrence based on a Bayesian strategy with new posterior statistics to carry out sample mining;
step 3, the unmarked weld joint image
Figure FDA0004031544770000024
Feeding into an initial defect detection model->
Figure FDA0004031544770000025
Classifying the pipeline weld defects and positioning the frame to obtain an unsupervised detection result; inputting the detected result into a value sample mining strategy module in the step 2A block for actively screening out defect samples which influence the detection rate of the model and are easy to be detected by mistake;
step 3.1, the height of the digital negative film is h, whether a single or a plurality of defect marking frames can be cut into h multiplied by h sub-images or not is judged, and the h multiplied by h sub-images are cut into a plurality of h multiplied by h resolution sub-images in a tail zero filling mode;
step 3.2 inputting the plurality of sub-images into the defect detection model
Figure FDA0004031544770000026
Deducing the category information and the position information of the defects, inputting the category information and the position information into the four sampling strategies in the step 2, and summarizing to obtain valuable weld negative films, so as to realize active mining of samples;
step 4, in the excavated value sample, sectionally cutting the defects on the digitized negative film of the long-distance pipeline, so that the target detection model can pertinently collect the characteristics of the defects; manually marking the cut long-distance pipeline small pieces by expert, correcting the false detection result, marking the undetected defects to form a value sample with real marking, and based on a defect detection model
Figure FDA0004031544770000027
Performing fine tuning and retraining to obtain->
Figure FDA0004031544770000028
And (5) completing one-time evolution of the model.
2. The method for intelligently identifying and evolving a model of a weld defect based on active learning according to claim 1, wherein the step 2 specifically comprises the following steps:
step 2.1, excavating a defect sample with larger hazard, and collecting the sample by adopting a high-certainty sampling method;
step 2.2, collecting a sample by adopting an information entropy sampling method for mining a defect sample with large model reasoning divergence;
step 2.3, excavating a defect sample with high similarity, and collecting the sample by adopting a boundary sampling method;
and 2.4, taking the probability that the number of the defect categories accounts for the total sample into consideration, and collecting the sample by adopting a Bayesian sampling method.
3. The method for intelligently identifying the weld defects and evolving the model based on the active learning according to claim 2, wherein the step 2.1 specifically comprises the following steps:
the method comprises the steps of excavating a determination sample with higher confidence, and adopting a formula with high-confidence sampling for defect cracks, unfused defects and strip defects with higher harm in weld defect identification:
conf(cls i )>δ h (3)
wherein ,clsi Representing crack, bar and unfused defect bounding boxes, conf (·) is the confidence of the category, chosen greater than δ h As a value sample, delta h Setting a threshold value; by excavating a large number of determined samples, the automatic excavation of the high-credibility damage defect samples is realized, so that the automation level of labeling is improved.
4. The method for intelligently identifying the weld defects and evolving the model based on the active learning according to claim 2, wherein the step 2.2 specifically comprises the following steps:
the information entropy sample with larger feature judgment divergence is mined, and the information entropy sampling formula is as follows:
Figure FDA0004031544770000031
wherein n is the defect class number, p i Is the i-th probability, and the products of all probabilities and logarithms thereof are summed to obtain the expected x of the uncertainty of the category e The information entropy considers the probability of all categories, and solves the problem that the confidence between the categories is not obvious.
5. The method for intelligently identifying the weld defects and evolving the model based on the active learning according to claim 2, wherein the step 2.3 specifically comprises the following steps:
for the problem of high similarity among the long-distance pipeline weld defects, boundary sampling considers two categories with similar prediction probabilities in a boundary box, and excavates the samples, as follows:
conf(cls i )-conf(cls j )<δ l (5)
wherein ,clsi ,cls j Representing defects of the ith and jth classes, delta l The difference threshold is used for screening out defect types with higher category similarity.
6. The method for intelligently identifying the weld defects and evolving the model based on the active learning according to claim 2, wherein the step 2.4 specifically comprises the following steps:
in the process of excavating value Samples in batches, counting the frequency of defect categories accounting for the total Samples, and calculating posterior probability under category frequency by taking the frequency of the defect categories as an influence factor of category confidence, wherein the formula of Bayes sampling (Bayes Samples) is as follows:
Figure FDA0004031544770000032
Figure FDA0004031544770000033
wherein conf (·) is the confidence, equation (4) represents the factor of influence of the category confidence, N is the defect category number, and N represents the total number of samples; in order to prevent the problem that the influence factors are unstable when the mining starts, c is set as a category base, the influence factors are smaller when the category occurrence number is larger, the Bayesian sampling focuses on small category samples with few category occurrence numbers, and the problem of unbalanced samples is solved.
7. The method for intelligently identifying and evolving a model of a weld defect based on active learning according to claim 1, wherein the step 4 specifically comprises the following steps:
step 4.1 the valuable weld negative obtained in step 3.2 was noted as
Figure FDA0004031544770000041
Active labeling is manually carried out by a nondestructive testing expert, and a value sample labeling data set is obtained>
Figure FDA0004031544770000042
Step 4.2, fine tuning and updating a detection model by using the acquired value sample data set;
step 4.3 initial data set to be annotated
Figure FDA0004031544770000043
And mining value sample data sets
Figure FDA0004031544770000044
Summarizing, then losing L through optimization det Using an SGD optimizer, preserving a stable initial detection model by evaluating constant loss fluctuations; loss L det The method comprises the following steps of respectively detecting loss of an initial data set and detecting loss of a mined sample data set, wherein the loss is shown in a formula (9):
Figure FDA0004031544770000045
wherein ,
Figure FDA0004031544770000046
for model evolution loss, ++>
Figure FDA0004031544770000047
and
Figure FDA0004031544770000048
Loss terms for the initial dataset and the value sample, respectively; identification model->
Figure FDA0004031544770000049
Is in the initial dataset +.>
Figure FDA00040315447700000410
Obtained by training, thus->
Figure FDA00040315447700000411
A large amount of knowledge of the initial dataset is already available, but +.>
Figure FDA00040315447700000412
Figure FDA00040315447700000413
The related knowledge is lacked more; to enhance the learning of the excavated sample, the loss specific gravity of the excavated sample, i.e., lambda, is increased s The assigned weight will be greater than lambda l The method is larger, so that the network learns more knowledge from the mined samples, and the evolutionary upgrading of the model is realized; the optimizer SGD (& gt) optimizes the network global parameter theta in the iterative process until the loss function is minimum, and stops the training process when the training reaches the set round number e, so that an evolution model & gt with the defect classification and positioning information of reasoning unknown images can be obtained>
Figure FDA00040315447700000414
8. The method for intelligently identifying the weld defects and evolving the model based on the active learning according to claim 7, wherein the step 4.2 specifically comprises the following steps:
updating and fine tuning the detection model; freezing model
Figure FDA00040315447700000415
To accelerate convergence, i.e
Figure FDA00040315447700000416
wherein ,
Figure FDA00040315447700000417
wherein the weights for preparing the update are represented, Θ r Indicating the weight of the freeze. />
CN202211731003.3A 2022-12-30 2022-12-30 Weld defect intelligent recognition model evolution method based on active learning Pending CN116258175A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211731003.3A CN116258175A (en) 2022-12-30 2022-12-30 Weld defect intelligent recognition model evolution method based on active learning

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211731003.3A CN116258175A (en) 2022-12-30 2022-12-30 Weld defect intelligent recognition model evolution method based on active learning

Publications (1)

Publication Number Publication Date
CN116258175A true CN116258175A (en) 2023-06-13

Family

ID=86678545

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211731003.3A Pending CN116258175A (en) 2022-12-30 2022-12-30 Weld defect intelligent recognition model evolution method based on active learning

Country Status (1)

Country Link
CN (1) CN116258175A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116551263A (en) * 2023-07-11 2023-08-08 苏州松德激光科技有限公司 Visual control method and system for welding position selection
CN116612120A (en) * 2023-07-20 2023-08-18 山东高速工程检测有限公司 Two-stage road defect detection method for data unbalance
CN117789184A (en) * 2024-02-26 2024-03-29 沈阳派得林科技有限责任公司 Unified weld joint ray image intelligent identification method

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116551263A (en) * 2023-07-11 2023-08-08 苏州松德激光科技有限公司 Visual control method and system for welding position selection
CN116551263B (en) * 2023-07-11 2023-10-31 苏州松德激光科技有限公司 Visual control method and system for welding position selection
CN116612120A (en) * 2023-07-20 2023-08-18 山东高速工程检测有限公司 Two-stage road defect detection method for data unbalance
CN116612120B (en) * 2023-07-20 2023-10-10 山东高速工程检测有限公司 Two-stage road defect detection method for data unbalance
CN117789184A (en) * 2024-02-26 2024-03-29 沈阳派得林科技有限责任公司 Unified weld joint ray image intelligent identification method
CN117789184B (en) * 2024-02-26 2024-05-17 沈阳派得林科技有限责任公司 Unified weld joint ray image intelligent identification method

Similar Documents

Publication Publication Date Title
CN116258175A (en) Weld defect intelligent recognition model evolution method based on active learning
CN110569901B (en) Channel selection-based countermeasure elimination weak supervision target detection method
US10417524B2 (en) Deep active learning method for civil infrastructure defect detection
CN113160192A (en) Visual sense-based snow pressing vehicle appearance defect detection method and device under complex background
US12007335B2 (en) Automatic optimization of an examination recipe
CN114022904B (en) Noise robust pedestrian re-identification method based on two stages
CN111949535B (en) Software defect prediction device and method based on open source community knowledge
CN116612120A (en) Two-stage road defect detection method for data unbalance
US11151710B1 (en) Automatic selection of algorithmic modules for examination of a specimen
CN111783616B (en) Nondestructive testing method based on data-driven self-learning
CN117152119A (en) Profile flaw visual detection method based on image processing
CN113553762A (en) Neural network for analyzing welding spots based on welding curve and establishing method
CN115629127A (en) Container defect analysis method, device and equipment and readable storage medium
CN118279665A (en) Casting defect detection system based on YOLO network
CN116258978A (en) Target detection method for weak annotation of remote sensing image in natural protection area
CN111429431A (en) Element positioning and identifying method based on convolutional neural network
CN113283467A (en) Weak supervision picture classification method based on average loss and category-by-category selection
CN114078106B (en) Defect detection method based on improved Faster R-CNN
CN116719241A (en) Automatic control method for informationized intelligent gate based on 3D visualization technology
CN113808079B (en) Industrial product surface defect self-adaptive detection method based on deep learning model AGLNet
CN115620083A (en) Model training method, face image quality evaluation method, device and medium
US20230084761A1 (en) Automated identification of training data candidates for perception systems
CN111091150A (en) Railway wagon cross rod cover plate fracture detection method
Lemghari et al. Handling noisy annotations in deep supervised learning
CN114021663B (en) Industrial process off-line data segmentation method based on sequence local discrimination information mining network

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