Weld deformation tracking compensation method based on convolutional neural network

The weld deformation tracking and compensation method using convolutional neural networks solves the problems of easy interruption and unstable tracking of weld detection during welding, and achieves robust continuous tracking and improved stability of weld centerline compensation control under complex working conditions.

CN121616573APending Publication Date: 2026-03-06HUNAN UNIV OF SCI & ENG
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202512014054.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-29
Publication Date
2026-03-06

AI Technical Summary

Technical Problem

Existing welding technologies are prone to interruption and unstable tracking in weld detection under complex conditions such as strong arc light interference, fumes, spatter, and shielding by welding torch components. They lack effective utilization of the degree of shielding and positioning uncertainty, and compensation control is difficult to adaptively adjust, affecting the stability of the welding process and the quality of the weld.

Method used

A weld deformation tracking and compensation method based on convolutional neural networks is adopted. By outputting an occlusion probability map and modulating features through the occlusion perception branch, and combining the uncertainty estimation branch output position variance, weighted geometric fitting is performed to calculate the compensation amount and perform gating and amplitude limiting processing to achieve robust continuous tracking and stable compensation of the weld centerline.

Benefits of technology

To maintain the continuity and robustness of weld inspection under complex working conditions, reduce false detections and vibrations, improve the stability and reliability of compensation control, avoid overcompensation and oscillations, and ensure the stability and quality of the welding process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121616573A_ABST
    Figure CN121616573A_ABST
Patent Text Reader

Abstract

The invention discloses a weld deformation tracking compensation method based on a convolutional neural network, and aims to solve the problem that continuous and stable tracking of a weld is difficult under complex working conditions such as arc light, smoke dust, splashing and welding gun shielding. Outputting a shielding probability graph by using the shielding sensing branch, and generating modulation parameters to perform channel and space modulation on the features; a weld joint probability graph is output through the weld joint position estimation branch, weld joint candidate points are determined, and meanwhile, a position variance graph is output through the uncertainty estimation branch to represent the positioning uncertainty of the candidate points; and determining a fitting weight by combining the shielding probability and the position variance, performing weighted geometric fitting on the candidate points to obtain a weld center line model, performing continuous gating on the compensation gain according to the fitting residual error and the tracking credibility, and smoothly outputting a compensation instruction in cooperation with amplitude limiting and time. Robust tracking and stable compensation control over the center line of the welding seam under shielding interference are achieved, and the tracking reliability and the welding track compensation stability are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of welding automation, and in particular to a method for tracking and compensating weld deformation based on convolutional neural networks. Background Technology

[0002] In automated and robotic welding applications, to ensure welding quality and trajectory consistency, it is typically necessary to acquire the weld position in real time during the welding process and generate compensation commands based on the weld's deviation from the preset welding trajectory, thereby achieving online tracking and compensation of weld deformation. Existing weld tracking technologies mainly include two categories: contact sensing and non-contact visual sensing. Among them, visual tracking based on industrial cameras has been widely researched and applied due to its rich information content and wide applicability. Related algorithms have gradually evolved from early methods such as threshold segmentation, edge detection, line feature extraction, template matching, and geometric fitting to deep learning methods that use convolutional neural networks for feature learning and weld localization, improving adaptability to complex texture backgrounds, different weld shapes, and changes in lighting.

[0003] In actual welding scenarios, existing technologies still have the following shortcomings:

[0004] 1. During the welding process, strong arc light interference, smoke, spatter, and obstruction by welding gun components often occur, which can easily cause local saturation of the image, reduced contrast, or loss of weld features, resulting in intermittent or fluctuating weld detection results and making it difficult to achieve continuous and stable tracking.

[0005] 2. Some deep learning localization methods typically only output the weld position result, lacking explicit evaluation and fusion utilization of the degree of occlusion and localization uncertainty. They still perform model updates or geometric fitting under low-confidence observation conditions, which can easily lead to false detections, jitter, or drift.

[0006] 3. Existing compensation control strategies mostly use fixed gain or simple filtering, which makes it difficult to dynamically adjust the compensation intensity according to the detection quality and fitting residual. In case of insufficient observation or false detection, overcompensation or oscillation may be introduced, affecting the stability of the welding process and the forming quality.

[0007] Therefore, a method for tracking and compensating weld deformation that can overcome the shortcomings of the existing technology is a problem that needs to be solved by those skilled in the art. Summary of the Invention

[0008] One objective of this invention is to propose a weld deformation tracking and compensation method based on convolutional neural networks. Addressing the problems of existing technologies, such as easy interruption and unstable tracking of weld detection under complex conditions including strong arc interference, fumes, spatter, and welding torch component obstruction, as well as the lack of effective utilization of obstruction degree and positioning uncertainty, and the difficulty in adaptively adjusting compensation control according to observation quality, the following technical solution is proposed: Acquire the current welding image during the welding process and obtain a multi-scale feature map through a feature extraction network; output an obstruction probability map and modulation parameters through an obstruction perception branch, and perform channel and spatial modulation on the multi-scale features; output a weld probability map through a weld position estimation branch to determine the coordinates of multiple weld candidate points, and simultaneously output a position variance map through an uncertainty estimation branch to obtain the position variance of each candidate point; determine fitting weights based on the obstruction probability and position variance, and perform weighted geometric fitting on the candidate points to obtain a weld centerline model; combine the fitting residual and tracking reliability to backtrack the model from the previous time step when effective observation is insufficient; calculate the compensation amount based on the weld deviation, and calculate the continuous compensation gain based on the fitting residual and tracking reliability to gate the compensation amount, and output compensation commands with amplitude limiting and time smoothing. This invention has the technical effect of achieving robust continuous tracking of the weld centerline under obstruction interference, reducing false detections and jitter, and improving compensation stability and reliability.

[0009] This invention provides a weld deformation tracking and compensation method based on a convolutional neural network, comprising:

[0010] S1. Acquire the current welding image of the workpiece during the welding process, input it into the feature extraction network of a convolutional neural network, and obtain a multi-scale feature map; S2. Input the multi-scale feature map into the occlusion perception branch of the convolutional neural network, outputting an occlusion probability map and modulation parameters, and perform feature modulation on the multi-scale feature map based on the modulation parameters; S3. Input the modulated multi-scale feature map into the weld position estimation branch of the convolutional neural network, outputting a weld probability map, and determine the coordinates of multiple weld candidate points based on the weld probability map. Input the modulated multi-scale feature map into the uncertainty estimation branch of the convolutional neural network, outputting a position variance map, and obtain the position variance corresponding to each weld candidate point coordinate; S4. Obtain the weld centerline model from the previous moment, determine the fitting weights of each weld candidate point coordinate based on the weld candidate point coordinates, their corresponding position variances, and the occlusion probability map, and utilize... Weighted geometric fitting is performed using the coordinates of candidate weld points and their fitting weights to obtain the current weld centerline model. The fitting residual is calculated, and the tracking reliability index is calculated based on the fitting weights and / or fitting residuals. When the effective observations determined by the fitting weights are insufficient, the weld centerline model of the previous moment is used as the current weld centerline model. S5: Obtain camera calibration parameters and preset welding trajectory. Calculate the weld deviation based on the current weld centerline model and the preset welding trajectory, and convert the weld deviation into a compensation amount using the camera calibration parameters. S6: Obtain the compensation command of the previous moment. Calculate the compensation gain based on the fitting residuals and the tracking reliability index. Multiply the compensation amount by the compensation gain to obtain the compensation command. After limiting the compensation command and performing time smoothing based on the compensation command of the previous moment, output it to the welding actuator for weld deformation tracking compensation on the preset welding trajectory.

