Steel structure weld defect detection method and device, electronic equipment and defect classification identification method

By placing a grid on steel structure weld images, extracting HOG and CNNF features, and utilizing the RepVGG network infrastructure and reparameterization processing to optimize the classifier and model structure, the problems of low detection accuracy and long processing time in existing technologies are solved, achieving efficient and accurate weld defect detection and classification.

CN117522837BActive Publication Date: 2025-11-28CHINA MCC17 GRP CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311576642.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-23
Publication Date
2025-11-28
Estimated Expiration
2043-11-23

AI Technical Summary

Technical Problem

Existing technologies have low accuracy and are time-consuming in detecting defects in steel structure welds. Traditional manual inspection is inefficient and its safety is difficult to guarantee. The accuracy and efficiency of existing computer vision methods still need to be improved.

Method used

A method based on exhaustive search and convolutional neural networks is adopted. By placing a grid on the weld seam image, HOG and CNNF features are extracted. The RepVGG network infrastructure is used for feature extraction and classification. Combined with reparameterization processing, the classifier and model structure are optimized to improve detection accuracy and efficiency.

Benefits of technology

It effectively improves the accuracy and efficiency of weld defect detection, reduces the number of network parameters, enhances the model's generalization ability and portability, and improves the accuracy of defect classification and identification precision.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117522837B_ABST
    Figure CN117522837B_ABST
Patent Text Reader

Abstract

The application discloses a kind of steel structure weld defect detection method, device, electronic equipment and defect classification identification method.The steel structure weld defect detection method of the application includes: placing grid on the input weld image, obtaining the gray value, gray deviation and uniformity of the image inside grid, using narrow threshold to preliminarily filter out the grid without defect;The features of the remaining grid inside image are sent into the trained classifier for discrimination, and the grid containing defects is obtained;The defect is positioned;The weld defect classification identification method of the application detects the weld defect using the steel structure weld defect detection method, and then uses the weld defect classification model, so as to identify the type of defect.The application can effectively improve the detection accuracy and detection efficiency of steel structure weld defect.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the technical field of artificial intelligence, and particularly relates to a steel structure weld defect detection method and device, an electronic equipment and a defect classification and identification method. BACKGROUND

[0002] With the development of science and technology, the application of building engineering steel structures is becoming more and more widespread in the world, and welding is a very important processing technology in steel structures. Due to various reasons, various defects may occur during welding, such as porosity, slag inclusion, incomplete penetration, incomplete fusion, cracks, pits, undercut, and welding bumps, which greatly affect the welding quality and the stability of the steel structure. Therefore, defect detection during welding is a necessary process.

[0003] Traditional weld defect detection mainly adopts a manual detection method, which is low in efficiency and high in intensity, and the safety of personnel is difficult to guarantee. With the rapid development of computer vision technology, some defect detection methods using traditional image processing and machine learning are constantly proposed. However, these methods, although effectively avoiding the drawbacks of manual visual inspection, are not high in defect detection accuracy. Compared with these methods, convolutional neural networks can better process image data and improve the accuracy and efficiency of defect detection.

[0004] After searching, the application case with the Chinese patent application number 2022116621355 discloses a steel surface defect detection method and system based on high resolution and reparameterization. The application case inputs the steel surface image into a steel surface defect detection model for multi-scale feature extraction; inputs the fused multi-scale feature map into the detection head part, reparameterizes the different size convolutional layers and normalization layers, and the detection system is composed of an image acquisition module, a feature extraction module, a feature fusion module, a detection module and a reparameterization module connected in turn. The use of convolutional neural networks for multi-scale feature extraction of steel surface images improves the ability of the model to extract small target defects using high-resolution features, and improves the speed of model inference using reparameterization, which can effectively improve the detection accuracy and speed of steel surface defects. However, its detection accuracy and detection efficiency still need to be further improved. SUMMARY

[0005] 1. Problem to be solved

