A welding defect identification method, device, equipment and storage medium

By constructing a deep neural network model with random multi-scale modules and extracting welding defect features using uniformly distributed variables of dilated convolution, the problem of welding defect detection relying on expert experience is solved, achieving high-accuracy automatic identification while protecting the eyes of inspection personnel.

CN114140463BActive Publication Date: 2025-10-24SHENZHEN TONGYUAN HUISHI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111507910.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-10
Publication Date
2025-10-24
Estimated Expiration
2041-12-10

AI Technical Summary

Technical Problem

Current methods for detecting welding defects rely on expert experience, which has low accuracy and is harmful to the eyes of inspectors.

Method used

A deep neural network model with random multi-scale modules is constructed, and random scale features are extracted using the dilation rate of the hyperparameter of dilated convolution, which follows a uniform distribution, to improve the accuracy of welding defect identification.

Benefits of technology

It improves the accuracy of automatic identification of welding defects and reduces eye strain for inspection personnel.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114140463B_ABST
    Figure CN114140463B_ABST
Patent Text Reader

Abstract

The application discloses a welding defect identification method and device, equipment and a storage medium. The method comprises the following steps: acquiring a welding scanning image sample, and performing welding defect labeling; a training set is divided from the labeled image sample; a deep neural network model with a random multi-scale module is constructed; the random multi-scale module comprises a hollow convolution, and a hyperparameter hole rate introduced by the hollow convolution is a variable obeying a uniform distribution and is used for extracting random scale features; the deep neural network model is trained by using the training set; and the welding defect of a to-be-tested welding scanning image is identified by using the trained deep neural network model. The method mainly aims at the characteristic of various welding defect scales, enhances the extraction capability of the deep neural network model for welding defect features, improves the automatic identification performance of the deep neural network model for welding defects in a real application scene, and further improves the accuracy of welding defect identification.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of welding, in particular to a welding defect identification method, device, equipment and storage medium. BACKGROUND

[0002] Welding technology has been widely used in many key fields including aerospace, oil pipeline, mechanical manufacturing. The X-ray based detection method is one of the most important means of welding defect detection in the industry. The traditional welding defect detection process is mainly based on manual identification, that is, professional inspectors visually inspect the location and type of defects under the strong brightness of the film viewer according to the X-ray physical film taken on site.

[0003] The above welding defect detection process has some problems: the requirement of expert experience is high, the position, shape and color of different types of defects are very different, and the detection personnel need to have rich on-site construction and film reading experience to accurately identify defects from the physical film, that is, the current welding defect identification relies on the subjective experience of experts. For the same film, different detection personnel, or even the same detection personnel at different times may give different identification results, which seriously affects the accuracy of welding defect identification and is prone to missed detection and high false detection rate. In addition, since the film viewer is a strong brightness device, continuous film reading by the detection personnel will cause great harm to the eyes and damage eye health.

[0004] Therefore, how to improve the accuracy of welding defect identification and avoid damaging the eyes is a technical problem to be solved by those skilled in the art. SUMMARY

[0005] Therefore, the purpose of the present application is to provide a welding defect identification method, device, equipment and storage medium, which can simultaneously consider defects of different scales and improve the automatic identification performance of the deep neural network model in real application scenarios. The specific scheme is as follows:

[0006] A welding defect identification method comprises:

[0007] Obtain a welding scan image sample and perform welding defect labeling, and divide a training set from the labeled image sample;

[0008] Construct a deep neural network model with a random multi-scale module; the random multi-scale module comprises a dilated convolution, and the hyperparameter hole rate introduced by the dilated convolution is a variable subject to uniform distribution for extracting random scale features;

[0009] Train the deep neural network model using the training set;

[0010] The trained deep neural network model is used to identify the welding defects of a to-be-tested welding scan image.

[0011] Preferably, in the welding defect identification method provided by the embodiment of the present application, the training of the deep neural network model using the training set comprises:

[0012] The variable is sampled from a uniform distribution U(gamma, u) Gamma is the lower bound of the uniform distribution, and u is the upper bound of the uniform distribution.

[0013] The variable is substituted into the calculation formula of the dilated convolution to perform forward calculation, and the random scale features of the training set are extracted.

[0014] Preferably, in the welding defect identification method provided by the embodiment of the present application, the calculation formula of the dilated convolution is:

[0015]

[0016] Wherein, W l represents a two-dimensional convolution kernel, and the superscript l represents the lth layer of the deep neural network model, a l represents the output of the lth layer, and the scalars P and Q represent the width and height of the convolution kernel, respectively, and p and q represent the coordinate index of the convolution kernel in the width and height directions, represents the net input of the (i, j) position of the l+1th layer.

[0017] Preferably, in the welding defect identification method provided by the embodiment of the present application, after the training of the deep neural network model using the training set, the method further comprises:

[0018] Dividing a test set from the labeled image samples;

[0019] Testing the trained deep neural network model using the test set.

[0020] Preferably, in the welding defect identification method provided by the embodiment of the present application, the testing of the trained deep neural network model using the test set comprises:

[0021] The variable is substituted into the calculation formula of the dilated convolution to perform forward calculation, and the random scale features of the training set are extracted.

[0022] Fusing the extracted multiple random scale features to obtain a fused test result.

[0023] ​​Preferably, in the welding defect identification method provided by the embodiment of the present application, the interval of the upper bound u and the lower bound γ in the uniform distribution U(γ, u) is inversely proportional to the number of samples of the training set; or,

[0024] The interval of the upper bound u and the lower bound γ is proportional to the difference in spatial scale of each type of defect to be identified.

[0025] Preferably, in the welding defect identification method provided by the embodiment of the present application, the random multi-scale module is connected to the output of the backbone network of the deep neural network model.

[0026] The embodiment of the present application also provides a welding defect identification device, comprising:

[0027] A sample processing module is configured to obtain a welding scan image sample, perform welding defect labeling, and divide a training set from the labeled image sample.

[0028] A model construction module is configured to construct a deep neural network model with a random multi-scale module; the random multi-scale module includes a dilated convolution, and a hyperparameter dilated rate introduced by the dilated convolution is a variable obeying a uniform distribution to extract random scale features;

[0029] A model training module is configured to train the deep neural network model using the training set.

[0030] A model inference module is configured to identify welding defects of a welding scan image to be tested using the trained deep neural network model.

[0031] The embodiment of the present application also provides a welding defect identification device, comprising a processor and a memory, wherein the processor implements the above-mentioned welding defect identification method provided by the embodiment of the present application when executing the computer program stored in the memory.

[0032] The embodiment of the present application also provides a computer readable storage medium for storing a computer program, wherein the computer program is executed by a processor to implement the above-mentioned welding defect identification method provided by the embodiment of the present application.

[0033] As can be seen from the above technical solutions, the welding defect identification method provided by the present application comprises: obtaining a welding scan image sample, performing welding defect labeling, and dividing a training set from the labeled image sample; constructing a deep neural network model with a random multi-scale module; the random multi-scale module includes a dilated convolution, and a hyperparameter dilated rate introduced by the dilated convolution is a variable obeying a uniform distribution The method is used for extracting random scale features, training a deep neural network model using a training set, and identifying welding defects of a to-be-tested welding scan image using the trained deep neural network model.

[0034] The present application mainly aims at the characteristics of various welding defect scales, constructs a deep neural network model compatible with different scale defects, and sets the hyperparameter hole rate introduced by the cavity convolution as a variable subject to uniform distribution The deep neural network model has improved the extraction ability of welding defect features, improved the automatic identification performance of the deep neural network model in a real application scenario, and further improved the accuracy of welding defect identification without damaging the human eye.