[0011] Optionally, S1 includes:

[0012] A current welding image of the workpiece to be welded during the welding process is obtained; the current welding image is preprocessed to obtain a preprocessed current welding image, wherein the image preprocessing includes size adjustment and brightness normalization; the preprocessed current welding image is input into the feature extraction network of the convolutional neural network; feature maps with different resolutions are output in at least two convolutional layers in the feature extraction network, and channel alignment and upsampling fusion processing are performed on the feature maps with different resolutions to obtain the multi-scale feature map.

[0013] Optionally, S2 includes:

[0014] The multi-scale feature map is input into the occlusion perception branch of the convolutional neural network to obtain an occlusion probability map and modulation parameters for feature modulation. The occlusion probability map is used to characterize the probability that each position in the current welding image is occluded by arc light, smoke, spatter, or welding torch components. Based on the modulation parameters, channel weighting and spatial weighting processing are performed on the multi-scale feature map to obtain a modulated multi-scale feature map. The modulated multi-scale feature map and the occlusion probability map are output.

[0015] Optionally, S3 includes:

[0016] The modulated multi-scale feature map is input into the weld seam location estimation branch of the convolutional neural network, and a weld seam probability map is output. Thresholding is applied to the weld seam probability map to obtain candidate regions, and local maximum search and non-maximum suppression processing are performed on the weld seam probability map within the candidate regions to determine the coordinates of multiple weld seam candidate points. The modulated multi-scale feature map is input into the uncertainty estimation branch of the convolutional neural network, and a location variance map is output. The location variance corresponding to the coordinates of the weld seam candidate points is read from the location variance map to obtain the location variance corresponding to each weld seam candidate point coordinate. The coordinates of the weld seam candidate points and their corresponding location variances are output.

[0017] Optionally, S4 includes:

[0018] Obtain the weld centerline model from the previous moment;

[0019] The coordinates, position variance, and occlusion probability map of the candidate weld points are used as inputs. For each candidate weld point coordinate, the occlusion probability at that coordinate is read, and the position variance corresponding to that candidate weld point coordinate is read. The fitting weight of the candidate weld point coordinate is calculated based on the occlusion probability and the position variance, wherein the fitting weight is equal to the product of the complement of the occlusion probability and the reciprocal of the position variance plus a preset constant. The fitting weights of each candidate weld point coordinate are accumulated to obtain the sum of the fitting weights.

[0020] If the sum of the fitting weights is not less than a preset threshold, a weighted least squares fitting based on the fitting weights is used to perform a weighted geometric fitting on the coordinates of the weld candidate points to obtain the current weld centerline model; if the sum of the fitting weights is less than the preset threshold, the current weld centerline model is updated to the weld centerline model of the previous time step; the fitting residual is calculated based on the coordinates of the weld candidate points and the current weld centerline model, wherein the fitting residual includes a weighted distance statistic from the coordinates of the weld candidate points to the current weld centerline model; a tracking reliability index is calculated based on the sum of the fitting weights and the fitting residual, wherein the tracking reliability index increases with the increase of the sum of the fitting weights and decreases with the increase of the fitting residual; the current weld centerline model, the fitting residual, and the tracking reliability index are output.

[0021] Optionally, S5 includes:

[0022] The camera calibration parameters and preset welding trajectory are obtained, and the current weld centerline model is used as input. Multiple centerline sampling points are selected on the current weld centerline model according to a preset sampling interval, and the corresponding point on the preset welding trajectory is determined for each centerline sampling point. The weld deviation is calculated based on the coordinate difference between each centerline sampling point and its corresponding point. The weld deviation is converted from image coordinates to displacement in coordinates consistent with the preset welding trajectory using the camera calibration parameters to obtain a compensation amount, wherein the compensation amount includes the displacement along the normal direction of the preset welding trajectory. The compensation amount is then output.

[0023] Optionally, S6 includes:

[0024] Get the compensation command from the previous moment;

[0025] The compensation amount, fitting residual, and tracking reliability index are used as inputs; a compensation gain is calculated based on the fitting residual and the tracking reliability index, wherein the compensation gain is a continuous function of the fitting residual and the tracking reliability index, and the compensation gain decreases as the fitting residual increases and as the tracking reliability index decreases; the compensation amount is multiplied by the compensation gain to obtain a compensation command; the compensation command is subjected to amplitude limiting processing to obtain an amplitude limiting compensation command; the amplitude limiting compensation command is subjected to time smoothing processing based on the compensation command at the previous moment to obtain a smooth compensation command; the smooth compensation command is output to the welding execution mechanism for weld deformation tracking compensation of the preset welding trajectory.

[0026] Optionally, the position variance map includes a first variance submap and a second variance submap that respectively characterize the uncertainty of the horizontal and vertical position of the image coordinates, and the position variance corresponding one-to-one with the coordinates of each weld candidate point includes the horizontal variance and the vertical variance.

[0027] Optionally, the tracking reliability index is also calculated based on temporal consistency, which includes at least one of the average distance, maximum distance, or curvature change between the current weld centerline model and the weld centerline model at the previous moment. The tracking reliability index decreases as the temporal consistency deteriorates.

[0028] Optionally, at least one of the exposure time, gain, or shutter speed for the next moment of image acquisition is determined based on the occlusion probability map, so as to reduce the proportion of arc saturation area and / or improve the contrast of weld area in the current welding image.

[0029] The beneficial effects of this invention are:

[0030] 1. By outputting an occlusion probability map through the occlusion perception branch and generating modulation parameters, the multi-scale features are modulated in a channel and spatial manner, so that the network can still maintain effective feature expression under interference such as arc light, smoke, spatter and welding gun component occlusion, thereby improving the continuity and robustness of weld detection and tracking.

[0031] 2. By estimating the variance map of the branch output through uncertainty, and determining the fitting weight of the weld candidate points together with the occlusion probability, the weld centerline model is obtained by weighted geometric fitting. This can suppress the influence of low-confidence candidate points on the fitting, reduce false detections, jitter and trajectory drift, and achieve model backoff when there are insufficient effective observations to ensure the stability of the centerline output.