[0006] The purpose of the present application is to provide a steel structure weld defect detection method and device, an electronic equipment and a defect classification and identification method. The present application detects steel structure weld defects based on exhaustive search and convolutional neural networks, thereby effectively improving the detection accuracy of welds and overcoming the shortcomings of existing detection methods, such as low detection accuracy and time-consuming.

[0007] 2. Technical solution

[0008] To solve the above problems, the technical scheme adopted by the present application is as follows:

[0009] The present application provides a method for detecting defects in steel structure welds, comprising:

[0010] Collecting weld images;

[0011] Placing a grid on the weld image to obtain the gray scale value, gray scale deviation and uniformity of the internal image of the grid, so as to preliminarily filter out the grid without defects;

[0012] Extracting the internal image features of the remaining grid, including HOG and CNNF features, wherein the extraction of CNNF features uses a convolutional neural network, and the convolutional neural network uses a part of the RepVGG network basic structure for parameter search of the convolutional layer of the feature extraction network;

[0013] Sending the extracted image features to a trained classifier for discrimination to obtain a grid containing defects;

[0014] Positioning and marking the defects.

[0015] Further, the extraction process of CNNF features is as follows:

[0016] Normalizing the local image and changing the relevant network parameters on the predefined network skeleton;

[0017] By changing the network parameters, many feature extraction networks can be obtained, and each network is trained using a training set. When the model converges, remove the fully connected layer in the model and save only the convolutional part to the disk;

[0018] Use the above feature extraction network to extract CNNF features on a new data set, and use L2 norm Normalize the features;

[0019] Use the trained classifier to identify the normalized features, and record the accuracy rate in turn, and select the best feature extraction network for extracting CNNF features according to the accuracy rate.

[0020] Further, the changeable network parameters include the size of the convolution kernel, the number of convolution kernels and the nonlinear function.

[0021] Further, when extracting CNNF features, the feature extraction network is re-parameterized to fuse different sizes of convolution layers, batch normalization layers and residual connections into a single convolution layer, thereby improving the extraction efficiency of CNNF features.

[0022] Further, the training method of the classifier comprises:

[0023] inputting a weld image;

[0024] placing a grid on the weld image, obtaining a gray value, a gray deviation and a uniformity of an internal image of the grid, so as to preliminarily filter out a grid without defects;

[0025] sequentially extracting internal image features of the remaining grid and saving the internal image features into a disk; the extracted grid image features comprise HOG and CNNF features, wherein the CNNF features are extracted by using a convolutional neural network, and a convolutional layer parameter search is performed on a feature extraction network, and a skeleton of the convolutional neural network is part of a RepVGG network basic structure;

[0026] reading the saved image feature data, dividing the image feature data into positive sample features and negative sample features according to whether the grid is internally defective, selecting the positive sample features and the negative sample features according to a certain proportion to form a single set of training data, and using the single set of training data to train the classifier, so as to obtain a trained and optimized classifier.

[0027] Further, the specific operation of locating and marking the defects is that the grid containing the defects is fused with a basic grid to become a prediction box of the defects, and the intersecting prediction boxes are merged until the number of the prediction boxes no longer changes, so as to obtain the final prediction box.

[0028] The application further provides a steel structure weld defect detection device, comprising:

[0029] a weld image acquisition module, configured to acquire a weld image;

[0030] a non-defect grid preliminary filtering module, configured to place a grid on the weld image, obtain a gray value, a gray deviation and a uniformity of an internal image of the grid, so as to preliminarily filter out a grid without defects;

[0031] an internal image feature extraction module, configured to extract internal image features of the remaining grid, and the extracted grid image features are HOG and CNNF features, wherein the CNNF features are extracted by using a convolutional neural network, and a convolutional layer parameter search is performed on a feature extraction network, and a skeleton of the convolutional neural network is part of a RepVGG network basic structure;

[0032] a defect detection module, configured to send the extracted image features into a trained classifier to perform discrimination, so as to obtain a grid containing defects;

