Automobile parts welding quality assessment method, system, storage medium and computer
Through real-time infrared image detection and dynamic resistance measurement, combined with image defect models and resistance feature classification, the problem of low efficiency in existing automotive parts welding quality inspection is solved, and efficient and accurate welding quality assessment is achieved.
Patent Information
- Application Number
- CN202510907088.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-02
- Publication Date
- 2025-09-12
- Estimated Expiration
- 2045-07-02
AI Technical Summary
Existing automotive parts welding quality inspection methods are inefficient, feedback is not timely, and inspection results rely on experience, resulting in poor production efficiency and product quality.
By acquiring infrared images in real time to detect the welding trajectory position, a welding image defect detection model is constructed. Combined with dynamic resistance measurement and time domain feature extraction, activation function is used to classify resistance features and comprehensively evaluate the welding quality.
It realizes real-time quality feedback during the welding process, improves detection efficiency and accuracy, can detect surface and internal defects in a timely manner, and is suitable for large-scale promotion.
Smart Images

Figure CN120411096B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of automobile inspection, and in particular to a method, system, storage medium and computer for evaluating the welding quality of automobile parts. Background Art
[0002] During the automotive parts manufacturing process, various surface defects such as holes and scratches are easily generated due to factors such as environmental and process conditions. These defects can cause changes in the performance of automotive parts, significantly reducing product quality and causing economic losses to automakers. Non-integrated parts are primarily connected by welding, and there are numerous weld points on the car body. Therefore, the quality of the welds between parts is a key parameter affecting vehicle quality.
[0003] At present, conventional automobile parts welding quality inspection mainly includes non-destructive testing or sampling destructive testing. Non-destructive testing includes visual inspection, ultrasonic testing, radiographic testing, etc., which does not provide timely feedback and is inefficient when inspecting the welding quality of welding tracks. Destructive testing mainly includes tensile testing, chisel testing, and metallographic analysis. The inspection process is time-consuming and labor-intensive, and the inspection effect depends on experience and proficiency, which may also lead to product waste. Conventional inspection methods are not effective and affect production efficiency. Summary of the Invention
[0004] Based on this, the purpose of the present invention is to provide a method, system, storage medium and computer for evaluating the welding quality of automobile parts to solve the technical problems existing in the prior art.
[0005] The present invention provides a method for evaluating the welding quality of automobile parts, comprising:
[0006] Acquire infrared images of automobile parts during welding in real time, calibrate the infrared images, and perform position detection of the welding trajectory of automobile parts based on the calibrated images to determine whether the welding trajectory is correct;
[0007] Acquire a welding image of the welding trajectory, construct a welding image defect detection model, and import the welding image into the welding image defect detection model for recognition to determine whether the welding image has surface defects;
[0008] Perform dynamic resistance measurement on the welding track, obtain dynamic resistance curve data and perform time domain feature extraction, vectorize the extracted time domain features, flatten and splice the vectorized time domain features to expand the time series features into a one-dimensional vector;
[0009] Based on the activation function, the time series features of the one-dimensional vector are classified into resistance features, and the presence of internal defects in the welding track is determined according to the resistance classification;
[0010] The welding quality of automobile parts is evaluated according to the position of the welding track, the welding image of the welding track, and the resistance characteristics of the welding track.
[0011] Preferably, the steps of acquiring infrared images of automobile parts in the welding process in real time, calibrating the infrared images, and detecting the position of the welding track of the automobile parts based on the calibrated images include:
[0012] Obtain an infrared image of the welding track during the welding process of automotive parts captured by a thermal imager, perform grayscale conversion based on the temperature value of each pixel in the infrared image, and obtain the corresponding grayscale image;
[0013] A fixed-size window in the grayscale image is selected for local movement. The grayscale gradient change in the window is determined based on the weights of all pixels in the window and the grayscale change value of the pixels in the window. Several corner points in the grayscale image are determined based on the grayscale gradient change range in the window.
[0014] Mapping the corner points to corresponding pixel positions under the orthographic projection through a mapping transformation matrix, and calculating the actual physical distance of each pixel in the transformed grayscale image to complete the calibration of the grayscale image;
[0015] Obtain the center deviation and angular deviation of the welding track in the calibrated grayscale image; determine whether the center deviation and angular deviation are within the preset range, and then determine whether the position of the welding track meets the requirements.
[0016] Preferably, the step of constructing a welding image defect detection model includes:
[0017] Construct a regional adversarial network based on feature extractor, task classifier, and domain discriminator;
[0018] Obtain and classify defective images of automotive parts. Welding images with defects are defined as unlabeled data and used as target domain samples, while the remaining defective automotive parts images are defined as labeled data and used as source domain samples.
[0019] Input the labeled source domain samples and unlabeled target domain samples into the feature extractor of the regional adversarial network to obtain the sample features corresponding to the source domain samples and the target domain samples;
[0020] Input the sample features corresponding to the source domain samples and the target domain samples into the task classifier to predict the sample category, calculate the classification loss of the source domain sample features, and calculate the minimum class confusion loss of the target domain sample features;
[0021] Based on the multilinear mapping method, the source domain sample features, the target domain sample features and the corresponding predicted sample categories are concatenated and mapped. The concatenated data is input into the domain discriminator for conditional domain adversarial and adversarial loss is calculated.
[0022] Taking the minimization of the sum of classification loss, minimum class confusion loss and adversarial loss as the optimization objectives, the model parameters in the regional adversarial network are optimized so that the feature distribution modes of the target domain samples and the source domain samples in the regional adversarial network are aligned, thereby being able to identify the target samples in the defect image set.
[0023] Preferably, the expression of the connection mapping is:
[0024]
[0025] Where, Indicates the output result of the join mapping, Represent the vectors corresponding to sample features and sample categories respectively, represents matrix product, represents the Hadamard product, Represent the dimensions corresponding to sample features and sample categories respectively, Represents the preset dimension threshold in the regional adversarial network, represents the join mapping dimension, Represent the random matrices corresponding to the connection mapping of sample features and sample categories respectively;
[0026] The expression of the classification loss is:
[0027]
[0028] Where, represents the feature extractor, represents the task classifier, Express expectations, Represents the source domain sample characteristics;
[0029] The expression of the minimum class confusion loss is:
[0030]
[0031] Where, represents the confusion loss function, Represents the sample characteristics of the target domain;
[0032] The expression of the adversarial loss is:
[0033]
[0034] Where, represents the domain discriminator, represents the feature extractor, Indicates field confrontation, represents the expectation corresponding to the feature distribution of source domain samples, represents the expectation corresponding to the feature distribution of the target domain samples, Represents the connection map corresponding to the source domain sample Represents the connection map corresponding to the target domain sample.
[0035] Preferably, the steps of measuring the dynamic resistance of the welding track, obtaining dynamic resistance curve data and extracting time domain features, vectorizing the extracted time domain features, and flattening and splicing the vectorized time domain features include:
[0036] Obtaining voltage and current signals on the welding track within a preset time period, calculating the dynamic resistance within the preset time period based on the voltage and current signals, and performing data enhancement and noise reduction on the dynamic resistance within the preset time period;
[0037] Constructing a feature extraction model, which includes at least a convolution layer, a pooling layer, and a flattening layer, inputting the dynamic resistance data after data enhancement and noise reduction into the feature extraction model, performing feature extraction in the convolution layer, and obtaining dynamic resistance curves corresponding to different types of solder joints that change over time;
[0038] The dynamic resistance curve is vectorized in the pooling layer to obtain a multi-channel feature matrix, which is then input into the flattening layer for splicing.
[0039] Preferably, the step of classifying the time series features of the one-dimensional vector into resistance features based on the activation function and determining whether the welding track has internal defects according to the resistance classification includes:
[0040] Add a batch normalization layer and a regularization layer before the activation function to perform batch normalization on the time series features expanded into a one-dimensional vector to change the variance and mean position of the time series features;
[0041] Regularize the time series features after batch normalization. During the data processing, some neurons are deactivated with a preset probability so that all neurons involved in data processing can participate in the work.
[0042] The regularized time series features are input into the ReLU activation function for nonlinear mapping to mine the resistance features of the time series features and classify them. The resistance classification is used to determine whether the welding track has internal defects.
[0043] The present invention also provides an automobile parts welding quality assessment system, comprising:
[0044] A calibration module is used to acquire infrared images of automobile parts during welding in real time, calibrate the infrared images, and perform position detection of the welding trajectory of the automobile parts based on the calibrated images to determine whether the welding trajectory is correct;
[0045] Constructing a model for acquiring a welding image of a welding trajectory, constructing a welding image defect detection model, and importing the welding image into the welding image defect detection model for recognition to determine whether the welding image has surface defects;
[0046] The flattening module measures the dynamic resistance of the welding track, obtains the dynamic resistance curve data and extracts the time domain features, vectorizes the extracted time domain features, flattens and splices the vectorized time domain features to expand the time series features into a one-dimensional vector;
[0047] The classification module classifies the time series features of the one-dimensional vector into resistance features based on the activation function, and determines whether the welding track has internal defects based on the resistance classification;
[0048] An evaluation module is used to evaluate the welding quality of automobile parts according to the position of the welding track, the welding image of the welding track, and the resistance characteristics of the welding track.
[0049] Preferably, the calibration module specifically includes:
[0050] A conversion unit is used to obtain an infrared image of the welding track during the welding process of automobile parts taken by a thermal imager, and perform grayscale conversion according to the temperature value of each pixel in the infrared image to obtain a corresponding grayscale image;
[0051] A determination unit is used to select a fixed-size window in the grayscale image for local movement, determine the grayscale gradient change in the window based on the weights of all pixels in the window and the grayscale change value of the pixels in the window, and determine several corner points in the grayscale image based on the grayscale gradient change range in the window;
[0052] A mapping unit, configured to map the corner points to corresponding pixel positions under orthographic projection using a mapping transformation matrix, and calculate the actual physical distance of each pixel in the transformed grayscale image to complete the calibration of the grayscale image;
[0053] The judgment unit is used to obtain the center deviation and angular deviation of the welding track in the calibrated grayscale image; judge whether the center deviation and angular deviation are within the preset range, and then determine whether the position of the welding track meets the requirements.
[0054] The present invention also provides a storage medium on which a computer program is stored. When the program is executed by a processor, the above-mentioned automobile parts welding quality assessment method is implemented.
[0055] The present invention also provides a computer comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the above-mentioned method for evaluating the welding quality of automobile parts is implemented.
[0056] The advantages of the present invention over the prior art are as follows: the method for evaluating the welding quality of automotive parts provided by the present application first obtains an infrared image during the welding process, determines the welding trajectory based on the infrared image, and facilitates timely adjustment of the welding path; after welding is completed, a welding image of the welding trajectory is obtained to construct a welding image defect detection model, and the welding image is imported into the welding image defect detection model for identification to determine whether the welding image has surface defects such as pits and pits; further, in addition to understanding the welding surface condition, dynamic resistance measurement is performed on the welding trajectory, dynamic resistance curve data is obtained and time domain feature extraction is performed, the extracted time domain features are vectorized, and the vectorized time domain features are flattened and spliced; the time series features are expanded into a one-dimensional vector, and the time series features of the one-dimensional vector are classified into resistance features based on the activation function, and whether the welding trajectory has internal defects is determined based on the resistance classification. Through the dynamic resistance measurement, it is timely understood whether the welding trajectory has internal defects such as holes, spatter or weld core deviation; the method for evaluating the welding quality of automotive parts provided by the present application obtains trajectory information during the welding process and provides timely feedback; after welding, the welding quality is comprehensively evaluated by surface and resistance measurement, with good evaluation accuracy and high efficiency, and is suitable for large-scale promotion.
[0057] Additional aspects and advantages of the present invention will be set forth in part in the description which follows and, in part, will be obvious from the description which follows, or may be learned by practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] Figure 1 This is a flow chart of a method for evaluating the welding quality of automobile parts in one embodiment of the present invention;
[0059] Figure 2 This is a structural block diagram of a computer in Embodiment 4 of the present invention.
[0060] The following specific embodiments will further illustrate the present invention in conjunction with the above-mentioned drawings. DETAILED DESCRIPTION
[0061] To facilitate understanding of the present invention, the present invention will be described more fully below with reference to the accompanying drawings. The drawings illustrate several embodiments of the present invention. However, the present invention may be implemented in many different forms and is not limited to the embodiments described herein. Rather, these embodiments are provided to provide a more thorough and comprehensive understanding of the present invention.
[0062] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one skilled in the art to which this invention pertains. The terms used in this specification of the present invention are for the purpose of describing specific embodiments only and are not intended to limit the present invention. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items.
[0063] Example 1
[0064] See also Figure 1 , which shows a method for evaluating the welding quality of automobile parts in a first embodiment of the present invention, specifically comprising steps S10 to S50:
[0065] S10, acquiring an infrared image of the automobile component during the welding process in real time, calibrating the infrared image, and detecting the position of the welding trajectory of the automobile component based on the calibrated image to determine whether the welding trajectory is correct;
[0066] Optionally, the steps of acquiring an infrared image of an automobile component during welding in real time, calibrating the infrared image, and detecting the position of the automobile component welding track based on the calibrated image include:
[0067] Obtain an infrared image of the welding track during the welding process of automotive parts captured by a thermal imager, perform grayscale conversion based on the temperature value of each pixel in the infrared image, and obtain the corresponding grayscale image;
[0068] A fixed-size window in the grayscale image is selected for local movement. The grayscale gradient change in the window is determined based on the weights of all pixels in the window and the grayscale change value of the pixels in the window. Several corner points in the grayscale image are determined based on the grayscale gradient change range in the window.
[0069] Mapping the corner points to corresponding pixel positions under the orthographic projection through a mapping transformation matrix, and calculating the actual physical distance of each pixel in the transformed grayscale image to complete the calibration of the grayscale image;
[0070] Obtain the center deviation and angular deviation of the welding track in the calibrated grayscale image; determine whether the center deviation and angular deviation are within the preset range, and then determine whether the position of the welding track meets the requirements.
[0071] Alternatively, currently, for welding between automotive parts, the main focus is on connecting the two parts after welding, and the trajectory during the welding process is not evaluated or adjusted. The welding trajectory is mainly inspected by visual inspection after welding is completed. Even if a trajectory deviation is found, it is difficult to adjust and modify it, and the timeliness is not strong. Based on this, this embodiment obtains infrared images in real time during the welding process. The infrared thermal imager can be arranged on the welding production line and equipped with a certain high-temperature protective cover. Due to the limitations of the welding process, it is impossible to take images directly above the welding process. Therefore, image calibration is required to transform the oblique image into an image under orthographic projection, and establish a mapping relationship between the image under orthographic projection and the actual distance. In this embodiment, by locally moving the window in the grayscale image, the pixel point corresponding to the maximum grayscale gradient change in the local image is the corner point. After determining the corner point, mapping can effectively reduce the mapping deviation and improve the accuracy of image calibration. Finally, the center deviation and angular deviation of the welding trajectory in the calibrated grayscale image are obtained; it is determined whether the center deviation and angular deviation are within the preset range, and then whether the position of the welding trajectory meets the requirements; it is convenient to adjust the welding path in time and improve the welding quality.
[0072] S20, acquiring a welding image of the welding trajectory, building a welding image defect detection model, and importing the welding image into the welding image defect detection model for recognition to determine whether the welding image has surface defects;
[0073] Optionally, the step of constructing a welding image defect detection model includes:
[0074] Construct a regional adversarial network based on feature extractor, task classifier, and domain discriminator;
[0075] Obtain and classify defective images of automotive parts. Welding images with defects are defined as unlabeled data and used as target domain samples, while the remaining defective automotive parts images are defined as labeled data and used as source domain samples.
[0076] Input the labeled source domain samples and unlabeled target domain samples into the feature extractor of the regional adversarial network to obtain the sample features corresponding to the source domain samples and the target domain samples;
[0077] Input the sample features corresponding to the source domain samples and the target domain samples into the task classifier to predict the sample category, calculate the classification loss of the source domain sample features, and calculate the minimum class confusion loss of the target domain sample features;
[0078] Based on the multilinear mapping method, the source domain sample features, the target domain sample features and the corresponding predicted sample categories are concatenated and mapped. The concatenated data is input into the domain discriminator for conditional domain adversarial and adversarial loss is calculated.
[0079] Taking the minimization of the sum of classification loss, minimum class confusion loss and adversarial loss as the optimization objectives, the model parameters in the regional adversarial network are optimized so that the feature distribution modes of the target domain samples and the source domain samples in the regional adversarial network are aligned, thereby being able to identify the target samples in the defect image set.
[0080] The expression of the join mapping is:
[0081]
[0082] Where, Indicates the output result of the join mapping, Represent the vectors corresponding to sample features and sample categories respectively, represents matrix product, represents the Hadamard product, Represent the dimensions corresponding to sample features and sample categories respectively, Represents the preset dimension threshold in the regional adversarial network, represents the join mapping dimension, Represent the random matrices corresponding to the connection mapping of sample features and sample categories respectively;
[0083] The expression of the classification loss is:
[0084]
[0085] Where, represents the feature extractor, represents the task classifier, Express expectations, Represents the source domain sample characteristics;
[0086] The expression of the minimum class confusion loss is:
[0087]
[0088] Where, represents the confusion loss function, Represents the sample characteristics of the target domain;
[0089] The expression of the adversarial loss is:
[0090]
[0091] Where, represents the domain discriminator, represents the feature extractor, Indicates field confrontation, represents the expectation corresponding to the feature distribution of source domain samples, represents the expectation corresponding to the feature distribution of the target domain samples, Represents the connection map corresponding to the source domain sample Represents the connection map corresponding to the target domain sample.
[0092] Optionally, after welding is completed, the welded image needs to be inspected to determine whether there are defects such as holes, scratches, patches, and pockmarks on the welding trajectory. Therefore, in this embodiment, a welding image defect detection model is constructed. In constructing the detection model, in order to address the problem of insufficient welding defect samples in the actual detection environment, a defect image set is constructed by selecting a non-welding defect image set as a source domain sample and a welding defect image as a target domain sample, and a regional adversarial network is constructed based on a feature extractor, a task classifier, and a domain discriminator; the regional adversarial network is trained based on the constructed defect image set, and a connection mapping is performed through the source domain sample features, the target domain sample features, and the corresponding predicted sample categories, and conditional domain adversarial is performed based on the data after the connection mapping. The feature distribution of the two domains is adjusted through a given labeled source domain sample data set and an unlabeled target domain sample data set to avoid the "domain offset" problem of defect images in different domains during adversarial training. The trained welding image defect detection model has a strong classification effect, realizes distribution mode alignment of defect samples, and has a good defect detection effect.
[0093] S30, performing dynamic resistance measurement on the welding track, obtaining dynamic resistance curve data and performing time domain feature extraction, vectorizing the extracted time domain features, and flattening and splicing the vectorized time domain features to expand the time series features into a one-dimensional vector;
[0094] Optionally, the steps of performing dynamic resistance measurement on the welding track, obtaining dynamic resistance curve data and extracting time domain features, vectorizing the extracted time domain features, and flattening and splicing the vectorized time domain features include:
[0095] Obtaining voltage and current signals on the welding track within a preset time period, calculating the dynamic resistance within the preset time period based on the voltage and current signals, and performing data enhancement and noise reduction on the dynamic resistance within the preset time period;
[0096] Constructing a feature extraction model, which includes at least a convolution layer, a pooling layer, and a flattening layer, inputting the dynamic resistance data after data enhancement and noise reduction into the feature extraction model, performing feature extraction in the convolution layer, and obtaining dynamic resistance curves corresponding to different types of solder joints that change over time;
[0097] The dynamic resistance curve is vectorized in the pooling layer to obtain a multi-channel feature matrix, which is then input into the flattening layer for splicing.
[0098] S40, classifying the time series features of the one-dimensional vector into resistance features based on the activation function, and determining whether the welding track has internal defects according to the resistance classification;
[0099] Optionally, the step of classifying the time series features of the one-dimensional vector into resistance features based on the activation function and determining whether the welding track has internal defects according to the resistance classification includes:
[0100] Add a batch normalization layer and a regularization layer before the activation function to perform batch normalization on the time series features expanded into a one-dimensional vector to change the variance and mean position of the time series features;
[0101] Regularize the time series features after batch normalization. During the data processing, some neurons are deactivated with a preset probability so that all neurons involved in data processing can participate in the work.
[0102] The regularized time series features are input into the ReLU activation function for nonlinear mapping to mine the resistance features of the time series features and classify them. The resistance classification is used to determine whether the welding track has internal defects.
[0103] Optionally, since some welding positions may have defects such as holes, spatter or weld core deviation, which are difficult to detect by appearance, in this embodiment, further dynamic resistance measurement of the welding track is required to evaluate the welding quality; this embodiment performs feature analysis based on a neural network; measuring the dynamic resistance of the welding track is also one of the important methods to verify the welding quality. The quality of the vehicle body welds directly affects the rigidity and collision safety of the vehicle; real-time dynamic resistance curve data is obtained by measuring the voltage signal and current signal of the welding track; since the occurrence of welding defects on the welding track of automotive parts is sporadic and low-frequency, and is subject to the limited time of occupying the production line welding point production platform, in order to expand the data capacity, in the specific implementation, the dynamic resistance data can be enhanced by data enhancement processing, and some disturbances are introduced while ensuring that the data label remains unchanged, thereby reducing the sensitivity to the original data while increasing the number of data samples. The diversity of the newly added samples in the data can improve the generalization ability of the feature extraction model.
[0104] In specific implementation, there is a corresponding relationship between welding defects and resistance changes. Schematically, the dynamic resistance of spatter-type welding defects will drop sharply. The obtained multi-channel feature matrix corresponds to different welding defects. The flattened and spliced feature vectors are integrated into a one-dimensional vector as the input of the subsequent network, which can reduce the dimension and reduce the amount of data processing. The activation function can use the ReLU function, and add a batch normalization layer and a regularization layer before the activation function. The batch normalization layer can make the batch data distribution a standard normal distribution, while maintaining a certain inconsistency between each batch of data, effectively preventing "gradient explosion". The purpose of the regularization layer is to solve the problem of overfitting in the model by selectively inactivating some neurons during the training process, balancing the opposing relationship between strong and weak nodes in the network, making full use of the width and depth of the network, and improving the model generalization ability and feature classification accuracy.
[0105] S50 , evaluating the welding quality of the automobile parts according to the position of the welding track, the welding image of the welding track, and the resistance characteristics of the welding track.
[0106] Optionally, the welding quality of automotive parts is comprehensively evaluated based on the position of the welding track, the welding image of the welding track, and the resistance characteristics of the welding track.
[0107] In summary, the automobile parts welding quality assessment method provided by the present application first obtains infrared images during the welding process, and determines the welding trajectory based on the infrared images to facilitate timely adjustment of the welding path; after welding is completed, the welding image of the welding trajectory is obtained to construct a welding image defect detection model, and the welding image is imported into the welding image defect detection model for identification to determine whether the welding image has surface defects such as pits and pits; further, in addition to understanding the welding surface conditions, the welding trajectory is subjected to dynamic resistance measurement, dynamic resistance curve data is obtained and time domain feature extraction is performed, the extracted time domain features are vectorized, and the vectorized time domain features are flattened and spliced; the time series features are expanded into a one-dimensional vector, and the time series features of the one-dimensional vector are classified into resistance features based on the activation function, and whether the welding trajectory has internal defects is determined based on the resistance classification. Through the measurement of dynamic resistance, it is timely understood whether there are internal defects such as holes, spatter or weld core deviation inside the welding trajectory; the automobile parts welding quality assessment method provided by the present application obtains trajectory information during the welding process and provides timely feedback; after welding, the welding quality is comprehensively evaluated by surface and resistance measurement, and the evaluation is accurate and efficient, which is suitable for large-scale promotion.
[0108] Example 2
[0109] This embodiment provides an automotive parts welding quality assessment system, comprising:
[0110] A calibration module is used to acquire infrared images of automobile parts during welding in real time, calibrate the infrared images, and perform position detection of the welding trajectory of the automobile parts based on the calibrated images to determine whether the welding trajectory is correct;
[0111] Constructing a model for acquiring a welding image of a welding trajectory, constructing a welding image defect detection model, and importing the welding image into the welding image defect detection model for recognition to determine whether the welding image has surface defects;
[0112] The flattening module measures the dynamic resistance of the welding track, obtains the dynamic resistance curve data and extracts the time domain features, vectorizes the extracted time domain features, flattens and splices the vectorized time domain features to expand the time series features into a one-dimensional vector;
[0113] The classification module classifies the time series features of the one-dimensional vector into resistance features based on the activation function, and determines whether the welding track has internal defects based on the resistance classification;
[0114] An evaluation module is used to evaluate the welding quality of automobile parts according to the position of the welding track, the welding image of the welding track, and the resistance characteristics of the welding track.
[0115] Preferably, the steps of acquiring infrared images of automobile parts in the welding process in real time, calibrating the infrared images, and detecting the position of the welding track of the automobile parts based on the calibrated images include:
[0116] Obtain an infrared image of the welding track during the welding process of automotive parts captured by a thermal imager, perform grayscale conversion based on the temperature value of each pixel in the infrared image, and obtain the corresponding grayscale image;
[0117] A fixed-size window in the grayscale image is selected for local movement. The grayscale gradient change in the window is determined based on the weights of all pixels in the window and the grayscale change value of the pixels in the window. Several corner points in the grayscale image are determined based on the grayscale gradient change range in the window.
[0118] Mapping the corner points to corresponding pixel positions under the orthographic projection through a mapping transformation matrix, and calculating the actual physical distance of each pixel in the transformed grayscale image to complete the calibration of the grayscale image;
[0119] Obtain the center deviation and angular deviation of the welding track in the calibrated grayscale image; determine whether the center deviation and angular deviation are within the preset range, and then determine whether the position of the welding track meets the requirements.
[0120] Preferably, the step of constructing a welding image defect detection model includes:
[0121] Construct a regional adversarial network based on feature extractor, task classifier, and domain discriminator;
[0122] Obtain and classify defective images of automotive parts. Welding images with defects are defined as unlabeled data and used as target domain samples, while the remaining defective automotive parts images are defined as labeled data and used as source domain samples.
[0123] Input the labeled source domain samples and unlabeled target domain samples into the feature extractor of the regional adversarial network to obtain the sample features corresponding to the source domain samples and the target domain samples;
[0124] Input the sample features corresponding to the source domain samples and the target domain samples into the task classifier to predict the sample category, calculate the classification loss of the source domain sample features, and calculate the minimum class confusion loss of the target domain sample features;
[0125] Based on the multilinear mapping method, the source domain sample features, the target domain sample features and the corresponding predicted sample categories are concatenated and mapped. The concatenated data is input into the domain discriminator for conditional domain adversarial and adversarial loss is calculated.
[0126] Taking the minimization of the sum of classification loss, minimum class confusion loss and adversarial loss as the optimization objectives, the model parameters in the regional adversarial network are optimized so that the feature distribution modes of the target domain samples and the source domain samples in the regional adversarial network are aligned, thereby being able to identify the target samples in the defect image set.
[0127] Preferably, the expression of the connection mapping is:
[0128]
[0129] Where, Indicates the output result of the join mapping, Represent the vectors corresponding to sample features and sample categories respectively, represents matrix product, represents the Hadamard product, Represent the dimensions corresponding to sample features and sample categories respectively, Represents the preset dimension threshold in the regional adversarial network, represents the join mapping dimension, Represent the random matrices corresponding to the connection mapping of sample features and sample categories respectively;
[0130] The expression of the classification loss is:
[0131]
[0132] Where, represents the feature extractor, represents the task classifier, Express expectations, Represents the source domain sample characteristics;
[0133] The expression of the minimum class confusion loss is:
[0134]
[0135] Where, represents the confusion loss function, Represents the sample characteristics of the target domain;
[0136] The expression of the adversarial loss is:
[0137]
[0138] Where, represents the domain discriminator, represents the feature extractor, Indicates field confrontation, represents the expectation corresponding to the feature distribution of source domain samples, represents the expectation corresponding to the feature distribution of the target domain samples, Represents the connection map corresponding to the source domain sample Represents the connection map corresponding to the target domain sample.
[0139] Preferably, the steps of measuring the dynamic resistance of the welding track, obtaining dynamic resistance curve data and extracting time domain features, vectorizing the extracted time domain features, and flattening and splicing the vectorized time domain features include:
[0140] Obtaining voltage and current signals on the welding track within a preset time period, calculating the dynamic resistance within the preset time period based on the voltage and current signals, and performing data enhancement and noise reduction on the dynamic resistance within the preset time period;
[0141] Constructing a feature extraction model, which includes at least a convolution layer, a pooling layer, and a flattening layer, inputting the dynamic resistance data after data enhancement and noise reduction into the feature extraction model, performing feature extraction in the convolution layer, and obtaining dynamic resistance curves corresponding to different types of solder joints that change over time;
[0142] The dynamic resistance curve is vectorized in the pooling layer to obtain a multi-channel feature matrix, which is then input into the flattening layer for splicing.
[0143] Preferably, the step of classifying the time series features of the one-dimensional vector into resistance features based on the activation function and determining whether the welding track has internal defects according to the resistance classification includes:
[0144] Add a batch normalization layer and a regularization layer before the activation function to perform batch normalization on the time series features expanded into a one-dimensional vector to change the variance and mean position of the time series features;
[0145] Regularize the time series features after batch normalization. During the data processing, some neurons are deactivated with a preset probability so that all neurons involved in data processing can participate in the work.
[0146] The regularized time series features are input into the ReLU activation function for nonlinear mapping to mine the resistance features of the time series features and classify them. The resistance classification is used to determine whether the welding track has internal defects.
[0147] Example 3
[0148] This embodiment provides a storage medium having a computer program stored thereon. When the program is executed by a processor, the above-mentioned method for evaluating the welding quality of automobile parts is implemented.
[0149] Example 4
[0150] The present invention also provides a computer, see Figure 2 , shown is a computer in an embodiment of the present invention, including a memory 10, a processor 20, and a computer program 30 stored in the memory 10 and executable on the processor 20. When the processor 20 executes the computer program 30, the above-mentioned automobile parts welding quality assessment method is implemented.
[0151] The memory 10 includes at least one type of storage medium, including flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory), a magnetic memory, a magnetic disk, an optical disk, etc. In some embodiments, the memory 10 may be an internal storage unit of a computer, such as the computer's hard disk. In other embodiments, the memory 10 may also be an external storage device, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) card, a flash memory card, etc. Furthermore, the memory 10 may include both an internal storage unit of the computer and an external storage device. The memory 10 can be used not only to store application software installed in the computer and various types of data, but also to temporarily store data that has been output or is about to be output.
[0152] Among them, in some embodiments, the processor 20 can be an electronic control unit (Electronic Control Unit, abbreviated as ECU, also known as a vehicle computer), a central processing unit (CPU), a controller, a microcontroller, a microprocessor or other data processing chip, used to run the program code stored in the memory 10 or process data, such as executing access restriction programs.
[0153] It should be pointed out that Figure 2 The structure shown does not constitute a limitation of the computer. In other embodiments, the computer may include fewer or more components than shown in the figure, or combine certain components, or arrange the components differently.
[0154] Those skilled in the art will appreciate that the logic and / or steps represented in the flowcharts or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, apparatus, or device (e.g., a computer-based system, a system including a processor, or other system that can fetch and execute instructions from an instruction execution system, apparatus, or device), or in conjunction with such instruction execution system, apparatus, or device. For purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate, or transport a program for use by an instruction execution system, apparatus, or device, or in conjunction with such instruction execution system, apparatus, or device.
[0155] More specific examples (a non-exhaustive list) of computer-readable media include the following: an electrical connection with one or more wires (electronic devices), a portable computer disk cartridge (magnetic devices), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disc read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting, or processing it in another suitable manner as necessary, and then storing it in a computer memory.
[0156] It should be understood that various components of the present invention may be implemented using hardware, software, firmware, or a combination thereof. In the aforementioned embodiments, multiple steps or methods may be implemented using software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented using hardware, as in another embodiment, any one or a combination of the following technologies known in the art may be used: a discrete logic circuit having logic gate circuits for implementing logic functions on data signals, an application-specific integrated circuit having suitable combinational logic gate circuits, a programmable gate array (PGA), a field-programmable gate array (FPGA), etc.
[0157] The technical features of the above-mentioned embodiments can be combined arbitrarily. In order to make the description concise, not all possible combinations of the technical features in the above-mentioned embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0158] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that a person skilled in the art could make various modifications and improvements without departing from the spirit of the present application, all of which fall within the scope of protection of the present application. Therefore, the scope of protection of the present patent application shall be determined by the appended claims.
Claims
1. A method for evaluating the welding quality of automobile parts, characterized in that: include: Acquire infrared images of automobile parts during welding in real time, calibrate the infrared images, and perform position detection of the welding trajectory of automobile parts based on the calibrated images to determine whether the welding trajectory is correct; Acquire a welding image of the welding trajectory, construct a welding image defect detection model, and import the welding image into the welding image defect detection model for recognition to determine whether the welding image has surface defects; Perform dynamic resistance measurement on the welding track, obtain dynamic resistance curve data and perform time domain feature extraction, vectorize the extracted time domain features, flatten and splice the vectorized time domain features to expand the time series features into a one-dimensional vector; Based on the activation function, the time series features of the one-dimensional vector are classified into resistance features, and the presence of internal defects in the welding track is determined according to the resistance classification; evaluating the welding quality of automobile parts according to the position of the welding track, the welding image of the welding track, and the resistance characteristics of the welding track; The step of constructing a welding image defect detection model comprises: Construct a regional adversarial network based on feature extractor, task classifier, and domain discriminator; Obtain and classify defective images of automotive parts. Welding images with defects are defined as unlabeled data and used as target domain samples, while the remaining defective automotive parts images are defined as labeled data and used as source domain samples. Input the labeled source domain samples and unlabeled target domain samples into the feature extractor of the regional adversarial network to obtain the sample features corresponding to the source domain samples and the target domain samples; Input the sample features corresponding to the source domain samples and the target domain samples into the task classifier to predict the sample category, calculate the classification loss of the source domain sample features, and calculate the minimum class confusion loss of the target domain sample features; Based on the multilinear mapping method, the source domain sample features, the target domain sample features and the corresponding predicted sample categories are concatenated and mapped. The concatenated data is input into the domain discriminator for conditional domain adversarial and adversarial loss is calculated. Taking the minimization of the sum of classification loss, minimum class confusion loss and adversarial loss as the optimization objectives, the model parameters in the regional adversarial network are optimized so that the feature distribution modes of the target domain samples and the source domain samples in the regional adversarial network are aligned, thereby being able to identify the target samples in the defect image set.
2. The method for evaluating the welding quality of automobile parts according to claim 1, wherein: The steps of acquiring infrared images of automobile parts during welding in real time, calibrating the infrared images, and detecting the position of the welding track of the automobile parts based on the calibrated images include: Obtain an infrared image of the welding track during the welding process of automotive parts captured by a thermal imager, perform grayscale conversion based on the temperature value of each pixel in the infrared image, and obtain the corresponding grayscale image; A fixed-size window in the grayscale image is selected for local movement. The grayscale gradient change in the window is determined based on the weights of all pixels in the window and the grayscale change value of the pixels in the window. Several corner points in the grayscale image are determined based on the grayscale gradient change range in the window. Mapping the corner points to corresponding pixel positions under the orthographic projection through a mapping transformation matrix, and calculating the actual physical distance of each pixel in the transformed grayscale image to complete the calibration of the grayscale image; Obtain the center deviation and angular deviation of the welding track in the calibrated grayscale image; determine whether the center deviation and angular deviation are within the preset range, and then determine whether the position of the welding track meets the requirements.
3. The method for evaluating the welding quality of automobile parts according to claim 1, wherein: The expression of the join mapping is: Where, Indicates the output result of the join mapping, Represent the vectors corresponding to sample features and sample categories respectively, represents matrix product, represents the Hadamard product, Represent the dimensions corresponding to sample features and sample categories respectively, Represents the preset dimension threshold in the regional adversarial network, represents the join mapping dimension, Represent the random matrices corresponding to the connection mapping of sample features and sample categories respectively; The expression of the classification loss is: Where, represents the feature extractor, represents the task classifier, Express expectations, Represents the source domain sample characteristics; The expression of the minimum class confusion loss is: Where, represents the confusion loss function, Represents the sample characteristics of the target domain; The expression of the adversarial loss is: Where, represents the domain discriminator, represents the feature extractor, Indicates field confrontation, represents the expectation corresponding to the feature distribution of source domain samples, represents the expectation corresponding to the feature distribution of the target domain samples, Represents the connection map corresponding to the source domain sample Represents the connection map corresponding to the target domain sample.
4. The method for evaluating the welding quality of automobile parts according to claim 1, wherein: The steps of measuring the dynamic resistance of the welding track, obtaining dynamic resistance curve data and extracting time domain features, vectorizing the extracted time domain features, and flattening and splicing the vectorized time domain features include: Obtaining voltage and current signals on the welding track within a preset time period, calculating the dynamic resistance within the preset time period based on the voltage and current signals, and performing data enhancement and noise reduction on the dynamic resistance within the preset time period; Constructing a feature extraction model, which includes at least a convolution layer, a pooling layer, and a flattening layer, inputting the dynamic resistance data after data enhancement and noise reduction into the feature extraction model, performing feature extraction in the convolution layer, and obtaining dynamic resistance curves corresponding to different types of solder joints that change over time; The dynamic resistance curve is vectorized in the pooling layer to obtain a multi-channel feature matrix, which is then input into the flattening layer for splicing.
5. The method for evaluating the welding quality of automobile parts according to claim 4, wherein: The step of classifying the time series features of the one-dimensional vector into resistance features based on the activation function and determining whether the welding track has internal defects according to the resistance classification includes: Add a batch normalization layer and a regularization layer before the activation function to perform batch normalization on the time series features expanded into a one-dimensional vector to change the variance and mean position of the time series features; Regularize the time series features after batch normalization. During the data processing, some neurons are deactivated with a preset probability so that all neurons involved in data processing can participate in the work. The regularized time series features are input into the ReLU activation function for nonlinear mapping to mine the resistance features of the time series features and classify them. The resistance classification is used to determine whether the welding track has internal defects.
6. An automotive parts welding quality assessment system, characterized in that: include: A calibration module is used to acquire infrared images of automobile parts during welding in real time, calibrate the infrared images, and perform position detection of the welding trajectory of the automobile parts based on the calibrated images to determine whether the welding trajectory is correct; Constructing a model for acquiring a welding image of a welding trajectory, constructing a welding image defect detection model, and importing the welding image into the welding image defect detection model for recognition to determine whether the welding image has surface defects; The flattening module measures the dynamic resistance of the welding track, obtains the dynamic resistance curve data and extracts the time domain features, vectorizes the extracted time domain features, flattens and splices the vectorized time domain features to expand the time series features into a one-dimensional vector; The classification module classifies the time series features of the one-dimensional vector into resistance features based on the activation function, and determines whether the welding track has internal defects based on the resistance classification; An evaluation module, configured to evaluate the welding quality of automobile parts based on the position of the welding track, the welding image of the welding track, and the resistance characteristics of the welding track; The construction model is specifically used for: Construct a regional adversarial network based on feature extractor, task classifier, and domain discriminator; Obtain and classify defective images of automotive parts. Welding images with defects are defined as unlabeled data and used as target domain samples, while the remaining defective automotive parts images are defined as labeled data and used as source domain samples. Input the labeled source domain samples and unlabeled target domain samples into the feature extractor of the regional adversarial network to obtain the sample features corresponding to the source domain samples and the target domain samples; Input the sample features corresponding to the source domain samples and the target domain samples into the task classifier to predict the sample category, calculate the classification loss of the source domain sample features, and calculate the minimum class confusion loss of the target domain sample features; Based on the multilinear mapping method, the source domain sample features, the target domain sample features and the corresponding predicted sample categories are concatenated and mapped. The concatenated data is input into the domain discriminator for conditional domain adversarial and adversarial loss is calculated. Taking the minimization of the sum of classification loss, minimum class confusion loss and adversarial loss as the optimization objectives, the model parameters in the regional adversarial network are optimized so that the feature distribution modes of the target domain samples and the source domain samples in the regional adversarial network are aligned, thereby being able to identify the target samples in the defect image set.
7. The automobile parts welding quality assessment system according to claim 6, characterized in that: The calibration module specifically includes: A conversion unit is used to obtain an infrared image of the welding track during the welding process of automobile parts taken by a thermal imager, and perform grayscale conversion according to the temperature value of each pixel in the infrared image to obtain a corresponding grayscale image; A determination unit is used to select a fixed-size window in the grayscale image for local movement, determine the grayscale gradient change in the window based on the weights of all pixels in the window and the grayscale change value of the pixels in the window, and determine several corner points in the grayscale image based on the grayscale gradient change range in the window; A mapping unit, configured to map the corner points to corresponding pixel positions under orthographic projection using a mapping transformation matrix, and calculate the actual physical distance of each pixel in the transformed grayscale image to complete the calibration of the grayscale image; The judgment unit is used to obtain the center deviation and angular deviation of the welding track in the calibrated grayscale image; judge whether the center deviation and angular deviation are within the preset range, and then determine whether the position of the welding track meets the requirements.
8. A storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method for evaluating the welding quality of automobile parts according to any one of claims 1 to 5 is implemented.
9. A computer comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the method for evaluating the welding quality of automobile parts according to any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Intermediate infrared temperature sensing based online detecting method for welding seam quality of electric-arc welding
CN107931802A
Resistance spot welding quality evaluation method and system for automobile body parts
CN116921910A