[0035] In addition, the present application also provides a corresponding device, equipment and computer readable storage medium for the welding defect identification method, which further makes the above method more practical, and the device, equipment and computer readable storage medium have corresponding advantages. BRIEF DESCRIPTION OF DRAWINGS

[0036] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related art, the drawings needed to be used in the embodiments or related art description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and those skilled in the art can obtain other drawings without creative labor based on the provided drawings.

[0037] Figure 1 The flowchart of the welding defect identification method provided by the embodiment of the present application is shown in the figure.

[0038] Figure 2 The schematic diagram of the existing convolution operation is shown in the figure.

[0039] Figure 3 The schematic diagram of the existing spatial convolution operation is shown in the figure.

[0040] Figure 4 The schematic diagram of the cavity convolution with different hole rates provided by the embodiment of the present application is shown in the figure.

[0041] Figure 5 The structural schematic diagram of the welding defect identification device provided by the embodiment of the present application is shown in the figure. DETAILED DESCRIPTION

[0042] The technical solutions in the embodiments of the present application will be described in detail below with reference to the drawings of the embodiments of the present application. Obviously, the described embodiments are only some embodiments of the present application, not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.

[0043] The application provides a welding defect recognition method, as shown in the following steps: Figure 1

[0044] S101, acquire a welding scanning image sample, and perform welding defect labeling, and divide a training set from the labeled image sample;

[0045] S102, construct a deep neural network model with a random multi-scale module; the random multi-scale module includes a hollow convolution, and a hyperparameter hole rate introduced by the hollow convolution is a variable subject to uniform distribution for extracting random scale features;

[0046] S103, train the deep neural network model using the training set;

[0047] S104, use the trained deep neural network model to recognize welding defects of a to-be-tested welding scanning image.

[0048] In actual applications, unlike natural images, welding defects often exhibit a multi-scale characteristic in X-ray images, such as a small geometric size of defects such as pores and slag inclusions, and a size often several times larger than that of defects such as cracks and incomplete fusion. The multi-scale characteristic poses a challenge to the performance of the deep neural network model in real scenarios. In addition, pseudo defects caused by film scratches and other reasons often have similar characteristics to real defects, which further increases the difficulty of automatic defect recognition. In the welding defect recognition method provided in the embodiment of the application, a deep neural network model that can simultaneously accommodate defects of different scales is constructed mainly in view of the multi-scale characteristic of the welding defects, and the hyperparameter hole rate introduced by the hollow convolution is set as a variable subject to uniform distribution , which enhances the feature extraction capability of the deep neural network model for welding defects, improves the automatic recognition performance of the deep neural network model for welding defects in real application scenarios, and further improves the accuracy of welding defect recognition without damaging the human eye.

[0049] It should be understood that convolution is one of the important components of the current deep neural network model. For the input welding scanning image, convolution mainly extracts abstract features by sliding from top to bottom and left to right in the input image using a convolution kernel with a certain step length, using the method of multiplying and summing, and the convolution can be described by the following formula:

[0050]

[0051] , wherein W l represents a two-dimensional convolution kernel, and the superscript l represents the lth layer of the deep neural network, a l ​represents the output of the l-th layer, and the scalars P and Q represent the width and height of the convolution kernel respectively, and p and q represent the coordinate index of the convolution kernel in the width and height direction respectively, represents the net input of the (i,j) position of the (l+1)-th layer.

[0052] The convolution kernel slides on the input data in the width and height direction, Figure 2 A schematic diagram of the convolution operation is shown, in which the dark lower left corner of the lower layer represents the convolution kernel W l , and the remaining light-colored part of the lower layer represents a l , and the white part above represents z l+1 .

[0053] Increasing the size of the convolution kernel W l can increase the receptive field size of the neural network, which helps the model to learn more rich feature expression. However, this will also increase the computational load of the model and the learnable parameters, thereby bringing the risk of overfitting. The original intention of the dilated convolution is to increase the receptive field size of the convolution while avoiding the introduction of new learnable parameters. The calculation principle of the dilated convolution is shown in the following formula:

[0054]

[0055] where r is a new hyperparameter of the dilated convolution, the dilated rate, which controls the distance between the elements of the convolution kernel. The in formula (2) has the same meaning as the in formula (1), and the hyperparameter dilated rate r is mainly introduced in formula (2). Compared with the ordinary convolution, the dilated convolution is equivalent to inserting r-1 zeros between the elements. Obviously, when r=1, the dilated convolution degenerates into the ordinary convolution. Figure 3 A schematic diagram of the dilated convolution operation is shown.

[0056] The dilated convolution effectively increases the receptive field of the convolution operation without increasing the network learnable parameters and computational load. However, in the process of applying the dilated convolution to the real network model, the hyperparameter r needs to be determined manually, and improper setting may reduce the recognition accuracy of the network for small targets. The present application mainly aims at the limitation of manually setting the hyperparameter r, and simultaneously improves the recognition performance of the network for larger and smaller targets.

[0057] Further, in the welding defect recognition method provided in the embodiment of the present application, the step S103 of training the deep neural network model using the training set can specifically include: sampling a variable from a uniform distribution U(gamma, u), where gamma is the lower bound of the uniform distribution, and u is the upper bound of the uniform distribution; substituting the variable into the calculation formula of the dilated convolution to perform forward calculation, and extracting the random scale features of the training set.

[0058] It should be noted that in the prior art, the hyperparameter r is generally fixed after the network structure is determined, while the present application converts r from a hyperparameter set by a person to a variable subject to uniform distribution That is Because is a random variable, it contains the extraction ability of random scale features. Figure 4 The effects of the dilated convolution with different dilation rates are shown; the rightmost figure corresponds to close to the upper bound u, that is, there is a large dilation rate, and the distance between the elements of the convolution kernel is large; the leftmost figure corresponds to close to the lower bound γ, that is, there is a small dilation rate, and the distance between the elements of the convolution kernel is small. The case where γ is equal to u is degenerated into Figure 4 (that is, the dilation rate remains fixed and has no randomness). When the variable γ is equal to u, the dilated convolution proposed in the present application is degenerated into the general dilated convolution, as shown in Figure 3 the dilation rate remains fixed and has no randomness.

[0059] Obviously, In the uniform distribution upper bound u and lower bound γ, when close to the upper bound u, the dilated convolution has a large receptive field, which is beneficial to identifying defects with a large area (such as incomplete fusion); when close to the lower bound γ, the receptive field of the dilated convolution is reduced, which is beneficial to identifying defects with a small area (such as slag inclusion). Therefore, the random scale feature extraction method proposed in the present application takes into account defects with different scales at the same time, and is expected to improve the recognition ability of the deep neural network in real application scenarios. In the training stage, the present application first samples the variable from the uniform distribution U(γ, u), and then substitutes it into the calculation formula of the dilated convolution to perform forward calculation, where the forward calculation means using the dilated convolution to extract features, a l and z l can be regarded as features obtained by forward calculation.

[0060] In specific implementation, in the above welding defect recognition method provided by the embodiment of the present application, the calculation formula of the dilated convolution can be specifically as follows:

[0061]

[0062] Wherein, W l represents a two-dimensional convolution kernel, and the superscript l represents the lth layer of the deep neural network model, a lrepresents the output of the l-th layer, and the scalars P and Q represent the width and height of the convolution kernel, respectively, and p and q represent the coordinate indices of the convolution kernel in the width and height directions, respectively, represents the net input of the (i,j) position of the (l+1)-th layer.

[0063] In a specific implementation, after the step S103 of training the deep neural network model using the training set, the above welding defect identification method provided by the embodiment of the present application can further include: dividing a test set from the labeled image samples; and testing the trained deep neural network model using the test set.