[0033] a defect locating module, configured to locate and mark the detected defects.

[0034] The application further provides a steel structure weld defect classification and identification method, comprising:

[0035] Collecting a weld seam image to be detected;

[0036] Placing a grid on the weld seam image, obtaining the gray scale value, gray scale deviation and uniformity of the image inside the grid to preliminarily filter out the grid without defects;

[0037] Extracting the image features of the remaining grid, the extracted grid image features including HOG and CNNF features, wherein the CNNF features are extracted by using a convolutional neural network, and the convolutional neural network adopts a part of the RepVGG network basic structure as a skeleton and performs convolution layer parameter searching on the feature extraction network;

[0038] Sending the extracted image features into a trained classifier to obtain the grid containing defects;

[0039] Positioning and marking the defects;

[0040] Using the steel structure weld seam defect classification model to identify and classify the defects.

[0041] Further, the steel structure weld seam defect classification model uses a backbone network composed of RepVGG structure units, the network model of which is composed of 5 RepVGG modules and a single attention layer, wherein the attention layer is located between the first and second RepVGG modules and has a neighborhood size of 5, the model is trained using an Adam optimizer with an initial learning rate of 0.001, a cross-entropy loss function is used as the loss function, and the learning rate is adjusted using cosine decay during the training process.

[0042] The application further provides an electronic device comprising a storage medium and a processor, wherein the storage medium stores a computer program, and the processor can execute the weld seam defect detection method or the weld seam defect classification method when the computer program is called.

[0043] The application further provides a storage medium, wherein the storage medium stores a computer program, and the computer program can execute the weld seam defect detection method or the weld seam defect classification method when called.

[0044] 3. Beneficial effects

[0045] Compared with the prior art, the beneficial effects of the application are:

[0046] (1) The application is based on exhaustive search and convolutional neural network, adopts the convolutional neural network to extract the CNNF features of the image, discriminates by using the trained classifier according to the extracted image features, so that the defects in the weld image can be detected; at the same time, the application further classifies and identifies the detected defects by using the defect classification model, and can effectively ensure the accuracy of defect classification.

[0047] (2) When the CNNF features of the image are extracted by using the convolutional neural network, the feature extraction network is re-parameterized, so that the network parameter amount can be reduced, the generalization ability and portability of the network can be improved, and thus the accuracy of the weld defect detection can be further improved, and the efficiency of the CNNF feature extraction can also be improved.

[0048] (3) The weld defect classification model of the application uses a backbone network composed of RepVGG structure units, and optimizes the model structure, which not only greatly reduces the parameter amount and calculation, but also has good performance. At the same time, by introducing the attention layer, the information irrelevant to the defect can be filtered out according to the spatial invariance of convolution and the feature information generated by the shallow layer of the model, and the irrelevant information is inhibited from propagating to the deep network, while the defect-related information is retained, so as to further improve the accuracy of defect classification and identification. BRIEF DESCRIPTION OF DRAWINGS

[0049] Figure 1 The flowchart of the weld defect classification and identification method of the application is shown in the figure.

[0050] Figure 2 The flowchart of the CNNF feature extraction is shown in the figure.

[0051] Figure 3 The structure diagram of the convolutional neural network used to extract the CNNF features is shown in the figure.

[0052] Figure 4 The structure diagram of the attention layer is shown in the figure.

[0053] Figure 5 The overall structure diagram of the steel structure weld defect classification model in an embodiment of the application is shown in the figure. DETAILED DESCRIPTION

[0054] The application will be further described below in combination with specific embodiments.

[0055] One embodiment of the application provides a steel structure weld defect detection method, comprising:

[0056] S1, collecting a weld image;

[0057] In one embodiment of the present invention, a multi-line array camera is used to acquire weld seam images. Furthermore, when acquiring images, a combination of forward illumination and backward illumination is used, wherein the forward illumination uses a linear LED light source with a light guide column installed; and the backward illumination uses a strip LED light source with a light diffuser installed.

