Vehicle body welding quality detection method and system based on machine learning
Through fast Fourier transform, texture analysis, discrete wavelet transform and feature fusion, combined with the mask area convolution network model of attention balance context block, the problem of details and global information ignored in body welding quality detection is solved, and the detection is improved comprehensiveness and accuracy.
Patent Information
- Application Number
- CN202411421290.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-12
- Publication Date
- 2025-01-14
AI Technical Summary
In the existing body welding quality detection, complex welding defects are expressed in different ways in the image. It is easy to ignore detailed features by directly using image data detection. The traditional mask area convolution network model focuses on local information and ignores global information, which affects the detection effect. .
Fast Fourier transform, texture analysis, discrete wavelet transform and feature fusion are used for feature extraction, combined with the masked area convolution network model of attention balance context blocks, capture multi-dimensional and multi-level feature information, and enhance the comprehensiveness of detection and Accuracy.
It significantly improves the accuracy, efficiency and generalization ability of body welding quality detection, and enhances the perception of subtle features and the capture of global information.
Smart Images

Figure CN119313635A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of automobile intelligent manufacturing, and specifically refers to a car body welding quality detection method and system based on machine learning. Background Art
[0002] Car body welding quality inspection is an important part of the automobile manufacturing process. Machine learning technology is used to automatically analyze image data collected during the automobile welding process, detect the welding quality of the car body in real time, and promptly discover and repair welding defects, thereby reducing the scrap rate and optimizing the automobile production process, which will help promote the intelligent development of the automobile manufacturing industry.
[0003] However, in the existing body welding quality inspection process, the body welding quality involves various complex welding defects, and different types of welding defects are expressed differently in images. Directly using image data for welding quality inspection tends to ignore the technical problem of detail features; there is a technical problem that the traditional masked area convolutional network model pays more attention to local information when conducting welding quality inspection, and tends to ignore global information, which affects the model detection effect and leads to the welding quality inspection being not comprehensive enough. Summary of the invention
[0004] In view of the above situation, in order to overcome the defects of the prior art, the present invention provides a vehicle body welding quality detection method and system based on machine learning. In view of the technical problem that in the existing vehicle body welding quality detection process, the vehicle body welding quality involves various complex welding defects, and different types of welding defects are expressed differently in images, and the image data is directly used for welding quality detection, which is easy to ignore the detail features. This solution creatively constructs a feature extraction layer through fast Fourier transform, texture analysis, discrete wavelet transform and feature fusion, effectively captures feature information in different dimensions, improves the detection model's perception ability of subtle features, and enhances the comprehensiveness of detection; in view of the technical problem that in the existing vehicle body welding quality detection process, the traditional masked region convolutional network model pays more attention to local information when performing welding quality detection, easily ignores global information, affects the model detection effect, and causes the welding quality detection to be not comprehensive enough, this solution creatively adopts a masked region convolutional network model combined with an attention balanced context block to construct a quality detection layer, focuses on the key areas of welding defects through the attention block, efficiently captures global context information through the context block, and evenly processes multi-channel and multi-scale features through the balancing block, significantly improving the accuracy, efficiency and generalization ability of vehicle body welding quality detection.
[0005] The technical solution adopted by the present invention is as follows: The vehicle body welding quality detection method based on machine learning provided by the present invention comprises the following steps:
[0006] Step S1: welding quality detection modeling;
[0007] Step S2: data acquisition layer construction;
[0008] Step S3: feature extraction layer construction;
[0009] Step S4: quality detection layer construction;
[0010] Step S5: Car body welding quality inspection.
[0011] Furthermore, in step S1, the welding quality detection modeling is used to design and construct the basic architecture of the body welding quality detection model, specifically to build a detection model for body welding quality. The detection model specifically includes a data acquisition layer, a feature extraction layer and a quality detection layer.
[0012] Furthermore, in step S2, the data acquisition layer is constructed to collect and preprocess the body welding image data, specifically to collect the body welding image data from the body welding line, and preprocess the image in the body welding image data by image size adjustment, image normalization and contrast adjustment to obtain body welding image optimization data.
[0013] Further, in step S3, the feature extraction layer is constructed to extract features from the body welding image optimization data and perform feature fusion, specifically by fast Fourier transform, texture analysis, discrete wavelet transform and feature fusion, to construct the feature extraction layer, including the following steps:
[0014] Step S31: Fast Fourier transform, specifically, extracting welding frequency features by performing fast Fourier transform on the image in the body welding image optimization data;
[0015] Step S32: texture analysis, specifically, extracting welding texture features by performing Gabor filtering on the image in the body welding image optimization data;
[0016] Step S33: discrete wavelet transform, specifically, performing discrete wavelet transform on the image in the body welding image optimization data to extract welding time-frequency characteristics;
[0017] Step S34: feature fusion, specifically, combining welding frequency features, welding texture features and welding time-frequency features to obtain the body welding fusion features.
[0018] Further, in step S4, the quality detection layer is constructed to construct the detection layer of the detection model, specifically, the mask region convolutional network model combined with the attention balance context block is used to construct the quality detection layer to obtain the body welding quality detection model;
[0019] The masked region convolutional network model combined with the attention balanced context block includes an attention context backbone network, a balanced feature pyramid, a region proposal network and a detection head;
[0020] The attention context backbone network is used to focus on key features through attention blocks, capture global information through context blocks, and then extract multi-level feature information from the model input;
[0021] The balanced feature pyramid is used to increase the multi-level feature fusion capability and improve the balance of feature extraction, thereby achieving deep fusion and balance of multi-level features;
[0022] The region proposal network is used to generate candidate regions including welding defects;
[0023] The detection head is used to output the classification, positioning and segmentation results of welding defects;
[0024] The quality detection layer construction includes the following steps:
[0025] Step S41: constructing a model input, specifically receiving the body welding fusion feature and the image in the body welding image optimization data as the model input;
[0026] Step S42: constructing an attention context backbone network, specifically, using the residual network as the backbone network, introducing attention blocks and context blocks into the backbone network, constructing an attention context backbone network including identity blocks, attention blocks, convolution blocks and context blocks, and calculating the model input through the attention context backbone network to obtain a multi-level feature map;
[0027] The calculation formula of the identity block is:
[0028] ;
[0029] In the formula, F ID is the identity block output feature map, g(·) is a feature mapping function, the feature mapping function includes convolution, batch normalization and nonlinear activation operations, and Ig is the model input;
[0030] The calculation formula of the attention block is:
[0031] ;
[0032] In the formula, F one is the channel attention map, M c (·) is the channel attention mechanism, is the element-by-element multiplication symbol, F two is the spatial attention map, M s (·) is the spatial attention mechanism;
[0033] The calculation formula of the convolution block is:
[0034] ;
[0035] In the formula, f conv is the convolutional block output feature map, ReLU(·) is the ReLU activation function, BN(·) is the batch normalization function, W conv is the convolution kernel, b conv is the convolution bias term;
[0036] The calculation formula of the context block is:
[0037] ;
[0038] In the formula, f i is the i-th feature in the context block output feature map, wherein the context block output feature map specifically refers to a multi-level feature map, i is the first feature index, and x i is the i-th feature in the context block input feature map, the context block input feature map specifically refers to the convolution block output feature map, W1 is the first weight of the linear transformation, LN(·) is the layer normalization function, j is the second feature index, NP is the number of features in the context block input feature map, is the global attention weight of the jth feature in the output feature map of the context block;
[0039] Step S43: construct a balanced feature pyramid, specifically, introduce a balanced block into the feature pyramid to construct a balanced feature pyramid, calculate the multi-level feature map through the balanced feature pyramid, and obtain a multi-scale feature map. The calculation formula is:
[0040] ;
[0041] In the formula, F neck is a multi-scale feature map, BalanceBlock(·) is a balance block function, FPN(·) is a feature pyramid network function, and F backbone It is a multi-level feature map;
[0042] Step S44: constructing a region proposal network, specifically generating candidate regions according to the multi-scale feature map, and performing a region interest alignment operation on the candidate regions to obtain an aligned feature map;
[0043] The calculation formula for generating the candidate region is:
[0044] ;
[0045] Where Pro is the candidate region, RPN(·) is the region proposal network function;
[0046] Step S45: constructing a detection head, specifically setting bounding box regression, classification, and mask prediction tasks in the detection head, calculating the alignment feature map through the detection head, and obtaining a model detection result;
[0047] Step S46: quality inspection model training, specifically, performing model training by constructing the model input, constructing the attention context backbone network, constructing the balanced feature pyramid, constructing the region proposal network and constructing the detection head to obtain the body welding quality inspection model.
[0048] Further, in step S5, the vehicle body welding quality detection is specifically performed by constructing the data acquisition layer, the feature extraction layer and the quality detection layer, and the vehicle body welding quality detection result is calculated by using the vehicle body welding quality detection model.
[0049] The vehicle body welding quality detection system based on machine learning provided by the present invention comprises: a welding quality detection modeling module, a data acquisition layer construction module, a feature extraction layer construction module, a quality detection layer construction module and a vehicle body welding quality detection module;
[0050] The welding quality detection modeling module is used for welding quality detection modeling. Through welding quality detection modeling, the basic architecture of the body welding quality detection model is obtained, and the data acquisition layer, feature extraction layer and quality detection layer are constructed according to the basic architecture of the body welding quality detection model;
[0051] The data acquisition layer construction module is used for data acquisition layer construction, obtains vehicle body welding image optimization data through data acquisition layer construction, and sends the vehicle body welding image optimization data to the feature extraction layer construction module and the quality detection layer construction module;
[0052] The feature extraction layer construction module is used for feature extraction layer construction, obtains the body welding fusion feature through feature extraction layer construction, and sends the body welding fusion feature to the quality detection layer construction module;
[0053] The quality detection layer construction module is used for quality detection layer construction, and obtains a body welding quality detection model through quality detection layer construction, and sends the body welding quality detection model to the body welding quality detection module;
[0054] The vehicle body welding quality detection module is used for vehicle body welding quality detection. By constructing the data acquisition layer, feature extraction layer and quality detection layer, the vehicle body welding quality detection is performed, and the vehicle body welding quality detection result is calculated by using the vehicle body welding quality detection model.
[0055] The beneficial effects achieved by the present invention using the above scheme are as follows:
[0056] (1) In the existing body welding quality inspection process, the body welding quality involves various complex welding defects. Different types of welding defects are expressed differently in images. Directly using image data for welding quality inspection tends to ignore the technical problem of detailed features. This solution creatively constructs a feature extraction layer through fast Fourier transform, texture analysis, discrete wavelet transform and feature fusion, effectively captures feature information in different dimensions, improves the detection model's perception of subtle features, and enhances the comprehensiveness of detection.
[0057] (2) In view of the technical problem that in the existing body welding quality inspection process, the traditional masked region convolutional network model pays more attention to local information and easily ignores global information when performing welding quality inspection, which affects the model detection effect and leads to incomplete welding quality inspection. This scheme creatively adopts the masked region convolutional network model combined with the attention balanced context block to construct the quality inspection layer. The attention block focuses on the key areas of welding defects, the context block efficiently captures the global context information, and the balancing block evenly processes multi-channel and multi-scale features, which significantly improves the accuracy, efficiency and generalization ability of body welding quality inspection. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] Figure 1 A schematic diagram of the process flow of the vehicle body welding quality detection method based on machine learning provided by the present invention;
[0059] Figure 2 A schematic diagram of a vehicle body welding quality detection system based on machine learning provided by the present invention;
[0060] Figure 3 is a schematic flow chart of step S3;
[0061] Figure 4 It is a schematic diagram of the process of step S4.
[0062] The accompanying drawings are used to provide further understanding of the present invention and constitute a part of the specification. They are used to explain the present invention together with the embodiments of the present invention and do not constitute a limitation of the present invention. DETAILED DESCRIPTION
[0063] The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments; based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0064] In the description of the present invention, it should be understood that terms such as “upper”, “lower”, “front”, “back”, “left”, “right”, “top”, “bottom”, “inside” and “outside” indicating directions or positional relationships are based on the directions or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific direction, be constructed and operated in a specific direction, and therefore should not be understood as limiting the present invention.
[0065] Example 1, see Figure 1 The present invention provides a vehicle body welding quality detection method based on machine learning, the method comprising the following steps:
[0066] Step S1: welding quality detection modeling;
[0067] Step S2: data acquisition layer construction;
[0068] Step S3: feature extraction layer construction;
[0069] Step S4: quality detection layer construction;
[0070] Step S5: Car body welding quality inspection.
[0071] Example 2, see Figure 1 This embodiment is based on the above embodiment. In step S1, the welding quality detection model is used to design and construct the basic architecture of the body welding quality detection model, specifically to build a detection model for body welding quality. The detection model specifically includes a data acquisition layer, a feature extraction layer and a quality detection layer.
[0072] Example 3, see Figure 1 , this embodiment is based on the above embodiment. In step S2, the data acquisition layer is constructed to collect and preprocess the body welding image data, specifically, to collect the body welding image data from the body welding line, and to preprocess the image in the body welding image data by image size adjustment, image normalization and contrast adjustment to obtain the body welding image optimization data;
[0073] The image size adjustment is specifically to adjust the image size in the body welding image data to 512×512 pixels;
[0074] The contrast adjustment is specifically to use adaptive histogram equalization to adjust the contrast of the image in the body welding image data.
[0075] Example 4, see Figure 1 and Figure 3This embodiment is based on the above embodiment. In step S3, the feature extraction layer is constructed to extract features from the body welding image optimization data and perform feature fusion. Specifically, the feature extraction layer is constructed through fast Fourier transform, texture analysis, discrete wavelet transform and feature fusion, including the following steps:
[0076] Step S31: Fast Fourier transform, specifically, extracting welding frequency features by performing fast Fourier transform on the image in the body welding image optimization data;
[0077] Step S32: texture analysis, specifically, extracting welding texture features by performing Gabor filtering on the image in the body welding image optimization data;
[0078] Step S33: discrete wavelet transform, specifically, performing discrete wavelet transform on the image in the body welding image optimization data to extract welding time-frequency characteristics;
[0079] Step S34: feature fusion, specifically, combining welding frequency features, welding texture features and welding time-frequency features to obtain a body welding fusion feature;
[0080] By performing the above operations, in view of the technical problem that in the existing body welding quality inspection process, the body welding quality involves various complex welding defects, and different types of welding defects are expressed differently in the image, and directly using image data for welding quality inspection is prone to ignore detail features, this solution creatively constructs a feature extraction layer through fast Fourier transform, texture analysis, discrete wavelet transform and feature fusion, effectively captures feature information in different dimensions, improves the detection model's perception of subtle features, and enhances the comprehensiveness of detection.
[0081] Example 5, see Figure 1 and Figure 4 This embodiment is based on the above embodiment. In step S4, the quality detection layer is constructed to construct the detection layer of the detection model. Specifically, the mask region convolutional network model combined with the attention balance context block is used to construct the quality detection layer to obtain the body welding quality detection model;
[0082] The masked region convolutional network model combined with the attention balanced context block includes an attention context backbone network, a balanced feature pyramid, a region proposal network and a detection head;
[0083] The attention context backbone network is used to focus on key features through attention blocks, capture global information through context blocks, and then extract multi-level feature information from the model input;
[0084] The balanced feature pyramid is used to increase the multi-level feature fusion capability and improve the balance of feature extraction, thereby achieving deep fusion and balance of multi-level features;
[0085] The region proposal network is used to generate candidate regions including welding defects;
[0086] The detection head is used to output the classification, positioning and segmentation results of welding defects;
[0087] The quality detection layer construction includes the following steps:
[0088] Step S41: constructing a model input, specifically receiving the body welding fusion feature and the image in the body welding image optimization data as the model input;
[0089] Step S42: constructing an attention context backbone network, specifically, using the residual network as the backbone network, introducing attention blocks and context blocks into the backbone network, constructing an attention context backbone network including identity blocks, convolution blocks, attention blocks and context blocks, and calculating the model input through the attention context backbone network to obtain a multi-level feature map;
[0090] The calculation formula of the identity block is:
[0091] ;
[0092] In the formula, F ID is the identity block output feature map, g(·) is a feature mapping function, the feature mapping function includes convolution, batch normalization and nonlinear activation operations, and Ig is the model input;
[0093] The calculation formula of the attention block is:
[0094] ;
[0095] In the formula, F one is the channel attention map, M c (·) is the channel attention mechanism, is the element-by-element multiplication symbol, F two is the spatial attention map, M s (·) is the spatial attention mechanism;
[0096] The calculation formula of the convolution block is:
[0097] ;
[0098] In the formula, f conv is the convolutional block output feature map, ReLU(·) is the ReLU activation function, BN(·) is the batch normalization function, W conv is the convolution kernel, bconv is the convolution bias term;
[0099] The calculation formula of the context block is:
[0100] ;
[0101] In the formula, f i is the i-th feature in the context block output feature map, wherein the context block output feature map specifically refers to a multi-level feature map, i is the first feature index, and x i is the i-th feature in the context block input feature map, the context block input feature map specifically refers to the convolution block output feature map, W1 is the first weight of the linear transformation, LN(·) is the layer normalization function, j is the second feature index, NP is the number of features in the context block input feature map, is the global attention weight of the jth feature in the output feature map of the context block;
[0102] Step S43: construct a balanced feature pyramid, specifically, introduce a balanced block into the feature pyramid to construct a balanced feature pyramid, calculate the multi-level feature map through the balanced feature pyramid, and obtain a multi-scale feature map. The calculation formula is:
[0103] ;
[0104] In the formula, F neck is a multi-scale feature map, BalanceBlock(·) is a balance block function, FPN(·) is a feature pyramid network function, and F backbone It is a multi-level feature map;
[0105] Step S44: constructing a region proposal network, specifically generating candidate regions according to the multi-scale feature map, and performing a region interest alignment operation on the candidate regions to obtain an aligned feature map;
[0106] The calculation formula for generating the candidate region is:
[0107] ;
[0108] Where Pro is the candidate region, RPN(·) is the region proposal network function;
[0109] Step S45: constructing a detection head, specifically setting bounding box regression, classification, and mask prediction tasks in the detection head, calculating the alignment feature map through the detection head, and obtaining a model detection result;
[0110] Step S46: quality inspection model training, specifically, performing model training through constructing the model input, constructing the attention context backbone network, constructing the balanced feature pyramid, constructing the region proposal network and constructing the detection head to obtain a body welding quality inspection model;
[0111] By performing the above operations, in order to solve the technical problem that in the existing body welding quality inspection process, the traditional masked region convolutional network model pays more attention to local information and easily ignores global information when performing welding quality inspection, which affects the model detection effect and leads to incomplete welding quality inspection, this scheme creatively adopts the masked region convolutional network model combined with the attention balanced context block to construct the quality inspection layer. The attention block focuses on the key areas of welding defects, the context block efficiently captures the global context information, and the balancing block evenly processes multi-channel and multi-scale features, which significantly improves the accuracy, efficiency and generalization ability of body welding quality inspection.
[0112] Example 6, see Figure 1 This embodiment is based on the above embodiment. In step S5, the body welding quality detection is specifically performed by constructing the data acquisition layer, the feature extraction layer and the quality detection layer to perform the body welding quality detection, and by using the body welding quality detection model, the body welding quality detection result is calculated.
[0113] Embodiment 7, see Figure 2 , this embodiment is based on the above embodiment, and the body welding quality detection system based on machine learning provided by the present invention includes: a welding quality detection modeling module, a data acquisition layer construction module, a feature extraction layer construction module, a quality detection layer construction module and a body welding quality detection module;
[0114] The welding quality detection modeling module is used for welding quality detection modeling. Through welding quality detection modeling, the basic architecture of the body welding quality detection model is obtained, and the data acquisition layer, feature extraction layer and quality detection layer are constructed according to the basic architecture of the body welding quality detection model;
[0115] The data acquisition layer construction module is used for data acquisition layer construction, obtains vehicle body welding image optimization data through data acquisition layer construction, and sends the vehicle body welding image optimization data to the feature extraction layer construction module and the quality detection layer construction module;
[0116] The feature extraction layer construction module is used for feature extraction layer construction, obtains the body welding fusion feature through feature extraction layer construction, and sends the body welding fusion feature to the quality detection layer construction module;
[0117] The quality detection layer construction module is used for quality detection layer construction, and obtains a body welding quality detection model through quality detection layer construction, and sends the body welding quality detection model to the body welding quality detection module;
[0118] The vehicle body welding quality detection module is used for vehicle body welding quality detection. By constructing the data acquisition layer, feature extraction layer and quality detection layer, the vehicle body welding quality detection is performed, and the vehicle body welding quality detection result is calculated by using the vehicle body welding quality detection model.
[0119] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.
[0120] While the embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that many changes, modifications, substitutions and variations can be made to the embodiments without departing from the principles and spirit of the invention.
[0121] The present invention and its embodiments are described above, and such description is not restrictive. The drawings show only one embodiment of the present invention, and the actual structure is not limited thereto. In short, if ordinary technicians in the field are inspired by it, without departing from the purpose of the invention, they can design a structure and embodiment similar to the technical solution without creativity, which should belong to the protection scope of the present invention.
Claims
1. A body welding quality detection method based on machine learning, characterized in that: The method comprises the following steps: Step S1: welding quality detection modeling; Step S2: Data acquisition layer construction; Step S3: constructing a feature extraction layer, which is used to extract features from the body welding image optimization data and perform feature fusion, specifically, constructing the feature extraction layer through fast Fourier transform, texture analysis, discrete wavelet transform and feature fusion; Step S4: constructing a quality detection layer, which is used to construct the detection layer of the detection model. Specifically, the quality detection layer is constructed by using a masked region convolutional network model combined with an attention-balanced context block to obtain a body welding quality detection model. The masked region convolutional network model combined with the attention balanced context block includes an attention context backbone network, a balanced feature pyramid, a region proposal network and a detection head; The attention context backbone network is used to focus on key features through attention blocks, capture global information through context blocks, and then extract multi-level feature information from the model input; The balanced feature pyramid is used to achieve deep fusion and balance of multi-level features; The region proposal network is used to generate candidate regions including welding defects; The detection head is used to output the classification, positioning and segmentation results of welding defects; Step S5: Car body welding quality inspection.
2. The vehicle body welding quality detection method based on machine learning according to claim 1 is characterized in that: In step S4, the quality detection layer is constructed, including the following steps: Step S41: constructing a model input, specifically receiving the body welding fusion feature and the image in the body welding image optimization data as the model input; Step S42: constructing an attention context backbone network, specifically, using the residual network as the backbone network, introducing attention blocks and context blocks into the backbone network, constructing an attention context backbone network including identity blocks, convolution blocks, attention blocks and context blocks, and calculating the model input through the attention context backbone network to obtain a multi-level feature map; The calculation formula of the identity block is: ; In the formula, F ID is the identity block output feature map, g(·) is a feature mapping function, the feature mapping function includes convolution, batch normalization and nonlinear activation operations, and Ig is the model input; The calculation formula of the attention block is: ; In the formula, F one is the channel attention map, M c (·) is the channel attention mechanism, is the element-by-element multiplication symbol, F two is the spatial attention map, M s (·) is the spatial attention mechanism; The calculation formula of the convolution block is: ; In the formula, f conv is the convolutional block output feature map, ReLU(·) is the ReLU activation function, BN(·) is the batch normalization function, W conv is the convolution kernel, b conv is the convolution bias term; The calculation formula of the context block is: ; In the formula, f i is the i-th feature in the context block output feature map, wherein the context block output feature map specifically refers to a multi-level feature map, i is the first feature index, and x i is the i-th feature in the context block input feature map, the context block input feature map specifically refers to the convolution block output feature map, W1 is the first weight of the linear transformation, LN(·) is the layer normalization function, j is the second feature index, NP is the number of features in the context block input feature map, is the global attention weight of the jth feature in the output feature map of the context block; Step S43: construct a balanced feature pyramid, specifically, introduce a balanced block into the feature pyramid to construct a balanced feature pyramid, calculate the multi-level feature map through the balanced feature pyramid, and obtain a multi-scale feature map. The calculation formula is: ; In the formula, F neck is a multi-scale feature map, BalanceBlock(·) is a balance block function, FPN(·) is a feature pyramid network function, and F backbone It is a multi-level feature map; Step S44: constructing a region proposal network, specifically generating candidate regions according to the multi-scale feature map, and performing a region interest alignment operation on the candidate regions to obtain an aligned feature map; The calculation formula for generating the candidate region is: ; Where Pro is the candidate region, RPN(·) is the region proposal network function; Step S45: constructing a detection head, specifically setting bounding box regression, classification, and mask prediction tasks in the detection head, calculating the alignment feature map through the detection head, and obtaining a model detection result; Step S46: quality inspection model training, specifically, performing model training by constructing the model input, constructing the attention context backbone network, constructing the balanced feature pyramid, constructing the region proposal network and constructing the detection head to obtain the body welding quality inspection model.
3. The vehicle body welding quality detection method based on machine learning according to claim 2 is characterized in that: In step S3, the feature extraction layer is constructed, including the following steps: Step S31: Fast Fourier transform, specifically, extracting welding frequency features by performing fast Fourier transform on the image in the body welding image optimization data; Step S32: texture analysis, specifically, extracting welding texture features by performing Gabor filtering on the image in the body welding image optimization data; Step S33: discrete wavelet transform, specifically, performing discrete wavelet transform on the image in the body welding image optimization data to extract welding time-frequency characteristics; Step S34: feature fusion, specifically, combining welding frequency features, welding texture features and welding time-frequency features to obtain the body welding fusion features.
4. The vehicle body welding quality detection method based on machine learning according to claim 3 is characterized in that: In step S1, the welding quality detection modeling is used to design and construct the basic architecture of the body welding quality detection model, specifically to build a detection model for body welding quality. The detection model specifically includes a data acquisition layer, a feature extraction layer and a quality detection layer.
5. The method for detecting the body welding quality based on machine learning according to claim 4 is characterized in that: In step S2, the data acquisition layer is constructed to collect and preprocess the body welding image data, specifically to collect the body welding image data from the body welding line, and preprocess the image in the body welding image data by image size adjustment, image normalization and contrast adjustment to obtain body welding image optimization data.
6. The method for detecting the body welding quality based on machine learning according to claim 5 is characterized in that: In step S5, the vehicle body welding quality detection is specifically performed by constructing the data acquisition layer, the feature extraction layer and the quality detection layer, and the vehicle body welding quality detection result is calculated by using the vehicle body welding quality detection model.
7. A vehicle body welding quality detection system based on machine learning, used to implement the vehicle body welding quality detection method based on machine learning as described in any one of claims 1 to 6, characterized in that: It includes a welding quality detection modeling module, a data acquisition layer building module, a feature extraction layer building module, a quality detection layer building module and a body welding quality detection module.
8. The vehicle body welding quality detection system based on machine learning according to claim 7 is characterized in that: The welding quality detection modeling module is used for welding quality detection modeling. Through welding quality detection modeling, the basic architecture of the body welding quality detection model is obtained, and the data acquisition layer, feature extraction layer and quality detection layer are constructed according to the basic architecture of the body welding quality detection model; The data acquisition layer construction module is used for data acquisition layer construction, obtains vehicle body welding image optimization data through data acquisition layer construction, and sends the vehicle body welding image optimization data to the feature extraction layer construction module and the quality detection layer construction module; The feature extraction layer construction module is used for feature extraction layer construction, obtains the body welding fusion feature through feature extraction layer construction, and sends the body welding fusion feature to the quality detection layer construction module; The quality detection layer construction module is used for quality detection layer construction, and obtains a body welding quality detection model through quality detection layer construction, and sends the body welding quality detection model to the body welding quality detection module; The vehicle body welding quality detection module is used for vehicle body welding quality detection. By constructing the data acquisition layer, feature extraction layer and quality detection layer, the vehicle body welding quality detection is performed, and the vehicle body welding quality detection result is calculated by using the vehicle body welding quality detection model.
Citation Information
Cited By
Automatic welding method for automobile sound-absorbing cotton
CN119928295A