[0032] 3. Calculate the continuous compensation gain based on the fitting residual and tracking reliability, gate the compensation amount, and output compensation commands with amplitude limiting and time smoothing. The compensation intensity can be automatically reduced when the observation quality deteriorates, avoiding overcompensation and oscillation, thereby improving the stability and reliability of the compensation control of the welding actuator. Attached Figure Description

[0033] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings:

[0034] Figure 1 This is a flowchart of a weld deformation tracking and compensation method based on a convolutional neural network proposed in this invention. Detailed Implementation

[0035] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, illustrating only the basic structure of the invention, and therefore only show the components relevant to the invention.

[0036] refer to Figure 1 A weld deformation tracking and compensation method based on convolutional neural networks includes:

[0037] S1. Acquire the current welding image of the workpiece during the welding process, input it into the feature extraction network of a convolutional neural network, and obtain a multi-scale feature map; S2. Input the multi-scale feature map into the occlusion perception branch of the convolutional neural network, outputting an occlusion probability map and modulation parameters, and perform feature modulation on the multi-scale feature map based on the modulation parameters; S3. Input the modulated multi-scale feature map into the weld position estimation branch of the convolutional neural network, outputting a weld probability map, and determine the coordinates of multiple weld candidate points based on the weld probability map. Input the modulated multi-scale feature map into the uncertainty estimation branch of the convolutional neural network, outputting a position variance map, and obtain the position variance corresponding to each weld candidate point coordinate; S4. Obtain the weld centerline model from the previous moment, determine the fitting weights of each weld candidate point coordinate based on the weld candidate point coordinates, their corresponding position variances, and the occlusion probability map, and utilize... Weighted geometric fitting is performed using the coordinates of candidate weld points and their fitting weights to obtain the current weld centerline model. The fitting residual is calculated, and the tracking reliability index is calculated based on the fitting weights and / or fitting residuals. When the effective observations determined by the fitting weights are insufficient, the weld centerline model of the previous moment is used as the current weld centerline model. S5: Obtain camera calibration parameters and preset welding trajectory. Calculate the weld deviation based on the current weld centerline model and the preset welding trajectory, and convert the weld deviation into a compensation amount using the camera calibration parameters. S6: Obtain the compensation command of the previous moment. Calculate the compensation gain based on the fitting residuals and the tracking reliability index. Multiply the compensation amount by the compensation gain to obtain the compensation command. After limiting the compensation command and performing time smoothing based on the compensation command of the previous moment, output it to the welding actuator for weld deformation tracking compensation on the preset welding trajectory.

[0038] In this specific embodiment, S1 includes:

[0039] During the welding process, an industrial camera installed near the welding torch and synchronized with the welding actuator captures the current welding image of the workpiece to be welded, denoted as . ,in Indicates the current data collection time. Indicates at time The acquired image data tensor, This represents the original pixel height of the image. This represents the original pixel width of the image, and It can be a single-channel grayscale image or a three-channel color image;

[0040] To ensure consistent input scale for subsequent convolutional neural networks and reduce the impact of arc-induced brightness drift on feature extraction, image preprocessing is performed on the current welding image. This image preprocessing includes resizing and brightness normalization, where resizing is used to... Transformed into a fixed-size image using bilinear interpolation or nearest-neighbor interpolation. ,in This represents the image after resizing. This indicates the pixel height after resizing. This indicates the pixel width after resizing.

[0041] Brightness normalization is used to... Convert to an input image with stable brightness distribution Frame-by-frame normalization as follows ;

[0042] in This represents the image after brightness normalization. Indicates at time right The average brightness value calculated for all pixels across the entire channel range. Indicates at time right The standard deviation of brightness calculated for all pixels across the entire channel range. This represents a preset positive constant used to avoid a denominator of zero;

[0043] The The feature extraction network of the input convolutional neural network is used to obtain multi-scale feature maps. The feature extraction network is a front-end backbone network composed of multiple convolutional blocks connected in series. Each convolutional block includes a convolutional layer, a normalization layer and a non-linear activation layer. The feature representation with different spatial resolutions is obtained by setting the convolutional stride and downsampling step by step.

[0044] The feature extraction network outputs feature maps with different resolutions in at least two convolutional layers, denoted as the first-scale feature map. With second-scale feature map ,in Corresponding to higher resolution features, For lower-resolution features, the two have different spatial dimensions to form multi-scale information;

[0045] To achieve cross-scale fusion, firstly... and Through respectively Convolution is used to align channels to obtain aligned feature maps with the same number of channels. and Channel alignment refers to transforming the number of channels of features at different scales into the same preset number of channels to facilitate splicing or addition;

[0046] Then Through the upsampling operator Magnified to The same space size, in This indicates an upsampling operation and can use bilinear upsampling or transposed convolution upsampling.

[0047] Then and Multi-scale feature maps are generated using fusion operators. ,in Representing multi-scale feature maps, the fusion operator can employ a channel-dimensional concatenation and convolutional mixing method:

[0048] ;

[0049] Concat This represents the operation of concatenating the input feature maps in the channel dimension. Indicates the kernel size as Convolution operation, Indicates the preset kernel size and can be selected. To further extract local geometry and suppress noise after fusion;

[0050] When the feature extraction network outputs feature maps with more than two levels, channel alignment, upsampling, and fusion are repeatedly performed to gradually converge the features at each scale to a uniform resolution, thereby obtaining the multi-scale feature map that simultaneously contains weld edge details and global morphological information. .

[0051] In this specific embodiment, S2 includes:

[0052] Multi-scale feature maps Input the occlusion-aware branch of the convolutional neural network to output an occlusion probability map And modulation parameters for feature modulation, and based on the modulation parameters... Perform channel weighting and spatial weighting to obtain modulated multi-scale feature maps. ;

[0053] in, Indicates the current moment. Indicates at time Multi-scale feature maps. express Feature map height, express The feature map width, express The number of channels;

[0054] The occlusion perception branch adopts a "shared encoder + three-head output" structure. Specifically, a shared feature encoder is first set up... Encode to obtain intermediate features The shared feature encoder consists of two layers connected in series. The system consists of convolutional layers with a stride of 1 and padding of 1. The number of output channels for each convolutional layer is set to a specific value. and on each floor After convolution, a batch normalization layer is sequentially connected to a ReLU (•) activation function to enhance training stability and suppress gradient fluctuations caused by the arc highlight region. This represents the intermediate features output by the shared feature encoder. This indicates the preset number of channels within the occlusion perception branch;

[0055] Based on this, an occlusion probability output head is set up to generate an occlusion probability map. The occlusion probability output head consists of a layer Convolution will Mapped to a single-channel occlusion logarithmic map and then... Function compression to The interval, thus obtaining the interval with Pixel-level occlusion probability maps with consistent spatial resolution:

[0056] ;