[0058] S2. Place a grid on the input weld image, and obtain the grayscale value, grayscale deviation and uniformity of the image inside the grid to initially filter out grids without defects.

[0059] Specifically, in this embodiment of the invention, the process of placing the grid is controlled by four parameters: the width w0 and height h0 of the base grid, and the number of pixels offset in a single horizontal shift. w offset and the number of pixels shifted in a single vertical direction h The grid across the entire image is obtained by continuously translating a base grid. The base grid is placed at the top left corner of the image, with its top-left corner coordinates (0,0) and its bottom-right corner coordinates (w0,h0). For any grid in the image, if it is obtained by moving the base grid i times horizontally and j times vertically, then its top-left corner coordinates are (i*offset) / (w0,h0). w ,j*offset h The coordinates of the bottom right corner are (i*offset). w +w0,j*offset h +h0). The formula for calculating the number of grids in the entire image, gridNums, is:

[0060]

[0061] Where ImgWid and ImgHei represent the width and height of the image, respectively, and [·] is the rounding up symbol.

[0062] In one preferred embodiment of the present invention, in step S2, a narrow threshold is used to initially filter out meshes without defects. The specific value of the narrow threshold is set according to the specific situation. For example, if the difference in grayscale values ​​between the defective mesh and the non-defective mesh is significantly larger, then a value in the middle range will be taken as the narrow threshold (the same applies to grayscale deviation and uniformity) to initially filter them out.

[0063] S3. Extract the internal image features of the remaining grid. The extracted grid image features are HOG and CNNF features. The extraction of CNNF features uses a convolutional neural network (e.g., Figure 3 As shown), the convolutional layer parameters of the feature extraction network are searched, and the skeleton used by the convolutional neural network is part of the basic structure of the RepVGG network.

[0064] HOG features are used to describe the structure and texture of images, and are not designed for class separability. Therefore, the embodiment of the present application additionally uses class separability as an optimization index, and uses a convolutional neural network to adaptively extract local image features. The features obtained in this process are referred to as CNNF (Convolutional Neutral Network based Feature). Specifically, as shown in FIG. 2, the extraction process of the CNNF features in the embodiment of the present application is as follows: Figure 2

[0065] First, normalization is performed on the local image, and relevant network parameters are changed on a predefined network skeleton (since the network skeleton is determined, the changeable parameters include the size of the convolution kernel, the number of convolution kernels, and the nonlinear function);

[0066] By changing the network parameters, a plurality of feature extraction networks can be obtained. The training set is used to train the network, and when the model converges, the fully connected layer in the model is removed, and only the convolution part is saved to the disk;

[0067] Then, the feature extraction network is used to extract features on a new data set (validation set), and the L2 norm is used to normalize the features. norm The features are normalized;

[0068] The trained classifier is used to distinguish the normalized features, and the accuracy rate is recorded in sequence. The best feature extraction network is selected according to the accuracy rate to extract the CNNF features.

[0069] In order to reduce the search cost introduced by changing the parameters, when changing the influencing factors in one direction cannot bring performance improvement (for example, increasing the number of convolution kernels does not increase the classification performance of the features), the search in that direction is ended.

[0070] As a further improvement of the embodiment of the present application, when extracting the CNNF features, the feature extraction network is re-parameterized to fuse the convolution layers, batch normalization layers, and residual connections of different sizes into a single convolution layer. The re-parameterization method can efficiently extract the CNNF features, reduce the number of network parameters, and improve the generalization ability and portability of the network. The core of the re-parameterization method is to fuse the convolution layers, batch normalization layers, and residual connections of different sizes into a single convolution layer, and the steps are as follows:

[0071] First, the 1x1 convolution layer is converted into a 3x3 convolution layer, that is, the 1x1 convolution kernel is filled with 0 in four directions of up, down, left, and right, and the input feature map is expanded to keep the output feature map size unchanged. Then, the 3x3 convolution layer is used to replace the residual connection, and then the convolution layer is used to convolve the input feature map to obtain an output feature map identical to the input feature map.​

