High-resolution welding ray image welding seam positioning and defect detection method
Through the roaming Gaussian extraction and weld feature recombination combined with the cross-layer feature fusion network model, the problem of insufficient information loss and adaptive recognition capabilities of weld positioning and defect detection in high-resolution welding ray images is solved, and high-precision Weld defect detection.
Patent Information
- Application Number
- CN202411437745.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-15
- Publication Date
- 2024-12-27
AI Technical Summary
The prior art has problems of information loss and insufficient adaptive recognition capabilities in high-resolution welding ray images, especially the length and width of the weld and the complex defect pattern, resulting in insufficient detection accuracy.
Weld positioning is achieved through DCT extraction, data fitting and morphological operations using weld extraction method, weld feature recombination method and weld defect detection network model (RFMWD) based on cross-layer feature fusion. , combined with U-shaped network structure and feature enhancement module, realize high-quality detection of weld defects.
Weld defect detection under high resolution conditions is achieved, and detection accuracy and adaptability are improved. DICE, VOE, RVD, Recall, Jaccard, and Model Size indicators all achieve the best performance, providing an effective weld defect detection solution.
Smart Images

Figure CN119205718A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of computer technology and modern manufacturing technology, and in particular to a high-resolution welding radiographic image weld positioning and defect detection method. Background Art
[0002] Welding is an important processing technology in the manufacturing industry. The quality of welding is directly related to the safety of equipment and personnel. The rapid development of modern industry has put forward higher requirements on welding quality. In actual industrial production operations, welds are prone to various defects such as incomplete penetration and slag inclusion. These defective workpieces will bring major safety hazards during service. Industrial X-ray non-destructive testing methods are now often used to image the welds and then use computers to detect their internal defects.
[0003] Defects and welding texture information are distributed in the weld, so it is very important to ensure high-quality weld extraction. The threshold segmentation method is usually used to extract the weld area, but this method generally has the problem of difficulty in determining the segmentation threshold, and its adaptability is greatly limited. For weld defect detection, the defect position can be obtained through the detection method of neural network learning prediction, such as the combination of deep learning network and defect detection mentioned in patent number CN116740039A "A system and method for surface defect detection of aviation structural parts based on machine vision", which effectively improves the accuracy of defect detection. However, for high-resolution radiographic images, the detection accuracy is insufficient and the existing methods cannot be adapted. The patent with application number CN202211398444.6 discloses a high-quality weld and weld defect recognition system, method, and storage medium, which still has the following shortcomings for the problem of high-resolution shell weld positioning and defect detection: 1. The resolution of the original radiographic film image in the actual industrial field is high, and the defect features are mainly concentrated in the weld area, which is not convenient for direct defect detection. 2. The existing weld length and width are relatively large, and the information loss is serious when using conventional compression methods. 3. Defect patterns are complex and varied, and traditional networks lack the ability to adaptively identify and adjust defects. Summary of the invention
[0004] In view of the above, the present invention proposes a method for high-resolution welding radiographic image weld positioning and defect detection. The method is divided into three steps: weld extraction, weld reorganization, and defect detection. The designed cross-layer feature fusion weld defect detection network model (RFMWD) is used to realize image segmentation and achieve high-quality detection of shell weld defects under high-resolution conditions.
[0005] In order to achieve the above object, the technical solution adopted by the present invention is:
[0006] A high-resolution welding radiographic image weld positioning and defect detection method comprises the following steps:
[0007] Step 1, construct a walking Gaussian weld extraction method;
[0008] Step 2: Design a method for constructing a small sample data set with high-resolution weld feature recombination. Specifically, the extracted long weld features with a large aspect ratio are reorganized into square-like weld features, and then the reorganized features are arranged and combined using the full permutation method. The combination times are calculated as follows:
[0009] R N =R n !
[0010] Step 3, design a new weld defect detection network model RFMWD based on cross-layer feature fusion;
[0011] Step 4: Test the trained network model on the constructed dataset GDXray to obtain performance analysis results.
[0012] Furthermore, the step 1 specifically includes the following sub-steps:
[0013] 1.1, high-frequency information extraction method based on discrete cosine transform (DCT): convert the two-dimensional image from the spatial domain to the frequency domain, discard the low-frequency information, and retain the high-frequency information;
[0014] 1.2, Based on the data fitting method, the direction of the weld is judged; the classic OTSU method is used in combination with morphological operations to realize the binary processing of the high-frequency information of the characters, and then the minimum bounding rectangle is used to realize the position extraction of the non-weld area information;
[0015] 1.3, to achieve accurate extraction of weld area.
[0016] Furthermore, in the step 1.1: the low-frequency information with concentrated energy is eliminated by using the mean brightness as an adaptive threshold, and then the inverse transformation of DCT is performed, and the HSV color space that is more in line with the human visual system is used for colorization.
[0017] Furthermore, the step 1.3 is specifically as follows:
[0018] Assume that the image matrix currently being processed is m×n, f(x,y) represents the pixel value at point (x,y), and the weld features are processed using formula (1), and the output is f(y)
[0019]
[0020] In order to locate the welding area more effectively, formula (2) is designed to process the lateral statistical characteristics, which represents the lateral characteristics after processing;
[0021]
[0022] Among them, C ef Indicates the expansion coefficient of the statistical feature, and implements the expansion processing of the statistical feature;
[0023] A walking model weld area positioning method is designed, and the calculation formula is:
[0024]
[0025] Where W represents the step size of the walk model, and F(y) represents the M×W feature statistics of the local area.
[0026] Furthermore, the step 3 specifically includes the following sub-steps:
[0027] 3.1. The main network uses a U-shaped network structure. The feature encoding module in the backbone of the network model adopts the RSU module. The input channel is set to 16 and the output channel is set to 32.
[0028] 3.2. Add a feature enhancement module FFE to the jump connection part of the network to merge the features extracted by the attention module with the features extracted by the hybrid dilated convolution;
[0029] 3.3. Design a cross-layer feature fusion MFF module. The MFF module connects the feature map obtained by the FFE module after the adjacent two down-sampling feature maps are connected with the feature map of the current layer after the FFE module, and performs two convolution operations.
[0030] Furthermore, the weld defect detection network model RFMWD with cross-layer feature fusion is used to locate welds and defects, and the process is as follows:
[0031] The input image is passed through the RSU module in the encoder to obtain the intermediate features Figure 1 , the intermediate features obtained Figure 1 After obtaining the temporary intermediate feature map through the FFE module, the temporary intermediate feature map is sent to the next RSU module to obtain the intermediate feature Figure 2 , the intermediate features obtained Figure 2 It is connected in series with the temporary intermediate feature map of the previous layer, and then upsampled after being processed by the CARFE structure to obtain the feature Figure 3 , the feature Figure 3 After being connected to the feature map obtained by the upper MFF module, upsampling operation is performed together to obtain the feature Figure 4 , 5 , 6, 7, and finally the features Figure 3 , 4 , 5, 6, and 7 are fused to obtain the final output result image.
[0032] Compared with the prior art, the present invention has the following beneficial effects:
[0033] 1. The walking Gaussian weld extraction method designed by the present invention converts weld features into one-dimensional data features using Gaussian functions, which can quickly and effectively realize the positioning extraction of welds.
[0034] 2. The weld feature reorganization method designed in the present invention reorganizes long weld features with a large aspect ratio into square-like weld features, which can retain the effective information of the weld to the greatest extent. Based on this, the data set is remade to pave the way for future work.
[0035] 3. The cross-layer feature fusion weld defect detection network model (RFMWD) designed by the present invention takes into account both speed and accuracy in weld defect recognition. Under the same conditions, this defect detection model achieves the best detection performance on public data sets, with DICE, VOE, RVD, Recall, Jaccard, and Model Size indicators all ranking first, providing an effective solution for high-resolution weld defect detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Figure 1 It is the overall flow chart of the present invention.
[0037] Figure 2 This is a schematic diagram for determining the direction of the weld.
[0038] Figure 3 Schematic diagram of the walking Gaussian weld extraction effect.
[0039] Figure 4 Schematic diagram of the weld defect detection network model with cross-layer feature fusion.
[0040] Figure 5 Schematic diagram of feature enhancement module.
[0041] Figure 6 Schematic diagram of feature fusion module.
[0042] Figure 7 Test sample detection result diagram. DETAILED DESCRIPTION
[0043] The following is a clear and complete description of the technical solution of the present invention in combination with the embodiments of the present invention and the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0044] Figure 1The figure shows the overall flow chart of the present invention. The method proposes a walking Gaussian weld location method to locate the weld area in the welding ray data set, and then uses the feature recombination method to complete the design of the data set. Finally, the cross-layer feature fusion weld defect detection network model (RFMWD) is used to achieve image segmentation and perform segmentation testing. Specifically, the following steps are included:
[0045] Step 1: construct a weld extraction method based on walking Gaussian;
[0046] 1.1, High-frequency information extraction method based on discrete cosine transform (DCT). Convert the two-dimensional image from the spatial domain to the frequency domain, discard the low-frequency information, and retain the high-frequency information. The calculation formula of the two-dimensional discrete cosine transform is:
[0047]
[0048] Among them, F DCT It is the coefficient obtained by transformation, f(x,y) represents the pixel value of the image, i is the horizontal frequency of the two-dimensional wave, j is the vertical frequency of the two-dimensional wave, and the value range is (0,mn-1), mn is the size of the image, and the calculation formula of C(i) is:
[0049]
[0050] Furthermore, the low-frequency information (weld information) with concentrated energy is eliminated using the mean brightness as the adaptive threshold, where the mean brightness calculation formula is:
[0051]
[0052] The calculation formula for eliminating low-frequency information with concentrated energy is:
[0053]
[0054] Finally, the inverse transformation of DCT is performed, and the transformation formula is:
[0055]
[0056] Furthermore, in order to improve the visualization effect of the inverse transformed image, the HSV color space, which is more in line with the human visual system, is used for colorization processing;
[0057] 1.2, based on the data fitting method, the weld direction is judged; the classic OTSU method is used in combination with morphological operations to realize the binarization of the high-frequency information of the characters, and then the minimum bounding rectangle is used to realize the position extraction of the non-weld area information. The calculation expression is (6). In this paper, S is set to (5,5), OTSU represents the OTSU adaptive binarization method, MF represents mean filtering, and MinR represents the minimum bounding rectangle processing;
[0058]
[0059] Based on the extracted character position information set, the present invention designs a least square fitting method for determining the approximate direction of the weld. The present invention assumes that the equation to be solved is (7) (8), and the coefficient vector equation to be solved is A:
[0060] A=[a n ,a n-1 ,...,a2,a1,a0] T (7)
[0061]
[0062] in:
[0063]
[0064] Among them, the position of the center point of the located character is (10):
[0065]
[0066] 1.3, to achieve accurate extraction of the weld area. Assume that the image currently being processed is m×n, f(x,y) represents the pixel value at point (x,y), and use formula (11) to process the weld features, and the output is f(y)
[0067]
[0068] In order to locate the welding area more effectively, formula (12) is designed to process the lateral statistical characteristics, which represents the lateral characteristics after processing;
[0069]
[0070] Among them, C ef Indicates the expansion coefficient of the statistical feature and implements the expansion processing of the statistical feature.
[0071] A new weld area positioning method based on the walking model is designed, and the calculation formula is:
[0072]
[0073] Where W represents the step size of the walking model, and F(y) represents the M×W feature statistics of the local area;
[0074] Step 2: Design a small sample data set construction method for high-resolution weld feature recombination. A weld feature recombination method is proposed to reorganize long weld features with large aspect ratio into square-like weld features, which can retain the effective information of the weld to the greatest extent. The calculation formula is (14);
[0075]
[0076] R W =R w / (R n +1) (15)
[0077] R H =R h ×(R n +1) (16)
[0078] Among them, R w is the weld image width, R h is the weld image height, R n is the total number of cuts, R W is the width of the feature reconstructed image, R H The height of the reconstructed image for the feature;
[0079] In addition, in order to enrich the data set, the full permutation method is used to permute and combine the reorganized features to complete the production of the weld data set. The formula for calculating the number of combinations is as follows:
[0080] R N =R n ! (17)
[0081] Step 3, a new weld defect detection network model (RFMWD) based on cross-layer feature fusion is designed;
[0082] 3.1, the main network uses a U-shaped network structure. The feature encoding module in the backbone of the network model uses an RSU module, but its input channel is set to 16 and the output channel is set to 32 to obtain the feature encoding module of this network model; the input image is passed through the RSU module in the encoder to obtain the intermediate feature Figure 1 ;
[0083] 3.2, add a feature enhancement module (FFE) to the jump connection part of the network to merge the features extracted by the attention module with the features extracted by the hybrid dilated convolution. Figure 1 After obtaining the temporary intermediate feature map through the FFE module, the temporary intermediate feature map is sent to the next RSU module, and this cycle is repeated four times to obtain the intermediate feature map. Figure 2 ;
[0084] 3.3, the intermediate features obtained in step 3.2 Figure 2 It is connected in series with the temporary intermediate feature map of the previous layer, and then upsampled after being processed by the CARFE structure to obtain the feature Figure 3 ;
[0085] 3.4, design the cross-layer feature fusion MFF module. The MFF module connects the feature map obtained by the FFE module of the adjacent two down-sampled feature maps with the feature map of the current layer after the FFE module, and performs two convolution operations. Figure 3 After being connected to the feature map obtained by the upper MFF module, upsampling operation is performed together to obtain the feature Figure 4 , 5 , 6, 7;
[0086] 3.5, combine the features obtained in steps 3.3 and 3.4 Figure 3 , 4 , 5, 6, and 7 are fused to obtain the final output result graph;
[0087] Step 4: Test the trained network model on the data set to obtain performance analysis results;
[0088] In the present invention, training and testing the network in step 4 is to train and test the processed data. Specifically, the data set samples obtained in step 1 are divided into a training set, a validation set and a test set, wherein the training set is used to train the RFMWD network model obtained in step 3, the validation set is used to adjust the parameters of the RFMWD network model, and the test set is used to test whether the RFMWD network model is accurate;
[0089] In order to reflect the effect of the network model of the present invention, the present invention performs defect segmentation on the data set, and the computer equipment and environment configuration are shown in Table 1;
[0090] Table 1 Computer equipment and experimental environment configuration table
[0091]
[0092] This paper uses the classic network model in the field of image segmentation for qualitative and quantitative experimental comparison. The larger the DICE, Recall, and Jaccard indicators, the better the segmentation accuracy, and the smaller the VOE and RVD indicators, the smaller the segmentation error. Model Size indicates the final model size, and the smaller it is, the lower the model complexity. The method performance comparison experiment is shown in Table 2;
[0093] Table 2 Experimental comparison results of various method models on 52 test sets
[0094]
[0095] From the comprehensive analysis of the indicators listed in Table 2, it can be seen that the method model designed by the present invention can achieve a balance between detection accuracy and model complexity, and all indicators are in the forefront, among which DICE, VOE, RVD, Recall, Jaccard, and ModelSize indicators are all in the first place, which provides a practical, effective and feasible solution for weld defect detection and has good application prospects.
[0096] Depend on Figure 7 It can be seen that the defects of U2Net, U2NetP and AWDL-Net models are seriously missed, especially the detection effect of the defect-intensive parts is poor. The defect segmentation model designed in the present invention can effectively realize high-precision detection of defects.
[0097] The above is an explanation of the specific implementation of the present invention, rather than a limitation of the present invention. Those skilled in the relevant technical field can also make various equivalent technical solutions without departing from the scope of the present invention, so all equivalent technical solutions should be included in the patent protection scope of the present invention.
Claims
1. A method for high-resolution welding radiographic image weld positioning and defect detection, characterized in that: The steps include: Step 1, construct a walking Gaussian weld extraction method; Step 2: Design a method for constructing a small sample data set with high-resolution weld feature recombination. Specifically, the extracted long weld features with a large aspect ratio are reorganized into square-like weld features, and then the reorganized features are arranged and combined using the full permutation method. The combination times are calculated as follows: R N =R n ! Step 3, design a new weld defect detection network model RFMWD based on cross-layer feature fusion; Step 4: Test the trained network model on the constructed dataset GDXray to obtain performance analysis results.
2. The high-resolution welding radiographic image weld positioning and defect detection method according to claim 1 is characterized in that: The step 1 specifically includes the following sub-steps: 1.1, high-frequency information extraction method based on discrete cosine transform (DCT): convert the two-dimensional image from the spatial domain to the frequency domain, discard the low-frequency information, and retain the high-frequency information; 1.2, Based on the data fitting method, the direction of the weld is judged; the classic OTSU method is used in combination with morphological operations to realize the binary processing of the high-frequency information of the characters, and then the minimum bounding rectangle is used to realize the position extraction of the non-weld area information; 1.3, to achieve accurate extraction of weld area.
3. The high-resolution welding radiographic image weld positioning and defect detection method according to claim 2 is characterized in that: In the step 1.1: the low-frequency information with concentrated energy is eliminated by using the mean brightness as an adaptive threshold, and then the inverse transformation of DCT is performed, and the HSV color space that is more in line with the human visual system is used for colorization.
4. The high-resolution welding radiographic image weld positioning and defect detection method according to claim 3 is characterized in that: The step 1.3 is as follows: Assume that the image matrix currently being processed is m×n, f(x,y) represents the pixel value at point (x,y), and the weld features are processed using formula (1), and the output is f(y) In order to locate the welding area more effectively, formula (2) is designed to process the lateral statistical characteristics, which represents the lateral characteristics after processing; Among them, C ef Indicates the expansion coefficient of the statistical feature, and implements the expansion processing of the statistical feature; A walking model weld area positioning method is designed, and the calculation formula is: Where W represents the step size of the walk model, and F(y) represents the M×W feature statistics of the local area.
5. The high-resolution welding radiographic image weld positioning and defect detection method according to claim 1, characterized in that: The step 3 specifically includes the following sub-steps: 3.
1. The main network uses a U-shaped network structure. The feature encoding module in the backbone of the network model adopts the RSU module. The input channel is set to 16 and the output channel is set to 32. 3.
2. Add a feature enhancement module FFE to the jump connection part of the network to merge the features extracted by the attention module with the features extracted by the hybrid dilated convolution; 3.
3. Design a cross-layer feature fusion MFF module. The MFF module connects the feature map obtained by the FFE module after the adjacent two down-sampling feature maps are connected with the feature map of the current layer after the FFE module, and performs two convolution operations.
6. The high-resolution welding radiographic image weld positioning and defect detection method according to claim 5, characterized in that: The weld defect detection network model RFMWD with cross-layer feature fusion is used to locate welds and defects. The process is as follows: The input image is passed through the RSU module in the encoder to obtain intermediate feature map 1, and the intermediate feature map 1 is passed through the FFE module to obtain a temporary intermediate feature map, and then the temporary intermediate feature map is sent to the next RSU module to obtain intermediate feature map 2. The intermediate feature map 2 is connected in series with the temporary intermediate feature map of the previous layer, and then upsampled after being processed by the CARFE structure to obtain feature map 3. Feature map 3 is connected to the feature map obtained by the upper level through the MFF module and then upsampled together to obtain feature maps 4, 5, 6, and 7 respectively. Finally, feature maps 3, 4, 5, 6, and 7 are fused to obtain the final output result map.
Citation Information
Patent Citations
A high-quality weld and weld defect identification system, method, and storage medium
CN115439483B
Eddy current heating type pipeline defect infrared imaging testing device and test method
CN105372263A
