A steering bridge horizontal welding tool intelligent control method and system
By using a teacher model to generate high-confidence pseudo-labels in the horizontal welding of steering bridges and combining consistency screening and dynamic adjustment of pseudo-label screening criteria, the problem of limited generalization ability of the model under different working conditions was solved, and the stability and accuracy of welding control were achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ZHEJIANG LINDE AXLE CO LTD
- Filing Date
- 2026-04-02
- Publication Date
- 2026-06-26
AI Technical Summary
In the horizontal welding of steering axles, existing technologies suffer from limitations in the generalization ability of machine vision models under different production environments due to factors such as changes in lighting, uncertain workpiece posture, oil stain reflection, and interference from welding arc light. Furthermore, poor quality of pseudo-labels leads to model performance degradation, making it difficult to achieve accurate welding control.
The initial student model is trained based on labeled source domain data. High-confidence pseudo-labels are generated using the teacher model. High-quality pseudo-labels are then selected through a consistency screening process. The student model is iteratively trained by combining multiple data augmentations and screening based on the mean of the intersection-union ratio and the standard deviation of the class confidence. The pseudo-label selection criteria are dynamically adjusted to achieve the weight allocation of contrastive loss and supervised loss, ensuring the stability and accuracy of model training.
This improved the model's recognition accuracy under different working conditions, ensured the stability and accuracy of welding control, enabled the refined utilization of unlabeled data, and avoided the performance degradation of the model caused by poor quality pseudo-labels.
Smart Images