[0057] in This represents an occlusion probability map, where the value at each position characterizes the probability that the corresponding position in the current welding image is occluded by arc light, fumes, spatter, or welding torch components. Indicates the kernel size as Convolution operation, The element-wise Sigmoid function is used to map the logarithmic value of occlusion to a probability.

[0058] Simultaneously, a channel modulation parameter output head and a spatial modulation parameter output head are set to generate modulation parameters. The channel modulation parameter output head is paired with... Global average pooling is performed to obtain channel description vectors, and channel recalibration is performed using a two-layer fully connected structure. The compression ratio of the two-layer fully connected structure is set to [value missing]. To reduce the number of parameters while maintaining expressive power, specifically by adjusting the channel dimension... Transformation, and used after the first fully connected layer. Activate, use after the second layer fully connected layer Activate to output channel modulation parameters ,in Indicates to The importance weight of each channel;

[0059] The spatial modulation parameter output head pair Use one layer Convolution generates a single-channel spatial response map and then... Activation yields spatial modulation parameters ,in Indicates to The importance weight of each spatial location, and the The stride of the convolution is set to 1 and the padding is set to 3 to keep the spatial size unchanged and expand the receptive field so as to better cover the connected area of ​​smoke dispersion and welding gun obstruction.

[0060] In obtaining and Afterwards, First, perform channel weighting, then perform spatial weighting to obtain the modulated multi-scale feature map. Specifically, it is done using an element-by-element broadcasting method:

[0061] ;

[0062] in This represents the modulated multi-scale feature map. Represents the index of the spatial height direction and satisfies Indicates the index of the spatial width direction and satisfies Represents the channel index and satisfies express In position With channel eigenvalues ​​at that location Indicates channel The channel modulation weights are shared across all spatial locations. Indicates position Spatial modulation weights are shared across all channels;

[0063] Therefore, in areas with high occlusion probability, unreliable feature responses are suppressed through a combination of spatial modulation and channel modulation. In observable areas, weld-related textures and edge features are enhanced to improve the robustness of subsequent weld localization and fitting. Finally, the modulated multi-scale feature map is output. and the occlusion probability map .

[0064] In this specific embodiment, S3 includes:

[0065] Modulated multi-scale feature maps Input the weld position estimation branch and uncertainty estimation branch of the convolutional neural network respectively to obtain the coordinates of the candidate weld points and their position variances;

[0066] in, Indicates the current moment. Indicates at time The modulated multi-scale feature map, Indicates the feature map height. Indicates the width of the feature map. This represents the number of feature map channels, and in this embodiment, the multi-scale features are aligned to a spatial resolution consistent with the preprocessed current welding image during the fusion stage in step S1, so that... The weld probability map and position variance map output subsequently correspond point-by-point in the pixel coordinate system;

[0067] The weld location estimation branch is constructed using a lightweight pixel classification head, specifically comprising two cascaded layers. Convolutional layers are used to aggregate local textures and edge responses near the weld, with two layers... The stride of the convolution is 1, the padding is 1, and the number of output channels is set to 1. and on each floor After convolution, batch normalization layers are set sequentially. Activation functions are used to improve feature stability under different arc light intensities and smoke occlusion conditions, followed by a layer Convolution maps the number of channels to a single channel and outputs a weld probability map using the Sigmoid function. ,in And its coordinates The value at that location represents the probability that the pixel belongs to the center region of the weld. Represents the height direction index and satisfies Indicates the width direction index and satisfies ;

[0068] From In determining the candidate area for weld, first... Threshold filtering is performed to generate binary candidate masks. Calculate using the following formula:

[0069] ;

[0070] in Indicates candidate mask, This indicates an indicator function that takes the value 1 when the condition within the parentheses is true, and otherwise takes the value _____. Indicates the candidate threshold and is taken in this embodiment. It allows adjustment within the range of 0.3 to 0.7 based on the on-site contrast.

[0071] Subsequently by Within the defined candidate region Performing local maximum search and non-maximum suppression to obtain multiple weld candidate point coordinates, the local maximum search is achieved by... Apply kernel size Max pooling is implemented by comparing each point of the original image, where... This is used to cover the local high-response clusters caused by weld width and arc light diffusion, so that only pixels that satisfy "their probability value is equal to the maximum value of the corresponding neighborhood" are retained as initial peak points.

[0072] The non-maximum suppression is used to remove adjacent duplicate peak points and stabilize the number of candidate points. Specifically, it involves dividing the initial peak points according to... Sort the points from largest to smallest and select them sequentially, ensuring that each selected point is within a certain Euclidean distance. The remaining peak points are suppressed within the neighborhood, where The suppression radius is represented in pixels, ultimately yielding the set of candidate weld points. ,in Indicates time The number of candidate points obtained Indicates the first Coordinates of candidate weld points;

[0073] The uncertainty estimation branch is used to explicitly quantize the positioning uncertainty of each pixel location and output a location variance map. Its structure and weld location estimation branch are set in parallel and the input is the same. Specifically, it includes one layer The convolutional layer is used to generate uncertain intermediate features and is set with a stride of 1, padding of 1, and the number of output channels of 1. In that Set batch normalization layer after convolution and Activation function, then through a layer Convolution output The variance logarithm plot of the channel is obtained by Softplus (•) activation to obtain the non-negative position variance plot. ,in , Represents the number of variance channels and is taken in this embodiment. To characterize the position variances in the height and width directions respectively, and allow for taking... To output the variance of isotropic locations, and to avoid extreme variances affecting subsequent weighted fitting, the variance will be... Crop element by element to preset range Inside, among which and ;

[0074] In obtaining Then, based on the coordinates of each candidate weld point... The variance of each position is read from the data and obtained by the following formula. ,in Indicates the first The variance of the location of each candidate weld point, when hour The two components correspond to the variance in the height direction and the variance in the width direction, respectively. hour Degenerates into scalar positional variance;

[0075] Output the coordinates of the candidate weld points and the position variance corresponding one-to-one with the coordinates of each candidate weld point. .

[0076] In this specific embodiment, S4 includes:

[0077] Get and cache the weld centerline model from the previous moment. ,in This is used to characterize the geometric shape of the weld centerline in the image coordinate system at the previous moment, and in this embodiment, it is constructed using a cubic polynomial centerline model, i.e., using image row coordinates. As the independent variable, the column coordinates of the graph Establish a centerline function for the dependent variable and use a parameter vector This represents the coefficients of its constant term, linear term, quadratic term, and cubic term;

[0078] Then the coordinate set of the weld candidate points was... and its location variance set With occlusion probability map As input, and for each weld candidate point from Read the occlusion probability at this point ,in Indicates the current moment. Indicates the candidate point index. This indicates the number of candidate points at the current moment. Indicates the first Image row coordinates of candidate points Indicates the first Image column coordinates of candidate points Represents the occlusion probability map and For image height, Image width, This indicates the probability that the point is blocked by arc light, smoke, spatter, or welding torch components;

