Weld joint morphology and surface defect online detection and evaluation method and system
Through the combination of line laser scanning and fully convolutional neural network, efficient detection of weld morphology and surface defects is achieved, solving the problems of low detection efficiency and insufficient accuracy in the existing technology, and adapting to the diversity and illumination changes of the welding site. , providing efficient and accurate weld inspection results.
Patent Information
- Application Number
- CN202410646837.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-23
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2044-05-23
AI Technical Summary
Existing weld inspection technology is difficult to achieve efficient detection and evaluation of weld morphology and surface defects at the same time, and traditional methods are inefficient, inaccurate, and difficult to adapt to the diversity and illumination changes of the welding site.
A line laser is used to scan the weld longitudinally and converted into 3D point cloud and 2D grayscale images. It is combined with a fully convolutional neural network to detect the weld morphology and surface defects, and realizes the calculation of the overall morphology parameters of the weld and the pixel-level classification of defects. , obtain the visualization, spatial positioning and geometric size information of defects for comprehensive evaluation.
It improves the efficiency and accuracy of weld detection, has strong anti-interference ability, is suitable for online real-time detection at the welding site, can accurately obtain the morphological parameters and defect information of the weld, and reduces the false detection rate.
Smart Images

Figure CN118602979A
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of weld nondestructive testing, and in particular, to a method and system for online detection and evaluation of weld morphology and surface defects. In particular, it relates to an online detection and evaluation method for weld morphology and surface defects based on a fully convolutional neural network and a line laser. Background Art
[0002] Welding is one of the most widely used processing and connection methods in modern industrial production. The inspection and control of welding quality is very important, which determines whether the welding is qualified and whether it meets the use requirements. Welding quality mainly depends on several aspects such as weld formation, weld microstructure and properties, and weld mechanical properties. Among them, weld formation is an important indicator to measure welding quality and is closely related to weld quality. Its inspection content mainly includes weld morphology and surface defect detection and weld internal defect detection. Among them, weld internal defect detection is mainly achieved by non-destructive testing methods such as X-ray and ultrasonic flaw detection. It is mainly used in the inspection of pressure vessels and important load-bearing structure welds, and has complete and strict quality inspection standards. Weld morphology and surface defect detection are the most widely used, and basically all industrial welds must be inspected for morphology and surface defects. At present, in the welding of important industries such as nuclear power, chemical industry containers, high-speed rail manufacturing, automobiles and ships, in addition to internal inspection requirements, strict weld morphology and surface defect inspections are required.
[0003] Traditional weld surface quality inspection uses contact measurement methods, using auxiliary measurement tools such as gauges, calipers and coordinate measuring machines to measure weld geometric features. Not only is the efficiency low and the stability poor, but the measuring tool is also easy to directly contact the workpiece surface during the measurement process, causing damage to the workpiece surface. Non-contact measurement technology came into being. Without contacting the surface of the object being measured, it obtains data information on the surface of the object through media such as light, electricity, and sound, including ultrasonic testing, eddy current testing, penetration testing, and visual testing, so as to perform surface quality inspection.
[0004] The line laser scanning method is a relatively advanced non-contact contour detection method in current industrial applications. It can obtain the contour information of the object and realize the three-dimensional high-precision measurement of the object. It has been applied to the detection of railway tracks and tire edge wear. The traditional detection method relies on professional inspectors to evaluate the weld quality, which has problems such as low detection efficiency, insufficient consistency of detection quality, and high professional requirements for evaluation. With the continuous improvement of the intelligent level of production and manufacturing, the demand for automated and high-precision weld defect detection technology in the welding field is also increasing. Process optimization, welding quality improvement, and on-site online real-time judgment are becoming more and more important.
[0005] In recent years, with the rapid development of computer and digital technology, computer vision has been widely used in the field of welding due to its large amount of information, high precision and large detection range. Machine vision technology can simulate the visual perception of the naked eye, obtain information from the collected original images, extract features, process and understand them, and finally be applied to the fields of actual weld defect classification, target detection and semantic understanding. Weld inspection based on machine vision technology meets the needs of digital production and has played an excellent role in weld quality inspection.
[0006] The invention patent with publication number CN107764205B discloses a three-dimensional detection device and method for high-frequency resistance welding weld morphology based on line structured light scanning, wherein the device includes a line structured light sensor, a line displacement transmission system and a computer. The line structured light sensor includes a laser, an industrial camera and a fixed panel; the line displacement transmission system includes a base, a stepper motor and a stepper motor controller. The object to be welded is placed on the base of the transmission system, and line structured light scanning is adopted. The industrial camera captures the weld laser light strip image, and the three-dimensional point cloud data of the weld is obtained through software system processing. The morphological features such as the width and height of the weld are analyzed, so that the quality of the weld can be judged.
[0007] The invention patent with publication number CN104697467B discloses a method for detecting weld appearance shape and surface defects based on line laser scanning. The actual contour curve of any section of the weld is obtained by using a line laser, and the actual contour curve is high-dimensionally fitted to obtain a fitted contour curve, and then the first-order derivative curve of the fitted contour curve is obtained. The addressing range of the weld start and end point is determined by the first-order derivative curve, and the point with the largest difference between the actual contour curve and the fitted contour curve is found within the addressing range as the weld start and end point of the weld section. Scan along the weld longitudinally to obtain the overall three-dimensional contour image of the weld. If the difference between any point on the weld contour curve and the fitted contour curve exceeds the preset standard value, it is determined that the weld at that location has a defect.
[0008] The invention patent with publication number CN114354639B discloses a real-time detection method and system for weld defects based on 3D point cloud. The method includes: setting a normal weld contour template based on historical data; scanning the weld cross section by line laser, collecting weld 3D point cloud data in real time, and recording the initial contour data obtained by real-time scanning of the line laser as data; performing inflection point detection based on DBSCAN density clustering algorithm to determine the current weld contour data; calculating the distance d between the current weld contour data and the normal weld contour template by DTW algorithm, thereby judging whether there are defects on the weld surface.
[0009] The invention patent with publication number CN109900706B discloses a method for detecting welds and weld defects based on deep learning, which uses the YOLOV3 network to realize weld and / or weld defect detection; the network training steps are as follows: the workpiece image uses a positioning frame to select and mark the weld, which is used as a training data set; the weld image uses a positioning frame to select the weld defect and mark the defect type, which is used as a training data set I; the coordinates xp, yp, and width and height dimensions wp, hp of the positioning frame are obtained; the network is initialized; the input tensor aj is randomly called for training calculation, and the detection result is output; the error function loss of the prediction result is calculated using the detection result; the weight W and the bias value b are adjusted in combination with the gradient descent method, and the trained network is obtained in this cycle.
[0010] The above-mentioned weld detection methods generally use single point cloud or image data with single functions, and it is difficult to simultaneously realize the detection and evaluation of weld morphology and surface defects. In terms of weld morphology detection, single-stripe curve fitting is often used for weld extraction, which is greatly affected by noise. In terms of weld defect detection, defect extraction methods based on three-dimensional point clouds often use abnormal point detection methods to determine the presence or absence of defects, which makes it difficult to determine the specific category of defects and has a high false detection rate. Defect detection methods based on two-dimensional images are greatly affected by lighting and are difficult to adapt to online applications at welding sites. At the same time, target detection models are generally used to obtain anchor frames of defects, which do not have the ability to extract defect contours, and cannot realize richer defect information such as three-dimensional visualization, spatial positioning, and three-dimensional size calculation of defects. Summary of the invention
[0011] In view of the defects in the prior art, the purpose of the present invention is to provide a method and system for online detection and evaluation of weld morphology and surface defects.
[0012] The method for online detection and evaluation of weld morphology and surface defects provided by the present invention comprises:
[0013] Step S1: Scanning the weld longitudinally by a line laser to obtain the overall three-dimensional profile height data of the weld morphology;
[0014] Step S2: converting the overall three-dimensional profile height data obtained by scanning into a 3D point cloud and a 2D grayscale image;
[0015] Step S3: Process the 3D point cloud, extract the weld area, and calculate the overall weld morphology;
[0016] Step S4: annotating the weld surface defects on the 2D grayscale image using a polygonal positioning frame to construct a weld surface defect data set;
[0017] Step S5: using the weld 2D grayscale image as input and pixel-level defect classification as output, a fully convolutional neural network defect detection model is established, and training, verification and testing are performed;
[0018] Step S6: Visualize, spatially locate and calculate geometric dimensions of the defects determined by the defect detection model;
[0019] Step S7: Combine the overall weld morphology with the surface defect detection to comprehensively evaluate the weld surface quality;
[0020] Step S8: Based on the constructed weld morphology and surface defect detection comprehensive evaluation system, the surface quality of the actual welding weld is detected and evaluated online.
[0021] Preferably, step S1 comprises: performing line laser scanning on the weld in three-dimensional space: taking the longitudinal direction of the weld as the Y-axis direction, the cross-sectional direction as the X-axis direction, and the height as the Z-axis direction, the line laser is parallel to the X-axis, moves along the Y-axis direction at a preset constant speed, and obtains height data of the weld cross section at a preset acquisition frequency;
[0022] Preferably, the step S2 comprises: step S2.1: converting the scan height data into a 3D point cloud according to the spatial resolution of the X-axis and the Y-axis; step S2.2: converting the scan height data into a 2D grayscale image using the Sobel combined with Gaussian enhancement image processing algorithm, and then dividing the 2D grayscale image into subframes using an equal interval cropping method;
[0023] Preferably, the step S3 comprises: step S3.1: removing invalid data points in the 3D point cloud; step S3.2: identifying points in the weld area of the 3D point cloud; step S3.3: obtaining the 3D point cloud of the weld area; step S3.4: computing the overall morphology of the weld based on the point cloud of the weld area;
[0024] Preferably, the step S4 comprises: step S4.1: using a polygonal positioning frame to mark different types of surface defects of the weld on the 2D grayscale image to obtain a corresponding mask image; step S4.2: rotating, mirroring, adding noise to the 2D grayscale image and the mask image to perform data augmentation to form a weld surface defect data set; step S4.3: dividing the obtained data set into a training set, a validation set and a test set according to a preset ratio;
[0025] Preferably, step S5 comprises:
[0026] Step S5.1: Establish a fully convolutional neural network defect detection model with the weld 2D grayscale image as input and pixel-level defect classification as output;
[0027] Step S5.2: Configure model training parameters, including setting learning rate, decay method, optimizer, batch size batch_size, and number of iterations epoch;
[0028] Step S5.3: Preprocess the 2D grayscale image: first convert it into a three-channel RGB image, then crop and scale it to the standard size required by the full convolutional neural network;
[0029] Step S5.4: Perform transfer learning on the established defect detection model: first freeze the weight parameters of the feature extraction part, fine-tune the network, and after a preset number of training iterations, unfreeze the feature extraction part to perform weight training on the entire model;
[0030] Step S5.5: Use the validation set to perform an overfitting check to determine whether the loss change of the defect detection model for the validation set shows an overfitting phenomenon of first decreasing and then increasing. When the loss of the validation set no longer decreases, stop training;
[0031] Step S5.6: Use the test set to test the accuracy and recall rate indicators of the defect detection model to verify the adaptability and accuracy of the model.
[0032] Preferably, step S6 comprises:
[0033] Step S6.1: Extract defects from the network output: The output of the defect detection model is a three-dimensional tensor of [height, width, num_classes], where height, width and num_classes are the height, width and depth of the tensor respectively, and the pixel value in the output three-dimensional tensor is the predicted probability value of the corresponding defect category; first, the defect prediction three-dimensional tensor output by the model is scaled back to the original image size, and then the mask images of different defects are obtained according to the category corresponding to the maximum predicted value, and then the connected domains of the mask images of defects of different categories are extracted respectively to obtain the two-dimensional contours of each defect;
[0034] Step S6.2: Defect visualization, spatial positioning and size calculation: Reconstruct the two-dimensional topological relationship of the defect based on Delaunay triangulation, and return to the three-dimensional point cloud to obtain the visualization result of the defect; combine the two-dimensional defect contour with the 3D point cloud for analysis, and obtain the position of the defect in the actual weld according to the relative position of the defect in the subframe and the number of frames; obtain the three-dimensional rectangular bounding box of the defect point cloud, and calculate the length, width and height of the defect;
[0035] The step S7 includes: combining the weld area obtained in step S3, determining whether the defect is on the weld surface, eliminating falsely detected defects, and comprehensively evaluating the weld morphology and whether the defect exceeds the tolerance according to the corresponding welding quality standard.
[0036] The on-line detection and evaluation system for weld morphology and surface defects provided by the present invention comprises:
[0037] Data acquisition module M1: Scans the weld longitudinally through a line laser to obtain the overall three-dimensional profile height data of the weld morphology;
[0038] Data conversion module M2: converts the overall three-dimensional profile height data obtained by scanning into 3D point cloud and 2D grayscale image;
[0039] Shape calculation module M3: processes the 3D point cloud, extracts the weld area, and calculates the overall shape of the weld;
[0040] Dataset construction module M4: annotate the weld surface defects using polygonal positioning frames on the 2D grayscale image to construct a weld surface defect dataset;
[0041] Network construction module M5: takes the weld 2D grayscale image as input and pixel-level defect classification as output to establish a fully convolutional neural network defect detection model, and conducts training, verification and testing;
[0042] Defect detection module M6: Defect visualization, spatial positioning and geometric dimension calculation of defects determined by the defect detection model;
[0043] Comprehensive quality assessment module M7: Combines the overall weld morphology with surface defect detection to conduct a comprehensive assessment of the weld surface quality;
[0044] Online detection and evaluation module M8: Based on the constructed weld morphology and surface defect detection comprehensive evaluation system, the surface quality of the actual welding weld is detected and evaluated online.
[0045] Preferably, the module M1 comprises: performing line laser scanning on the weld in three-dimensional space: taking the longitudinal direction of the weld as the Y-axis direction, the cross-sectional direction as the X-axis direction, and the height as the Z-axis direction, the line laser is parallel to the X-axis, moves along the Y-axis direction at a preset constant speed, and obtains the height data of the weld cross section according to a preset acquisition frequency;
[0046] Preferably, the module M2 comprises: module M2.1: converting the scan height data into a 3D point cloud according to the spatial resolution of the X-axis and the Y-axis; module M2.2: converting the scan height data into a 2D grayscale image using the Sobel combined with Gaussian enhancement image processing algorithm, and then dividing the 2D grayscale image into subframes using an equal interval cropping method;
[0047] Preferably, the module M3 comprises: module M3.1: removing invalid data points in the 3D point cloud; module M3.2: identifying points in the weld area of the 3D point cloud; module M3.3: obtaining the 3D point cloud of the weld area; module M3.4: computing the overall morphology of the weld based on the point cloud of the weld area;
[0048] Preferably, the module M4 comprises: module M4.1: using a polygonal positioning frame to mark different types of surface defects of the weld on the 2D grayscale image to obtain a corresponding mask image; module M4.2: rotating, mirroring, adding noise to the 2D grayscale image and the mask image to perform data augmentation to form a weld surface defect data set; module M4.3: dividing the obtained data set into a training set, a validation set and a test set according to a preset ratio;
[0049] Preferably, the module M5 comprises:
[0050] Module M5.1: Establish a fully convolutional neural network defect detection model with a 2D grayscale image of the weld as input and pixel-level defect classification as output;
[0051] Module M5.2: Configure model training parameters, including setting learning rate, decay method, optimizer, batch size batch_size, and number of iterations epoch;
[0052] Module M5.3: Preprocess the 2D grayscale image: first convert it into a three-channel RGB image, then crop and scale it to the standard size required by the full convolutional neural network;
[0053] Module M5.4: Transfer learning of the established defect detection model: First, freeze the weight parameters of the feature extraction part, fine-tune the network, and after a preset number of training iterations, unfreeze the feature extraction part to perform weight training of the entire model;
[0054] Module M5.5: Use the validation set to perform an overfitting check to determine whether the loss change of the defect detection model on the validation set shows an overfitting phenomenon of first decreasing and then increasing. When the loss of the validation set no longer decreases, stop training;
[0055] Module M5.6: Use the test set to test the accuracy and recall rate indicators of the defect detection model to verify the adaptability and accuracy of the model.
[0056] Preferably, the module M6 comprises:
[0057] Module M6.1: Extract defects from network output: The output of the defect detection model is a three-dimensional tensor of [height, width, num_classes], where height, width and num_classes are the height, width and depth of the tensor respectively. The pixel value in the output three-dimensional tensor is the predicted probability value of the corresponding defect category. First, the defect prediction three-dimensional tensor output by the model is scaled back to the original image size, and then the mask images of different defects are obtained according to the category corresponding to the maximum predicted value. Then, the connected domains of the mask images of defects of different categories are extracted respectively to obtain the two-dimensional contours of each defect.
[0058] Module M6.2: Defect visualization, spatial positioning and size calculation: Reconstruct the 2D topological relationship of the defect based on Delaunay triangulation, and return to the 3D point cloud to obtain the visualization result of the defect; combine the 2D defect contour with the 3D point cloud for analysis, and obtain the position of the defect in the actual weld according to the relative position of the defect in the subframe and the number of frames; obtain the 3D rectangular bounding box of the defect point cloud, and calculate the length, width and height of the defect;
[0059] The module M7 includes: combining the weld area obtained by the module M3, judging whether the defect is on the weld surface, eliminating falsely detected defects, and comprehensively evaluating the weld morphology and whether the defect exceeds the tolerance according to the corresponding welding quality standard.
[0060] Compared with the prior art, the present invention has the following beneficial effects:
[0061] (1) Traditional passive visual sensing is greatly affected by the detection environment light, etc. The present invention adopts line laser visual detection, which has strong anti-interference ability to the ambient light; at the same time, the present invention can simultaneously realize the comprehensive evaluation of weld morphology and defect detection, effectively improving the measurement efficiency;
[0062] (2) The traditional welding defect detection method has a complex process and insufficient adaptability, and is difficult to adapt to the diverse forms of welds on site and the dynamic changes of light. The present invention adopts a deep learning full convolutional network, fully utilizing its efficient feature extraction capabilities, and can achieve pixel-level identification of defects with high accuracy and low missed detection rate. At the same time, it has strong adaptability to the diverse forms of welds on site and is suitable for on-site online detection of welds;
[0063] (3) The detection results of traditional weld surface detection methods only contain the distribution information of defects on the image, and lack specific three-dimensional spatial information such as position and size. The present invention uses line laser for three-dimensional measurement, obtains 3D point cloud and 2D grayscale image through data conversion, calculates weld surface morphology parameters based on point cloud, and realizes pixel-level classification of weld surface defects based on 2D grayscale image. Combined with 3D point cloud, the spatial information of defects in X, Y, and Z dimensions is obtained, and defect positioning and geometric size calculation are performed. Comprehensive and accurate detection and evaluation of weld surface are achieved through one-time line laser online scanning. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] Other features, objects and advantages of the present invention will become more apparent from the detailed description of non-limiting embodiments made with reference to the following drawings:
[0065] Figure 1 It is a flow chart of a method for online detection and evaluation of weld morphology and surface defects based on a fully convolutional neural network and a line laser in an embodiment of the present invention;
[0066] Figure 2 This is the principle diagram of the line laser scanning weld;
[0067] Figure 3a The original image of the weld. Figure 3b is a 2D grayscale image;
[0068] Figure 4 It is the intermediate result of 3D point cloud processing;
[0069] Figure 5 Schematic diagram of the calculation of the overall weld morphology;
[0070] Figure 6 The weld surface defect annotation results of the 2D grayscale image;
[0071] Figure 7 The fully convolutional neural network structure adopted;
[0072] Figure 8a and Figure 8b Convergence of the loss function for training a fully convolutional network for the dataset;
[0073] Figure 9a to Figure 9d Verify the prediction performance of the fully convolutional neural network for the test set;
[0074] Fig.10 It is the comprehensive detection and evaluation result of weld morphology and surface defects. DETAILED DESCRIPTION
[0075] The present invention is described in detail below in conjunction with specific embodiments. The following embodiments will help those skilled in the art to further understand the present invention, but are not intended to limit the present invention in any form. It should be noted that, for those of ordinary skill in the art, several changes and improvements can also be made without departing from the concept of the present invention. These all belong to the protection scope of the present invention.
[0076] Example 1
[0077] The embodiment of the present invention provides a method for online detection and evaluation of weld morphology and surface defects based on a fully convolutional neural network and a line laser, such as Figure 1 As shown, the details are as follows:
[0078] The weld is scanned by a line laser sensor to obtain the overall height data of the weld contour, which is converted into a 3D point cloud and a 2D grayscale image. The complete contour of the weld is extracted using 3D point cloud processing, and then the overall morphology of the weld is calculated; the 2D grayscale image is preprocessed and input into the fully convolutional neural network weld surface defect detection model to detect weld surface defects; the morphological parameters of the weld and the type, location and geometric size of the defect are obtained by combining the results of the two, and the surface quality of the weld is comprehensively evaluated. It includes the following steps:
[0079] Step S1: Scan the weld longitudinally by a line laser sensor to obtain the overall three-dimensional profile height data of the weld, such as Figure 2 As shown;
[0080] The step S1 includes: performing a line laser scan on the weld in three-dimensional space. With the longitudinal direction of the weld as the Y-axis direction, the cross-sectional direction as the X-axis direction, and the height as the Z-axis direction, the line laser sensor generates a line laser in the X-axis direction, projects and focuses on the weld surface, and moves along the Y-axis direction. In order to ensure the detection accuracy, the origin position of the X-axis is corrected before scanning to align it with the center of the weld. The line laser generates N points in one scan to obtain the contour information of the weld in the Z-axis (the length is N, the line laser measuring instrument model used in the embodiment is the Keyence line laser measuring instrument, N=800).
[0081] The line laser sensor moves along the Y-axis direction, continuously collecting weld profile data of different cross sections at a certain scanning frequency; finally, the scanning height data of the overall original profile of the weld is obtained (M×N matrix, M is determined by the specific weld length, N=800). The acquisition frequency used in the embodiment is 1000 Hz, and the moving speed is 150 mm / s.
[0082] Step S2: converting the overall three-dimensional profile height data obtained by scanning into a 3D point cloud and a 2D grayscale image;
[0083] The step S2 comprises:
[0084] Step S2.1: Convert the scan height data into a 3D point cloud according to the spatial resolution of the X-axis and the Y-axis. First, determine the conversion coefficient of the 3D point cloud. Use x_res to represent the spatial resolution of the X-axis, that is, the actual corresponding distance between adjacent points on the same row of the scan data, and y_res to represent the spatial resolution of the Y-axis, that is, the actual corresponding distance between adjacent points on the same column; then implement the spatial point cloud conversion. Traverse the data points of the scan data, and convert each data point into a spatial point in the 3D point cloud through the conversion coefficient. The conversion formula is: X=i*x_res, Y=j*y_res, Z=value; wherein X, Y, and Z represent the spatial point coordinates in the 3D point cloud, i represents the row of the scan data, j represents the column of the scan data, and value represents the height value of the data point (i, j) on the scan data. In the embodiment, the parameters x_res=0.1mm, y_res=0.15mm.
[0085] Step S2.2: Use the Sobel+Gaussian enhancement image processing algorithm to convert the scanned height data into a 2D grayscale image. First, use the Sobel operator to calculate the height difference diff_values between each point on each of the scanned data and its neighbor on the left; secondly, calculate the maximum and minimum values of the height difference diff_values, and linearly scale the corresponding height difference from the minimum to the maximum value to the range of 0-255 as the corresponding grayscale image pixel value; then use Gaussian enhancement to improve the image contrast, specifically, calculate the pixel mean and standard deviation of the grayscale image, calculate the linear scaling coefficient a=255 / (6*dev), b=-a*(mean-3*dev), and linearly scale each pixel to obtain the final result of the grayscale image, as shown in Figure 3; use the equal interval cropping method to divide the 2D grayscale image into subframes, and divide it into [800,800] subframes with an interval of 800 rows in the row direction, and fill the part less than 800 rows with a grayscale value of 128.
[0086] Step S3: Process the 3D point cloud and extract the weld area, such as Figure 4 As shown, the overall morphology of the weld is calculated.
[0087] The step S3 comprises:
[0088] Step S3.1: Remove invalid data points in the 3D point cloud. According to the valid range of the scan data, set the effective threshold to -200, and directly filter out those points smaller than this value;
[0089] Step S3.2: Identify points in the weld region of the 3D point cloud. First, fit the base plane of the parent material; then, traverse all points in the 3D point cloud and calculate the distance from each point to the base plane. If the distance is greater than the set distance threshold, it means that the point belongs to the weld region;
[0090] Step S3.3: Obtain the 3D point cloud of the weld area. First, the points in the weld area are converted into a binary image according to the conversion coefficient of the 3D point cloud, 1 indicates that the point exists, and 0 indicates that the point does not exist; then, the redundant noise points are removed by median filtering, and the redundant white points and black holes are repaired by morphological operations, and the largest area connected domain is retained to obtain the weld area mask; finally, the weld area mask and the scanning data are used to perform 3D point cloud conversion to obtain the weld area point cloud;
[0091] Step S3.4: Calculate the overall shape of the weld based on the weld area point cloud. Perform Canny edge extraction based on the weld area mask to obtain the weld edge contour, and calculate the weld edge shape parameters based on this, including weld length and straightness; calculate the weld shape parameters of each weld section based on each row of the weld area point cloud, including weld thickness, width, concavity and weld foot (such as Figure 5 The average value, standard deviation and other statistical results of each parameter are calculated.
[0092] In step S3.2, the base material reference plane is fitted using the random sampling consistency fitting plane algorithm. The process is as follows:
[0093] Step S3.2.1: Randomly select three non-collinear target points in the 3D point cloud, calculate the plane equation of the plane formed by the three target points, and obtain the plane model;
[0094] Step S3.2.2: Select other points in the 3D point cloud image and calculate the point-to-surface distance from the selected point to the plane model determined by the plane equation, compare the point-to-surface distance with the preset minimum distance threshold, if the point-to-surface distance is less than the minimum distance threshold, the selected point is an interior point, otherwise it is an exterior point, and record the number of all interior points;
[0095] Step S3.2.3: Repeat steps S3.2.1 and S3.2.2. If the number of internal points of the current plane model exceeds the number of internal points of the previous plane model, the current plane model is recorded;
[0096] Step S3.2.4: After reaching the set number of iterations, the plane with the most internal points is the reference plane.
[0097] Step S4: annotating the weld surface defects on the 2D grayscale image using a polygonal positioning frame to construct a weld surface defect data set;
[0098] The step S4 comprises:
[0099] Step S4.1: Use a polygonal positioning frame to mark different types of surface defects of the weld on the 2D grayscale image to obtain a corresponding mask image, such as Figure 6 As shown;
[0100] Step S4.2: Rotate, mirror, and add noise to the 2D grayscale image and the mask image to perform data augmentation to form a weld surface defect dataset;
[0101] Step S4.3: Divide the obtained data set into a training set, a validation set, and a test set in proportions of 75%, 10%, and 15%.
[0102] The classification of the weld surface defects includes: pores, undercuts and weld bumps; the corresponding category labels during annotation are: background 0, pores 1, undercuts 2, weld bumps 3, that is, the category parameter num_classes of the data set is 4.
[0103] Step S5: Establish a fully convolutional neural network defect detection model with the 2D grayscale image as input and pixel-level defect classification as output, and perform training, verification and testing;
[0104] The step S5 comprises:
[0105] Step S5.1: Establish a fully convolutional neural network defect detection model with a 2D grayscale image as input and pixel-level defect classification as output. The input shape of the fully convolutional neural network is [height, width, 3], where height and width are the height and width of the network input image, respectively. In the embodiment, height = 512, width = 512. The structure of the fully convolutional defect detection network is as follows: Figure 7 As shown, it can be divided into three parts: the first part is the feature extraction part, which uses the convolution layer and the maximum pooling layer to stack and obtain five preliminary effective feature layers; the second part is the feature restoration part, which uses the five preliminary effective feature layers obtained in the feature extraction part to upsample and perform feature fusion to obtain a final effective feature layer that integrates all features; the third part is the prediction part, which uses the last effective feature layer obtained to classify each feature point.
[0106] The feature extraction part is composed of a stack of convolutional layers + maximum pooling layers, using the VGG16 network structure. The input image size is 512*512*3. The specific layers are: conv1: perform two [3,3] 64-channel convolutions to obtain a preliminary effective feature layer of [512,512,64], and then perform 2×2 maximum pooling to obtain a feature layer of [256,256,64]; conv2: perform two [3,3] 128-channel convolutions to obtain a preliminary effective feature layer of [256,256,128], and then perform 2×2 maximum pooling to obtain a [128,128,128] feature layer; conv3: perform three [3,3] 256-channel convolutions to obtain a preliminary effective feature layer of [128,128,256], and then perform 2×2 maximum pooling to obtain a feature layer of [64,64,256]; conv4: perform three [3,3] 512-channel convolutions to obtain a preliminary effective feature layer of [64,64,512], and then perform 2×2 maximum pooling to obtain a feature layer of [32,32,512]; conv5: perform three [3,3] 512-channel convolutions to obtain a preliminary effective feature layer of [32,32,512].
[0107] The feature restoration part uses five preliminary effective feature layers for feature fusion, that is, the feature layers are upsampled and stacked, and when upsampling, they are directly upsampled by two times and then feature fusion is performed. The final feature layer has the same height and width as the input image.
[0108] In the prediction part, the features are used to obtain the prediction results, and a 1×1 convolution is used for channel adjustment to adjust the number of channels in the final layer to num_classes=4.
[0109] The loss function uses Dice Loss. The calculation formula is as follows:
[0110]
[0111] Among them, |X∩Y| is the true value, i.e. TP, |X| and |Y| are the true value and predicted value respectively, TP is true positive (TP), true negative (TN), false positive (FP) and false negative (FN). Among these four parts, negative examples refer to the parts that are not target labels, such as background, etc., and positive examples refer to the parts with target labels, i.e. target tasks.
[0112] Step S5.2: Adaptive moment estimation (Adam) optimizer is used to update the model weight parameters. The initial value of the learning rate is set to 1e-4, and the learning rate decay method is used. Momentum = 0.9, the batch size batch_size is 2, the number of iterations in the freezing stage epoch is 100, and the number of iterations in the thawing stage epoch = 100.
[0113] Step S5.3: Preprocess the 2D grayscale image. First, convert it into a 3-channel RGB image, and then crop and scale the original 800×800 image to the standard input size of 512×512 for the full convolutional neural network.
[0114] Step S5.4: Perform transfer learning on the established defect detection model. First, freeze the weight parameters of the feature extraction part, including conv1, conv2, conv3, conv4 and conv5, and fine-tune the network. After a certain number of training iterations, unfreeze the feature extraction part to perform weight training on the entire model.
[0115] Step S5.5: Use the validation set to perform an overfitting check to determine whether the loss change of the validation set by the defect detection model shows an overfitting phenomenon of first decreasing and then increasing. When the loss of the validation set no longer decreases, stop training.
[0116] The convergence of the model's loss function and the changes in indicators during the training process are shown in Figure 8.
[0117] Step S5.6: Use the test set to test the prediction indicators of the defect detection model, including average intersection-over-union ratio, pixel accuracy, accuracy, and recall. The calculation formula is as follows:
[0118]
[0119]
[0120]
[0121]
[0122] Among them, there are k+1 categories including the background, p ij is the number of pixels that belong to class i but are predicted to be class j, i.e., p ii Represents the number of correctly classified classes i.
[0123] As shown in Figure 9, this is the semantic segmentation evaluation obtained through the test set.
[0124] Step S6: Visualize, spatially locate and calculate geometric dimensions of the defects determined by the defect detection model.
[0125] The step S6 comprises:
[0126] Step S6.1: Extract defects from network data. The input of the defect detection model is a three-dimensional tensor of [height, width, num_classes], where height, width and num_classes are the height, width and depth of the tensor respectively. The pixel value in the output three-dimensional tensor is the predicted probability value of the corresponding defect category. First, scale the defect prediction three-dimensional tensor output by the model back to the original image size, and then obtain the mask images of different defects according to the category corresponding to the maximum predicted value. Then, perform connected domain extraction on the mask images of defects of different categories to obtain the two-dimensional contours of each defect;
[0127] Step S6.2: Defect visualization, spatial positioning and size calculation. Reconstruct the two-dimensional topological relationship of the defect based on Delaunay triangulation, and return to the three-dimensional point cloud to obtain the visualization result of the defect; combine the two-dimensional defect contour with the 3D point cloud for analysis, and convert the relative position of the defect in the subframe and the number of frames into the position in the actual weld; obtain the three-dimensional rectangular bounding box of the defect point cloud, and calculate the length, width and height of the defect; the detection results of weld defects include the defect type, location and specific length, width and height;
[0128] Step S7: Combine the overall weld morphology with the surface defect detection to conduct a comprehensive assessment of the weld surface quality.
[0129] The step S7 includes: combining the weld area obtained in step S3, determining whether the defect is on the weld surface, eliminating falsely detected defects, and comprehensively evaluating the weld morphology and whether the defect exceeds the tolerance according to the corresponding welding quality standard.
[0130] First, eliminate falsely detected defects based on the basic characteristics of the defects. (1) Location of defects: Porosity defects are generally located inside the weld, undercut defects are generally located close to the two sides of the weld, and weld nodule defects are generally located close to the middle of the weld; (2) Shape of defects: Porosity is mostly circular or elliptical and has a relatively regular shape; undercuts are generally linear and have a certain length; weld nodules are generally ellipsoidal and have a certain length and width; (3) Size of defects: Porosity length and width are both small; undercuts are relatively slender and the length is generally significantly larger than the width; weld nodule defects are relatively large and are in the shape of a convex hill with a length-to-width ratio of approximately 0.5-2. Falsely detected defects can be eliminated based on these characteristics;
[0131] Then, the weld morphology and defects are judged according to the inspection standards. The main judgment criteria are as follows:
[0132] (a) Whether the weld length exceeds the given standard value;
[0133] (b) Whether the minimum and maximum values and fluctuation range of the weld thickness exceed the given standard values;
[0134] (c) Whether the minimum and maximum values and fluctuation range of the weld width exceed the given standard values;
[0135] (d) Whether the weld straightness and the deviation ratio on both sides exceed the given standard value;
[0136] (e) Whether the minimum and maximum values and fluctuation range of the weld concavity and convexity exceed the given standard values;
[0137] (f) Whether the minimum and maximum values and fluctuation range of the weld leg exceed the given standard values;
[0138] (g) Whether the length, width and height of the defect exceed the given standard values.
[0139] Fig.10 The figure shows the comprehensive evaluation results of weld morphology and surface defects, where the highlighted ones indicate the out-of-tolerance test results.
[0140] Step S8: Based on the constructed weld morphology and surface defect detection comprehensive evaluation system, the surface quality of the actual welding weld is detected and evaluated online.
[0141] The step S8 includes: after welding is completed, using a line laser sensor to scan the weld to obtain overall weld contour height data, converting it into a 3D point cloud and a 2D grayscale image, using 3D point cloud processing to extract the complete weld contour, and then calculating the overall weld morphology; preprocessing the 2D grayscale image and inputting it into a fully convolutional neural network weld surface defect detection model to obtain a pixel-level classification output of the defect; realizing defect visualization, calculating the spatial position and three-dimensional size, and combining it with the overall weld morphology to realize online comprehensive judgment of the weld surface quality.
[0142] The present invention can not only accurately obtain the overall contour morphology of the weld and the pixel-level classification of defects, but also obtain rich information such as defect visualization, spatial positioning and three-dimensional geometric dimensions of defects; the data collected based on laser scanning has strong resistance to light changes and is suitable for complex scenes at welding sites; the defect detection network based on full convolution has fast reasoning speed, high judgment accuracy, requires a small number of samples, has strong generalization ability, and is suitable for online real-time judgment of various types of welds at the site. Therefore, the present invention has great promotion and application value from the perspective of economic benefits and social benefits.
[0143] Example 2
[0144] The present invention also provides an online detection and evaluation system for weld morphology and surface defects. The online detection and evaluation system for weld morphology and surface defects can be realized by executing the process steps of the online detection and evaluation method for weld morphology and surface defects, that is, those skilled in the art can understand the online detection and evaluation method for weld morphology and surface defects as a preferred implementation mode of the online detection and evaluation system for weld morphology and surface defects.
[0145] The online detection and evaluation system for weld morphology and surface defects provided by the present invention comprises: a data acquisition module M1: scanning the weld longitudinally by a line laser to obtain the overall three-dimensional profile height data of the weld morphology; a data conversion module M2: converting the overall three-dimensional profile height data obtained by scanning into a 3D point cloud and a 2D grayscale image; a morphology calculation module M3: processing the 3D point cloud, extracting the weld area, and calculating the overall weld morphology; a data set construction module M4: annotating the weld surface defects by using a polygonal positioning frame on the 2D grayscale image, and constructing a weld surface defect data set; a network construction module M5: Building module M5: Taking the weld 2D grayscale image as input and pixel-level defect classification as output, a fully convolutional neural network defect detection model is established, and training, verification and testing are performed; defect detection module M6: Defect visualization, spatial positioning and geometric dimension calculation of defects determined by the defect detection model are performed; comprehensive quality assessment module M7: The overall weld morphology is combined with surface defect detection to conduct a comprehensive assessment of the weld surface quality; online detection and evaluation module M8: Based on the constructed weld morphology and surface defect detection comprehensive evaluation system, the surface quality of the actual weld is detected and evaluated online.
[0146] The module M1 includes: performing line laser scanning on the weld in three-dimensional space: the longitudinal direction of the weld is the Y-axis direction, the cross-sectional direction is the X-axis direction, and the height is the Z-axis direction. The line laser is parallel to the X-axis and moves along the Y-axis direction at a preset constant speed, and the height data of the weld cross section is obtained according to a preset acquisition frequency;
[0147] The module M2 includes: module M2.1: converting the scan height data into a 3D point cloud according to the spatial resolution of the X-axis and the Y-axis; module M2.2: converting the scan height data into a 2D grayscale image using the Sobel combined with Gaussian enhancement image processing algorithm, and then dividing the 2D grayscale image into subframes using an equal interval cropping method;
[0148] The module M3 comprises: module M3.1: removing invalid data points in the 3D point cloud; module M3.2: identifying points in the weld area of the 3D point cloud; module M3.3: obtaining the 3D point cloud of the weld area; module M3.4: calculating the overall shape of the weld based on the point cloud of the weld area;
[0149] The module M4 includes: module M4.1: using a polygonal positioning frame to mark different types of surface defects of the weld on the 2D grayscale image to obtain a corresponding mask image; module M4.2: rotating, mirroring, adding noise to the 2D grayscale image and the mask image to perform data augmentation to form a weld surface defect data set; module M4.3: dividing the obtained data set into a training set, a validation set and a test set according to a preset ratio;
[0150] The module M5 includes: module M5.1: taking the weld 2D grayscale image as input and pixel-level defect classification as output to establish a full convolutional neural network defect detection model; module M5.2: configuring model training parameters, including setting learning rate, attenuation mode, optimizer, batch size batch_size, and number of iterations epoch; module M5.3: preprocessing the 2D grayscale image: first converting it into a three-channel RGB image, and then cropping and scaling it to the standard size required by the full convolutional neural network; module M5.4: performing transfer learning on the established defect detection model: first freezing the weight parameters of the feature extraction part, fine-tuning the network, and after a preset number of training iterations, unfreezing the feature extraction part to perform weight training on the full model; module M5.5: using the validation set to perform an overfitting check to determine whether the loss change of the defect detection model on the validation set shows an overfitting phenomenon of first decreasing and then increasing, and when the loss of the validation set no longer decreases, stopping the training; module M5.6: using the test set to test the accuracy and recall rate indicators of the defect detection model to verify the adaptability and accuracy of the model.
[0151] The module M6 includes: Module M6.1: Extracting defects from the network output: The output of the defect detection model is a three-dimensional tensor of [height, width, num_classes], where height, width and num_classes are respectively the height, width and depth of the tensor, and the pixel value in the output three-dimensional tensor is the predicted probability value of the corresponding defect category; first, the defect prediction three-dimensional tensor output by the model is scaled back to the original image size, and then the mask images of different defects are obtained according to the category corresponding to the maximum predicted value, and then the connected domains of the mask images of defects of different categories are extracted respectively to obtain the two-dimensional contours of each defect; Module M6.2: Defect visualization, spatial positioning and size calculation: The two-dimensional topological relationship of the defect is reconstructed based on Delaunay triangulation, and returned to the three-dimensional point cloud to obtain the visualization result of the defect; The two-dimensional defect contour is combined with the 3D point cloud for analysis, and the position of the defect in the actual weld is obtained according to the relative position of the defect in the subframe and the number of frames; The three-dimensional rectangular bounding box of the defect point cloud is obtained, and the length, width and height of the defect are calculated;
[0152] The module M7 includes: combining the weld area obtained by the module M3, judging whether the defect is on the weld surface, eliminating falsely detected defects, and comprehensively evaluating the weld morphology and whether the defect exceeds the tolerance according to the corresponding welding quality standard.
[0153] Those skilled in the art know that, in addition to implementing the system, device and its various modules provided by the present invention in a purely computer-readable program code, it is entirely possible to implement the same program in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers and embedded microcontrollers by logically programming the method steps. Therefore, the system, device and its various modules provided by the present invention can be considered as a hardware component, and the modules included therein for implementing various programs can also be considered as structures within the hardware component; the modules for implementing various functions can also be considered as both software programs for implementing the method and structures within the hardware component.
[0154] The above describes the specific embodiments of the present invention. It should be understood that the present invention is not limited to the above specific embodiments, and those skilled in the art can make various changes or modifications within the scope of the claims, which does not affect the essence of the present invention. In the absence of conflict, the embodiments of the present application and the features in the embodiments can be combined with each other arbitrarily.
Claims
1. A method for online detection and evaluation of weld morphology and surface defects, characterized in that: include: Step S1: Scanning the weld longitudinally by a line laser to obtain the overall three-dimensional profile height data of the weld morphology; Step S2: converting the overall three-dimensional profile height data obtained by scanning into a 3D point cloud and a 2D grayscale image; Step S3: Process the 3D point cloud, extract the weld area, and calculate the overall weld morphology; Step S4: annotating the weld surface defects on the 2D grayscale image using a polygonal positioning frame to construct a weld surface defect data set; Step S5: using the weld 2D grayscale image as input and pixel-level defect classification as output, a fully convolutional neural network defect detection model is established, and training, verification and testing are performed; Step S6: Visualize, spatially locate and calculate geometric dimensions of the defects determined by the defect detection model; Step S7: Combine the overall weld morphology with the surface defect detection to comprehensively evaluate the weld surface quality; Step S8: Based on the constructed weld morphology and surface defect detection comprehensive evaluation system, the surface quality of the actual welding weld is detected and evaluated online.
2. The on-line detection and evaluation method for weld morphology and surface defects according to claim 1 is characterized in that: The step S1 comprises: performing line laser scanning on the weld in three-dimensional space: the longitudinal direction of the weld is the Y-axis direction, the cross-sectional direction is the X-axis direction, and the height is the Z-axis direction. The line laser is parallel to the X-axis and moves along the Y-axis direction at a preset constant speed, and the height data of the weld cross section is obtained according to a preset acquisition frequency; The step S2 includes: step S2.1: converting the scanning height data into a 3D point cloud according to the spatial resolution of the X-axis and the Y-axis; step S2.2: converting the scanning height data into a 2D grayscale image using the Sobel combined with Gaussian enhancement image processing algorithm, and then dividing the 2D grayscale image into subframes using an equal-interval cropping method.
3. The on-line detection and evaluation method for weld morphology and surface defects according to claim 1 is characterized in that: The step S3 comprises: step S3.1: removing invalid data points in the 3D point cloud; step S3.2: identifying points in the weld area of the 3D point cloud; step S3.3: obtaining the 3D point cloud of the weld area; step S3.4: calculating the overall shape of the weld based on the point cloud of the weld area; The step S4 includes: step S4.1: using a polygonal positioning frame to mark different types of surface defects of the weld on the 2D grayscale image to obtain a corresponding mask image; step S4.2: rotating, mirroring, adding noise to the 2D grayscale image and the mask image to perform data augmentation to form a weld surface defect data set; step S4.3: dividing the obtained data set into a training set, a validation set, and a test set according to a preset ratio.
4. The on-line detection and evaluation method for weld morphology and surface defects according to claim 1 is characterized in that: The step S5 comprises: Step S5.1: Establish a fully convolutional neural network defect detection model with the weld 2D grayscale image as input and pixel-level defect classification as output; Step S5.2: Configure model training parameters, including setting learning rate, decay method, optimizer, batch size batch_size, and number of iterations epoch; Step S5.3: Preprocess the 2D grayscale image: first convert it into a three-channel RGB image, then crop and scale it to the standard size required by the full convolutional neural network; Step S5.4: Perform transfer learning on the established defect detection model: first freeze the weight parameters of the feature extraction part, fine-tune the network, and after a preset number of training iterations, unfreeze the feature extraction part to perform weight training on the entire model; Step S5.5: Use the validation set to perform an overfitting check to determine whether the loss change of the defect detection model for the validation set shows an overfitting phenomenon of first decreasing and then increasing. When the loss of the validation set no longer decreases, stop training; Step S5.6: Use the test set to test the accuracy and recall rate indicators of the defect detection model to verify the adaptability and accuracy of the model.
5. The on-line detection and evaluation method for weld morphology and surface defects according to claim 1 is characterized in that: The step S6 comprises: Step S6.1: Extract defects from the network output: The output of the defect detection model is a three-dimensional tensor of [height, width, num_classes], where height, width and num_classes are the height, width and depth of the tensor respectively, and the pixel value in the output three-dimensional tensor is the predicted probability value of the corresponding defect category; first, the defect prediction three-dimensional tensor output by the model is scaled back to the original image size, and then the mask images of different defects are obtained according to the category corresponding to the maximum predicted value, and then the connected domains of the mask images of defects of different categories are extracted respectively to obtain the two-dimensional contours of each defect; Step S6.2: Defect visualization, spatial positioning and size calculation: Reconstruct the two-dimensional topological relationship of the defect based on Delaunay triangulation, and return to the three-dimensional point cloud to obtain the visualization result of the defect; combine the two-dimensional defect contour with the 3D point cloud for analysis, and obtain the position of the defect in the actual weld according to the relative position of the defect in the subframe and the number of frames; obtain the three-dimensional rectangular bounding box of the defect point cloud, and calculate the length, width and height of the defect; The step S7 includes: combining the weld area obtained in step S3, determining whether the defect is on the weld surface, eliminating falsely detected defects, and comprehensively evaluating the weld morphology and whether the defect exceeds the tolerance according to the corresponding welding quality standard.
6. A weld morphology and surface defect online detection and evaluation system, characterized in that: include: Data acquisition module M1: Scans the weld longitudinally through a line laser to obtain the overall three-dimensional profile height data of the weld morphology; Data conversion module M2: converts the overall three-dimensional profile height data obtained by scanning into 3D point cloud and 2D grayscale image; Shape calculation module M3: processes the 3D point cloud, extracts the weld area, and calculates the overall shape of the weld; Dataset construction module M4: annotate the weld surface defects using polygonal positioning frames on the 2D grayscale image to construct a weld surface defect dataset; Network construction module M5: takes the weld 2D grayscale image as input and pixel-level defect classification as output to establish a fully convolutional neural network defect detection model, and conducts training, verification and testing; Defect detection module M6: Defect visualization, spatial positioning and geometric dimension calculation of defects determined by the defect detection model; Comprehensive quality assessment module M7: Combines the overall weld morphology with surface defect detection to conduct a comprehensive assessment of the weld surface quality; Online detection and evaluation module M8: Based on the constructed weld morphology and surface defect detection comprehensive evaluation system, the surface quality of the actual welding weld is detected and evaluated online.
7. The online detection and evaluation system for weld morphology and surface defects according to claim 6 is characterized in that: The module M1 includes: performing line laser scanning on the weld in three-dimensional space: the longitudinal direction of the weld is the Y-axis direction, the cross-sectional direction is the X-axis direction, and the height is the Z-axis direction. The line laser is parallel to the X-axis and moves along the Y-axis direction at a preset constant speed, and the height data of the weld cross section is obtained according to a preset acquisition frequency; The module M2 includes: module M2.1: converting the scanning height data into a 3D point cloud according to the spatial resolution of the X-axis and the Y-axis; module M2.2: converting the scanning height data into a 2D grayscale image using the Sobel combined with Gaussian enhancement image processing algorithm, and then dividing the 2D grayscale image into subframes using an equal-interval cropping method.
8. The weld morphology and surface defect online detection and evaluation system according to claim 6, characterized in that: The module M3 comprises: module M3.1: removing invalid data points in the 3D point cloud; module M3.2: identifying points in the weld area of the 3D point cloud; module M3.3: obtaining the 3D point cloud of the weld area; module M3.4: calculating the overall shape of the weld based on the point cloud of the weld area; The module M4 includes: module M4.1: using a polygonal positioning frame to mark different types of surface defects of the weld on the 2D grayscale image to obtain a corresponding mask image; module M4.2: rotating, mirroring, adding noise to the 2D grayscale image and the mask image to perform data augmentation to form a weld surface defect data set; module M4.3: dividing the obtained data set into a training set, a validation set and a test set according to a preset ratio.
9. The online detection and evaluation system for weld morphology and surface defects according to claim 6 is characterized in that: The module M5 comprises: Module M5.1: Establish a fully convolutional neural network defect detection model with a 2D grayscale image of the weld as input and pixel-level defect classification as output; Module M5.2: Configure model training parameters, including setting learning rate, decay method, optimizer, batch size batch_size, and number of iterations epoch; Module M5.3: Preprocess the 2D grayscale image: first convert it into a three-channel RGB image, then crop and scale it to the standard size required by the full convolutional neural network; Module M5.4: Transfer learning of the established defect detection model: First, freeze the weight parameters of the feature extraction part, fine-tune the network, and after a preset number of training iterations, unfreeze the feature extraction part to perform weight training of the entire model; Module M5.5: Use the validation set to perform an overfitting check to determine whether the loss change of the defect detection model on the validation set shows an overfitting phenomenon of first decreasing and then increasing. When the loss of the validation set no longer decreases, stop training; Module M5.6: Use the test set to test the accuracy and recall rate indicators of the defect detection model to verify the adaptability and accuracy of the model.
10. The online detection and evaluation system for weld morphology and surface defects according to claim 6, characterized in that: The module M6 comprises: Module M6.1: Extract defects from network output: The output of the defect detection model is a three-dimensional tensor of [height, width, num_classes], where height, width and num_classes are the height, width and depth of the tensor respectively. The pixel value in the output three-dimensional tensor is the predicted probability value of the corresponding defect category. First, the defect prediction three-dimensional tensor output by the model is scaled back to the original image size, and then the mask images of different defects are obtained according to the category corresponding to the maximum predicted value. Then, the connected domains of the mask images of defects of different categories are extracted respectively to obtain the two-dimensional contours of each defect. Module M6.2: Defect visualization, spatial positioning and size calculation: Reconstruct the 2D topological relationship of the defect based on Delaunay triangulation, and return to the 3D point cloud to obtain the visualization result of the defect; combine the 2D defect contour with the 3D point cloud for analysis, and obtain the position of the defect in the actual weld according to the relative position of the defect in the subframe and the number of frames; obtain the 3D rectangular bounding box of the defect point cloud, and calculate the length, width and height of the defect; The module M7 includes: combining the weld area obtained by the module M3, judging whether the defect is on the weld surface, eliminating falsely detected defects, and comprehensively evaluating the weld morphology and whether the defect exceeds the tolerance according to the corresponding welding quality standard.
Citation Information
Patent Citations
Weld seam and weld seam defect detection method based on deep learning
CN109900706A
Surface weld joint feature recognition and automatic grinding and polishing device and method of complex curved surface
CN110091333A
Cross welding seam identification method and system based on deep residual learning and multi-line laser
CN113642492A
Hub weld joint three-dimensional characteristic measuring device and method based on line laser rotation scanning
CN113989379A
Weld defect real-time detection method and system based on 3D point cloud
CN114354639A
Cited By
Energy storage box weld appearance detection method and system based on machine vision
CN118864449A
Construction site measuring system based on image processing
CN119206099A
Intelligent assembling and welding manufacturing method and system for open type pressure machine tool body
CN119347193A
Visual inspection and quality evaluation method for small structural component of airplane
CN119354981A
A visual detection and quality evaluation method for small aircraft structures
CN119354981B