[0064] That is, the construction of the deep neural network model is divided into two stages of training and testing. In the training stage, the connection weight of the model is adjusted using the training set. After the training is completed, the real performance of the model is tested using the test set. In the testing stage, the trained deep neural network model is tested using the test set, which can specifically include: setting the variable traversing (γ, u), respectively performing forward calculation, and extracting random scale features of the multiple test sets; and fusing the extracted random scale features to obtain the fused test result.

[0065] The specific calculation process of the testing stage is as follows:

[0066]

[0067]

[0068] wherein n represents the sampling value from (γ, u), represents the feature obtained when the hole rate is n, represents the final result after fusing the (u-γ) features. The fusion method here is to average, as shown in equation (5).

[0069] In a specific implementation, in the above welding defect identification method provided by the embodiment of the present application, the random multi-scale module is connected to the output of the backbone network of the deep neural network model. That is, the random multi-scale module acts on the output of the backbone network, and the module and the backbone network are independent and irrelevant parts. The backbone network can select any neural network model, such as the common ResNet, VGG, Inception network, etc., which is not limited here.

[0070] In a specific implementation, in the welding defect identification method provided by the embodiment of the present application, in the uniform distribution U (γ, u), the interval of the upper bound u and the lower bound γ is inversely proportional to the number of samples of the training set; or the interval of the upper bound u and the lower bound γ is proportional to the difference in spatial scales of each type of defect to be identified. When the number of training image samples is small (for example, less than 1000), or the difference in spatial scales of each type of defect to be identified is large, the interval of the upper bound u and the lower bound γ can be set to be large (for example, u = 7, γ = 1). Conversely, the interval of the upper bound u and the lower bound γ can be set to be small (for example, u = 3, γ = 1).

[0071] In addition, in a specific implementation, a verification set can also be divided from the labeled image samples. In the process of training the deep neural network model, first, the parameters γ and u in the random multi-scale module are determined, then a certain backbone network is selected, for example, ResNet, and finally the deep neural network model is trained using the training set. After the evaluation index (for example, accuracy, recall rate, precision, etc.) is determined, the trained deep neural network model can be verified using the verification set. If the effect of the model meets the expectation, the model can be applied and deployed. If the effect of the model does not meet the expectation, the deep neural network model needs to be retrained.

[0072] The welding defect identification method provided by the embodiment of the present application has the ability to identify welding defects of different scales, enhances the ability of the deep neural network to solve real problems, and has strong versatility, and can be applied to identification tasks of targets containing different scales except welding defects.

[0073] Based on the same inventive concept, the embodiment of the present application also provides a welding defect identification device. Since the principle of solving problems of the device is similar to the foregoing welding defect identification method, the implementation of the device can be referred to the implementation of the welding defect identification method, and the repeated parts will not be described herein.

[0074] In a specific implementation, the welding defect identification device provided by the embodiment of the present application, as shown in FIG. 1, Figure 5 specifically includes:

[0075] The sample processing module 11 is configured to obtain welding scan image samples and perform welding defect labeling, and divide a training set from the labeled image samples.

[0076] The model construction module 12 is configured to construct a deep neural network model with a random multi-scale module. The random multi-scale module includes a dilated convolution, and the hyperparameter hole rate introduced by the dilated convolution is a variable for extracting random scale features.

[0077] The model training module 13 is configured to train the deep neural network model using the training set.

[0078] The model inference module 14 is configured to utilize the trained deep neural network model to identify the welding defects in the welding scan image to be tested.

[0079] In the welding defect identification device provided by the embodiment of the present application, the four modules interact with each other to enhance the extraction capability of the deep neural network model for welding defect features of different scales, improve the automatic identification performance of the deep neural network model for welding defects in a real application scenario, and further improve the accuracy of welding defect identification without damaging the human eye.

[0080] The more specific working processes of the above modules can refer to the corresponding contents disclosed in the foregoing embodiments, and will not be described here.

[0081] Correspondingly, the embodiment of the present application further discloses a welding defect identification device, comprising a processor and a memory; wherein the processor executes the computer program stored in the memory to realize the welding defect identification method disclosed in the foregoing embodiments.

