A method for detecting defects in pile leg welds

Through the combination of wavelet transform mode maximum multi-scale edge detection and deep learning model, the problem of poor results in pile leg weld defect detection in the prior art when the background is complex is achieved, and high accuracy and high efficiency detection effects are achieved.

CN116823756BActive Publication Date: 2025-05-02江苏永康智能防务科技股份有限公司
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202310745818.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-25
Publication Date
2025-05-02
Estimated Expiration
2043-06-25

AI Technical Summary

Technical Problem

The existing pile leg weld defect detection method has a reduced detection effect when the image background is complex, and there are missed or missed detection. It is weak in versatility and it is difficult to effectively detect weld defects in different production scenarios.

Method used

The wavelet transform mode maximum value multi-scale edge detection method is used to obtain the image edge of the largest connecting domain. Through the trained weld area division model and convolutional neural network model, we determine whether there are defects in the potential area and identify defect areas and categories.

Benefits of technology

It improves the accuracy and efficiency of weld defect detection, reduces missed and missed detection, and enhances the universality and effectiveness of detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116823756B_ABST
    Figure CN116823756B_ABST
Patent Text Reader

Abstract

The present invention relates to a pile leg weld defect detection method. The pile leg weld defect detection method of the present invention uses a wavelet transform modulus maximum multi-scale edge detection method to obtain the image edge of the largest connected domain, thereby achieving the acquisition of a potential area with defects. Then, a weld area division model is used to determine whether the potential area contains defects, and a convolutional neural network model is used to determine the specific defect area and defect category of the defect. Compared with the existing weld defect detection method, it improves the accuracy of detection by retaining the connected domain with the largest area and eliminating non-weld areas. At the same time, before identifying the defect area and defect category, the weld area division model is used to pre-determine whether the potential area contains defects, which further improves the accuracy of defect detection, reduces missed detection and false detection of defects, and greatly improves the effectiveness of weld defect detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a weld defect detection method, in particular to a pile leg weld defect detection method. Background Art

[0002] With the rapid development of target recognition weld defect technology, behavior simulation, and big data technology, the use of deep learning methods to detect pile leg weld defects has gradually become a mainstream method and has been widely used in the traditional industrial vision field.

[0003] Researchers from all over the world have conducted relevant research on the problem of pile leg weld defect detection. Among them, Abdehak M proposed a method of rapid detection and segmentation using a combination of multiple threshold methods to detect weld defects. The method specifically uses X-ray images and combines the threshold method to extract weld defect features. The algorithm has a high detection accuracy for relatively clear weld defect areas. However, when the image background is complex and changeable, such as when the image has uneven brightness, the detection effect will drop sharply. Therefore, Zhichao Liao et al. proposed a fixed background detection method. The main idea is to fit the background area where the detection exists, and finally complete the extraction of weld defect features in the detection area by eliminating the background area.

[0004] Although the above weld defect detection methods have good detection effects on weld defect detection, there are still many shortcomings. For example, although the weld defect detection area can be roughly located, there is a certain position difference from the actual defect area, and missed detection and false detection may occur during detection. At the same time, these methods do not consider the similarities between defective images and non-defective images in algorithm design. In actual production, defective images and non-defective images exist evenly. In the detection, defective images may be detected in non-weld images, which has a great impact on the detection accuracy. Therefore, these methods are not very versatile. In different actual production scenarios, better weld defect detection algorithms need to be proposed to improve the detection effect.

[0005] The Chinese patent with the publication number of "CN115984272A" and the name of "Semi-trailer axle defect identification method based on computer vision" discloses a semi-trailer axle defect identification method based on computer vision, which obtains each suspicious connected domain in the weld area image of the axle surface, determines the edge rule degree value of each suspicious connected domain, and then determines each target connected domain in each suspicious connected domain; according to the gray value of the pixel point in each target connected domain, determines the internal gray change degree value and gray curve evaluation value corresponding to each target connected domain, and then determines the credibility of the slag inclusion defect corresponding to each target connected domain, so as to finally determine the slag inclusion defect area in each target connected domain. Although this defect identification method can realize the detection of weld defects, it is mainly aimed at slag inclusion defects and porosity defects, and its scope of application is limited. Summary of the invention

[0006] In order to solve the above technical problems, an object of the present invention is to provide a pile leg weld defect detection method which is less prone to false detection and has a high detection accuracy.

[0007] The pile leg weld defect detection method of the present invention comprises the following steps:

[0008] Step S1: Acquire potential areas that may have defects in the image;

[0009] Step S2: using the trained weld area division model to determine whether there are defects in the potential area obtained in step S1, and outputting the potential area with defects;