[0079] Simultaneously, the position variance corresponding to each candidate point is read. And convert it to scalar location variance ,when When it is a two-component variance vector The arithmetic mean of the variances in both directions is used to simultaneously reflect the uncertainty in lateral and longitudinal positioning. When it is a single-component variance, directly let It equals the variance of that single component;

[0080] Based on occlusion probability Scalar position variance Calculate the fitting weight of the candidate point in the geometric fitting. The sum of the fitting weights is obtained by summing the fitting weights for all candidate points. The calculation method is as follows:

[0081] ;

[0082] in Indicates the first Fitting weights for each weld candidate point This represents the sum of the fitting weights. Indicates a preset constant and is used to avoid Too small a value results in unbounded weights, which is not considered in this implementation. ;

[0083] Before updating the centerline, the current frame is judged to have stable fitting conditions based on the "effective observation" criterion. The effective observation criterion includes the number of candidate points satisfying the condition. And the sum of the fitting weights satisfies ,in This represents the minimum number of candidate points threshold, and in this embodiment, it is taken as... This represents the threshold for the sum of fitting weights, and in this embodiment, it is taken as 5 to 50 depending on the camera resolution and candidate point density.

[0084] when or At that time, the weld centerline model from the previous moment is directly used. As the current weld centerline model To achieve model backtracking and suppress centerline jumps caused by occlusion;

[0085] when and At that time, perform a weighted application on the candidate points. Weighted least squares fitting was used to obtain the current weld centerline model. The objective of weighted least squares fitting is to minimize the weighted squared error of all candidate points. Specifically, this is achieved by constructing a system with... The design matrix uses the 0th to 3rd powers as basis functions and... For the observation vector, use a diagonal weight matrix After applying weights, a numerically stable linear solver is used to solve for the parameters. The linear solver selected is... Decomposition or singular value decomposition is used to avoid ill-conditioned regularization of the normal equation, and ridge regularization can be optionally added to suppress overfitting when the number of candidate points is too small, with the regularization coefficient set to a specific value. ;

[0086] In obtaining Then calculate the fitting residuals With tracking credibility metrics Among them, the fitting residual This is used to characterize the average deviation of candidate points from the current centerline model, and is implemented using a weighted distance statistic from candidate points to the centerline. The column coordinates are obtained by evaluating the centerline function at the row coordinates of the candidate points. and The absolute value of the difference is used to balance computational efficiency and real-time performance, while also tracking reliability metrics. Numerical variation Increase and increase and follow Increases and decreases, calculated using the following continuous function:

[0087] ;

[0088] in Represents the fitting residual. Indicates the first The distance from each candidate point to the current centerline model. This indicates the current weld centerline model. The column coordinates obtained by evaluating the function at a given row coordinate. This indicates a preset positive number to avoid a denominator of zero, and in this embodiment, it is taken as... This represents the residual scale threshold, and in this embodiment, it is taken as... Pixels and allow adjustment based on weld width and imaging magnification. Indicates that you will input Limited to Interval clipping function, This indicates the tracking reliability metrics;

[0089] Output the current weld centerline model Fitting residuals and tracking credibility metrics .

[0090] In this specific embodiment, S5 includes:

[0091] Obtain camera calibration parameters and preset welding trajectory, and model the current weld centerline. As input, calculate weld deviation and convert it to obtain compensation amount;

[0092] The camera calibration parameters include the camera intrinsic parameter matrix. , distortion parameter vector The extrinsic rotation matrix of the camera relative to the workpiece coordinate system With translation vector , Used to characterize the imaging scale and principal point location. Used for distortion correction of radial and tangential distortions. and Used to establish the spatial relationship between image coordinates and workpiece coordinates;

[0093] The preset welding trajectory is denoted as It is stored as a discrete path point sequence in the workpiece coordinate system and is consistent with the motion plan of the welding actuator. To facilitate comparison with the weld centerline in the image coordinate system, at each moment... use Will Projecting the image onto the image coordinate system yields an image representation of the preset welding trajectory. It is stored as a sequence of line segments to support nearest point search;

[0094] exist According to the preset sampling interval Select multiple centerline sampling points to form a set ,in This represents the sampling interval along the image row direction, and in this embodiment, it is taken as 10 to 30 pixels. Indicates the number of sampling points along the center line. Indicates the first Image row coordinates of each sampling point Indicates the first Image column coordinates of sampling points, and when When using a polynomial centerline model, by... exist The function evaluation is performed at the point to obtain ;

[0095] For each centerline sampling point ,exist Determine its corresponding point The corresponding points are determined using the "nearest point projection of a polyline" method, which involves traversing... For each line segment, calculate the perpendicular projection point from the sampling point to that line segment. If the perpendicular falls between the endpoints of the line segment, then the perpendicular is taken as a candidate corresponding point; otherwise, the closer endpoint is taken as the candidate corresponding point, and the point corresponding to the perpendicular is selected from all candidate corresponding points. The one with the smallest Euclidean distance is taken as This ensures that a stable one-to-one correspondence can still be established even when there are changes in the curvature of the trajectory;

[0096] After obtaining the corresponding points, calculate the image coordinate representation of the weld deviation. :

[0097] ;

[0098] in Indicates the first Weld deviation vector at each sampling point Indicates line direction deviation. Indicates column direction deviation. and They represent the first The image row coordinates and image column coordinates of each corresponding point;

[0099] To convert the weld deviation from image coordinates into a displacement in coordinates consistent with the preset welding trajectory, a local linear mapping from "pixel-level micro-displacement to workpiece plane displacement" is pre-established based on K, d, R, T, and the geometric parameters of the plane containing the workpiece surface in the workpiece coordinate system. ,in Indicates the coordinates in the image The calibration Jacobian matrix at the location is defined, with its first column being the workpiece plane displacement vector corresponding to a 1-pixel increase in the image row coordinate, and its second column being the workpiece plane displacement vector corresponding to a 1-pixel increase in the image column coordinate. Through the The three pixels are distorted, back-projected onto the workpiece plane, and the difference is calculated offline, and then retrieved online by looking up a table.

[0100] Simultaneously, the preset welding trajectory is calculated in the workpiece coordinate system. In The unit normal direction vector at the corresponding position in The tangential direction of adjacent trajectory points is normalized and then rotated 90 degrees in the workpiece plane, and oriented according to the right-hand rule to be consistent with the normal compensation direction of the welding actuator.

[0101] Based on this, the weld deviation is projected to obtain the compensation component along the normal direction of the preset welding trajectory. :

[0102] ;

[0103] in Indicates the first Normal displacement at each sampling point express transpose, This represents the calibration Jacobian matrix read at the corresponding point;

