An ADMM-based network model lightweight method, a laser real-time weld seam tracking method, a system and a network model segmentation performance verification method
By using the ADMM algorithm to perform structured pruning of the UNET network model, the problem of parameter redundancy in deep learning network models in embedded devices is solved, enabling fast inference and efficient weld seam tracking of the lightweight model, thereby improving welding accuracy and efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-19
- Publication Date
- 2026-03-27
AI Technical Summary
Existing deep learning network models have redundant parameters in embedded devices, resulting in high computational costs and difficulty in achieving efficient real-time weld seam tracking.
A lightweight network model based on ADMM is adopted. The UNET network model is structured and pruned by the ADMM algorithm to remove redundant parameters, and a lightweight network model is constructed and deployed on an embedded industrial control computer for weld seam tracking.
This study achieves fast inference speed and efficient weld seam tracking for lightweight models, meets welding accuracy requirements, improves welding production efficiency, and provides a method for verifying the segmentation performance of network models.
Smart Images

Figure CN116673598B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of weld seam tracking in welding robots. Specifically, it relates to a lightweight network model based on ADMM, a real-time laser weld seam tracking method, and a system and network model segmentation performance verification method. Background Technology
[0002] Modern welding robots increasingly incorporate popular deep learning networks for image processing, moving beyond simple teaching to enable autonomous learning of different weld seam trajectories. This allows real-time weld seam tracking systems to achieve automated weld seam welding.
[0003] The success of deep neural networks (DNNs) has driven the pursuit of computationally and memory-efficient models for applications in resource-constrained systems such as embedded devices. However, when these powerful deep learning network models are migrated to specific application scenarios, they often exhibit significant parameter redundancy.
[0004] Model compression methods are generally classified into four categories: low-rank factorization, network quantization, knowledge distillation, and network pruning. Low-rank factorization directly compresses the network by decomposing high-dimensional weight tensors, but the computationally intensive decomposition operation is performed layer by layer, and overall performance cannot be guaranteed. Network quantization maps model parameters to a finite set of values, resulting in performance degradation. Knowledge distillation transfers knowledge obtained from deep networks to shallow networks, minimizing the KL divergence between their output probabilities. However, its drawback is that model assumptions are often too strict and cannot be satisfied in practical applications. Network pruning can effectively remove redundant parameters that lead to overfitting and accelerate the inference process.
[0005] In network pruning, direct reduction of weights, i.e., unstructured pruning, can make the weight matrix sparse, but the compressed model architecture retains the original structure. In practice, pruning requires dedicated hardware or libraries capable of storing unstructured sparsity weights for fast inference, leading to increased computational costs. Furthermore, related research suggests using the pruning performance ratio (PPR) to compare structured and unstructured weight pruning when quantization is adequate, finding that the index storage overhead of unstructured pruning is always greater than its additional weight reduction storage. Simultaneously, most studies not only struggle to identify neurons to be pruned but also face difficulties in converging to the optimal solution. Summary of the Invention
[0006] The primary objective of this invention is to overcome the shortcomings and deficiencies of the prior art and provide a lightweight network model method based on ADMM, which can effectively remove redundant parameters of the UNET network model, reduce the size of the network model to obtain a lightweight model, and improve the inference speed of the model.
[0007] The second objective of this invention is to provide a laser real-time weld seam tracking method.
[0008] The third objective of this invention is to provide a laser real-time weld seam tracking system.
[0009] The fourth objective of this invention is to provide a method for verifying the segmentation performance of a network model.
[0010] The first objective of this invention is achieved through the following technical solution: a lightweight network model based on ADMM, comprising the following steps:
[0011] S1. The UNET network model is trained using a dataset of pre-collected noisy and noiseless weld seam images to obtain the trained network model.
[0012] S2. Use the ADMM algorithm to perform structured pruning on the trained network model to obtain a lightweight network model.
[0013] Preferably, step S2 specifically includes:
[0014] S21. Calculate the cross-entropy between the weld seam image output by the trained network model and the real noise-free weld seam image. ( Write the objective function into the objective optimization function and add a regularization term to construct the objective function of the lightweight network model, as follows:
[0015] Equation (1),
[0016] in, For the first An image of a noisy weld. For the first A noise-free weld image. These are the weight parameters for all layers of the network model. Let t be the 0-1 vectors of all layers in the network model, and t be the total number of images used for training. ( () is a mapping function that maps a noisy weld image to a noise-free weld image as input. ( )for and The loss function between For the network model Layer weight parameters, This is the penalty factor for the regularization term;
[0017] S22. By introducing 0-1 vectors corresponding to the number of convolution kernels in the UNET network model. Furthermore, 0 in this vector represents kernel pruning, and 1 represents kernel retention. The structured pruning problem of convolution kernels for each layer of the UNET network model is transformed into an integer programming problem. The constraints of the objective function are then expressed as follows:
[0018]
[0019] in, For the lightweight network model The number of neurons retained in the layer. For the network model The 0-1 vector of the layer, The first part of the network model before pruning The total number of neurons in the layer, where N represents a natural number;
[0020] S23. The structured pruning problem of the UNET network model is transformed into an optimization problem of the objective function, which is expressed as follows:
[0021] Equation (2),
[0022]
[0023] S24. Replace step S22 with the intersection of the inequality constraints and the l2 spherical equality constraints. binary constraints , It is expressed as follows:
[0024]
[0025] Correspondingly, the optimization objective function in step S23 is changed to:
[0026] Equation (3)
[0027]
[0028] Among them, the constraint set , They are respectively:
[0029]
[0030] S25. Introducing indicator functions Reconstruct and optimize the objective function:
[0031] Define indicator functions respectively :
[0032] , Equation (4),
[0033] , Equation (5),
[0034] Introducing auxiliary variables Then the optimization objective function in step S24 is updated as follows:
[0035] Equation (6),
[0036]
[0037] S26. By introducing dual variables , and penalty parameters The objective function of step S25 is changed to unconstrained augmented Lagrangian optimization. The question format is as follows:
[0038]
[0039]
[0040]
[0041] Equation (7),
[0042] According to the augmented Lagrange method, equation (7) is decomposed into the following four subproblems and solved iteratively in sequence:
[0043] Equation (8)
[0044] Equation (9)
[0045] Equation (10)
[0046] Equation (11).
[0047] Among them, the penalty parameter Dual variables The iterative update is as follows:
[0048]
[0049]
[0050] For the two subproblems corresponding to equations (8) and (9), the stochastic gradient descent method is used to solve them. For the subproblem corresponding to equation (10), the QP solver is used for global solution. For the subproblem corresponding to equation (11), the vector projection L2 space is used for solution. When the difference between the calculated actual clipping rate and the set theoretical clipping rate is within the error range of 0.1%, the ADMM iteration process is completed and the lightweight clipping is completed.
[0051] Preferably, in step S26, the subproblem corresponding to equation (11) is solved by vector projection into L2 space, and the specific formula is as follows:
[0052] Wherein, P( ) is the projection vector.
[0053] The second objective of this invention is achieved through the following technical solution: a laser real-time weld seam tracking method, comprising the following steps:
[0054] S01. Port the lightweight network model obtained based on an ADMM-based network model lightweighting method to an embedded industrial control computer;
[0055] S02. Before welding begins, the industrial camera in the laser vision sensor first acquires the weld seam image and sends it to the embedded industrial control computer. The embedded industrial control computer initializes the weld seam image by calling the library function of the Halcon software to obtain the pixel coordinate values of the initial weld seam feature points. These initial weld seam feature points serve as the initial targets of the efficient convolution operation filter tracking algorithm.
[0056] S03. Using a robot calibration algorithm, the pixel coordinates of the initial weld feature points are converted into two-dimensional coordinates in the welding robot coordinate system, and these two-dimensional coordinates are sent to the control cabinet.
[0057] S04. After welding begins, the industrial camera of the laser vision sensor continuously acquires noisy weld seam images at a sampling frequency of 60 fps and sends them to the embedded industrial control computer. The lightweight network model extracts features from the noisy weld seam images to obtain three-line laser stripe feature images. Then, the three-line laser stripe feature images are processed by an efficient convolution operation filter tracking algorithm to obtain the pixel coordinate values of the weld seam feature points.
[0058] S05. Using a robot calibration algorithm, the pixel coordinates of the weld feature points are converted into two-dimensional coordinates of the weld feature points in the robot coordinate system, and these two-dimensional coordinates are sent to the control cabinet.
[0059] S06. The control cabinet outputs control signals to the welding robot, causing the welding wire at the end of the welding torch to move along the weld seam of the workpiece to be welded, thus completing the real-time automatic tracking of the weld seam tracking system.
[0060] The third objective of this invention is achieved through the following technical solution: a real-time laser weld seam tracking system, comprising a welding robot, a welding torch, a laser vision sensor, a worktable, supporting welding equipment, and a control cabinet, and further comprising an embedded industrial control computer. This embedded industrial control computer embeds a lightweight network model obtained based on an ADMM-based lightweight network model method. The laser vision sensor is mounted on the welding torch, which is mounted at the end effector of the welding robot. The supporting welding equipment provides energy and materials to the welding torch. After acquiring a weld seam image, the laser vision sensor sends the image to the embedded industrial control computer. The embedded industrial control computer extracts weld seam feature points and predicted positions based on the image and transmits the predicted positions to the control cabinet. The control cabinet outputs signals to control the movement trajectory of the welding torch, thereby achieving automatic tracking of the weld seam of the workpiece to be welded on the worktable.
[0061] Preferably, the laser vision sensor includes a partition, an industrial camera, a sensor housing, and a laser generator. The industrial camera and the laser generator are fixed inside the sensor housing. The laser generator is connected to the sensor housing by bolts and nuts. The partition is fixed inside the sensor housing and located at the front end of the industrial camera and the laser generator.
[0062] The fourth objective of this invention is achieved through the following technical solution: a method for verifying the performance of network model segmentation, comprising the following steps:
[0063] S001. Before welding begins, an offline teaching experiment is conducted on the workpiece to be welded using an embedded industrial control computer to obtain the two-dimensional coordinate values of the noiseless welding trajectory in the robot coordinate system. T represents a noise-free welding trajectory sequence. The first of the welding trajectory sequence One welding point;
[0064] S002. The lightweight network model obtained based on an ADMM-based network model lightweighting method is ported to an embedded industrial control computer.
[0065] S003. After welding begins, the industrial camera of the laser vision sensor continuously acquires noisy weld seam images at a sampling frequency of 60 fps and sends them to the embedded industrial control computer. The lightweight network model extracts features from the noisy weld seam images to obtain three-line laser stripe feature images. Then, the three-line laser stripe feature images are processed by an efficient convolution operation filter tracking algorithm to obtain the pixel coordinate values of the weld seam feature points.
[0066] S004. Using a robot calibration algorithm, convert the pixel coordinates of the weld feature points into two-dimensional coordinates of the weld feature points in the robot coordinate system. R represents the welding trajectory sequence of weld feature points. The first of the welding trajectory sequence One welding point;
[0067] S005. Based on the two-dimensional coordinate values from step S001 and the two-dimensional coordinate values of step S004 Calculate the Euclidean distance between the weld points corresponding to the T and R sequences:
[0068]
[0069] European distance The smaller the value, the better the segmentation performance of the lightweight network model can be verified.
[0070] The present invention has the following advantages and effects compared with the prior art:
[0071] (1) The present invention provides a lightweight network model based on ADMM, which uses the ADMM algorithm to achieve a high reduction rate of structural weight redundancy in the UNET network model, effectively removes redundant parameters of the model, reduces the size of the network model to obtain a lightweight model, and improves the inference speed of the model.
[0072] (2) A lightweight method for implementing an ADMM-based network model according to the present invention, which reduces the complexity of the implementation model.
[0073] Pruning has a strong theoretical basis. By adding constraints to limit the number of convolutional kernels in the original UNET network, the number of channels between neural layers in the network model is reduced, thereby reducing the size of the network model. This results in faster convergence during the pruning training process, allowing the pruned model to quickly obtain the required lightweight model under certain pruning rates and segmentation performance indicators.
[0074] (3) The laser real-time weld seam tracking method of the present invention deploys a lightweight network model on an embedded industrial control computer, which can maintain good noise segmentation performance, meet the welding accuracy requirements, and realize laser real-time weld seam tracking.
[0075] (4) The laser real-time weld seam tracking system of the present invention has a high degree of automation and improves welding production efficiency.
[0076] (5) The network model segmentation performance verification method of the present invention can perform actual segmentation performance verification for the construction effect of lightweight network model, and can also perform accuracy verification for the actual welding effect of real-time weld seam tracking based on lightweight network model, which has a high theoretical reference basis. Attached Figure Description
[0077] Figure 1This is a schematic diagram of the overall structure of a laser real-time weld seam tracking system according to the present invention;
[0078] Figure 2 This is a schematic diagram of the structure of the laser vision sensor in the laser real-time weld seam tracking system of the present invention;
[0079] Figure 3 This is a flowchart illustrating a lightweight network model method based on ADMM according to the present invention.
[0080] In the diagram: 1- Matching welding equipment; 2- Control cabinet; 3- Embedded industrial computer; 4- Welding robot; 5- Supporting pad; 7- Welding torch; 9- Laser vision sensor; 10- Workbench; 91- Partition; 92- Industrial camera; 93- Sensor housing; 94- Laser generator. Detailed Implementation
[0081] The present invention will be further described in detail below with reference to the embodiments and accompanying drawings, but the embodiments of the present invention are not limited thereto.
[0082] Example 1
[0083] like Figure 3 The diagram shows a flowchart of a lightweight network model method based on ADMM, including the following steps:
[0084] S1. The UNET network model is trained using a dataset of pre-collected noisy and noiseless weld seam images to obtain the trained network model.
[0085] S2. Use the ADMM algorithm to perform structured pruning on the trained network model to obtain a lightweight network model.
[0086] Specifically, a training sample set is formed using image datasets with and without welding noise. The UNET network model is then trained and tested. The lightweight model's cropping rate and image segmentation performance are considered simultaneously, aiming to improve the cropping rate while maintaining good noise segmentation performance in theoretical simulations. The cropping rate is a hyperparameter that needs continuous adjustment based on experience; the segmentation performance is evaluated using common segmentation model performance metrics such as Intersection over Union (IOU), Mean Pixel Accuracy (MPA), and Recall.
[0087] The lightweight method of this invention uses the ADMM algorithm to achieve a high reduction rate of structural weight redundancy in the UNET network model, effectively removing redundant parameters of the model, reducing the size of the network model to obtain a lightweight model, and improving the inference speed of the model.
[0088] Step S2 specifically includes:
[0089] S21. Calculate the cross-entropy between the weld seam image output by the trained network model and the real noise-free weld seam image. ( Write the objective function into the objective optimization function and add a regularization term to construct the objective function of the lightweight network model, as follows:
[0090] Equation (1),
[0091] in, For the first An image of a noisy weld. For the first A noise-free weld image. These are the weight parameters for all layers of the network model. Let t be the 0-1 vectors of all layers in the network model, and t be the total number of images used for training. ( () is a mapping function that maps a noisy weld image to a noise-free weld image as input. ( )for and The loss function between them, namely the cross-entropy function. For the network model Layer weight parameters, This is the penalty factor for the regularization term;
[0092] S22. By introducing 0-1 vectors corresponding to the number of convolution kernels in the UNET network model. Furthermore, 0 in this vector represents kernel pruning, and 1 represents kernel retention. Different positions of 0-1 represent different convolutional kernels in the original network. The structured pruning problem of convolutional kernels for each layer of the UNET network model is transformed into an integer programming problem. The constraints of the objective function are then expressed as follows:
[0093]
[0094] in, For the lightweight network model The number of neurons retained in the layer. For the network model The 0-1 vector of the layer, The first part of the network model before pruning The total number of neurons in the layer, where N represents a natural number;
[0095] S23. The structured pruning problem of the UNET network model is transformed into an optimization problem of the objective function, which is expressed as follows:
[0096] Equation (2),
[0097]
[0098] S24. Replace step S22 with the intersection of the inequality constraints and the l2 spherical equality constraints. binary constraints , It is expressed as follows:
[0099]
[0100] Correspondingly, the optimization objective function in step S23 is changed to:
[0101] Equation (3),
[0102]
[0103] Among them, the constraint set , They are respectively:
[0104]
[0105] S25. Introducing indicator functions Reconstruct and optimize the objective function:
[0106] Define indicator functions respectively :
[0107] , Equation (4),
[0108] , Equation (5),
[0109] Introducing auxiliary variables Then the optimization objective function in step S24 is updated as follows:
[0110] Equation (6),
[0111]
[0112] S26. By introducing dual variables , and penalty parameters The objective function of step S25 is changed to the augmented Lagrangian function, as shown below:
[0113]
[0114]
[0115]
[0116] Equation (7),
[0117] According to the augmented Lagrange method, equation (7) is decomposed into the following four subproblems and solved iteratively in sequence:
[0118] Equation (8)
[0119] Equation (9)
[0120] Equation (10)
[0121] Equation (11).
[0122] Among them, the penalty parameter Dual variables The iterative update is as follows:
[0123]
[0124]
[0125] For the two subproblems corresponding to equations (8) and (9), the stochastic gradient descent method is used for solution. For the subproblem corresponding to equation (10), the QP solver is used for global solution. For the subproblem corresponding to equation (11), the vector projection L2 space is used for solution. When the difference between the calculated actual clipping rate and the set theoretical clipping rate is within the error range of 0.1%, the ADMM iteration process is completed, and the lightweight clipping is completed.
[0126] Specifically, the ADMM-based sparsity pruning method theoretically solves the aforementioned lightweight model. ADMM refers to the equivalent transformation of the mathematical optimization problem established by pruning the UNET network model through variable decomposition and other methods, using the Lagrange alternating direction multiplier method. The ADMM solution process is also the parameter sparsification process, where the indicator parameters corresponding to the convolution kernels during training... Continuously train to approach the value of 0 to varying degrees. The vector elements contain only 0-1, where 0 indicates clipping and 1 indicates retention. This represents an "instruction" for the clipping action, i.e., a process of distinguishing the "unimportance" of neural layer structural channels corresponding to the convolution kernel; the result of sparsification is... The values represent the results, starting with all values of 1 and then varying to indicate the importance of different neurons. Most importantly, providing the pruning rate allows for accurate... The threshold distinguishes between the two intervals: the one to be cropped and the one to be retained. It is calculated based on the set structured cropping rate. The threshold for value clipping, i.e., the threshold for the variable indicating clipping. The final values of the training iterations are sorted to obtain the threshold for pruning. Values less than the threshold are then pruned. A value of 0 indicates theoretical pruning of the labeled convolutional kernel; values greater than the threshold are excluded. A value of 1 indicates that the labeled convolutional kernel is theoretically preserved, and the network model will also be binarized. The value is used to calculate the actual clipping rate and compare it with the set theoretical clipping rate. If the difference between the two is within the 0.1% error range, then sparsification is successful and lightweight clipping is completed.
[0127] The present invention provides a lightweight network model method based on ADMM, which has a high theoretical basis for realizing model pruning. By adding constraints to limit the number of convolutional kernels in the original UNET network, the number of channels between neural layers in the network model is reduced, thereby reducing the size of the network model. This results in faster convergence during the pruning training process, enabling the pruned model to obtain the required lightweight model at a faster speed under certain pruning rates and segmentation performance indicators.
[0128] In step S26, the subproblem corresponding to equation (11) is solved by vector projection into L2 space, and the specific formula is as follows:
[0129] Wherein, P( ) is the projection vector.
[0130] Example 2
[0131] A laser real-time weld seam tracking method includes the following steps:
[0132] S01. The lightweight network model obtained based on the ADMM-based network model lightweighting method described in Example 1 is ported to the embedded industrial control computer 3.
[0133] S02. Before welding begins, the industrial camera in the laser vision sensor 9 first acquires the weld seam image and sends it to the embedded industrial control computer 3. The embedded industrial control computer 3 initializes the weld seam image by calling the library function of the Halcon software to obtain the pixel coordinate values of the initial weld seam feature points. These initial weld seam feature points serve as the initial targets of the efficient convolution operation filter tracking algorithm.
[0134] S03. Using a robot calibration algorithm, the pixel coordinates of the initial weld feature points are converted into two-dimensional coordinates in the welding robot coordinate system, and these two-dimensional coordinates are sent to the control cabinet 2.
[0135] S04. After welding begins, the industrial camera of the laser vision sensor 9 continuously acquires noisy weld seam images at a sampling frequency of 60 fps and sends them to the embedded industrial control computer 3. The lightweight network model extracts features from the noisy weld seam images to obtain three-line laser stripe feature images. Then, the three-line laser stripe feature images are processed by an efficient convolution operation filter tracking algorithm to obtain the pixel coordinate values of the weld seam feature points.
[0136] S05. Using a robot calibration algorithm, the pixel coordinates of the weld feature points are converted into two-dimensional coordinates of the weld feature points in the robot coordinate system, and these two-dimensional coordinates are sent to the control cabinet 2.
[0137] S06, the control cabinet 2 outputs control signals to the welding robot 4, causing the welding wire at the end of the welding torch 7 to move along the weld seam of the workpiece to be welded, thus completing the real-time automatic tracking of the weld seam tracking system.
[0138] Specifically, the laser real-time weld seam tracking method of the present invention deploys a lightweight network model on an embedded industrial control computer, which can maintain good noise segmentation performance, meet welding accuracy requirements, and realize laser real-time weld seam tracking.
[0139] Example 3
[0140] like Figures 2-3As shown, a laser real-time weld seam tracking system includes a welding robot 4, a welding torch 7, a laser vision sensor 9, a worktable 10, a supporting welding equipment 1, and a control cabinet 2. It also includes an embedded industrial computer 3, which embeds a lightweight network model obtained based on the ADMM-based lightweight network model simplification method described in Embodiment 1. The worktable 10 is equipped with G-type clamps, and the workpiece to be welded is placed on a support pad 5 and clamped and positioned by two or more G-type clamps. By adjusting the tilt angle of the support pad 5, the workpiece to be welded can have different postures. The laser vision sensor 9 is mounted on the welding torch 7, which is mounted at the end of the welding robot 4. The supporting welding equipment 1 provides energy and materials to the welding torch 7. The welding equipment includes a welding machine and a protective gas cylinder. The welding machine is a Yaskawa MOTOWELD-RD350, used for wire feeding and retraction of the welding robot. The protective gas cylinder contains CO2 (20%) and N2 (80%). The vision laser sensor 9 is connected to the embedded industrial computer 3 via an Ethernet cable. After acquiring the weld seam image, the laser vision sensor 9 sends the image to the embedded industrial computer 3. The embedded industrial computer 3 is connected to the control cabinet 2 via an Ethernet cable. The embedded industrial computer 3 extracts the weld seam feature points and predicted positions based on the image and transmits the predicted positions to the control cabinet 2. The control cabinet 2 outputs signals to control the movement trajectory of the welding torch 7, realizing automatic tracking of the weld seam of the workpiece to be welded on the worktable 10.
[0141] The laser vision sensor 9 includes a partition 91, an industrial camera 92, a sensor housing 93, and a laser generator 94. The industrial camera 92 and the laser generator 94 are fixed inside the sensor housing 93. The laser generator 94 is connected to the sensor housing 93 by bolts and nuts. The laser generator 94 and the industrial camera 92 form a 30° angle. The partition 91 is fixed inside the sensor housing 93 and is located at the front end of the industrial camera 92 and the laser generator 94.
[0142] Specifically, the present invention provides a laser real-time weld seam tracking system with a high degree of automation, which can improve welding production efficiency.
[0143] Example 4
[0144] A method for verifying the segmentation performance of a network model includes the following steps:
[0145] S001. Before welding begins, an offline teaching experiment is conducted on the workpiece to be welded using an embedded industrial control computer 3 to obtain the two-dimensional coordinate values of the noiseless welding trajectory in the robot coordinate system. T represents a noise-free welding trajectory sequence. The first of the welding trajectory sequence One welding point;
[0146] S002. The lightweight network model obtained based on the ADMM-based network model lightweighting method described in Example 1 is ported to the embedded industrial control computer 3.
[0147] S003. After welding begins, the industrial camera of the laser vision sensor 9 continuously acquires noisy weld seam images at a sampling frequency of 60 fps and sends them to the embedded industrial control computer 3. The lightweight network model extracts features from the noisy weld seam images to obtain three-line laser stripe feature images. Then, the three-line laser stripe feature images are processed by an efficient convolution operation filter tracking algorithm to obtain the pixel coordinate values of the weld seam feature points.
[0148] S004. Using a robot calibration algorithm, convert the pixel coordinates of the weld feature points into two-dimensional coordinates of the weld feature points in the robot coordinate system. R represents the welding trajectory sequence of weld feature points. The first of the welding trajectory sequence One welding point;
[0149] S005. Based on the two-dimensional coordinate values from step S001 and the two-dimensional coordinate values of step S004 Calculate the Euclidean distance between the weld points corresponding to the T and R sequences:
[0150]
[0151] European distance The smaller the value, the better the segmentation performance of the lightweight network model can be verified.
[0152] Specifically, by setting the clipping rate, different Euclidean distances can be obtained. Furthermore, the overall variation curves of the welding trajectories formed by fitting several welding points in two different welding processes can be plotted separately, observing the error deviation from the true T welding sequence in the overall welding process represented by the R sequence obtained from the lightweight network model. The Euclidean distance can be used to verify the segmentation performance of the lightweight network model, and also to verify the accuracy of the actual welding effect of real-time weld seam tracking based on the lightweight network model, providing a high level of theoretical reference.
[0153] The above embodiments are preferred embodiments of the present invention and are not intended to limit the present invention. Any changes or other equivalent substitutions made without departing from the technical solution of the present invention are included within the protection scope of the present invention.
Claims
1. A method for verifying the segmentation performance of a network model, characterized in that, Includes the following steps: S001. Before welding begins, an offline teaching experiment is conducted on the workpiece to be welded using an embedded industrial control computer (3) to obtain the two-dimensional coordinate values of the noiseless welding trajectory in the robot coordinate system. T represents a noise-free welding trajectory sequence. The first of the welding trajectory sequence One welding point; S002, Port the lightweight network model obtained by the ADMM-based network model lightweighting method to an embedded industrial control computer (3); This ADMM-based network model lightweighting method includes the following steps: S1. The UNET network model is trained using a dataset of pre-collected noisy and noiseless weld seam images to obtain the trained network model. S2. Use the ADMM algorithm to perform structured pruning on the trained network model to obtain a lightweight network model; S003. After welding begins, the industrial camera of the laser vision sensor (9) continuously acquires noisy weld images at a sampling frequency of 60 fps and sends them to the embedded industrial control computer (3). The lightweight network model extracts features from the noisy weld images to obtain three-line laser stripe feature images. Then, the three-line laser stripe feature images are processed by the efficient convolution operation filter tracking algorithm to obtain the pixel coordinate values of the weld feature points. S004. Using a robot calibration algorithm, convert the pixel coordinates of the weld feature points into two-dimensional coordinates of the weld feature points in the robot coordinate system. R represents the welding trajectory sequence of weld feature points. The first of the welding trajectory sequence One welding point; S005. Based on the two-dimensional coordinate values from step S001 and the two-dimensional coordinate values of step S004 Calculate the Euclidean distance between the weld points corresponding to the T and R sequences: European distance The smaller the value, the better the segmentation performance of the lightweight network model can be verified.
2. The network model segmentation performance verification method according to claim 1, characterized in that, Step S2 specifically includes: S21. Calculate the cross-entropy between the weld seam image output by the trained network model and the real noise-free weld seam image. ( Write the objective function into the objective optimization function and add a regularization term to construct the objective function of the lightweight network model, as follows: Equation (1), in, For the first An image of a noisy weld. For the first A noise-free weld image. These are the weight parameters for all layers of the network model. Let t be the 0-1 vectors of all layers in the network model, and t be the total number of images used for training. ( () is a mapping function that maps a noisy weld image to a noise-free weld image as input. ( )for and The loss function between For the network model Layer weight parameters, This is the penalty factor for the regularization term; S22. By introducing 0-1 vectors corresponding to the number of convolution kernels in the UNET network model. Furthermore, 0 in this vector represents kernel pruning, and 1 represents kernel retention. The structured pruning problem of convolution kernels for each layer of the UNET network model is transformed into an integer programming problem. The constraints of the objective function are then expressed as follows: in, For the lightweight network model The number of neurons retained in the layer. For the network model The 0-1 vector of the layer, The first part of the network model before pruning The total number of neurons in the layer, where N represents a natural number; S23. The structured pruning problem of the UNET network model is transformed into an optimization problem of the objective function, which is expressed as follows: Equation (2), S24. Replace step S22 with the intersection of the inequality constraints and the l2 spherical equality constraints. binary constraints , It is expressed as follows: Correspondingly, the optimization objective function in step S23 is changed to: Equation (3), Among them, the constraint set , They are respectively: S25. Introducing indicator functions Reconstruct and optimize the objective function: Define indicator functions respectively : , Equation (4), , Equation (5), Introducing auxiliary variables Then the optimization objective function in step S24 is updated as follows: Equation (6), S26. By introducing dual variables , and penalty parameters The objective function of step S25 is changed to the augmented Lagrangian function, as shown below: Equation (7), According to the augmented Lagrange method, equation (7) is decomposed into the following four subproblems and solved iteratively in sequence: Equation (8) Equation (9) Equation (10) Equation (11). Among them, the penalty parameter Dual variables The iterative update is as follows: For the two subproblems corresponding to equations (8) and (9), the stochastic gradient descent method is used to solve them. For the subproblem corresponding to equation (10), the QP solver is used for global solution. For the subproblem corresponding to equation (11), the vector projection L2 space is used for solution. When the difference between the calculated actual clipping rate and the set theoretical clipping rate is within the error range of 0.1%, the ADMM iteration process is completed and the lightweight clipping is completed.
3. The method for verifying the performance of network model segmentation according to claim 2, characterized in that, In step S26, the subproblem corresponding to equation (11) is solved by vector projection into L2 space, and the specific formula is as follows: Wherein, P( ) is the projection vector.
4. A laser real-time weld seam tracking method, characterized in that, Includes the following steps: S01. The lightweight network model obtained based on the network model segmentation performance verification method according to any one of claims 1-3 is ported to an embedded industrial control computer (3). S02. Before welding begins, the industrial camera in the laser vision sensor (9) first acquires the weld seam image and sends it to the embedded industrial control computer (3). The embedded industrial control computer (3) initializes the weld seam image by calling the library function of the Halcon software to obtain the pixel coordinate values of the initial weld seam feature points. These initial weld seam feature points serve as the initial target of the efficient convolution operation filter tracking algorithm. S03. Using the robot calibration algorithm, the pixel coordinate values of the initial weld feature points are converted into two-dimensional coordinate values in the welding robot coordinate system, and these two-dimensional coordinate values are sent to the control cabinet (2). S04. After welding begins, the industrial camera of the laser vision sensor (9) continuously acquires noisy weld images at a sampling frequency of 60 fps and sends them to the embedded industrial control computer (3). The lightweight network model extracts features from the noisy weld images to obtain three-line laser stripe feature images. Then, the three-line laser stripe feature images are processed by the efficient convolution operation filter tracking algorithm to obtain the pixel coordinate values of the weld feature points. S05. Using a robot calibration algorithm, the pixel coordinates of the weld feature points are converted into two-dimensional coordinates of the weld feature points in the robot coordinate system, and these two-dimensional coordinates are sent to the control cabinet (2). S06. The control cabinet (2) outputs control signals to the welding robot (4), causing the welding wire at the end of the welding gun (7) to move along the weld seam of the workpiece to be welded, thus completing the real-time automatic tracking of the weld seam tracking system.
5. A laser real-time weld seam tracking system, comprising a welding robot (4), a welding torch (7), a laser vision sensor (9), a worktable (10), supporting welding equipment (1), and a control cabinet (2), characterized in that, It also includes an embedded industrial computer (3), which embeds a lightweight network model obtained based on a network model segmentation performance verification method according to any one of claims 1-3; the laser vision sensor (9) is installed on the welding torch (7), the welding torch (7) is installed at the end of the welding robot (4), the matching welding equipment (1) provides energy and materials to the welding torch (7), the laser vision sensor (9) acquires the weld seam image and sends the image to the embedded industrial computer (3), the embedded industrial computer (3) extracts the weld seam feature points and predicted positions according to the image, and transmits the predicted positions to the control cabinet (2), the control cabinet (2) outputs signals to control the movement trajectory of the welding torch (7) to realize automatic tracking of the weld seam of the workpiece to be welded on the workbench (10).
6. A laser real-time weld seam tracking system according to claim 5, characterized in that, The laser vision sensor (9) includes a partition (91), an industrial camera (92), a sensor housing (93), and a laser generator (94). The industrial camera (92) and the laser generator (94) are fixed inside the sensor housing (93). The laser generator (94) is connected to the sensor housing (93) by bolts and nuts. The partition (91) is fixed inside the sensor housing (93) and located at the front end of the industrial camera (92) and the laser generator (94).
Citation Information
Patent Citations
Efficient deep convolutional neural network pruning method
CN113610227A
Structured light weld curve recognition and fitting method based on deep learning
CN114155372A