[0010] Step S3: using the trained convolutional neural network model to determine the specific defect area and defect category in the potential area output in step S2;

[0011] The steps for obtaining the potential area that may have defects in step S1 are as follows:

[0012] Step S11: extracting all connected domains in the image;

[0013] Step S12: retain the connected domain with the largest area, and set the grayscale values ​​in the remaining connected domains to 0;

[0014] Step S13: For the connected domain with the largest area in step S12, use the wavelet transform modulus maximum multi-scale edge detection method to obtain the image edge, and select the area containing the image edge, which is the potential area that may have defects.

[0015] The advantage of the pile leg weld defect detection method is that it uses the wavelet transform modulus maximum multi-scale edge detection method to obtain the image edge of the maximum connected domain, thereby achieving the acquisition of the potential area with defects. Then, the weld area division model is used to determine whether the potential area contains defects, and the convolutional neural network model is used to determine the specific defect area and defect category of the defect.

[0016] Since the weld area is generally large, compared with the existing weld defect detection method, the pile leg weld defect detection method retains the connected domain with the largest area, thereby eliminating the non-weld area, avoiding the detection of defects in the non-weld area and improving the detection accuracy.

[0017] At the same time, before identifying the defect area and defect category, it uses the weld area division model to pre-judge whether the potential area contains defects. This not only improves the efficiency of defect detection, but also further improves the accuracy of defect detection, reduces missed detection and false detection of defects, and greatly improves the effectiveness of weld defect detection.

[0018] Furthermore, the pile leg weld defect detection method of the present invention pre-processes the image before step S1, comprising the following steps:

[0019] Steps to reduce image noise: Use nonlinear filtering to reduce image noise;

[0020] Steps to change the grayscale of the image: convert the three-channel image into a single-channel image;

[0021] The steps of data transformation of the image are as follows: the image is corrected by using gamma transformation;

[0022] The steps of equalizing the image using grayscale histogram.

[0023] The preprocessing of the image facilitates the acquisition of the potential area by the subsequent program and improves the accuracy of the acquisition of the potential area.

[0024] Further, in the pile leg weld defect detection method of the present invention, the weld area division model in step S2 is obtained by the following steps:

[0025] Step S21: sorting the extracted feature data and adding real labels;

[0026] Step S22: Using the feature data extracted in step S21, the weld area division model is trained through a decision tree classifier.

[0027] Furthermore, the pile leg weld defect detection method of the present invention includes an image normalization step before step S3;

[0028] If the image is greater than or equal to 416*416 pixels, it is scaled proportionally; if it is less than 416*416 pixels, the Seam-Carving algorithm is used for non-proportional scaling;

[0029] When performing non-proportional transformation on an image, first determine the image size. If the image exceeds the normalized size, scale it proportionally. After meeting the specified size requirements, continue to perform non-proportional transformation until the image finally meets the size requirements.

[0030] Furthermore, the pile leg weld defect detection method of the present invention further includes the following steps:

[0031] S14: Divide the potential area into several columns;

[0032] S15: For each column of the potential area, the square weighted grayscale centroid method is used to obtain the brightness center point of the column area. The calculation formula is:

[0033]

[0034] Among them, (υ c ,ν c ) is the coordinate of the brightness center point, (u,v i ) is the coordinate of a pixel in a column, N is the total number of pixels in a column, and I is the gray value of the pixel;

[0035] S16: Using a continuous edge fitting operation, the brightness center points in each column area obtained in step S15 are fitted into continuous sub-pixel center lines, and the area and perimeter of the area surrounded by the sub-pixel center lines are calculated.

[0036] The square weighted grayscale centroid method is used to obtain the center point, and then the sub-pixel center line and the area and perimeter it encloses are obtained through continuous edge fitting operations. The weld area division model in step S2 can use the area and perimeter features to predict it to determine whether it is a defect. This operation enables the pile leg weld defect detection method of the present invention to maintain a good detection effect when the weld area is small and the defect characteristics are weak.

[0037] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention and implement it in accordance with the contents of the specification, the embodiments of the present invention are described in detail below. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] Figure 1 It is a flow chart of the pile leg weld defect detection method. DETAILED DESCRIPTION

[0039] The specific implementation of the present invention is further described in detail below in conjunction with the accompanying drawings and examples. The following examples are used to illustrate the present invention, but are not intended to limit the scope of the present invention.

[0040] See also Figure 1 The pile leg weld defect detection method of this embodiment comprises the following steps:

[0041] Step S1: Acquire potential areas that may have defects in the image;