[0104] When there are multiple centerline sampling points, for Perform robust fusion to output a single compensation quantity The robust fusion can be achieved by sorting by numerical values ​​and then removing the values ​​at both ends. The truncated mean method, which involves recalculating the mean of the samples, suppresses abnormal bias caused by local false detections, and the resulting mean is then used to calculate the mean. As the output compensation amount of step S5, and including at least the displacement amount along the normal direction of the preset welding trajectory, it is used for gain gating and instruction generation in step S6.

[0105] In this specific embodiment, S6 includes:

[0106] Obtain the compensation instruction from the previous time step and record it as ,in Indicates the current moment. Indicates at time Compensation commands that have been output to the welding actuator and have taken effect;

[0107] compensation amount and fitting residuals and tracking credibility metrics As input, where This represents the displacement compensation amount along the normal direction of the preset welding trajectory. This represents the fitting residual obtained based on the weighted distance statistics from the candidate weld points to the current weld centerline model. This indicates the reliability of the tracking index, with a higher value indicating a more reliable current observation.

[0108] in accordance with and Calculate the compensation gain Among them, the compensation gain Defined as about and A continuous function, and as Increase and decrease and follow The compensation gain is continuously gated in this embodiment as follows:

[0109] ;

[0110] in Indicates compensation gain. This represents an exponential function with the natural constant as its base. This represents the residual scale parameter and is used to control the influence of the residual on the rate of gain decay. In engineering implementation, it can be taken as the residual scale threshold used to normalize the residual in step S4 to ensure the consistency of gain changes under different operating conditions.

[0111] Multiplying the compensation amount by the compensation gain yields the unlimited compensation command. ,in and This indicates the target compensation instruction based on perceived quality gating at the current moment;

[0112] right Amplitude limiting is performed to meet the stroke or speed constraints of the welding actuator and to avoid overcompensation caused by abnormal observations. The limiting range is determined by the preset minimum compensation command. With maximum compensation command Confirmed, among which and The value is calculated based on the maximum allowable lateral correction amount and the maximum correction speed under the control cycle;

[0113] After amplitude limiting, time smoothing processing based on the compensation command of the previous moment is performed on the compensation command to suppress high-frequency jitter and improve the stability of trajectory compensation. The time smoothing is implemented using a first-order exponential smoothing filter, and the smoothing coefficient is determined by the control period and the desired response time constant. In this embodiment, amplitude limiting and time smoothing are implemented as follows: ;

[0114] in This indicates a limit compensation instruction. This represents a saturation limiting function whose output is equal to... , This indicates the final compensation instruction after time smoothing. Represents the smoothing coefficient and A smaller value indicates stronger smoothness, and in implementation, it can be selected from 0.1 to 0.5 depending on the control cycle to balance response speed and jitter suppression;

[0115] Finally The output is sent to the welding actuator to perform weld deformation tracking compensation on the preset welding trajectory.

[0116] In this specific embodiment, it also includes:

[0117] The location variance plot output by the uncertainty estimation branch The image is constructed using a bipartite graph approach, which includes a first variance subgraph representing the horizontal and vertical positional uncertainties of the image coordinates, respectively. Subgraph with second variance ,in Indicates the current moment. Represents a location variance plot. This indicates the number of pixel rows corresponding to the image height. This indicates the number of pixel columns corresponding to the image width. Denotes the set of nonnegative real numbers. This represents the horizontal variance subplot and the horizontal coordinates of the corresponding image column. direction, Represents the vertical variance subplot and the vertical axis corresponds to the row coordinates of the image. In order to ensure consistency of terminology, the lateral variance is equivalent to the width variance, and the longitudinal variance is equivalent to the height variance.

[0118] In its specific construction, the uncertainty estimation branch is applied to the modulated multi-scale feature map. After completing the convolutional feature extraction, it is passed through a layer The convolution outputs a logarithmic variance plot of two channels. ,in First Channel Corresponding to the logarithm of the horizontal variance, the second channel Corresponding logarithm of longitudinal variance;

[0119] To ensure that the output variance is non-negative and numerically stable, and Each was activated by Softplus(⋅) and the minimum variance constant was superimposed. The first variance subplot and the second variance subplot are obtained:

[0120] ;

[0121] in Describes an element-wise smooth nonnegative mapping function. Represents the natural logarithm function. Represents the natural constant. This represents a preset minimum variance constant used to prevent the output from being zero, which would lead to subsequent weighted instability, and in this embodiment, it is taken as... ;

[0122] Furthermore, to avoid individual pixels outputting excessive variance under arc saturation / or strong occlusion conditions, affecting subsequent fitting weight calculations, the following measures are taken: and Clipping elements to the preset limit Within, of which In this embodiment, take Furthermore, it can be adjusted according to the image noise level and weld dimensions;

[0123] Obtain the set of coordinates of candidate weld points Then, in the first and second variance sub-maps, the horizontal and vertical variances of each candidate point are read one by one according to the pixel coordinates, forming a set of positional variances that correspond one-to-one with the coordinates of the candidate points. ,in Indicates the candidate point index. Indicates the number of candidate points. Indicates the first The lateral variance of each candidate point Indicates the first The longitudinal variance of each candidate point, and the lateral variance and longitudinal variance are used as position uncertainty inputs when calculating the fitting weights in the subsequent step S4, to automatically reduce the impact of the candidate point positioning on the geometric fitting of the weld centerline when the candidate point positioning is unreliable.

[0124] In this specific embodiment, it also includes:

[0125] The tracking reliability index obtained in step S4 further introduces a temporal consistency term on top of the original basic reliability obtained based on fitting weights and fitting residuals to suppress abrupt changes in the centerline under occlusion interference.

[0126] The current weld centerline model is denoted as The weld centerline model at the previous moment is denoted as And respectively, the function evaluation form of the centerline in the image coordinate system. and Represents the row coordinates of the image. Indicates that at row coordinates Cause The calculated centerline column coordinates, Indicates that at row coordinates Cause The calculated centerline column coordinates;

[0127] To ensure temporal consistency, sampling intervals are set within the image row coordinate range where the center lines of both frames are valid. Select Aligned sampling row coordinates ,in This indicates the timing consistency sampling interval and can range from 10 pixels to 30 pixels. Indicates the number of sampling points. Indicates the first The coordinates of each sampled row satisfy... ;

[0128] In each Evaluations at each location and The corresponding column coordinates are obtained, and the distance samples between the two center lines are calculated. The average distance and maximum distance are then obtained to characterize temporal consistency. Specifically, the calculation is as follows:

[0129] ;

[0130] in Indicates the coordinates of the sampling row The distance sample between the current centerline and the centerline at the previous time step. This represents the absolute value operation. This represents the average distance of the distance samples. This represents the summation operation. This represents the maximum distance to the sample. This indicates the operation of finding the maximum value.

[0131] In this embodiment, the basic confidence level is denoted as ,in This represents the tracking reliability metric before the introduction of temporal consistency, and the final tracking reliability metric is obtained by fusing temporal consistency in a continuously decaying manner. Calculated as follows:

[0132] ;