[0082] The more specific processes of the above method can refer to the corresponding contents disclosed in the foregoing embodiments, and will not be described here.

[0083] Further, the present application further discloses a computer readable storage medium for storing a computer program; the computer program is executed by the processor to realize the welding defect identification method disclosed above.

[0084] The more specific processes of the above method can refer to the corresponding contents disclosed in the foregoing embodiments, and will not be described here.

[0085] Each embodiment in the specification is described in a progressive manner, and each embodiment focuses on the difference from other embodiments. The same or similar parts of each embodiment can be referred to each other. For the device, equipment and storage medium disclosed by the embodiment, since it corresponds to the method disclosed by the embodiment, the description is relatively simple, and the related parts can refer to the method part.

[0086] The skilled person can further realize that the units and algorithm steps of the examples described in combination with the embodiments disclosed herein can be realized by electronic hardware, computer software or a combination of the two. In order to clearly show the interchangeability of hardware and software, the components and steps of each example have been described in the above description. Whether the functions are realized in hardware or software depends on the specific application and design constraints of the technical solution. The skilled person can use different methods to realize the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.

[0087] The steps of a method or algorithm described in connection with the embodiments disclosed herein can be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module can reside in random access memory (RAM), flash memory, read-only memory (ROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor such that the processor can read information from, and write information to, the storage medium. In the alternative, hard disk can be used for tangibly embodying the software module.

[0088] In summary, the welding defect recognition method provided by the embodiment of the present application comprises: acquiring a welding scan image sample, performing welding defect labeling, and dividing a training set from the labeled image sample; constructing a deep neural network model with a random multi-scale module; the random multi-scale module comprises a hollow convolution, and a hyperparameter hole rate introduced by the hollow convolution is a variable subject to uniform distribution for extracting random scale features; training the deep neural network model using the training set; and identifying welding defects of a to-be-tested welding scan image using the trained deep neural network model. The present application mainly aims at the characteristic of various scales of welding defects, and constructs a deep neural network model that can simultaneously accommodate defects of different scales, sets the hyperparameter hole rate introduced by the hollow convolution as a variable subject to uniform distribution to enhance the extraction capability of the deep neural network model for welding defect features, improve the automatic recognition performance of the deep neural network model for welding defects in a real application scenario, and further improve the accuracy of welding defect recognition without damaging the human eye. In addition, the present application also provides a corresponding device, equipment and computer readable storage medium for the welding defect recognition method, which further makes the above method more practical, and the device, equipment and computer readable storage medium have corresponding advantages.

[0089] Finally, it should be noted that, in this text, relationship terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or sequence between the entities or operations. Moreover, the terms "include", "contain" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or equipment including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such process, method, article or equipment. Without more limitations, the element defined by the statement "including a" does not exclude the presence of another identical element in the process, method, article or equipment including the element.

[0090] The welding defect identification method, device, equipment and storage medium provided by the present application are described in detail above, and the principles and implementation modes of the present application are described by applying specific examples. The above example is only used to help understand the method of the present application and its core idea; at the same time, for those skilled in the art, according to the idea of the present application, the specific implementation mode and application range will be changed, and the above description should not be understood as a limitation of the present application.

Claims

1. A method of weld defect recognition, characterized by, The method comprises the following steps: Obtaining a welding scanning image sample, labeling welding defects, and dividing a training set and a test set from the labeled image sample; A deep neural network model with a random multi-scale module is constructed; the random multi-scale module includes a hollow convolution, and a hyperparameter hole rate introduced by the hollow convolution is a variable subject to a uniform distribution for extracting random scale features The variable is a random variable; and a calculation formula of the empty convolution is: ; wherein, represents a two-dimensional convolution kernel, and the superscript l represents the lth layer of the deep neural network model, represents the output of the lth layer, and the scalars P and Q represent the width and height of the convolution kernel, respectively, and p and q represent the coordinate indices of the convolution kernel in the width and height directions, respectively, represents the net input of the (i, j) position of the (l+1)th layer; wherein the convolution kernel slides on the input data in the width and height directions; Using the training set to train the deep neural network model includes: The variables are obtained by sampling ; is the lower bound of the uniform distribution, is the upper bound of the uniform distribution; the variable At the upper bound of the uniform distribution and the Nether Randomly select a value from Substituting the dilated convolution into the calculation formula to perform forward calculation and extract the random scale features of the training set; Among them, in the uniform distribution Middle and upper bounds and the lower bound The interval is inversely proportional to the number of samples in the training set; or, the upper bound and the lower bound The interval is proportional to the difference in spatial scales of various defects to be identified; Testing the trained deep neural network model using the test set, including: inputting the variables traversing respectively performing forward calculation, extracting random scale features of the test set; fusing the extracted random scale features to obtain the fused test results; the calculation process of the test stage is as follows: ; Wherein, n represents from The sampling value in the n-th frame, Indicates the feature obtained when the hole rate is n, and finally the multiple features obtained by traversing are fused to obtain the final result; Using the trained deep neural network model to identify welding defects of a to-be-tested welding scanning image.

2. The welding defect recognition method of claim 1, wherein The random multi-scale module is connected to the output of the backbone network of the deep neural network model.

3. A welding defect recognition apparatus characterized by comprising: The method comprises the following steps: A sample processing module is configured to obtain a welding scanning image sample, label welding defects, and divide a training set and a test set from the labeled image sample; The model construction module is configured to construct a deep neural network model with a random multi-scale module; the random multi-scale module comprises a cavity convolution, and a hyperparameter cavity rate introduced by the cavity convolution is a variable obeying a uniform distribution for extracting random scale features; The variable is a random variable; and a calculation formula of the empty convolution is: ; wherein, represents a two-dimensional convolution kernel, and the superscript l represents the lth layer of the deep neural network model, represents the output of the lth layer, and the scalars P and Q represent the width and height of the convolution kernel, respectively, and p and q represent the coordinate index of the convolution kernel in the width and height direction, respectively, represents the net input of the (i, j) position of the (l+1)th layer; wherein the convolution kernel slides on the input data in the width and height direction; A model training module is used to train the deep neural network model using the training set, including: The variables are obtained by sampling ; is the lower bound of the uniform distribution, is the upper bound of the uniform distribution; the variable On the upper bound of the uniform distribution and the Nether Randomly select a value from Substitute into the calculation formula of the dilated convolution to perform forward calculation and extract the random scale features of the training set; wherein, the uniform distribution Middle and upper bounds and the lower bound The interval is inversely proportional to the number of samples in the training set; or, the upper bound and the lower bound The interval is proportional to the difference in spatial scale of each type of defect to be identified; using the test set to test the trained deep neural network model, including: Traversal , respectively perform forward calculations to extract multiple random scale features of the test set; fuse the extracted multiple random scale features to obtain a fused test result; the calculation process of the test phase is as follows: ; Wherein, n represents from The sampling value in the n-th frame, Indicates the feature obtained when the hole rate is n, and finally the multiple features obtained by traversing are fused to obtain the final result; A model inference module is configured to use the trained deep neural network model to identify welding defects of a to-be-tested welding scanning image.

4. A welding defect identification device, characterized in that: A computer program product comprising a processor and a memory, wherein the processor implements the welding defect identification method of claim 1 or 2 when executing the computer program stored in the memory.

5. A computer-readable storage medium, characterized in that A computer program product for storing a computer program, wherein the computer program is executed by a processor to implement the welding defect identification method of claim 1 or 2.

Citation Information

Patent Citations

  • Image classification method and system, computer equipment and storage medium

    CN112163601A

  • Segmentation algorithm for detecting laser welding defect of power battery safety valve

    CN112184686A