[0042] Step S2: using the trained weld area division model to determine whether there are defects in the potential area obtained in step S1, and outputting the potential area with defects;

[0043] Step S3: using the trained convolutional neural network model to determine the specific defect area and defect category in the potential area output in step S2;

[0044] The steps for obtaining the potential area that may have defects in step S1 are as follows:

[0045] Step S11: extracting all connected domains in the image;

[0046] Step S12: retain the connected domain with the largest area, and set the grayscale values ​​in the remaining connected domains to 0;

[0047] Step S13: For the connected domain with the largest area in step S12, use the wavelet transform modulus maximum multi-scale edge detection method to obtain the image edge, and select the area containing the image edge, which is the potential area that may have defects.

[0048] The pile leg weld defect detection method of the present invention uses the wavelet transform modulus maximum multi-scale edge detection method to obtain the image edge of the maximum connected domain, thereby achieving the acquisition of the potential area with defects. Then, the weld area division model is used to determine whether the potential area contains defects, and the convolutional neural network model is used to determine the specific defect area and defect category of the defect.

[0049] Since the weld area is generally large, compared with the existing weld defect detection method, the pile leg weld defect detection method retains the connected domain with the largest area, thereby eliminating the non-weld area, avoiding the detection of defects in the non-weld area and improving the detection accuracy.

[0050] At the same time, before identifying the defect area and defect category, it uses the weld area division model to pre-judge whether the potential area contains defects. This not only improves the efficiency of defect detection, but also further improves the accuracy of defect detection, reduces missed detection and false detection of defects, and greatly improves the effectiveness of weld defect detection.

[0051] The area of ​​the connected domain is the number of pixels with non-zero grayscale values ​​in the connected domain.

[0052] The wavelet transform modulus maximum multi-scale edge detection method is an existing image edge detection method, which can accurately and quickly extract image edges. Its specific method steps are existing technologies. For details, please refer to relevant literature and will not be repeated here.

[0053] Among them, the weld area division model is used to determine whether there are defects in the potential area. After obtaining characteristic information through feature extraction, the classifier is used to train the model and realize classification, thereby achieving the correct division of the weld defect area. The specific steps include:

[0054] Organize the extracted feature data and add real labels;

[0055] The above-mentioned feature data is used to train the model through a decision tree classifier to predict and classify the data to be tested;

[0056] Among them, the convolutional neural network model is used to obtain specific defect areas and defect categories. It is a YOLOv3 network model. Its specific structure and principle can be referred to in relevant literature and will not be repeated here.

[0057] Preferably, the pile leg weld defect detection method of this embodiment pre-processes the image before step S1, including the following steps:

[0058] Steps to reduce image noise: Use nonlinear filtering to reduce image noise;

[0059] Steps to change the grayscale of the image: convert the three-channel image into a single-channel image;

[0060] The steps of data transformation of the image are as follows: the image is corrected by using gamma transformation;

[0061] The steps of equalizing the image using grayscale histogram.

[0062] The preprocessing of the image facilitates the subsequent program to obtain the potential area and improves the accuracy of the potential area acquisition.

[0063] Among them, the step of data transformation of the image enhances the contrast between the target and the background. Specifically, the gamma transform corrects the grayscale value. After the too low or too high value is calculated, the grayscale value needs to be reassigned and calculated. The pixel value at each position on the original image is multiplied by the parameter, and the enhanced image visual effect will become better.

[0064] Among them, the methods of denoising the image by nonlinear filtering, converting the three-channel image into a single-channel image, and correcting the image by gamma transformation are all existing methods, and their specific principles and steps are not repeated here.

[0065] The steps to equalize the image using the grayscale histogram are as follows:

[0066] A1: Determine the grayscale level of the image to determine whether grayscale conversion is required;

[0067] A2: Calculate the original histogram distribution probability;

[0068] A3: Calculate the cumulative value of the histogram probability;

[0069] A4: Formula for calculating pixel mapping;

[0070] A5: Perform formula mapping on all pixels in the image, and all the mapped pixels form a new image;

[0071] The step of equalizing the image using the grayscale histogram improves the visual effect of the image by expanding the distribution range of the image grayscale.

[0072] Preferably, in the pile leg weld defect detection method of this embodiment, the weld area division model in step S2 is obtained by the following steps:

[0073] Step S21: sorting the extracted feature data and adding real labels;

[0074] Step S22: Using the feature data extracted in step S21, the weld area division model is trained through a decision tree classifier.

[0075] Preferably, the pile leg weld defect detection method of this embodiment includes an image normalization step before step S3;