[0133] in This represents a tracking reliability metric after merging temporal consistency. This represents an exponential function with the natural constant as its base. Represents the temporal distance scale parameter and is used for control. The impact on the rate of credibility decay and its applicability. Pixels to 8 pixels;

[0134] When further enhancement of mutation suppression is required, it can be... Replace with To be more sensitive to local maximum offset, or to use the curvature change as an additional input while keeping the above formula structure unchanged, and to calculate the curvature change by discrete second-order difference of the centerline sampling points to achieve the constraint that "the greater the curvature change, the lower the reliability", thereby reducing the tracking reliability index as the consistency of time deteriorates.

[0135] In this specific embodiment, it also includes:

[0136] At the completion time Image acquisition and occlusion probability map obtained Then, the occlusion probability map is used to adaptively set the image acquisition parameters for the next moment to reduce the proportion of the arc saturation area and / or improve the contrast of the weld area.

[0137] in Indicates the current moment. This represents the occlusion probability map output by the occlusion perception branch. This indicates the number of pixel rows corresponding to the image height. This indicates the number of pixel columns corresponding to the image width. This indicates that the row coordinates of the image are... And the column coordinates are The occlusion probability at a location, which is used to characterize the likelihood that the location is blocked by arc light, smoke, spatter, or welding torch components;

[0138] Camera control parameters include exposure time With gain ,in Indicates the camera at time Exposure time used for integral imaging, measured in microseconds or milliseconds. It represents the camera's analog or digital gain and is used to amplify the sensor output. In cameras configured with shutter speed, shutter speed and exposure time correspond to the same physical quantity and are equivalently converted according to camera interface requirements.

[0139] To quantify the saturation caused by arc light, an occlusion-weighted saturation percentage is calculated based on the pixel intensity and occlusion probability map of the current welding image. Calculated as follows:

[0140] ;

[0141] in This represents the percentage of saturated pixels in areas with a high probability of occlusion. Indicates time Welding image in position The pixel intensity at that location can be either grayscale intensity or a brightness value obtained through multi-channel conversion. This represents the saturation threshold, set to a value close to the maximum representable intensity based on the camera's bit depth. For example, for an 8-bit image... And 12-bit image capture This indicates an indicator function that takes the value 1 when the condition within the parentheses is true, and otherwise takes the value _____. This represents the summation operation over all pixels in the image. This indicates a preset positive number to avoid a denominator of zero and takes... ;

[0142] In obtaining Then, a continuous update law is used to adjust the exposure time for the next moment to reduce the proportion of the arc saturation region and avoid flickering caused by sudden parameter changes. The continuous update law is as follows:

[0143] ;

[0144] in This indicates the exposure time used to acquire the image at the next moment. This represents a saturation limiting function whose output is equal to... This represents an exponential function with the natural constant as its base. This represents the saturation feedback coefficient, used to control the exposure adjustment speed, and is taken in this embodiment. to Indicates the target saturation percentage and is taken in this embodiment. to This indicates the lower limit of exposure and is set based on the camera's minimum exposure capability and the brightness of the welding arc. to This indicates the upper limit of exposure and is set according to the tolerance for motion blur and frame rate constraints, for example, from 0.5 ms to 5 ms;

[0145] After updating the exposure time, to improve the contrast of the weld area, the brightness level and local gradient level in the low-occlusion area were further calculated based on the occlusion probability map, and the gain was fine-tuned. Specifically, the following parameters were selected: The pixels are selected as the set of sharp pixels, and their average brightness and average gradient magnitude are calculated. When the average brightness is lower than the preset target brightness or the average gradient magnitude is lower than the preset target gradient magnitude, [the following is omitted]. Within the permissible range, adjust up one gear at a discrete increment or in fixed steps. When it remains above the upper limit threshold Adjusted downwards to match exposure and suppress saturation, among which This represents the clarity threshold and is taken in this embodiment. Up to 0.6, and for Apply upper and lower limits to the gain and constraints on the maximum change in a single cycle to avoid parameter oscillation;

[0146] Finally, the updated version and / or Write the data into the camera control interface and make it effective in the next frame, thereby achieving adaptive exposure and gain adjustment based on the occlusion probability map, reducing the proportion of arc saturation area and / or improving the contrast of weld area in the current welding image.

[0147] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.

[0148] This invention addresses the problems of missing weld features and unstable observation caused by strong arc light interference, smoke, spatter, and occlusion from welding torch components. It collaboratively combines multi-scale feature extraction of welding images, occlusion perception, weld probability localization, and uncertainty estimation: Features are conditionally modulated using an occlusion probability map, suppressing weld-related features in occluded areas and enhancing them in observable areas; simultaneously, the output position variance quantifies the reliability of candidate points and participates in weighted geometric fitting along with the occlusion probability, thereby reducing the disturbance of low-confidence observations to the fitting results during the centerline modeling stage; furthermore, compensation gain is calculated based on the fitting residual and tracking confidence, and the compensation amount is continuously gated, combined with amplitude limiting and time smoothing, so that the compensation command automatically converges when the observation quality deteriorates, avoiding overcompensation and oscillation, achieving continuous and stable output of the weld centerline and smooth compensation control of weld deformation.

[0149] This invention improves the algorithm structure for welding occlusion scenarios in the following ways: First, it sets up an occlusion perception branch and introduces occlusion conditional feature modulation, allowing occlusion information to be introduced at the feature level in advance, thus improving the feature representation capability in occlusion scenarios. Second, it introduces uncertainty estimation of pixel-level position variance and adopts a weighted strategy based on occlusion probability and position variance in the geometric fitting layer to achieve adaptive suppression of outliers and low-confidence points. Third, it establishes consistency constraints between perception quality and control output through a centerline model backoff mechanism when effective observation is insufficient and a confidence-based continuous gain gating compensation mechanism, thereby better achieving the technical effect of robust tracking and stable compensation in complex welding environments.

Claims

1. A method for tracking and compensating weld deformation based on a convolutional neural network, characterized in that, Comprising: S1, acquiring a current welding image of a workpiece to be welded in a welding process, inputting a feature extraction network of a convolutional neural network to obtain a multi-scale feature map; S2, inputting the multi-scale feature map into a shielding perception branch of the convolutional neural network to output a shielding probability map and a modulation parameter, and performing feature modulation on the multi-scale feature map based on the modulation parameter; S3, inputting the modulated multi-scale feature map into a weld position estimation branch of the convolutional neural network to output a weld probability map, and determining a plurality of weld candidate point coordinates according to the weld probability map, inputting the modulated multi-scale feature map into an uncertainty estimation branch of the convolutional neural network to output a position variance map, and obtaining a position variance corresponding to each weld candidate point coordinate; S4, acquiring a weld centerline model at the previous moment, determining a fitting weight of each weld candidate point coordinate according to the weld candidate point coordinate, the position variance corresponding thereto and the shielding probability map, performing weighted geometric fitting on the weld candidate point coordinate and the fitting weight thereof to obtain a current weld centerline model, and calculating a fitting residual, calculating a tracking confidence index based on the fitting weight and / or the fitting residual, and using the weld centerline model at the previous moment as the current weld centerline model when there is insufficient effective observation according to the fitting weight; S5, acquiring camera calibration parameters and a preset welding trajectory, calculating a weld deviation according to the current weld centerline model and the preset welding trajectory, and converting the weld deviation into a compensation amount using the camera calibration parameters; S6, acquiring a compensation instruction at the previous moment, calculating a compensation gain according to the fitting residual and the tracking confidence index, multiplying the compensation amount and the compensation gain to obtain a compensation instruction, and outputting the compensation instruction to a welding execution mechanism after limiting the amplitude and time smoothing based on the compensation instruction at the previous moment, for weld deformation tracking compensation on the preset welding trajectory.

