A method for identifying and classifying weld combination defects
Through the deep learning algorithm and prior feature value matching in the weld defect detection system, the identification and classification of weld combination defects are achieved, and the problem of inability to deal with multiple weld defect combinations in the prior art is solved, and the accuracy and efficiency of detection are improved.
Patent Information
- Application Number
- CN202311008666.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-10
- Publication Date
- 2025-08-26
- Estimated Expiration
- 2043-08-10
AI Technical Summary
The existing weld defect identification method cannot be applied to a combined defect scenario where at least two weld defects on the weld to be detected.
Weld defect detection system is adopted, including control module, real-time image acquisition module, image analysis module, weld defect classification module and detection result generation module. Weld defects are identified through deep learning algorithms, combined with the characteristic values of the prior target area image, weld defect categories are determined and detection results are generated.
It is possible to easily identify and classify combined defects with at least two defects on welds, which improves the accuracy and efficiency of weld defect detection and reduces the operating risks brought about by data redundancy.
Smart Images

Figure CN116934737B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of welding technology, and in particular to a method for identifying and classifying weld combination defects. Background Art
[0002] Patent CN108596892B discloses a weld defect recognition method based on an improved LeNet-5 model. First, for the weld grayscale image, the input of the traditional convolution kernel channel of the LeNet-5 model is improved, the grayscale image is converted into a color image through pseudo-color enhancement technology, and the obtained color image is used as the input of the neural network; then the convolution kernel of the LeNet-5 model is improved by adding a convolution kernel channel with a Gabor filter; in the sixth layer of the neural network, the features obtained from multiple channels are fused to obtain the feature set T; finally, the SoftMax classifier is used in the seventh layer (output layer) of the neural network to obtain the weld defect type and the probability of belonging to each category, which is used to provide a reference for relevant personnel to determine the film type and formulate on-site rework plans.
[0003] However, the above-mentioned weld defect identification method has the disadvantage that it can only output the identified weld defect type and the corresponding probability, and requires relevant personnel to make further judgments. It is not suitable for application scenarios where the weld to be detected has a combination of defects with at least one weld defect.
[0004] It can be seen that how to improve the method of weld defect identification so that it can be applied to the application scenario of a combination defect with at least two types of weld defects on the weld to be detected is a technical problem that needs to be solved urgently. Summary of the Invention
[0005] The technical problem to be solved by the present invention is to provide a method for identifying and classifying combined weld defects, which is suitable for application scenarios where a weld to be detected has a combined defect of at least two weld defects.
[0006] In order to solve the above technical problems, the present invention discloses a method for identifying and classifying combined weld defects, which is applied to a weld defect detection system. The weld defect detection system includes a control module, a real-time image acquisition module, an image analysis module, a weld defect classification module, and a detection result generation module. The real-time image acquisition module, the image analysis module, the weld defect classification module, and the detection result generation module are electrically connected to the control module respectively. The control module is used to control the operation of the real-time image acquisition module, the image analysis module, the weld defect classification module, and the detection result generation module.
[0007] The method comprises:
[0008] The control module controls the real-time image acquisition module to acquire a real-time image of the weld of the target workpiece;
[0009] The control module controls the image analysis module to perform a target image recognition operation on the weld defect based on the deep learning algorithm on the real-time weld image to determine a current target area image corresponding to the current weld defect image;
[0010] The control module controls the image analysis module to perform an image feature extraction operation on the current target area image to determine a current target feature value corresponding to a pixel point of the current target area image;
[0011] The control module controls the weld defect classification module to determine an image matching evaluation index between the current target area image and the prior target area image based on a priori eigenvalue corresponding to the priori target area image and the current target eigenvalue, wherein the priori target area image is an image in a pre-made priori target area image set, and the priori target area image is an image of a sample weld having at least two defects;
[0012] The control module controls the weld defect classification module to determine the weld defect category corresponding to the current target area image according to the image matching evaluation index;
[0013] The control module controls the detection result generation module to generate a first detection result, wherein the first detection result includes the weld defect image position of the target workpiece and the corresponding weld defect category, wherein the weld defect image position corresponds to the position of the current target area image in the weld real-time image.
[0014] In the weld combination defect recognition and classification method disclosed in the present invention, the control module controls the image analysis module to perform a target image recognition operation on the weld defect based on the deep learning algorithm on the real-time weld image. On the one hand, it is beneficial to determine whether the weld of the target workpiece has surface defects. On the other hand, by screening out the target area image corresponding to the weld defect image from the real-time weld image, the risk of reducing the operating efficiency of the image analysis module due to the large amount of data redundancy is reduced; the control module controls the weld defect classification module to determine the image matching evaluation index of the current target area image and the prior target area image of the sample weld image with at least two defects according to the prior feature value and target feature value corresponding to the prior target area image, and determines the corresponding weld defect category according to the image matching evaluation index, and generates a weld defect image position representing the target workpiece and the corresponding weld defect category, which is beneficial for relevant personnel to easily learn about the weld combination defect of the target workpiece. It can be seen that the weld combination defect recognition and classification method disclosed in the present invention can be applied to the application scenario of the combination defect with at least two weld defects on the weld to be detected.
[0015] As an optional implementation, in the present invention, the network model corresponding to the deep learning algorithm is one of FastR-CNN, YOLO and SSD.
[0016] As an optional embodiment, in the present invention, the control module controls the weld defect classification module to determine the image matching evaluation index between the current target area image and the prior target area image based on the prior feature value corresponding to the prior target area image and the target feature value, and the algorithm used is as follows;
[0017]
[0018] Where P represents the image matching evaluation index between the current target area image and the prior target area image, m represents the number of rows of pixels in the current target area image, n represents the number of columns of pixels in the current target area image, i represents the serial number of the row where a certain pixel in the current target area image is located, j represents the serial number of the column where a certain pixel in the current target area image is located, and x ij Indicates the current target feature value corresponding to the pixel point in the i-th row and j-th column of the current target area image, Represents x ij , p represents the number of rows of pixels in the prior target area image, q represents the number of columns of pixels in the prior target area image, k represents the serial number of the row where a certain pixel in the prior target area image is located, l represents the serial number of the column where a certain pixel in the prior target area image is located, x′ kl Represents the prior eigenvalue corresponding to the pixel point in the kth row and lth column of the prior target area image, Represents x′ kl The mean of .
[0019] As an optional implementation, in the present invention, the current target feature value includes one of a horizontal gradient value, a vertical gradient value, a grayscale value, and a brightness value of the current target area image.
[0020] As an optional embodiment, in the present invention, after the control module controls the image analysis module to perform a target image recognition operation on the real-time weld image based on a deep learning algorithm to determine a target area image corresponding to the weld defect image, the method further includes:
[0021] The control module controls the image analysis module to determine a ratio of an image size of a target area image corresponding to the weld defect image to an image size of the weld real-time image;
[0022] The control module determines whether the ratio of the image size of the target area image corresponding to the weld defect image to the image size of the real-time weld image is greater than or equal to a predetermined threshold value. If so, the control module controls the detection result generation module to generate a second detection result, and the second detection result indicates that the weld defect area corresponding to the weld defect image belongs to the abnormal area range. If not, the control module controls the detection result to generate a third detection result, and the third detection result indicates that the weld defect area corresponding to the weld defect image belongs to the normal area range.
[0023] As an optional embodiment, in the present invention, the control module controls the weld defect classification module to determine the weld defect category corresponding to the current target area image according to the image matching evaluation index. The weld defect classification module screens out the prior target area image with the largest image matching evaluation index to determine that the defect category of the current target area image is the weld defect category corresponding to the prior target area image with the largest image matching evaluation index. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0025] Figure 1 1 is a structural diagram of a weld defect detection system according to an embodiment of the present invention;
[0026] Figure 2 This is a flow chart of a method for identifying and classifying weld combination defects according to an embodiment of the present invention;
[0027] Figure 3 is a current target area image corresponding to the current weld defect image in an embodiment of the present invention;
[0028] Figure 4 It is a flow chart of another weld combination defect identification and classification method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0029] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0030] The terms "first," "second," and so on, in the description and claims of the present invention are used to distinguish between different objects, not to describe a specific order. Furthermore, the terms "including," "having," and any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, apparatus, product, or device comprising a series of steps or elements is not limited to the listed steps or elements but may optionally include steps or elements not listed, or may optionally include other steps or elements inherent to the process, method, product, or device.
[0031] References herein to "embodiments" mean that a particular feature, structure, or characteristic described in connection with the embodiments may be included in at least one embodiment of the present invention. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor does it constitute a separate or alternative embodiment that is mutually exclusive of other embodiments. It is understood, both explicitly and implicitly, by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0032] Embodiment 1: The present invention discloses a method for identifying and classifying weld combination defects, which is applied to a weld defect detection system.
[0033] like Figure 1 As shown, the weld defect detection system includes a control module, a real-time image acquisition module, an image analysis module, a weld defect classification module and a detection result generation module. The real-time image acquisition module, the image analysis module, the weld defect classification module and the detection result generation module are electrically connected to the control module respectively. The control module is used to control the operation of the real-time image acquisition module, the image analysis module, the weld defect classification module and the detection result generation module.
[0034] like Figure 2 As shown, the method includes:
[0035] S101. The control module controls the real-time image acquisition module to acquire a real-time image of the weld of the target workpiece. For scenarios where surface weld defects, i.e., combinations of several surface weld defects, need to be identified, a common industrial camera can be used to acquire a real-time image of the weld of the target workpiece. This real-time image of the weld is a planar image. For scenarios where a combination of surface and internal weld defects, or a combination of several internal weld defects, needs to be identified, the real-time image of the weld can be an X-ray image obtained by scanning the weld of the target workpiece using a laser scanner.
[0036] S102, the control module controls the image analysis module to perform a target image recognition operation on the weld defect based on the deep learning algorithm on the real-time weld image to determine the current target area image corresponding to the current weld defect image. The current target area image corresponding to the current weld defect image can be as follows: Figure 3 shown.
[0037] S103: The control module controls the image analysis module to perform an image feature extraction operation on the current target area image to determine target feature values corresponding to pixels of the current target area image.
[0038] S104. The control module controls the weld defect classification module to determine an image matching evaluation index between the current target area image and the prior target area image based on the prior feature value and the target feature value corresponding to the prior target area image. The prior target area image is an image in a pre-made prior target area image set, and the prior target area image is an image of a sample weld with at least two defects. It should be noted that the image of the sample weld corresponding to the prior target area image can be an image of a weld defect with at least two surface defects, or an image of a weld defect with at least two internal defects, or an image of a weld defect with both surface defects and internal defects.
[0039] S105. The control module controls the weld defect classification module to determine the weld defect category corresponding to the current target area image according to the image matching evaluation index.
[0040] S106: The control module controls the detection result generation module to generate a first detection result, wherein the first detection result includes the weld defect image position of the target workpiece and the corresponding weld defect category. The weld defect image position corresponds to the position of the current target area image in the real-time weld image.
[0041] In the weld combination defect recognition and classification method disclosed in the present invention, the control module controls the image analysis module to perform a target image recognition operation on the weld defect based on the deep learning algorithm on the real-time weld image. On the one hand, it is beneficial to determine whether the weld of the target workpiece has surface defects. On the other hand, by screening out the target area image corresponding to the weld defect image from the real-time weld image, the risk of reducing the operating efficiency of the image analysis module due to the large amount of data redundancy is reduced; the control module controls the weld defect classification module to determine the image matching evaluation index of the current target area image and the prior target area image of the sample weld image with at least two defects according to the prior feature value and target feature value corresponding to the prior target area image, and determines the corresponding weld defect category according to the image matching evaluation index, and generates a weld defect image position representing the target workpiece and the corresponding weld defect category, which is beneficial for relevant personnel to easily learn about the weld combination defect of the target workpiece. It can be seen that the weld combination defect recognition and classification method disclosed in the present invention can be applied to the application scenario of the combination defect with at least two weld defects on the weld to be detected.
[0042] Embodiment 2: The deep learning algorithm used in step S102 may be a network model with target detection capabilities, and the network model may mark the image area corresponding to the target. Optionally, the network model corresponding to the deep learning algorithm is one of Fast R-CNN, YOLO, and SSD. Further optionally, the deep learning algorithm model may be a model trained using a dataset of positive and negative samples of workpiece weld defects as a training dataset, wherein the positive sample images of the dataset are sample images of weld defects, and the negative sample images are sample images of welds without defects.
[0043] In order to improve the efficiency of determining the image matching evaluation index between the current target area image and the prior target area image, in step S104, the corresponding image matching evaluation index can be determined based on the mapping relationship between the prior eigenvalues corresponding to the pixels in the prior target area image, the current target eigenvalues and the image matching evaluation index when the first two are determined.
[0044] Optionally, the control module controls the weld defect classification module to determine the image matching evaluation index between the current target area image and the prior target area image according to the prior eigenvalue and target eigenvalue corresponding to the prior target area image, and the algorithm used is as follows;
[0045]
[0046] Where P represents the image matching evaluation index between the current target area image and the prior target area image, m represents the number of rows of pixels in the current target area image, n represents the number of columns of pixels in the current target area image, i represents the serial number of the row where a certain pixel in the current target area image is located, j represents the serial number of the column where a certain pixel in the current target area image is located, and x ij Indicates the current target feature value corresponding to the pixel point in the i-th row and j-th column of the current target area image, Represents x ij , p represents the number of rows of pixels in the prior target area image, q represents the number of columns of pixels in the prior target area image, k represents the serial number of the row where a certain pixel in the prior target area image is located, l represents the serial number of the column where a certain pixel in the prior target area image is located, x′ kl Represents the prior eigenvalue corresponding to the pixel point in the kth row and lth column of the prior target area image, Represents x′ kl The mean of .
[0047] The image matching evaluation index between the current target area image and the prior target area image obtained by the algorithm for determining the matching evaluation index can represent the degree of image matching between the current target area image and the prior target area image. The larger the value of the image matching evaluation index, the higher the degree of image matching between the current target area image and the prior target area image, that is, the more similar the current target area image and the prior target area image are. Since the prior target area image is an image of a sample weld having at least two defects, the prior target area image with the largest image matching evaluation index in the prior target area image set is the image in the prior target area image set that is most similar to the current target area image, that is, the weld defect corresponding to the current target area image can be represented as the weld defect corresponding to the prior target area image. Therefore, the weld defect category corresponding to the current target area image can be determined to be consistent with the weld defect category corresponding to the prior target area image. Specifically, in the process of the control module controlling the weld defect classification module to determine the weld defect category corresponding to the current target area image according to the image matching evaluation index, the weld defect classification module screens out the prior target area image with the largest image matching evaluation index to determine that the defect category of the current target area image is the weld defect category corresponding to the prior target area image with the largest image matching evaluation index. Optionally, based on experience, the value range of the image matching evaluation index determined based on the above algorithm is (0.5, 1]. Among them, when the obtained image matching evaluation index is less than 0.5, the image similarity between the current target area image and the prior target area image is low. At this time, it can be directly determined that the weld defect category of the current target area image is not related to the weld defect category corresponding to the prior target area image. Further optionally, before the above-mentioned weld defect classification module screens out the image matching evaluation index, it can be determined whether the obtained image matching evaluation index is greater than or equal to 0.5 to narrow the screening range, thereby improving the screening efficiency.
[0048] In order to improve the accuracy of the image matching evaluation index between the current target area image and the prior target area image, the current target feature value may optionally include one of the horizontal gradient value, vertical gradient value, grayscale value, and brightness value of the current target area image. In this case, it can be understood that the image feature type of the current target feature is consistent with the image feature type of the prior target feature, that is, when the current target feature value is the horizontal gradient value of the current target area image, it can be determined that the prior target feature value is the horizontal gradient value of the prior target area image.
[0049] Taking into account the risk that the image matching evaluation index may be affected by the high sensitivity of a single image feature, thereby affecting the reliability of its judgment of the matching degree between the current target area image and the prior target area image, the above-mentioned image feature type may be a "composite image feature" obtained by performing a feature fusion operation on the corresponding image features of the image's horizontal gradient, vertical gradient, grayscale, and brightness. Optionally, the image feature may be graded according to the eigenvalues corresponding to the above-mentioned image features. Taking the horizontal gradient of the image as an example, it may be divided into several level ranges in ascending order according to the eigenvalues, and the levels divided are 1-10. Further optionally, the eigenvalues corresponding to the above-mentioned composite image features may be determined according to the following algorithm:
[0050] T=αT1+βT2+γT3+δT4
[0051] Wherein, T is the composite image feature value, T1 represents the level of horizontal gradient, T2 represents the level of vertical gradient, T3 represents the grayscale level, T4 represents the brightness level, and α, β, γ, and δ represent the corresponding influence coefficients. Optionally, α, β, γ, and δ can be preset by those skilled in the art based on experience.
[0052] In addition to the identification and classification of weld defects, the area size of weld defects is often also an important indicator for evaluating the quality of the weld. In the weld combination defect identification and classification method disclosed in the present invention, the size of the target area image can be used to determine whether the size of the weld defect area meets expectations. Specifically, the control module can control the image analysis module to perform a target image recognition operation on the weld defect based on the deep learning algorithm on the real-time weld image to determine the target area image corresponding to the weld defect image, that is, after step S102, as shown in FIG. Figure 4 As shown, the method further includes the following steps:
[0053] S203, the control module controls the image analysis module to calculate the ratio of the image size of the target area image corresponding to the weld defect image to the image size of the real-time weld image. Optionally, the above image size can be expressed in terms of image resolution.
[0054] S204. The control module determines whether the ratio of the image size of the target area image corresponding to the weld defect image to the image size of the weld real-time image is greater than or equal to a predetermined threshold. If so, execute step S205a; if not, execute step S205b.
[0055] S205a: The control module controls the detection result generation module to generate a second detection result. The second detection result indicates that the weld defect area corresponding to the weld defect image belongs to the abnormal area range.
[0056] S205b: The control module controls the detection result to generate a third detection result. The third detection result indicates that the weld defect area corresponding to the weld defect image belongs to a normal area range.
[0057] Finally, it should be noted that the method for identifying and classifying combined weld defects disclosed in the embodiment of the present invention only discloses a preferred embodiment of the present invention, which is only used to illustrate the technical solution of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments can still be modified, or some of the technical features thereof can be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for identifying and classifying weld combination defects, characterized in that: The method is applied to a weld defect detection system, which includes a control module, a real-time image acquisition module, an image analysis module, a weld defect classification module, and a detection result generation module. The real-time image acquisition module, the image analysis module, the weld defect classification module, and the detection result generation module are electrically connected to the control module, respectively. The control module is used to control the operation of the real-time image acquisition module, the image analysis module, the weld defect classification module, and the detection result generation module. The method comprises: The control module controls the real-time image acquisition module to acquire a real-time image of the weld of the target workpiece; The control module controls the image analysis module to perform a target image recognition operation on the weld defect based on the deep learning algorithm on the real-time weld image to determine a current target area image corresponding to the current weld defect image; The control module controls the image analysis module to perform an image feature extraction operation on the current target area image to determine a current target feature value corresponding to a pixel point of the current target area image; The control module controls the weld defect classification module to determine an image matching evaluation index between the current target area image and the prior target area image based on a priori eigenvalue corresponding to the priori target area image and the current target eigenvalue, wherein the priori target area image is an image in a pre-made priori target area image set, and the priori target area image is an image of a sample weld having at least two defects; The control module controls the weld defect classification module to determine the weld defect category corresponding to the current target area image according to the image matching evaluation index; The control module controls the detection result generation module to generate a first detection result, wherein the first detection result includes a weld defect image position of the target workpiece and a corresponding weld defect category, wherein the weld defect image position corresponds to a position of the current target area image in the weld real-time image; The control module controls the weld defect classification module to determine the image matching evaluation index between the current target area image and the prior target area image based on the prior feature value corresponding to the prior target area image and the target feature value, and the algorithm used is as follows; , Where, Represents the image matching evaluation index between the current target area image and the prior target area image, Indicates the number of rows of pixels in the current target area image. Indicates the number of columns of pixels in the current target area image. Indicates the serial number of the row where a pixel point of the current target area image is located. Indicates the column number of a pixel in the current target area image. Indicates the current target area image Rank The current target feature value corresponding to the pixel point in the column, express The mean of Represents the number of rows of pixels in the prior target area image, Represents the number of columns of pixels in the prior target area image, Indicates the serial number of the row where a pixel point of the prior target area image is located, Indicates the column number of a pixel in the prior target area image. Represents the first Rank The prior eigenvalues corresponding to the pixel points in the column, express The mean of .
2. The weld combination defect identification and classification method according to claim 1, characterized in that: The network model corresponding to the deep learning algorithm is one of Fast R-CNN, YOLO and SSD.
3. The weld combination defect identification and classification method according to claim 2, characterized in that: The current target feature value includes one of a horizontal gradient value, a vertical gradient value, a grayscale value, and a brightness value of the current target area image.
4. The weld combination defect identification and classification method according to claim 3, characterized in that: After the control module controls the image analysis module to perform a target image recognition operation on the real-time weld image based on a deep learning algorithm to determine a target area image corresponding to the weld defect image, the method further includes: The control module controls the image analysis module to determine the ratio of the image size of the target area image corresponding to the weld defect image to the image size of the weld real-time image; The control module determines whether the ratio of the image size of the target area image corresponding to the weld defect image to the image size of the real-time weld image is greater than or equal to a predetermined threshold value. If so, the control module controls the detection result generation module to generate a second detection result, and the second detection result indicates that the weld defect area corresponding to the weld defect image belongs to the abnormal area range. If not, the control module controls the detection result to generate a third detection result, and the third detection result indicates that the weld defect area corresponding to the weld defect image belongs to the normal area range.
5. The weld combination defect identification and classification method according to claim 4, characterized in that: In the process of the control module controlling the weld defect classification module to determine the weld defect category corresponding to the current target area image according to the image matching evaluation index, the weld defect classification module screens out the prior target area image with the largest image matching evaluation index to determine that the defect category of the current target area image is the weld defect category corresponding to the prior target area image with the largest image matching evaluation index.
Citation Information
Patent Citations
A Weld Defect Identification Method Based on an Improved LeNet-5 Model
CN108596892B
Pipeline weld defect detection method, device and system and storage medium
CN110969611A
Welding seam defect type detection method and device, electronic equipment and storage medium
CN111292303A