[0072] Next, the convolutional layer and the batch normalization layer are combined into a single convolutional layer.

[0073] Finally, only the convolutional layer and the activation function are left in the network structure, and the convolutional layer parameters of the branches of the same node are added to obtain the network structure of RepVGG.

[0074] S4, the extracted image features are sent into the trained classifier for discrimination to obtain a grid containing defects;

[0075] The above classifier can adopt any existing weld defect detection classifier, and as a preferred scheme of the embodiment of the present application, the classifier adopts a perception machine.

[0076] As a further improvement of the embodiment of the present application, the process of training and optimizing the existing classifier is as follows:

[0077] Input the weld image;

[0078] Place a grid on the weld image to obtain the gray value, gray deviation and uniformity of the image inside the grid, so as to preliminarily filter out the grid without defects;

[0079] Sequentially extract the image features of the remaining grid and save them to the disk; the extracted grid image features include HOG and CNNF features, wherein the CNNF feature extraction adopts a convolutional neural network, and the convolutional neural network adopts a part of the RepVGG network basic structure for convolutional layer parameter search; at the same time, the CNNF feature extraction process also performs reparameterization processing, and the specific operations of feature extraction and reparameterization processing are as in step 3.

[0080] Read the saved image feature data, divide it into positive sample features and negative sample features according to whether the grid inside contains defects, select positive and negative sample features according to a certain proportion to form a single set of training data, and use it to train the classifier, so as to obtain the trained and optimized classifier. Further, the positive sample features and the negative sample features form a single set of training data according to a ratio of 1:3, i.e. a training set, which can be used to train and optimize the existing defect detection classifier, and can be used to train the CNNF feature extraction network.

[0081] S5, positioning and marking the defects;

[0082] The method for positioning and marking the defects is that the grid containing defects is fused with the basic grid to become the prediction box of the defect, and the intersecting prediction boxes are combined until the number of prediction boxes no longer changes, i.e. the final prediction box is obtained. Wherein, the step of generating the prediction box is:

[0083] First, the confidence score of each grid is thresholded to obtain the grid containing defects (for example, if the confidence score given by the classifier is greater than 0.5, it is considered that the grid contains defects), and then the connected grid containing defects is fused. For the fused region, the top-left corner coordinate of the region prediction box is the top-left corner coordinate of the leftmost top grid contained by the region, and the bottom-right corner coordinate is the same.

[0084] Another embodiment of the present application also provides a steel structure weld defect detection device, comprising:

[0085] A weld image acquisition module is configured to acquire a weld image.

[0086] A non-defect grid preliminary filtering module is configured to place a grid on the weld image, obtain the gray value, gray deviation and uniformity of the internal image of the grid, and preliminarily filter out the grid without defects.

[0087] An internal image feature extraction module is configured to extract the internal image features of the remaining grid, and the extracted grid image features include HOG and CNNF features, wherein the CNNF feature extraction adopts a convolutional neural network, and the convolutional neural network adopts a part of the RepVGG network basic structure for convolutional layer parameter search.

[0088] A defect detection module is configured to send the extracted image features into a trained classifier for discrimination to obtain the grid containing defects.

[0089] A defect positioning module is configured to position and mark the detected defects.

[0090] The working processes of each module are the same as those described in the weld defect detection method, which are omitted here and will not be described again.

[0091] In combination Figure 1 , another embodiment of the present application also provides a steel structure weld defect classification and identification method, comprising:

[0092] Acquiring a weld image to be detected;

[0093] Placing a grid on the weld image, obtaining the gray value, gray deviation and uniformity of the internal image of the grid, and preliminarily filtering out the grid without defects.

[0094] Extracting the internal image features of the remaining grid, and the extracted grid image features include HOG and CNNF features, wherein the CNNF feature extraction adopts a convolutional neural network, and the convolutional neural network adopts a part of the RepVGG network basic structure for convolutional layer parameter search.

