An active learning-based weld defect intelligent identification model evolution method
By employing active learning methods and utilizing data augmentation and multi-value sample mining strategies to optimize the weld defect detection model, the problem of insufficient evolutionary capability of fixed deep learning models in weld defect detection is solved, thereby achieving model evolution and accuracy improvement.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHENYANG PEDLIN TECH CO LTD
- Filing Date
- 2022-12-30
- Publication Date
- 2026-04-10
AI Technical Summary
Existing fixed deep learning models lack the ability to evolve and improve performance in weld defect detection, resulting in insufficient intelligent detection of unknown defects.
An active learning-based approach is adopted to gradually optimize the weld defect detection model through data augmentation, multi-value sample mining strategies, and model fine-tuning. This includes data augmentation, information entropy, and Bayesian strategies to mine high-value samples, followed by model retraining and fine-tuning.
It improves the accuracy and intelligence level of weld defect detection, effectively identifies high-value samples, and enables model evolution and performance enhancement.
Smart Images

Figure CN116258175B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of artificial intelligence active learning, and in particular to a welding seam defect intelligent identification model evolution method based on active learning. BACKGROUND
[0002] The vigorous development of oil and gas pipeline construction has brought challenges to the quality control of long-distance pipeline connection. The ray detection technology can intuitively display the shape, size and distribution of internal defects of material structure, has unique advantages in defect qualitative detection, and is a widely used non-destructive testing technology in the industrial field. Pipeline digitization includes informatization, networking, intelligentization and visualization of pipeline data. At present, the application and development of artificial intelligence in the field of industrial images are flourishing. By using machine learning technology, the intelligentization and automation of long-distance pipeline defect identification can be improved, which can accelerate the construction of digital pipelines and effectively improve the safety and reliability of energy transportation engineering.
[0003] At present, a large number of methods and inventions related to intelligent identification of defects in the welding seam quality evaluation process have been proposed. These new technologies greatly promote the intelligentization process and improve the defect identification accuracy to some extent. However, considering the variety of welding seam defects and the complexity of the welding industry, the current methods are mainly based on fixed deep learning models. Such fixed defect intelligent models do not have the ability to evolve and improve performance, so the intelligent level of unknown defect detection is weakened.
[0004] In order to improve the efficiency and accuracy of welding seam quality evaluation, based on the above analysis and the limitations of current technology, an evolvable welding seam defect detection model is proposed to accelerate the digitalization and intelligentization process of X-ray images. SUMMARY
[0005] The technical problem to be solved by the present application is to provide an active learning-based welding seam defect intelligent identification model evolution method to solve the above technical problems of the prior art.
[0006] To solve the above technical problems, the technical solution adopted by the present application is:
[0007] Step 1: input the welding seam ray image scanned by the digital negative and its corresponding defect label into the detection network for training and optimization to obtain an initial detection model;
[0008] Step 1.1: label the welding seam defect training set based on the digital image, give the pixel coordinates of the defect in the form of a rectangular frame, and form a training set:
[0009]
[0010] Wherein, n represents the number of training set samples, for any given image in the training set The defect instance set in any image can be represented as The instance label of each image is marked as Wherein, k represents the number of defects in the image, and the superscript L represents the labeled data.
[0011] Step 1.2 Data augmentation and expansion are performed on the training set
[0012] By expanding the training samples, the generalization ability of the model is increased, and the diversity and complexity of the samples in unknown scenes are simulated, thereby greatly improving the detection accuracy of the initial model. The image enhancement module adopts the methods of Gaussian noise, adaptive brightness adjustment, image translation, image folding, image scale, and multiple image splicing, and the same operation is performed on the instance label, thereby greatly expanding the data set Wherein, N represents the number of defects in the expanded data set.
[0013] Step 1.3 The weld images are input into the fully convolutional detection network in batches, the feature representation is extracted, and the predicted class probability is output And the target position
[0014] Step 1.4 Through the optimization of loss L det , using the SGD optimizer, by evaluating the constant loss fluctuation, saving the stable initial detection model, loss L det Includes two parts, which are classification loss and regression loss, as shown in formula (1):
[0015]
[0016] Wherein, BCE(·) is the binary classification cross-entropy loss function, DIoU(·) is the bounding box regression loss function, Represent the class probability of x i Label, Represent the bounding box of x i Label;
[0017] The loss value calculated according to formula (1) is optimized by the optimizer SGD(·) in the iteration process, until the loss function is minimized, as shown in formula (2):
[0018]
[0019] Set the upper limit e of the number of training rounds, so that the training process stops when the number of training rounds reaches e, and the primary defect detection model with defect classification and positioning information of unknown images can be obtained
[0020] Step 2: Inference based on model detection results, i.e. predicted class probability and target position Design multiple value sample mining strategies; consider mining high confidence and low confidence fuzzy samples based on information entropy uncertain rules, in addition to considering the high similarity between weld defects (small inter-class difference), design classification fuzzy sample query rules based on boundary uncertainty rules, and finally consider new Bayesian strategies based on posterior statistics to mine defect frequency samples;
[0021] Step 2.1 Mine samples with high confidence. For weld defect recognition, defects such as cracks, incomplete fusion defects, and strip defects that are more harmful, use the high confidence sampling formula:
[0022] conf(cls i )>δ h (3)
[0023] Where cls i represents the boundary box of crack, strip and incomplete fusion defects, conf(·) is the confidence of the class, and defects with a confidence greater than δ h are selected as value samples, and δ h is a set threshold. By mining a large number of certain samples, automatic mining of high-confidence hazardous defect samples is achieved, thereby improving the automation level of labeling;
[0024] Step 2.2 Mine information entropy samples with large feature determination differences. The formula for entropy sampling is:
[0025]
[0026] Where n is the number of defect classes, p i is the probability of the i-th class, and the sum of all probabilities and their logarithms is taken to obtain the class uncertainty expectation x e . Information entropy considers the probability of all classes, solving the problem of unclear confidence between classes;
[0027] Step 2.3 For long pipeline weld defects, there is a high inter-class similarity problem. Boundary sampling will consider two classes with similar prediction probabilities in the boundary box, and mine such samples, as follows:
[0028] conf(cls i )-conf(cls j )<δ l (5)
[0029] Where clsi , cls j represents the i-th and j-th defects, δ l is the difference threshold, used to filter out defect categories with high category similarity.
[0030] Step 2.4 In the process of batch mining valuable samples, the frequency of defect categories in the total sample is counted as an influencing factor of the confidence of the category. The posterior probability under the category frequency is calculated. The formula of Bayes Samples is:
[0031]
[0032]
[0033] Where conf(·) is the confidence, formula (4) represents the influencing factor of the confidence of the category, n is the number of defect categories, and N represents the total number of samples. To prevent the problem of unstable influencing factors at the beginning of mining, set c as the category base. The larger the number of category occurrences, the smaller the influencing factor. Bayes Samples focuses on small category samples with few occurrences, solving the problem of sample imbalance.
[0034] Step 3 The unmarked weld image is sent to the initial defect detection model for pipeline weld defect classification and bounding box positioning to obtain unsupervised detection results. The detected results are input to the valuable sample mining strategy module in step 2 to actively select defect samples that affect the model detection rate and are prone to false detection.
[0035] Step 3.1 The digital negative has a height of h. It is determined whether a single or multiple defect marker boxes can be cut into h×h sub-images. By means of tail zero padding, multiple h×h resolution sub-images are cut.
[0036] Step 3.2 Multiple sub-images are input to the defect detection model to infer the category information and location information of the defects, and are input to the four sampling strategies in step 2 above and are summarized to obtain valuable weld negatives, realizing active mining of samples.
[0037] Step 4 In the mined valuable samples, the defects on the long pipeline digital negative are segmented and cut, so that the target detection model can collect features of the defects in a targeted manner. The cut long pipeline small pieces are manually labeled by experts to correct false detection results and mark undetected defects, forming valuable samples with real labels. Based on the defect detection model , fine-tuning and retraining are performed to obtain , completing the evolution of the model once.
[0038] Step 4.1 Record the valuable weld film obtained in Step 3.2 as... A valuable sample annotation dataset is obtained through manual annotation by nondestructive testing experts.
[0039] Step 4.2 Update and fine-tune the detection model; freeze the model. The weights of the first three layers of the network are used to accelerate convergence, i.e.
[0040]
[0041] in, Where Θ represents the weight to be updated. r Indicates the weight of the freeze;
[0042] Step 4.3 Label the initial dataset With mining valuable sample datasets The results are summarized, and then the loss L is optimized. det Using the SGD optimizer, a stable initial detection model is preserved by evaluating constant loss fluctuations; loss L det It consists of two parts: the detection loss of the initial dataset and the detection loss of the mined sample dataset, as shown in Equation (9):
[0043]
[0044] in, For model evolution loss, These are the loss terms for the initial dataset and the valuable samples, respectively; due to the defect identification model... The initial weights are in the initial dataset. Therefore, it was obtained through training. We already possess a large amount of initial dataset knowledge, but for mining sample datasets... Furthermore, there is a greater lack of relevant knowledge; in order to enhance the learning from the mined samples, the proportion of loss in the mined samples should be increased, i.e., λ. s The assigned weights will be greater than λ. l Larger sizes allow the network to learn more knowledge from mined samples, thus enabling model evolution and upgrades. The optimizer SGD(·) optimizes the network's global parameters Θ during iteration until the loss function is minimized. Training stops when the set number of epochs e is reached, resulting in an evolutionary model capable of inferring defect classification and localization information from unknown images.
[0045] The beneficial effects generated by the technical scheme are that the welding defect intelligent identification model evolution method based on active learning is provided, the method can effectively mine potential and high-value samples, and fine-tune model parameters by using the high-value samples, realize evolution of the model, and make the defect intelligent identification model have higher precision. BRIEF DESCRIPTION OF DRAWINGS
[0046] Figure 1 A method overall architecture diagram is provided for the embodiment of the application.
[0047] Figure 2 A network structure diagram is provided for the embodiment of the application.
[0048] Figure 3 A value sample mining structure diagram is provided for the embodiment of the application. DETAILED DESCRIPTION
[0049] The specific implementation of the application will be further described in detail below in combination with the drawings and embodiments. The following embodiments are used to illustrate the application, but not to limit the scope of the application.
[0050] The overall method of the embodiment is shown in Figure 1 YOLOv5 network is taken as a baseline model, the initial training set and pre-training weight are input into the model to obtain a predicted set, the set is input into a sampling strategy filter to screen out high-value samples, the high-value samples are queried and labeled by a person skilled in the art to obtain a high-value sample updated training set, the unmarked sample pool and the pre-training weight are updated, the model is retrained and fine-tuned to obtain an evolved model. Part of the network structure of YOLOv5 is shown in Figure 2 The specific implementation method is as follows:
[0051] Step 1: the welding radiographic image scanned by the digitized negative and the corresponding defect label are input into a detection network for training and optimization to obtain an initial detection model, and each operation of the model is performed in a PC environment shown in the following table;
[0052]
[0053] Step 1.1: based on the digital image, the welding defect training set is labeled, the pixel coordinates of the defect are given in the form of a rectangular frame, and the training set is formed:
[0054]
[0055] Wherein, n represents the number of training set samples, for any given image in the training set The defect instance set in any image can be expressed as The instance label of each image is marked as Wherein k represents the number of defects in the image, and the superscript L represents the labeled data;
[0056] Step 1.2 of the training set Data augmentation and expansion are performed;
[0057] By expanding the training samples, the generalization ability of the model is increased, and the diversity and complexity of the samples in the unknown scene are simulated, thereby greatly improving the detection accuracy of the initial model. The image enhancement module uses Gaussian noise, adaptive brightness adjustment, image translation, image folding, image scale, multiple image splicing, and performs the same operation on the instance label, thereby greatly expanding the data set Wherein N represents the number of defects in the weld image after expanding the data set;
[0058] Step 1.3: The weld image is input into the fully convolutional detection network in batches, the feature representation is extracted, and the predicted class probability is output And the target position
[0059] Step 1.4: By optimizing the loss L det , using the SGD optimizer, by evaluating the constant loss fluctuation, saving the stable initial detection model, the loss L det Includes two parts, which are classification loss and regression loss, as shown in formula (1):
[0060]
[0061] Wherein, BCE(·) is the binary classification cross-entropy loss function, DIoU(·) is the boundary box regression loss function, Represents the class probability of the label x i , Represents the bounding box of the label x i ;
[0062] According to the loss value calculated by formula (1), the optimizer SGD(·) will optimize the network global parameters Θ in the iteration process until the loss function is minimized, as shown in formula (2):
[0063]
[0064] Set the upper limit e of the training rounds, e=150 in this embodiment, so that the training process is stopped when the training rounds reach e, and the primary defect detection model with defect classification and positioning information of unknown images can be obtained
[0065] Step 2: The detection result based on model reasoning, i.e. the predicted class probability And the target position Design multiple value sample mining strategies, such as Figure 3 As shown in the figure; considering the high similarity between the weld defects (small inter-class difference), designing the classification fuzzy sample query rule based on the boundary uncertain rule, and finally considering the new Bayesian strategy based on the posterior statistics to mine the sample frequency of defect occurrence;
[0066] Step 2.1 Mine samples with high confidence. For weld defect identification, defects such as cracks, incomplete fusion defects, and strip defects that are more harmful, use the high confidence sampling formula:
[0067] conf(cls i )>δ h (3)
[0068] Where cls i represents the boundary box of crack, strip and incomplete fusion defects, and conf(·) is the confidence of the class. Select defects greater than δ h as value samples, and δ h is the set threshold. In this embodiment, δ h = 0.9. By mining a large number of certain samples, automatic mining of high-confidence harmful defect samples is achieved, thereby improving the automation level of labeling;
[0069] Step 2.2 Mine information entropy samples with large feature judgment divergence. The formula for entropy sampling is:
[0070]
[0071] Where n is the number of defect classes, p i is the probability of the i-th class, and the sum of all probabilities and their logarithms is obtained. x e is the expected class uncertainty. Information entropy considers the probability of all classes, solving the problem of unclear confidence between classes;
[0072] Step 2.3 For long pipeline weld defects, there is a high inter-class similarity problem. Boundary sampling will consider two classes with similar prediction probabilities in the boundary box, and mine such samples, as shown below:
[0073] conf(cls i )-conf(cls j )<δ l (5)
[0074] Where cls i , cls jrepresents the i-th and j-th defects, δ l is a difference threshold, in this embodiment, δ l = 0.1 is used to screen out defect categories with high category similarity.
[0075] Step 2.4 In the process of batch mining valuable samples, the frequency of defect categories in the total samples is counted as an influencing factor of the confidence of the category, the posterior probability under the category frequency is calculated, and the formula of Bayes Samples is as follows:
[0076]
[0077]
[0078] Wherein, conf(·) is the confidence, formula (4) represents the influencing factor of the confidence of the category, n is the number of defect categories, and N represents the total number of samples; in order to prevent the problem of unstable influencing factor at the beginning of mining, c is set as the category base, the influencing factor is smaller when the category appears more frequently, Bayes Samples focuses on the small category samples with less frequency, and solves the problem of sample imbalance.
[0079] Step 3 sends the unmarked weld image into the initial defect detection model for classification and frame positioning of the pipeline weld defects, and obtains the unsupervised detection result; the detected result is input into the valuable sample mining strategy module in step 2, and the defect samples affecting the model detection rate and easy to be misdetected are actively screened out;
[0080] Step 3.1 The digital negative has a height of h, it is judged whether a single or multiple defect marking frames can be cut into h×h subimages, and the tail zero is filled to cut into multiple h×h resolution subimages;
[0081] Step 3.2 The multiple subimages are input into the defect detection model to infer the category information and position information of the defects, and are input into the four sampling strategies in the above step 2 and are summarized to obtain valuable weld negatives, so as to realize the active mining of samples.
[0082] Step 4 In the mined valuable samples, the defects on the long-distance pipeline digital negative are segmented and cut, so that the target detection model can collect features of the defects in a targeted manner; the cut long-distance pipeline small pieces are manually labeled by experts, the wrong detection results are corrected, the undetected defects are marked, the valuable samples with real labels are formed, and the defect detection model is fine-tuned and retrained to obtain the evolution of the model is completed;
[0083] Step 4.1 The valuable weld bottom piece obtained in step 3.2 is recorded as The value sample annotation dataset is obtained by manual active annotation by nondestructive testing experts
[0084] Step 4.2 Update and fine-tune the detection model; freeze the model Part of the first three layers of the network weights to accelerate convergence, that is,
[0085]
[0086] wherein, wherein represents the weight to be updated, Θ r represents the frozen weight;
[0087] Step 4.3 The annotated initial dataset is combined with the value sample dataset is summarized, and then the stable initial detection model is saved by evaluating the constant loss fluctuation through the optimization loss L det using the SGD optimizer; the loss L det includes two parts, which are the initial dataset detection loss and the value sample dataset detection loss, as shown in formula (9):
[0088]
[0089] wherein, is the model evolution loss, and are the loss terms of the initial dataset and the value sample, respectively, λ l and λ s are 0.5 and 1, respectively; since the initial weights of the defect recognition model are obtained by training on the initial dataset , the initial dataset has a large amount of knowledge, but the value sample dataset is more lacking in relevant knowledge; in order to strengthen the learning of the value sample, the proportion of the value sample loss should be increased, that is, λ s will be allocated a larger weight than λ l , so that the network learns more knowledge from the value sample, thereby realizing the evolution and upgrading of the model; the optimizer SGD(·) will optimize the network global parameters Θ in the iteration process until the loss function is minimized, and the training process is stopped when the training reaches the set number of rounds 150, and the evolution model with the defect classification and positioning information of unknown images can be obtained
[0090] The model obtained by the application is compared with the DefectNet method and the TAS-Net in terms of precision, recall and average accuracy. The precision represents the ratio of all predicted correct results to the total number of predictions, the recall represents the ratio of all predicted correct results to the total number of labels, and the average accuracy is a comprehensive consideration of the precision and the recall. The calculation results of the indexes are shown in the following table.
[0091]
[0092] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, but not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: it can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement for part or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope defined by the claims of the present application.
Claims
1. An active learning-based weld defect intelligent identification model evolution method, characterized in that, The method comprises the following steps: Step 1: the weld radiographic image scanned by the digitized negative and its corresponding defect label are sent to a detection network for training and optimization to obtain an initial detection model; Step 1.1: based on the digitized image, a weld defect training set is labeled, pixel coordinates of the defect are given in the form of a rectangular frame, and the training set is formed: ; Wherein n represents the number of training set samples, for any given image in the training set The defect instance set in any image can be expressed as The instance label of each image is marked as Wherein is expressed as the number of defects in the image, and the superscript indicates labeled data; Step 1.2 Data augmentation and augmentation on training set Data augmentation and augmentation The generalization ability of the model is increased by expanding the training sample, and the diversity and complexity of the sample in the unknown scene are simulated, so that the detection precision of the initial model is greatly improved; the image enhancement module adopts the modes of Gaussian noise, adaptive brightness adjustment, image translation, image folding, image scale, and multiple image splicing, and the same operation is performed on the instance label, so that the data set is greatly expanded wherein represents the number of defects in the weld image after the expanded data set Step 1.3 Input the weld images into the fully convolutional detection network in batches, extract the feature representation and output the predicted class probability to the target position ; Step 1.
4. Save the stable initial detection model by evaluating the constant loss fluctuation using the SGD optimizer, loss The loss function includes two parts, which are the classification loss and the regression loss, as shown in equation (1): ; wherein, is a binary cross-entropy loss function, is a bounding box regression loss function, represents a class probability of a label, represents a bounding box of a label; The optimizer calculates the loss value according to formula (1). During the iteration process, the global parameters of the network will be adjusted. Optimize until the loss function is minimized, as shown in Equation (2): ; Setting an upper limit on the number of training rounds , so that the training process stops when the number of training rounds reaches , a preliminary defect detection model with defect classification and positioning information for reasoning unknown images can be obtained ; Step 2 Model-based inference of detection results, i.e. predicted class probabilities and target position , design multiple value sample mining strategy; consider high confidence and low confidence fuzzy samples based on information entropy uncertain rule mining respectively, in addition to the high similarity between the weld defects, design classification fuzzy sample query rule based on boundary uncertain rule, finally consider the new Bayesian strategy based on posterior statistics to mine the frequency of defect samples; Step 3: Image of the unmarked weld seam It is fed into the initial defect detection model. In the process, pipe weld defects are classified and their boundaries are located to obtain unsupervised detection results; the detected results are input into the value sample mining strategy module in step 2 to actively filter out defect samples that affect the model's detection rate and are prone to false detection. Step 3.1 Digitize the film height , determine whether a single or multiple defect marker frame can be cut into sub-images, cut into multiple resolution sub-images by tail zero padding Step 3.2 inputting the plurality of sub-images to a defect detection model , infer the category information and location information of the defects, and input to the four sampling strategies in the above step 2 and aggregate to obtain valuable weld negatives, and realize active mining of samples; Step 4: In the excavated value sample, the defects on the long-distance pipeline digital negative are segmented and cropped, so that the target detection model can collect features of the defects; the cropped long-distance pipeline small pieces are manually labeled by experts, the wrong detection results are corrected, the undetected defects are marked, and the value sample with real labels is formed; and the defect detection model is trained based on the value sample Step 2: The model is fine-tuned and retrained to obtain , and the evolution of the model is completed; and the step 2 specifically comprises the following steps: Step 2.1: for mining defect samples with greater harmfulness, a high-confidence sampling method is used to collect samples; Step 2.2: for mining defect samples with greater model reasoning divergence, an information entropy sampling method is used to collect samples; Step 2.3: for mining defect samples with high similarity, a boundary sampling method is used to collect samples; Step 2.4: considering the probability of the number of defect categories in the total samples, a Bayes sampling method is used to collect samples; the step 2.1 specifically comprises the following contents: Mining high-confidence determination samples, for weld defect recognition, defects with greater harmfulness such as cracks, incomplete fusion defects and strip defects, a high-confidence sampling formula is used: (3); wherein, represents a crack, a strip and an un-fused defect bounding box, is the confidence of the category, and defects with a value greater than are selected as valuable samples, is a set threshold; by mining a large number of determined samples, automatic mining of high-confidence hazard defect samples is realized, thereby improving the automation level of labeling; the step 2.2 specifically includes the following content: Mining information entropy samples with greater feature judgment divergence, an information entropy sampling formula is: (4); Wherein, n is the number of defect categories, is the probability of the first category, and the sum of the product of all probabilities and their logarithms is the category uncertainty expectation . The information entropy considers the probability of all categories and solves the problem of unclear confidence between categories. Step 2.3 specifically includes the following content: For the problem of high inter-class similarity of long-distance pipeline weld defects, boundary sampling will consider two classes with similar prediction probabilities in the boundary frame, and mine such samples, as follows: (5); wherein, , representing the class and the class defects, is a difference threshold value for screening out defect categories with high category similarity; the step 2.4 specifically includes the following content: In the process of batch mining valuable samples, the frequency of defect categories in the total samples is counted as the confidence factor of the category, the posterior probability under the category frequency is calculated, and the formula of Bayes sampling is: (6); (7); wherein, is the confidence, formula (4) represents the influence factor of the category confidence, is the number of defect categories, represents the total number of samples; in order to prevent the problem of unstable influence factor at the beginning of mining, c is set as the category base, the greater the number of category occurrences, the smaller the influence factor, and the Bayesian sampling focuses on the small category samples with few category occurrences, thereby solving the problem of sample imbalance.
2. The method of claim 1, wherein the method further comprises: The step 4 specifically comprises the following steps: Step 4.1 The valuable weld negative film obtained in step 3.2 is recorded as The value sample labeling data set is obtained by manual active labeling by a nondestructive testing expert ; Step 4.2: using the obtained valuable sample data set to fine-tune and update the detection model; Step 4.3 The initial data set is labeled With the mining value sample data set The loss is optimized , using the SGD optimizer, by evaluating the constant loss fluctuation, saving the stable initial detection model; loss Including two parts, respectively, the initial data set detection loss and the mining sample data set detection loss, as shown in formula (9): (8); in, For model evolution loss, and These are the loss terms for the initial dataset and the valuable samples, respectively; due to the defect identification model... The initial weights are in the initial dataset. Therefore, it was obtained through training. We already possess a large amount of initial dataset knowledge, but for mining sample datasets... , They lack relevant knowledge; to enhance the learning from the mined samples, the proportion of loss in the mined samples needs to be increased, that is... The assigned weights will be greater than Larger sizes allow the network to learn more from mined samples, thus enabling model evolution and upgrades; optimizer During the iteration process, the global parameters of the network will be adjusted. Optimize until the loss function is minimized, when the training reaches a set number of rounds. By stopping the training process at a certain point, an evolutionary model capable of inferring defect classification and localization information for unknown images can be obtained. .
3. The method of claim 2, wherein the method further comprises: The step 4.2 specifically comprises the following contents: updating and fine-tuning the detection model; freezing parts of the first three layers of the network weights to accelerate convergence, i.e. the first three layers of the network weights to accelerate convergence, i.e. (9); wherein, wherein represents the weight to be updated, represents the frozen weight.