Figure CN121962781B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of control, and in particular relates to an intelligent control method and system for a horizontal welding fixture for a steering axle. Background Technology
[0002] Horizontal welding fixtures for steering axles are crucial equipment in the manufacturing of rail transit equipment. Machine vision-based target recognition models are widely used to guide welding robots in positioning and operation. High-performance recognition models typically rely on large-scale, high-quality labeled datasets for supervised training. In actual industrial scenarios of steering axle welding, numerous challenges arise, including varying lighting conditions, unpredictable workpiece poses, oil glare, welding arc interference, and smoke obstruction, limiting the model's generalization ability under different production environments. Re-collecting and manually labeling large amounts of image data for each specific working condition is not only costly and time-consuming but also severely restricts the rapid deployment and adaptability of intelligent welding systems. This paper employs a semi-supervised learning and unsupervised domain adaptation method. A model trained on labeled source domain data is used to predict unlabeled target domain data, and high-confidence predictions are added as pseudo-labels to the training set, thereby improving model performance using massive amounts of unlabeled data. The quality of the pseudo-labels determines the optimization direction of the model; low-quality or incorrect pseudo-labels introduce noise, leading to error accumulation and even model performance degradation. The common practice of using confidence thresholds to filter pseudo-labels is ill-suited to the dynamically changing learning capabilities of models during training. This can lead to the filtering out of too many useful samples in the early stages of training or the overuse of low-quality samples in later stages. Furthermore, a single class confidence level cannot fully represent the reliability of the prediction, and the failure to differentiate between selected pseudo-labels based on their reliability differences results in all pseudo-labels having the same weight in the loss calculation, limiting model performance. All of these factors contribute to inaccurate control of horizontal welding of steering axles. Summary of the Invention
[0003] To address the aforementioned problems, in the first aspect, this invention proposes an intelligent control method for a horizontal welding fixture for a steering axle, comprising the following steps:
[0004] The initial student model is trained based on a labeled source domain workpiece image dataset, and the model parameters are copied to initialize the teacher model.
[0005] The teacher model is used to predict unlabeled images in the target domain, and a high-confidence pseudo-label is generated through a consistency screening process. The screening process is as follows: the unlabeled images in the target domain are augmented multiple times and input into the teacher model. When the mean of the intersection-union ratio of multiple prediction boxes is greater than a first threshold and the standard deviation of the category confidence is less than a second threshold, the prediction result of the unaugmented original image of the unlabeled image is determined as the target domain image with a high-confidence pseudo-label, and the corresponding confidence, mean intersection-union ratio, and standard deviation of confidence are recorded.
[0006] Unlabeled images that fail the consistency screening process are identified as low-confidence samples in the target domain; the student model is iteratively trained by combining the labeled workpiece image dataset from the source domain, the target domain images with high-confidence pseudo-labels, and the low-confidence samples in the target domain; during training, the student model parameters are updated based on the sum of supervised loss, unsupervised loss, and contrastive loss; the teacher model parameters are updated using the exponential moving average of the student model parameters.
[0007] After each training cycle, the first and second thresholds are adjusted for pseudo-label screening in the next cycle based on the difference between the average confidence of all high-confidence pseudo-labels in the cycle and the preset target confidence. Based on the trained student model, the workpiece is identified in real time and welding motion control commands are generated.
[0008] Optionally, performing multiple data augmentations on the unlabeled image of the target domain and inputting it into the teacher model includes:
[0009] Each unlabeled image in the target domain undergoes multiple independent enhancement transformations, including random horizontal flipping, random cropping, color jittering, and Gaussian noise addition.
[0010] Optionally, the mean cross-union ratio is the average cross-union ratio calculated for multiple prediction boxes of the same target instance, and the standard deviation of the class confidence score is the standard deviation calculated for multiple class confidence scores of the target instance.
[0011] Optionally, the weighting factor W is calculated as follows: ;
[0012] Where C is the confidence level, I is the mean of the cross-union ratio, and S is the standard deviation of the confidence level. ε is a preset scaling factor, where ε is a tiny positive constant to avoid a denominator of zero.
[0013] Optionally, updating the student model parameters based on the sum of supervised loss, unsupervised loss, and contrastive loss includes:
[0014] The classification and regression losses on the labeled workpiece image dataset in the source domain are calculated as supervised losses;
[0015] Calculate the classification and regression losses on the target domain image with the high-confidence pseudo-labels, and multiply them by the weighting factor to obtain the unsupervised loss;
[0016] The feature vectors of the low-confidence samples in the target domain are used to calculate the contrastive loss.
[0017] Optionally, updating the teacher model parameters using an exponential moving average of the student model parameters includes:
[0018] The teacher model parameters are updated as follows: ;
[0019] in For the updated teacher model parameters, The parameters of the teacher model before the update. These are the parameters for the current student model. This is the momentum coefficient.
[0020] Optionally, adjusting the first and second thresholds for pseudo-label screening in the next period based on the difference between the average confidence of all high-confidence pseudo-labels within the period and the preset target confidence includes:
[0021] First threshold Second threshold The adjustment method is as follows: , ;
[0022] in This represents the average confidence level of high-confidence pseudo-labels in the current period. To preset the target confidence level, To adjust the step size factor.
[0023] Optionally, the step of deploying the trained student model in the control system of the horizontal welding fixture for the steering axle, for real-time workpiece identification and generation of welding motion control commands, includes:
[0024] The two-dimensional pixel coordinates of the workpiece position output by the student model are converted into three-dimensional spatial coordinates in the welding fixture coordinate system through a pre-calibrated camera intrinsic and extrinsic parameter matrix.
[0025] Based on the identified three-dimensional spatial coordinates, the corresponding welding robot motion trajectory instructions are matched and generated from the preset welding process library.
[0026] In a second aspect, the present invention provides an intelligent control system for a horizontal welding fixture for a steering axle, comprising the following modules:
[0027] The training module is used to train an initial student model based on a labeled source domain workpiece image dataset and to copy the model parameters to initialize a teacher model.
[0028] The determination module is used to predict unlabeled images of the target domain using the teacher model and generate high-confidence pseudo-labels through a consistency screening process. The screening process is as follows: the unlabeled images of the target domain are subjected to multiple data augmentations and input into the teacher model. When the mean of the intersection-union ratio of multiple prediction boxes is greater than a first threshold and the standard deviation of the category confidence is less than a second threshold, the prediction result of the unlabeled original image without augmentation is determined as the target domain image with a high-confidence pseudo-label, and the corresponding confidence, mean intersection-union ratio, and standard deviation of confidence are recorded.
[0029] An update module is used to identify unlabeled images that fail the consistency screening process as low-confidence samples in the target domain; iteratively train the student model by combining the labeled workpiece image dataset from the source domain, the target domain images with high-confidence pseudo-labels, and the low-confidence samples in the target domain; during training, the student model parameters are updated based on the sum of supervised loss, unsupervised loss, and contrastive loss; and the teacher model parameters are updated using an exponential moving average of the student model parameters.
[0030] The generation module is used to adjust the first threshold and the second threshold for pseudo-label screening in the next cycle after each training cycle, based on the difference between the average confidence of all high-confidence pseudo-labels in the cycle and the preset target confidence. Based on the trained student model, the module identifies the workpiece in real time and generates motion control commands for welding.
[0031] Preferably, the step of performing multiple data augmentations on the unlabeled image of the target domain and inputting it into the teacher model includes:
[0032] Each unlabeled image in the target domain is subjected to multiple independent enhancement transformations, including random horizontal flipping, random cropping, color jittering, and Gaussian noise addition.
[0033] Preferably, the mean cross-union ratio is the average cross-union ratio calculated for multiple prediction boxes of the same target instance, and the standard deviation of the class confidence score is the standard deviation calculated for multiple class confidence scores of the target instance.
[0034] Preferably, the weighting factor W is calculated as follows: ;
[0035] Where C is the confidence level, I is the mean of the cross-union ratio, and S is the standard deviation of the confidence level. ε is a preset scaling factor, where ε is a tiny positive constant to avoid a denominator of zero.
[0036] Preferably, updating the student model parameters based on the sum of supervised loss, unsupervised loss, and contrastive loss includes:
[0037] The classification and regression losses on the labeled workpiece image dataset in the source domain are calculated as supervised losses;
[0038] Calculate the classification and regression losses on the target domain image with the high-confidence pseudo-labels, and multiply them by the weighting factor to obtain the unsupervised loss;
[0039] The feature vectors of the low-confidence samples in the target domain are used to calculate the contrastive loss.
[0040] Preferably, updating the teacher model parameters using the exponential moving average of the student model parameters includes:
[0041] The teacher model parameters are updated as follows: ;
[0042] in For the updated teacher model parameters, The parameters of the teacher model before the update. These are the parameters for the current student model. This is the momentum coefficient.
[0043] Preferably, adjusting the first and second thresholds for pseudo-label screening in the next period based on the difference between the average confidence level of all high-confidence pseudo-labels within the period and the preset target confidence level includes:
[0044] First threshold Second threshold The adjustment method is as follows: , ;
[0045] in This represents the average confidence level of high-confidence pseudo-labels in the current period. To preset the target confidence level, To adjust the step size factor.
[0046] Preferably, the step of deploying the trained student model in the control system of the horizontal welding fixture for the steering axle, for real-time workpiece identification and generation of welding motion control commands, includes:
[0047] The two-dimensional pixel coordinates of the workpiece position output by the student model are converted into three-dimensional spatial coordinates in the welding fixture coordinate system through a pre-calibrated camera intrinsic and extrinsic parameter matrix.
[0048] Based on the identified three-dimensional spatial coordinates, the corresponding welding robot motion trajectory instructions are matched and generated from the preset welding process library.
[0049] This invention generates high-quality pseudo-labels by performing multiple enhancements on unlabeled images and verifying the consistency of prediction results, evaluating the overlap of predicted boxes and the stability of class confidence. This avoids the performance degradation caused by inputting incorrect labels with a single fixed threshold. Different training weights are assigned to each pseudo-label based on its reliability, allowing high-quality pseudo-labels to play a dominant role in model optimization and achieving refined utilization of the value of unlabeled data. Furthermore, this invention can periodically adjust the pseudo-label selection criteria according to the model's training progress, ensuring the stability of model training and improving welding control accuracy by enhancing recognition accuracy. Attached Figure Description
[0050] Figure 1 A flowchart of the first embodiment;
[0051] Figure 2 This is a schematic diagram illustrating the process of generating and filtering pseudo-tags.
[0052] Figure 3 This is a schematic diagram illustrating the calculation of pseudo-label weight factors.
[0053] Figure 4 A schematic diagram illustrating the loss function used to train the student model;
[0054] Figure 5 This is a schematic diagram of the model deployment and application process. Detailed Implementation
[0055] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0056] In the first embodiment, the present invention proposes an intelligent control method for a horizontal welding fixture for a steering axle, such as... Figure 1 This includes the following steps:
[0057] A) Train an initial student model based on a labeled source domain workpiece image dataset, and then copy the model parameters to initialize a teacher model;
[0058] Choose a mainstream object detection network architecture as the basic structure for both the student and teacher models, such as the YOLO series or Faster R-CNN series. Prepare a source domain dataset containing images of steering bridge workpieces taken under standard lighting and clear conditions, and precisely manually annotate all key welding areas in the images to form labels including category and bounding box location. Using this labeled source domain dataset, employ the stochastic gradient descent optimization algorithm with a momentum coefficient of 0.9 and a weight decay coefficient of 0.0005 to supervise the training of the student model. Performance convergence is determined by the model's average accuracy on the validation set showing no significant improvement for five consecutive training epochs, until the model converges. After training, copy all network layer weights and bias parameters of the student model one by one to initialize the corresponding network layers of the teacher model, ensuring that both have identical recognition capabilities at the start of training.
[0059] Optionally, the student model and the teacher model employ the same object detection network architecture. In a preferred embodiment, a YOLOv7 network is used as the base detector. This architecture mainly consists of three parts: a backbone network based on ELAN modules for extracting multi-scale features from the input image; a neck network for fusing multi-scale features, specifically a path aggregation network; and a detection head for outputting prediction results. The model's input is an image of an object, such as an RGB image scaled to 640×640 pixels. The model's output is a list of detected objects. For each detected object, it outputs its bounding box coordinates, class label, and confidence score for that class. The bounding box coordinates are typically represented as center point coordinates, width, and height. During training, the student model and the teacher model work together. The teacher model's parameters are not updated directly through gradient backpropagation, but rather through an exponential moving average of the student model's parameters, following the formula: .in For the updated teacher model parameters, The parameters before the update. These are the parameters for the current student model. This is the momentum coefficient.
[0060] B) The teacher model is used to predict unlabeled images in the target domain, and high-confidence pseudo-labels are generated through a consistency screening process. The screening process is as follows: the unlabeled images in the target domain are augmented multiple times and input into the teacher model. When the mean of the intersection-union ratio of multiple prediction boxes is greater than the first threshold and the standard deviation of the category confidence is less than the second threshold, the prediction result of the unlabeled original image without augmentation is determined as the target domain image with a high-confidence pseudo-label, and the corresponding confidence, mean intersection-union ratio and standard deviation of confidence are recorded.
[0061] An image is selected from an unlabeled target domain image set. This image may contain interference from actual working conditions such as changes in lighting and oil glare. N independent random data augmentation operations are performed on this image, such as random cropping, color jittering, horizontal flipping, and Gaussian blurring, generating N augmented image versions. These N augmented images, along with the original unaugmented image, are input into the teacher model to obtain N+1 sets of prediction results. For the same target object in the image, the corresponding prediction bounding box and class confidence score are extracted from the N+1 sets of results. The intersection-union ratio (IUR) of each pair of the N+1 prediction bounding boxes is calculated, and its arithmetic mean is obtained. Simultaneously, the standard deviation of the N+1 class confidence scores is calculated. If the calculated IUR mean is higher than a current first threshold, and the class confidence score standard deviation is lower than a current second threshold, then the teacher model's prediction of the target is considered stable and reliable. At this point, the teacher model's prediction results for the original unenhanced image—namely, the bounding box coordinates and category—are used as pseudo-labels for the image. The confidence score of these pseudo-labels, the calculated mean of the intersection-union ratio (IU), and the standard deviation of the confidence score are saved for subsequent weighted training. Figure 2 .
[0062] In an optional embodiment, performing multiple data augmentations on the unlabeled image of the target domain and inputting it into the teacher model includes:
[0063] Each unlabeled image in the target domain undergoes multiple independent enhancement transformations, including random horizontal flipping, random cropping, color jittering, and Gaussian noise addition.
[0064] Obtain an unlabeled image of the target domain, such as a workpiece image taken under actual working conditions with dimensions of 1920×1080 pixels. To ensure the teacher model makes consistent predictions for the same image across different viewpoints and perturbations, multiple versions of the original image with different enhancement processes need to be generated. For example, three independent enhanced views can be generated for each unlabeled image, and these three views will be simultaneously input into the teacher model.
[0065] A series of enhancement transformations are applied to the original image to generate the three views. For the first view, a random horizontal flip with a 50% probability is applied. For the second view, a 1280×720 pixel region is randomly cropped from the original image and scaled back to its original size. For the third view, color dithering is applied, for example, randomly adjusting the image's brightness by 20% and contrast by 30%. Gaussian noise with a mean of 0 and a variance of 0.01 can be added to all three enhanced views to simulate the noise of the sensor in a real industrial environment. In this way, the teacher model needs to learn feature representations that are insensitive to these transformations.
[0066] In an optional embodiment, the mean cross-union ratio is the average cross-union ratio calculated for multiple prediction boxes of the same target instance, and the standard deviation of the class confidence score is the standard deviation calculated for multiple class confidence scores of the target instance.
[0067] Multiple sets of predictions are obtained by inputting unlabeled images of the same target domain, which have undergone multiple data augmentations, along with their original unaugmented images, into the teacher model. For example, after inputting the three augmented views and the original unaugmented image, the teacher model will output four independent predictions for the same workpiece instance in the image. Each prediction includes a bounding box coordinate and a class confidence score. Assume the four predicted bounding boxes are... , , , The corresponding category confidence score is =0.98, =0.95, =0.99, =0.97. The same target instance corresponding to different augmented predictions was determined using a matching strategy based on the intersection-union ratio.
[0068] Based on the four sets of predictions, the mean of the cross-union ratio (CUN) and the standard deviation of the category confidence are calculated. To calculate the mean CUN, the CUN between each pair of the four prediction boxes is calculated, resulting in six CUN values, for example... =0.92, =0.89, =0.94, =0.88, =0.90, =0.93. The mean of the intersection-union ratio (I) is the average of the six values, i.e., (0.92+0.89+0.94+0.88+0.90+0.93) / 6≈0.910. For the category confidence standard deviation S, we calculate its standard deviation using the four confidence scores of 0.98, 0.95, 0.99, and 0.97, resulting in a value of, for example, 0.016. These two indicators together represent the consistency and stability of the teacher model's prediction results.
[0069] C) Unlabeled images that fail the consistency screening process are identified as low-confidence samples in the target domain; the student model is iteratively trained by combining the labeled workpiece image dataset from the source domain, the target domain images with high-confidence pseudo-labels, and the low-confidence samples in the target domain; during training, the student model parameters are updated based on the sum of supervised loss, unsupervised loss, and contrastive loss; the teacher model parameters are updated using the exponential moving average of the student model parameters.
[0070] Specifically, in each training batch, data is simultaneously drawn from the source domain labeled dataset, the target domain image set with generated high-confidence pseudo-labels, and the target domain sample set determined to be low-confidence. For the source domain data and high-confidence pseudo-label data, a supervised loss is calculated between the predicted result and the true label or pseudo-label. This loss typically includes classification loss and bounding box regression loss. For low-confidence samples, feature vectors of targets in different samples are extracted from the backbone network of the model. The contrastive loss is used to narrow the distance between features of similar targets and widen the distance between features of dissimilar targets. When calculating the total loss, the supervised loss term generated for each high-confidence pseudo-label sample is multiplied by a weighting factor. This weighting factor is determined by the confidence level, the mean of the intersection-union ratio, and the standard deviation of the confidence level, and is constrained to a reasonable numerical range by a scaling factor, so that more reliable pseudo-labels contribute more to gradient updates. After weighted summation of the three types of losses, the parameters of the student model are updated through backpropagation. After updating the student model parameters in each training batch, instead of directly copying them to the teacher model, an exponential moving average strategy is adopted, that is, the teacher model parameters are a weighted average of the old parameters and the new parameters of the student model, making the teacher model update smoother and more stable.
[0071] In an optional embodiment, the weighting factor W is calculated as follows: ;
[0072] Where C is the confidence level, I is the mean of the cross-union ratio, and S is the standard deviation of the confidence level. ε is a preset scaling factor, where ε is a tiny positive constant to avoid a denominator of zero.
[0073] The first step is to collect all the variables needed to calculate the weighting factor W. These variables are all derived from the teacher model's predictions for multiple augmented views of the same sample. Variable C is the teacher model's prediction confidence for the original unenhanced image, variable I is the mean of the intersection-over-union (IoU) ratios between multiple predicted boxes and the average box, and variable S is the standard deviation of the multiple prediction confidence scores. The tiny normal number ε is a preset minimum value, such as 1e-6, whose sole purpose is to prevent division-by-zero errors when the standard deviation S is zero. Scaling factor. This is used to adjust the calculated original weight values to an appropriate range to prevent individual sample weights from being too large, which could lead to abnormal training gradients.
[0074] The second step is to substitute the collected values into the formula for calculation. Using the previous example data, the average confidence level C is 0.973, the mean cross-union ratio I is 0.917, and the standard deviation of the confidence level S is 0.02. Let the scaling factor be... =0.1. Substituting this value into the weighting factor calculation formula, we get... ≈4.46. The resulting weight value is very high, indicating that the teacher model's prediction of this sample has high localization and classification consistency. Therefore, the generated pseudo-labels are of high quality and will be assigned greater weight in subsequent training of the student model. Conversely, if the prediction consistency is poor, S will increase or I will decrease, resulting in a decrease in the W value, reducing the impact of the sample in the unsupervised loss calculation. See [link to relevant documentation]. Figure 3 The average confidence level is the average of the category confidence levels of all high-confidence pseudo-label target instances within the current period.
[0075] In an optional embodiment, updating the student model parameters based on the sum of supervised loss, unsupervised loss, and contrastive loss includes:
[0076] The classification and regression losses on the labeled workpiece image dataset in the source domain are calculated as supervised losses;
[0077] Calculate the classification and regression losses on the target domain image with the high-confidence pseudo-labels, and multiply them by the weighting factor to obtain the unsupervised loss;
[0078] The feature vectors of the low-confidence samples in the target domain are used to calculate the contrastive loss.
[0079] The student model uses the YOLOv7 architecture, with its backbone network based on the ELAN module, and receives a batch of labeled image data from the source domain. For each image, the model outputs a predicted bounding box and category. The supervised loss is calculated by comparing the model's predictions with the image's ground truth labels, and it consists of two parts: a cross-entropy loss for classification and a GIoU loss for bounding box localization. The sum of these two losses constitutes the supervised loss. This guides the model to learn the basic features in the source domain.
[0080] Further calculate the weighted unsupervised loss and contrastive loss. For unlabeled data in the target domain, the student model is divided into high-confidence samples for prediction, and the prediction results are compared with the pseudo-labels generated by the teacher model. The classification loss and regression loss are calculated again, but the total loss is multiplied by the weight factor W previously calculated for the pseudo-label to obtain the unsupervised loss. For samples classified as low-confidence, no detection loss is calculated. Instead, feature vectors are extracted from intermediate layers of the student model's backbone network, such as the C3 layer or SPPF layer in YOLOv7. The contrastive loss is then calculated using these feature vectors. For example, the InfoNCE loss aims to bring features of similar samples closer together and push features of dissimilar samples further apart in the feature space. The total loss is obtained by weighted summation of the three loss components mentioned above. , These are weighted parameters. For example... =1.0, =0.5, =0.1. This total loss is then used to update the network parameters of the student model via backpropagation, such as... Figure 4 .
[0081] In an optional embodiment, updating the teacher model parameters using an exponential moving average of the student model parameters includes:
[0082] The teacher model parameters are updated as follows: ;
[0083] in For the updated teacher model parameters, The parameters of the teacher model before the update. These are the parameters for the current student model. This is the momentum coefficient.
[0084] The first step is to clarify the relationship between the teacher model and the student model. The teacher and student models have identical network structures, such as using the YOLOv7 architecture, but their parameters (weights) are initialized to the same values at the start of training. During training, only the parameters of the student model are initialized. Updated via backpropagation and gradient descent. Parameters of the teacher model. It does not directly participate in backpropagation, and its updates depend entirely on the parameters of the student model.
[0085] The second step is to perform parameter updates at the end of each training iteration, updating the parameters of the student model. After completing one gradient update, the teacher model parameters are immediately updated using the exponential moving average method. The momentum coefficient α is a constant close to 1, for example, set to 0.999. According to the formula, the new teacher model parameters... These are the parameters of the old teacher model. and current student model parameters The updated teacher model parameters are weighted averages. For example, when α = 0.999, 99.9% of the updated teacher model parameters come from the old parameters, and only 0.1% come from the latest parameters of the student model. This slow update strategy makes the evolution of the teacher model very smooth and stable, providing more reliable pseudo-labels for the student model and avoiding training instability caused by drastic fluctuations in student model parameters.
[0086] D), after each training cycle, adjust the first threshold and the second threshold for pseudo-label screening in the next cycle based on the difference between the average confidence of all high-confidence pseudo-labels in the cycle and the preset target confidence; and identify the workpiece and generate welding motion control commands in real time based on the trained student model.
[0087] Specifically, after a complete training epoch, all pseudo-labels selected as having high confidence during that epoch are analyzed, and their arithmetic mean confidence scores are calculated. This average confidence score is then compared to a pre-set ideal target confidence score, such as 0.88. If the average confidence score is higher than the target confidence score, it indicates that the current selection criteria are too lenient, and the model is overconfident. In this case, the first threshold (mean threshold of the intersection-union comparison) should be increased, and the second threshold (standard deviation threshold of confidence score) should be decreased, thus allowing for stricter selection of pseudo-labels in the next epoch. Conversely, if the average confidence score is lower than the target confidence score, it indicates that the selection criteria are too stringent, inhibiting the model's learning. In this case, the first threshold should be appropriately decreased, and the second threshold should be increased to include more potentially useful pseudo-labels. The adjustment step size is proportional to the difference between the two thresholds, thus forming a negative feedback adjustment mechanism that allows the model's learning process to steadily converge towards the preset target.
[0088] When the model's performance on an independent validation set no longer improves for N consecutive training epochs (e.g., N=5), the model is considered converged, training is stopped, and the model weight file is saved. This model file is deployed to an industrial computer or embedded computing platform installed at the welding fixture site. A video stream of the steering axle workpiece is acquired in real-time using an industrial camera integrated with the fixture. The deployed model performs forward inference on each frame of the video, outputting the category and pixel coordinates of the area to be welded on the workpiece. The control system has pre-calibrated camera intrinsic and extrinsic parameters, which are used to convert the two-dimensional pixel coordinates output by the model into three-dimensional spatial coordinates in the welding robot coordinate system. Based on the identified three-dimensional coordinates of the welding start point, end point, or critical path point, the motion controller plans the welding robot's motion trajectory and welding parameters, and generates corresponding control code to drive the welding robot to perform precise welding operations.
[0089] In an optional embodiment, adjusting the first and second thresholds for pseudo-label screening in the next period based on the difference between the average confidence of all high-confidence pseudo-labels within the period and the preset target confidence includes:
[0090] First threshold Second threshold The adjustment method is as follows: , ;
[0091] in This represents the average confidence level of high-confidence pseudo-labels in the current period. To preset the target confidence level, To adjust the step size factor.
[0092] First, at the end of each training epoch, calculate the average confidence score of all samples selected as high-confidence pseudo-labels within the current epoch. At the same time, a target confidence level is preset. For example, 0.88, and a small adjustment step size factor. For example, 0.005. The initial first threshold. Second threshold They can be set to 0.65 and 0.12 respectively.
[0093] Secondly, according to and The threshold is adjusted based on the difference. Assuming that after one epoch, the calculated... The value is 0.91, which is higher than the target value of 0.88. At this point, It is a positive value of 0.03. According to the formula, The calculated value is 0.65015. Increase it. At the same time... The calculated value is 0.11985. The adjustment lowers the confidence level. This adjustment ensures that in the next epoch, only pseudo-labels with higher confidence levels are selected as high-confidence samples, while simultaneously expanding the range of low-confidence samples. Conversely, if... Below The threshold adjustment direction is opposite. This mechanism can maintain the quality of high-confidence samples and ensure that there are a sufficient number of samples for contrastive learning, thereby stabilizing the training process.
[0094] In an optional embodiment, the deployment of the trained student model in the control system of the horizontal welding fixture for the steering axle is used to identify the workpiece in real time and generate motion control commands for welding, including:
[0095] The two-dimensional pixel coordinates of the workpiece position output by the student model are converted into three-dimensional spatial coordinates in the welding fixture coordinate system through a pre-calibrated camera intrinsic and extrinsic parameter matrix.
[0096] Based on the identified three-dimensional spatial coordinates, the corresponding welding robot motion trajectory instructions are matched and generated from the preset welding process library.
[0097] The first step is to convert the 2D pixel coordinates detected by the student model in the real-time video stream into 3D physical world coordinates. When the student model detects the welding start point on the workpiece, the output is the pixel coordinates of that point in the image, for example, (u,v)=(450,620). Through prior camera calibration, the camera's intrinsic parameter matrix K and extrinsic parameter matrices R and t relative to the welding fixture coordinate system are obtained. Combined with the depth value Z in the camera coordinate system provided by the depth camera, the coordinate transformation formula is used... The three-dimensional coordinates of the point in the welding fixture coordinate system can be obtained by inverse solution. For example, (155.2, 310.8, 85.0) mm.
[0098] The second step is to generate robot control instructions based on 3D coordinates. A welding process library is built, storing standardized program modules for different workpiece models or welding tasks. Once the workpiece model is identified and the 3D coordinates of key points are calculated, the robot retrieves and calls the welding program matching that model from the process library. This program is a template containing a series of motion instructions and welding parameter settings. The calculated 3D coordinates (155.2, 310.8, 85.0) are used as target points and filled into the corresponding positions in the template, thereby generating a specific executable robot motion control code, such as G-Code or robot-specific language instructions. These instructions are sent to the welding robot's controller, guiding the robotic arm to precisely move to the target position and perform the welding operation, such as... Figure 5 .
[0099] In a second embodiment, the present invention also provides an intelligent control system for a horizontal welding fixture for a steering axle, comprising the following modules:
[0100] The training module is used to train an initial student model based on a labeled source domain workpiece image dataset and to copy the model parameters to initialize a teacher model.
[0101] The determination module is used to predict unlabeled images of the target domain using the teacher model and generate high-confidence pseudo-labels through a consistency screening process. The screening process is as follows: the unlabeled images of the target domain are subjected to multiple data augmentations and input into the teacher model. When the mean of the intersection-union ratio of multiple prediction boxes is greater than a first threshold and the standard deviation of the category confidence is less than a second threshold, the prediction result of the unlabeled original image without augmentation is determined as the target domain image with a high-confidence pseudo-label, and the corresponding confidence, mean intersection-union ratio, and standard deviation of confidence are recorded.
[0102] An update module is used to identify unlabeled images that fail the consistency screening process as low-confidence samples in the target domain; iteratively train the student model by combining the labeled workpiece image dataset from the source domain, the target domain images with high-confidence pseudo-labels, and the low-confidence samples in the target domain; during training, the student model parameters are updated based on the sum of supervised loss, unsupervised loss, and contrastive loss; and the teacher model parameters are updated using an exponential moving average of the student model parameters.
[0103] The generation module is used to adjust the first threshold and the second threshold for pseudo-label screening in the next cycle after each training cycle, based on the difference between the average confidence of all high-confidence pseudo-labels in the cycle and the preset target confidence. Based on the trained student model, the module identifies the workpiece in real time and generates motion control commands for welding.
[0104] In this specification, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise limited, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element. In this document, "a," "an," "the," "the," and "its" may also include plural forms unless the context clearly indicates otherwise. "Multiple" refers to at least two, such as 2, 3, 5, or 8, etc. "And / or" includes any and all combinations of the associated listed items.
[0105] The various embodiments in this specification are described in a progressive manner. Each embodiment focuses on the differences from other embodiments. The various embodiments can be combined as needed, and the same or similar parts can be referred to each other.
[0106] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for intelligent control of horizontal welding fixtures for steering axles, characterized in that, Includes the following steps: The initial student model is trained based on the source domain labeled workpiece image dataset, and the model parameters are copied to initialize the teacher model; The teacher model is used to predict unlabeled images in the target domain, and high-confidence pseudo-labels are generated through a consistency screening process. Unlabeled images that fail the consistency screening process are identified as low-confidence samples in the target domain; The student model is iteratively trained by combining the source domain labeled workpiece image dataset, the target domain images with high-confidence pseudo-labels, and the target domain low-confidence samples. During training, the student model parameters are updated based on the sum of supervised loss, unsupervised loss, and contrastive loss. The teacher model parameters are updated using an exponential moving average of the student model parameters; After each training cycle, the first threshold and the second threshold are adjusted for pseudo-label screening in the next cycle based on the difference between the average confidence of all high-confidence pseudo-labels in the cycle and the preset target confidence. Based on the trained student model, workpieces are identified in real time and welding motion control commands are generated. The process of generating high-confidence pseudo-labels through consistency screening includes: The unlabeled image of the target domain is augmented multiple times and input into the teacher model. When the mean of the intersection-union ratio of multiple prediction boxes is greater than the first threshold and the standard deviation of the class confidence is less than the second threshold, the prediction result of the unlabeled image without augmentation is determined as the target domain image with a high-confidence pseudo-label, and the corresponding confidence, mean intersection-union ratio and standard deviation of class confidence are recorded. The step of adjusting the first and second thresholds for pseudo-label screening in the next period based on the difference between the average confidence level of all high-confidence pseudo-labels within the period and the preset target confidence level includes: First threshold Second threshold The adjustment method is as follows: , ; in This represents the average confidence level of high-confidence pseudo-labels in the current period. To preset the target confidence level, To adjust the step size factor; The mean cross-union ratio is the average cross-union ratio calculated for multiple prediction boxes of the same target instance, and the standard deviation of the class confidence score is the standard deviation calculated for multiple class confidence scores of the target instance.
2. The method according to claim 1, characterized in that, The process of performing multiple data augmentations on the unlabeled image of the target domain and inputting it into the teacher model includes: Each unlabeled image in the target domain undergoes multiple independent enhancement transformations, including random horizontal flipping, random cropping, color jittering, and Gaussian noise addition.
3. The method according to claim 1, characterized in that, The weighting factor W is calculated as follows: ; Where C is the confidence level, I is the mean of the cross-union ratio, and S is the standard deviation of the class confidence level. ε is a preset scaling factor, where ε is a tiny positive constant to avoid a denominator of zero.
4. The method according to claim 1, characterized in that, The step of updating the student model parameters based on the sum of supervised loss, unsupervised loss, and contrastive loss includes: The classification and regression losses on the labeled workpiece image dataset in the source domain are calculated as supervised losses; Calculate the classification and regression losses on the target domain image with high-confidence pseudo-labels, and multiply them by a weighting factor to obtain the unsupervised loss; The feature vectors of the low-confidence samples in the target domain are used to calculate the contrastive loss.
5. The method according to claim 1, characterized in that, The step of updating the teacher model parameters using the exponential moving average of the student model parameters includes: The teacher model parameters are updated as follows: ; in For the updated teacher model parameters, The parameters of the teacher model before the update. These are the parameters for the current student model. This is the momentum coefficient.
6. The method according to any one of claims 1-5, characterized in that, The student model, after training, identifies the workpiece in real time and generates motion control commands for welding, including: The two-dimensional pixel coordinates of the workpiece position output by the student model are converted into three-dimensional spatial coordinates in the welding fixture coordinate system through a pre-calibrated camera intrinsic and extrinsic parameter matrix. Based on the identified three-dimensional spatial coordinates, the corresponding welding robot motion trajectory instructions are matched and generated from the preset welding process library.
7. An intelligent control system for a horizontal welding fixture for a steering axle, characterized in that, Includes the following modules: The training module is used to train an initial student model based on a source domain labeled workpiece image dataset, and to copy the model parameters to initialize a teacher model; The determination module is used to predict unlabeled images of the target domain using the teacher model and generate high-confidence pseudo-labels through a consistency screening process. The screening process is as follows: the unlabeled images of the target domain are subjected to multiple data augmentations and input into the teacher model. When the mean of the intersection-union ratio of multiple prediction boxes is greater than a first threshold and the standard deviation of the class confidence is less than a second threshold, the prediction result of the unlabeled original image without augmentation is determined as the target domain image with a high-confidence pseudo-label, and the corresponding confidence, mean intersection-union ratio, and standard deviation of class confidence are recorded. The update module is used to identify unlabeled images that fail the consistency screening process as low-confidence samples of the target domain. The student model is iteratively trained by combining the source domain labeled workpiece image dataset, the target domain images with high-confidence pseudo-labels, and the target domain low-confidence samples. During training, the student model parameters are updated based on the sum of supervised loss, unsupervised loss, and contrastive loss. The teacher model parameters are updated using an exponential moving average of the student model parameters; The generation module is used to adjust the first threshold and the second threshold for pseudo-label selection in the next cycle after each training cycle, based on the difference between the average confidence of all high-confidence pseudo-labels in the cycle and the preset target confidence. Based on the trained student model, workpieces are identified in real time and welding motion control commands are generated. The process of generating high-confidence pseudo-labels through consistency screening includes: The unlabeled image of the target domain is augmented multiple times and input into the teacher model. When the mean of the intersection-union ratio of multiple prediction boxes is greater than the first threshold and the standard deviation of the class confidence is less than the second threshold, the prediction result of the unlabeled image without augmentation is determined as the target domain image with a high-confidence pseudo-label, and the corresponding confidence, mean intersection-union ratio and standard deviation of class confidence are recorded. The step of adjusting the first and second thresholds for pseudo-label screening in the next period based on the difference between the average confidence level of all high-confidence pseudo-labels within the period and the preset target confidence level includes: First threshold Second threshold The adjustment method is as follows: , ; in This represents the average confidence level of high-confidence pseudo-labels in the current period. To preset the target confidence level, To adjust the step size factor; The mean cross-union ratio is the average cross-union ratio calculated for multiple prediction boxes of the same target instance, and the standard deviation of the class confidence score is the standard deviation calculated for multiple class confidence scores of the target instance.
Citation Information
Patent Citations
Target detection method and system adaptive to unsupervised domain
CN120852853A
KR20250118779A