[0076] If the image is greater than or equal to 416*416 pixels, it is scaled proportionally; if it is less than 416*416 pixels, the Seam-Carving algorithm is used for non-proportional scaling;

[0077] When performing non-proportional transformation on an image, first determine the image size. If the image exceeds the normalized size, scale it proportionally. After meeting the specified size requirements, continue to perform non-proportional transformation until the image finally meets the size requirements.

[0078] Preferably, the pile leg weld defect detection method of this embodiment further includes the following steps:

[0079] S14: Divide the potential area into several columns;

[0080] S15: For each column of the potential area, the square weighted grayscale centroid method is used to obtain the brightness center point of the column area. The calculation formula is:

[0081]

[0082] Among them, (υ c ,ν c ) is the coordinate of the brightness center point, (u,v i ) is the coordinate of a pixel in a column, N is the total number of pixels in a column, and I is the gray value of the pixel;

[0083] S16: Using a continuous edge fitting operation, the brightness center points in each column area obtained in step S15 are fitted into continuous sub-pixel center lines, and the area and perimeter of the area surrounded by the sub-pixel center lines are calculated.

[0084] The square weighted grayscale centroid method is used to obtain the center point, and then the sub-pixel center line and the area and perimeter it encloses are obtained through continuous edge fitting operations. The weld area division model in step S2 can use the area and perimeter features to predict it, so as to more accurately determine whether it is a defect. This operation enables the pile leg weld defect detection method of the present invention to maintain a good detection effect when the weld area is small and the defect characteristics are weak.

[0085] The above are only preferred embodiments of the present invention, which are used to assist those skilled in the art to implement the corresponding technical solutions, and are not used to limit the scope of protection of the present invention, which is defined by the attached claims. It should be pointed out that for those of ordinary skill in the art, a number of equivalent improvements and variations can be made on the basis of the technical solution of the present invention, and these improvements and variations should also be regarded as the scope of protection of the present invention. At the same time, it should be understood that although this specification is described in accordance with the above-mentioned embodiments, not every embodiment contains only one independent technical solution. This narrative method of the specification is only for the sake of clarity. Those skilled in the art should regard the specification as a whole, and the technical solutions of each embodiment can also be appropriately combined to form other embodiments that can be understood by those skilled in the art.

Claims

1. A method for detecting defects in pile leg welds, characterized in that: The following steps are involved: Step S1: Acquire potential areas that may have defects in the image; Step S2: Use the trained weld region division model to determine whether there are defects in the potential area obtained in step S1, and output the potential area with defects; the weld region division model is obtained by the following steps: Step S21: sorting the extracted feature data and adding real labels; Step S22: Using the feature data extracted in step S21, and training the weld area division model through a decision tree classifier; Step S3: Using the trained YOLOv3 network model to determine the specific defect area and defect category in the potential area output in step S2; The steps for obtaining the potential area that may have defects in step S1 are as follows: Step S11: extracting all connected domains in the image; Step S12: retain the connected domain with the largest area, and set the grayscale values ​​in the remaining connected domains to 0; Step S13: for the connected domain with the largest area in step S12, use the wavelet transform modulus maximum multi-scale edge detection method to obtain the image edge, and select the area containing the image edge, which is the potential area that may have defects; Step S14: Divide the potential area into several columns; Step S15: For each column of the potential area, the square weighted grayscale centroid method is used to obtain the brightness center point in the column area. The calculation formula is: ; in, is the coordinate of the brightness center point, is the coordinate of a pixel in a column, N is the total number of pixels in a column, and I is the gray value of the pixel; Step S16: Using a continuous edge fitting operation, the brightness center points in each column area obtained in step S15 are fitted into continuous sub-pixel center lines, and the area and perimeter of the area surrounded by the sub-pixel center lines are calculated.

2. The method for detecting defects in pile leg welds according to claim 1, characterized in that: The image is preprocessed before step S1, including the following steps: Steps to reduce image noise: Use nonlinear filtering to reduce image noise; Steps to change the grayscale of the image: convert the three-channel image into a single-channel image; The steps of data transformation of the image are as follows: the image is corrected by using gamma transformation; The steps of equalizing the image using grayscale histogram.

3. The method for detecting defects in pile leg welds according to claim 1, characterized in that: The step S3 includes an image normalization step before the step S3; If the image is greater than or equal to 416*416 pixels, it is scaled proportionally; if it is less than 416*416 pixels, the Seam-Carving algorithm is used for non-proportional scaling.

Citation Information

Patent Citations

  • Welding seam defect detection method and system, storage medium, computer equipment and terminal

    CN111932489A