2. The weld seam deformation tracking and compensation method based on a convolutional neural network according to claim 1, characterized in that, S1 comprises: acquiring a current welding image of a workpiece to be welded in a welding process to obtain a current welding image; performing image preprocessing on the current welding image to obtain a preprocessed current welding image, wherein the image preprocessing includes size adjustment and brightness normalization; inputting the preprocessed current welding image into the feature extraction network of the convolutional neural network; outputting feature maps with different resolutions in at least two convolution layers in the feature extraction network, respectively, and performing channel alignment and up-sampling fusion processing on the feature maps with different resolutions to obtain the multi-scale feature map. 3.The weld deformation tracking and compensation method based on convolutional neural network according to claim 1, wherein S2 Comprising: inputting the multi-scale feature map into a shielding perception branch of the convolutional neural network to obtain a shielding probability map and a modulation parameter for feature modulation, wherein the shielding probability map is used to represent the probability of each position in the current welding image being shielded by arc light, smoke, spatter or welding gun components; based on the modulation parameter, performing channel weighting processing and spatial weighting processing on the multi-scale feature map, respectively, to obtain a modulated multi-scale feature map; outputting the modulated multi-scale feature map and the shielding probability map.

4. The weld seam deformation tracking and compensation method based on a convolutional neural network according to claim 1, characterized in that, S3 comprises: The modulated multi-scale feature map is input into a weld position estimation branch of a convolutional neural network to output a weld probability map; threshold filtering is performed on the weld probability map to obtain a candidate region, and local maximum value search and non-maximum value suppression processing are performed on the weld probability map in the candidate region to determine a plurality of weld candidate point coordinates; the modulated multi-scale feature map is input into an uncertainty estimation branch of the convolutional neural network to output a position variance map; a corresponding position variance is read from the position variance map according to the weld candidate point coordinates to obtain a position variance corresponding to each weld candidate point coordinate; and the weld candidate point coordinates and the position variance corresponding thereto are output.

5. The weld seam deformation tracking and compensation method based on a convolutional neural network according to claim 1, characterized in that S4 Comprise: obtaining a weld centerline model of a previous time; taking the weld candidate point coordinates, the position variance and the occlusion probability map as inputs; for each weld candidate point coordinate, reading the occlusion probability at the weld candidate point coordinate and reading the position variance corresponding to the weld candidate point coordinate, and calculating a fitting weight of the weld candidate point coordinate according to the occlusion probability and the position variance, wherein the fitting weight is equal to the product of the complement of the occlusion probability and the reciprocal of the sum of the position variance and a preset constant; and accumulating the fitting weights of the weld candidate point coordinates to obtain a sum of fitting weights; in a case where the sum of fitting weights is not less than a preset threshold, performing weighted geometric fitting on the weld candidate point coordinates based on the fitting weights to obtain a current weld centerline model; in a case where the sum of fitting weights is less than the preset threshold, updating the current weld centerline model to the weld centerline model of the previous time; calculating a fitting residual according to the weld candidate point coordinates and the current weld centerline model, wherein the fitting residual comprises a weighted distance statistic of the weld candidate point coordinates to the current weld centerline model; calculating a tracking confidence index based on the sum of fitting weights and the fitting residual, wherein the tracking confidence index increases as the sum of fitting weights increases and decreases as the fitting residual increases; and outputting the current weld centerline model, the fitting residual and the tracking confidence index.

6. The weld seam deformation tracking and compensation method based on a convolutional neural network according to claim 1, characterized in that S5 Comprise: obtaining camera calibration parameters and a preset welding trajectory, and taking a current weld centerline model as input; selecting a plurality of centerline sampling points on the current weld centerline model at a preset sampling interval, and determining a corresponding point of each centerline sampling point on the preset welding trajectory; calculating a weld deviation according to the coordinate difference between each centerline sampling point and its corresponding point; converting the weld deviation from image coordinates to a displacement amount in coordinates consistent with the preset welding trajectory by using the camera calibration parameters to obtain a compensation amount, wherein the compensation amount comprises a displacement amount along the normal direction of the preset welding trajectory; and outputting the compensation amount.

7. The weld seam deformation tracking and compensation method based on a convolutional neural network according to claim 1, characterized in that S6 Comprise: obtaining a compensation instruction of a previous time; taking the compensation amount, the fitting residual and the tracking confidence index as input; According to the fitting residual and the tracking confidence index, a compensation gain is calculated, wherein the compensation gain is a continuous function of the fitting residual and the tracking confidence index, and the compensation gain decreases as the fitting residual increases and decreases as the tracking confidence index decreases; the compensation amount is multiplied by the compensation gain to obtain a compensation instruction; the compensation instruction is subjected to amplitude limiting processing to obtain an amplitude-limited compensation instruction; the amplitude-limited compensation instruction is subjected to time smoothing processing based on the last-time compensation instruction to obtain a smoothed compensation instruction; and the smoothed compensation instruction is output to a welding execution mechanism for welding seam deformation tracking compensation of the preset welding trajectory.

8. The weld seam deformation tracking and compensation method based on a convolutional neural network according to claim 4, characterized in that, The position variance map includes a first variance sub-map and a second variance sub-map respectively representing transverse and longitudinal position uncertainties of image coordinates, and the position variance corresponding to each welding seam candidate point coordinate includes a transverse variance and a longitudinal variance. 9.The weld deformation tracking and compensation method based on convolutional neural network according to claim 5, characterized in that, The tracking confidence index is also calculated based on a timing consistency, the timing consistency including at least one of an average distance, a maximum distance, or a curvature change amount between the current welding centerline model and the last-time welding centerline model, and the tracking confidence index decreases as the timing consistency deteriorates.

10. The weld seam deformation tracking and compensation method based on a convolutional neural network according to claim 3, characterized in that, Further comprising: At least one of an exposure time, a gain, or a shutter speed for image acquisition at a next time is determined according to the occlusion probability map, so that an arc light saturated area proportion in the current welding image is reduced and / or a welding seam area contrast is improved.