[0095] The extracted image features are sent into the trained classifier for discrimination to obtain the grid containing defects;

[0096] The defects are positioned and marked to realize detection of the defects;

[0097] The steel structure weld defect detection model is used to classify and identify the defects.

[0098] The defect detection method adopts the weld defect detection method of any one of the preceding embodiments, which will not be described again here.

[0099] As a further improvement of the embodiment, the steel structure weld defect classification model uses a backbone network composed of RepVGG structure units, the input image size of the model in the figure is 224*224, and the network model is composed of 5 RepVGG modules and a single attention layer (the structure of the attention layer is as shown in Figure 5 The attention layer is located between the first and second RepVGG modules and has a neighborhood size of 5.

[0100] RepVGG is a lightweight network based on the VGG network structure, which greatly reduces the number of parameters and calculations, and has good performance. The role of the attention layer is to filter out information irrelevant to the defect according to the spatial invariance of convolution and the feature information generated by the shallow layer of the model, so as to suppress the propagation of irrelevant information to the deep network while retaining defect-related information. When training the model, the Adam optimizer is used, the initial learning rate is 0.001, the loss function uses the cross-entropy loss function, and the learning rate is adjusted using cosine decay during the training process.

[0101] The embodiment of the application also provides a steel structure weld defect classification and identification device, which comprises:

[0102] A weld image acquisition module is configured to acquire a weld image to be detected.

[0103] A non-defect grid preliminary filtering module is configured to place a grid on the weld image, obtain the gray value, gray deviation and uniformity of the internal image of the grid, and preliminarily filter out the grid without defects.

[0104] An internal image feature extraction module is configured to extract internal image features of the remaining grid, and the extracted grid image features are HOG and CNNF features, wherein the CNNF features are extracted by a convolutional neural network, and the convolutional neural network is used to search for convolutional layer parameters of the feature extraction network, and the skeleton of the convolutional neural network is part of a RepVGG network basic structure.

[0105] A defect detection module is configured to send the extracted image features into a trained classifier for discrimination to obtain the grid containing defects.

[0106] a defect positioning module configured to position and mark the detected defects;

[0107] a defect classification and identification module configured to classify and identify the defects by using a steel structure weld defect detection model.

[0108] The embodiment of the present application further provides a storage medium, wherein a computer program is stored in the storage medium, and the computer program can execute the steel structure weld defect detection method of the embodiment of the present application when called by a processor.

[0109] The embodiment of the present application further provides an electronic device, comprising a storage medium and a processor, wherein a computer program is stored in the storage medium, and the processor can execute the steel structure weld defect detection method of the embodiment of the present application when calling the computer program.

Claims

1. A method of detecting a defect of a weld of a steel structure, characterized by, The method comprises the following steps: Collecting a weld image; Placing a grid on the weld image, obtaining the gray value, gray deviation and uniformity of the image inside the grid to preliminarily filter out the grid without defects; Extracting the image features of the remaining grid, wherein the extracted image features of the grid include HOG and CNNF features, the extraction of the CNNF features adopts a convolutional neural network, and the convolutional layer parameters of the feature extraction network are searched, and the skeleton of the convolutional neural network adopts part of the basic structure of the RepVGG network; Sending the extracted image features into a trained classifier to obtain the grid containing defects; Positioning and marking the defects, that is, detecting the weld defects; Identifying and classifying the defects by using a steel structure weld defect classification model; The extraction process of the CNNF features is as follows: Normalizing the local image and changing the related network parameters on the predefined network skeleton; A plurality of feature extraction networks can be obtained by changing the network parameters, and each network is trained by using a training set, and when the model converges, the full connection layer in the model is removed, and only the convolutional part is saved to the disk; The CNNF features are extracted on new datasets using the feature extraction network described above, and are used normalizing the features; and Using the trained classifier to identify the normalized features, and recording the accuracy rate in sequence, and selecting the best feature extraction network for extracting the CNNF features according to the accuracy rate; The backbone network of the steel structure weld defect classification model is composed of RepVGG structure units, and the network model is composed of 5 RepVGG modules and a single attention layer, wherein the attention layer is located between the first and second RepVGG modules and has a neighborhood size of 5.

2. The method of claim 1, wherein The changeable network parameters include the convolution kernel size, the number of convolution kernels and the nonlinear function.

3. The method of claim 1 or 2, wherein When extracting the CNNF features, the feature extraction network is re-parameterized to fuse the convolutional layer, the batch normalization layer and the residual connection of different sizes into a single convolutional layer.

4. The method of claim 1 or 2, wherein The training method of the classifier comprises the following steps: Inputting a weld image; Placing a grid on the weld image, obtaining the gray value, gray deviation and uniformity of the image inside the grid to preliminarily filter out the grid without defects; Sequentially extracting the image features of the remaining grid and saving them to the disk; the extracted image features of the grid include HOG and CNNF features, the extraction of the CNNF features adopts a convolutional neural network, and the convolutional layer parameters of the feature extraction network are searched, and the skeleton of the convolutional neural network adopts part of the basic structure of the RepVGG network; Reading the saved image feature data, dividing the positive sample features and the negative sample features according to whether the grid inside contains defects, selecting the positive and negative sample features in a certain proportion to form a single set of training data, and using the training data to train the classifier, so as to obtain the trained and optimized classifier.

5. The method of claim 1 or 2, wherein The specific operation of positioning and marking the defects is that the grid containing defects is fused with the basic grid to become the prediction box of the defect, and the intersecting prediction boxes are merged until the number of the prediction boxes no longer changes, and the final prediction box is obtained.

6. The method of claim 1 or 2, wherein The Adam optimizer is used to train the steel structure weld defect classification model, the initial learning rate is 0.001, the cross-entropy loss function is used as the loss function, and the cosine decay is used to adjust the learning rate during the training process.

7. A device for detecting defects in a weld of a steel structure, characterized in that The method comprises the following steps: a weld image acquisition module for acquiring weld images; a non-defect grid preliminary filtering module for placing a grid on the weld image, obtaining the gray value, gray deviation and uniformity of the internal image of the grid, and preliminarily filtering out the grid without defects; an internal image feature extraction module for extracting the internal image features of the remaining grid, wherein the extracted grid image features are HOG and CNNF features, the extraction of the CNNF features adopts a convolutional neural network, and the convolutional neural network is searched for convolutional layer parameters, and the skeleton adopted by the convolutional neural network is part of the RepVGG network basic structure; a defect detection module for sending the extracted image features into the trained classifier for identification to obtain the grid containing defects; a defect positioning module for positioning and marking the detected defects; and a defect recognition and classification module for recognizing and classifying the defects by using the steel structure weld defect classification model. The extraction process of the CNNF features is as follows: normalizing the local image and changing the relevant network parameters on the predefined network skeleton; by changing the network parameters, many feature extraction networks can be obtained, and the training set is used to train each network respectively, when the model converges, remove the full connection layer in the model, and only save the convolution part to the disk; The CNNF features are extracted on new datasets using the feature extraction network described above, and are used normalizing the features; and using the trained classifier to identify the normalized features, and recording the accuracy rate in turn, and selecting the best feature extraction network for extracting the CNNF features according to the accuracy rate; The steel structure weld defect classification model uses a backbone network composed of RepVGG structure units, and the network model is composed of 5 RepVGG modules and a single attention layer, wherein the attention layer is located between the first and second RepVGG modules and has a neighborhood size of 5.

8. An electronic device comprising a storage medium and a processor, the storage medium having stored therein a computer program, characterized in that, The processor can execute the weld defect detection method of any one of claims 1-6 when calling the above computer program.

Citation Information

Patent Citations

  • Method and device for monitoring and detecting laser cutting quality of zirconium alloy plate

    CN115631138A

  • Battery surface welding defect detection method

    CN116309313A