A deep learning model optimization method for weld seam target detection, a weld seam target detection method and system based on the optimized deep learning model
By optimizing the deep learning model using the ADMM algorithm, the problem of excessive hardware resource consumption on the microcontroller was solved, enabling high-precision weld seam tracking and low-cost welding, thereby improving welding production efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SOUTH CHINA UNIV OF TECH
- Filing Date
- 2023-06-19
- Publication Date
- 2026-07-03
AI Technical Summary
Existing deep learning models face problems of excessive hardware resource consumption and accuracy degradation when deployed on microcontrollers, resulting in high welding production costs and poor real-time performance.
The ADMM algorithm is used for joint weight pruning and quantization, and the deep learning model is optimized by combining L1 regularization method to reduce the number of model parameters and maintain high accuracy. The model is then deployed on a microcontroller for weld seam target detection.
It effectively reduces hardware resource requirements, improves the real-time performance and automation of weld seam tracking, and reduces welding production costs.
Smart Images

Figure CN116894991B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of weld seam tracking in welding robots. Specifically, it relates to a deep learning model optimization method for weld seam target detection, and a weld seam target detection method and system based on the optimized deep learning model. Background Technology
[0002] With the continuous development of industrial automation, welding robots have been widely used in industrial production and have become the main automated welding equipment. Besides the current dominant "teach-and-playback" mode, the use of welding robots based on deep learning models is also increasing. Compared to welding robots using the "teach-and-playback" mode, welding robots based on deep learning models have the characteristic of real-time control of the welding process, significantly improving welding accuracy even under the influence of various factors such as clamping errors, thermal deformation, and vibration. However, the huge hardware resource consumption of deep learning models leads to higher welding production costs.
[0003] Using microcontrollers as the carrier for deep learning models faces two "hardware limitations": First, due to the limited memory of microcontrollers, the large number of parameters in deep learning models cannot be directly deployed on them. Second, the data type used by deep learning models is 32 bits long, and deploying it directly on a microcontroller without quantization would consume a huge amount of memory. However, if post-quantization is used during deployment, it would lead to a significant degradation in accuracy. Summary of the Invention
[0004] The primary objective of this invention is to overcome the shortcomings and deficiencies of the prior art and provide a deep learning model optimization method for weld seam target detection, thereby solving the problem of excessive hardware resource consumption by existing deep learning algorithms.
[0005] The second objective of this invention is to provide a weld target detection method based on an optimized depth model, thereby improving the real-time performance of weld tracking.
[0006] The third objective of this invention is to provide a weld seam target detection system based on an optimized depth model, which solves the problem of high welding production costs.
[0007] The first objective of this invention is achieved through the following technical solution: a deep learning model optimization method for weld seam target detection, comprising the following steps:
[0008] S1. Initialize the deep learning model using pre-trained weights FP32, and then train it using a pre-collected dataset of weld seam images from the welding process to obtain the trained deep learning model.
[0009] S2. The ADMM algorithm is used to perform joint weight pruning, quantization, and dequantization on the trained deep learning model, and then quantization is performed again to obtain an optimized deep learning model.
[0010] Preferably, step S2 specifically includes:
[0011] S21. The loss function for pruning and quantization of the deep learning model is:
[0012]
[0013] Among them, w i Let b be the set of weights for the i-th layer of the deep learning model. i Let i be the set of biases for the i-th layer of the deep learning model;
[0014] The weight pruning and quantization problems can both be represented by the following optimization objective function:
[0015]
[0016] Among them, w i ∈S i i = 1…N
[0017] For the weight pruning problem: constraint set S i ={Total number of non-zero weights ≤ a i}, a i The expected value of the total number of non-zero weights remaining after training with weight pruning of the i-th layer;
[0018] For quantification problems: constraint set S i = {the quantized value mapped to the weight in the i-th layer}, where the quantized value is an integer centered at 0;
[0019] For the joint problem of weight pruning and quantization, the constraints of the above two constraint sets must be satisfied simultaneously.
[0020] S22. Introduce an indicator function to reconstruct the optimization objective function for weight pruning and quantization:
[0021] Define indicator function g i (w i )for:
[0022]
[0023] Merging auxiliary variables z i Then the objective function for weight pruning and quantization is updated as follows:
[0024]
[0025] Where z i =wi , i = 1…N;
[0026] S23. According to the augmented Lagrange method, formula (4) is decomposed into two subproblems:
[0027] First sub-problem:
[0028]
[0029] in, For the dual variable that is updated in each iteration, ρ i ρ is the regularization penalty parameter. i =e -2 ;
[0030] The second sub-problem:
[0031]
[0032] The analytical solution to the second subproblem is in, for In constraint set S i European-style projection on the screen;
[0033] The first subproblem is solved using gradient descent; the second subproblem is solved using L1 regularization and quantization-aware training.
[0034] S24. After iteratively solving the two sub-problems to achieve the desired accuracy, the model trained in step S23 is quantized again to obtain the optimized deep learning model.
[0035] Preferably, in step S23, when iteratively solving the second sub-problem, weights less than the constraint threshold Δ are set to 0, and the remaining non-zero weights are quantized and dequantized. The constraint threshold is... Where α is the weight of l1 regularization, ρ i The regularization penalty parameter is defined, and the specific steps include:
[0036] S231. Perform weight pruning on the deep learning model using L1 regularization:
[0037] For variable z i The formula for solving this problem is:
[0038]
[0039] in The weight for l1 regularization is α = 5e -4 ;
[0040] S232. Use the symmetric quantization method in quantization-aware training QAT to sequentially quantize and dequantize the deep learning model, as shown in the following formula:
[0041]
[0042] in, w-bits = 8 is the number of bits used for weight quantization.
[0043] Preferably, in step S24, the desired accuracy specifically means that the distance error between the predicted feature point coordinates and the manually labeled feature point coordinates is less than 6 pixels.
[0044] Preferably, in step S24, the quantification formula is:
[0045]
[0046] in, w-bits = 8 is the number of bits used for weight quantization.
[0047] The second objective of this invention is achieved through the following technical solution: a weld seam target detection method based on an optimized deep learning model, comprising the following steps:
[0048] S01. The optimized deep learning model, which is based on a deep learning model optimization method for weld seam target detection, is ported to the microcontroller.
[0049] S02. The microcontroller initializes the weld image acquired before welding begins, obtains the initial pixel coordinates of the weld feature points, transforms the initial pixel coordinate values into three-dimensional coordinate values in the welding robot base coordinate system, and obtains the starting position of the weld.
[0050] S03. The microcontroller initializes the weld seam image acquired after welding begins. The optimized deep learning model extracts features from the initialized weld seam image. Based on the image after feature extraction, it predicts weld seam feature points, obtains the pixel coordinate values of the weld seam feature points, and converts them into three-dimensional coordinate values in the base coordinate system of the welding robot to obtain the calculated position of the weld seam.
[0051] S04. The difference between the calculated position and the robot's current position coordinates is obtained to obtain the deviation value, which is transmitted to the control cabinet in real time for processing. The control cabinet transmits control signals to the welding robot to control the welding torch to move along the weld seam of the workpiece and complete the automatic tracking of the weld seam.
[0052] Preferably, step S02 specifically includes the following steps:
[0053] S021. Before welding begins, an industrial camera captures weld seam images and sends them to a microcontroller. The microcontroller initializes the images and performs detection and localization by calling library functions of the Halcon software to obtain the initial pixel coordinates of the weld seam feature points. The initial weld seam feature points are then used as the initial targets of the weld seam target detection model.
[0054] S022. Through calibration algorithm, the pixel coordinate values of the initial weld feature points are converted into three-dimensional spatial coordinate values in the base coordinate system of the welding robot.
[0055] Preferably, step S03 specifically includes the following steps:
[0056] S031. After welding begins, the industrial camera continuously acquires weld seam images at a sampling frequency of 20kHz and sends them to the microcontroller for image preprocessing. The images are then fed into an optimized deep learning model for feature extraction, resulting in six feature images with scales of 38*38, 19*19, 10*10, 5*5, 3*3, and 1*1. Convolution operations are then performed on the six feature images, and the center coordinates of the final target candidate box are the predicted pixel coordinates of the weld seam feature points.
[0057] S032. Through a calibration algorithm, the pixel coordinate values of the predicted weld feature points are converted into three-dimensional coordinate values in the welding robot base coordinate system.
[0058] The third objective of this invention is achieved through the following technical solution: a weld seam target detection system based on an optimized deep learning model, comprising a laser vision sensor, a welding robot, supporting welding equipment, a workpiece clamping workbench, a control cabinet, and a welding torch, further comprising: a microcontroller, which embeds an optimized deep learning model optimized based on a deep learning model optimization method for weld seam target detection; the laser vision sensor is mounted on the welding torch, the welding torch is mounted on the end effector of the welding robot, the supporting welding equipment provides energy and materials to the welding torch, the laser vision sensor acquires a weld seam image and sends the image to the microcontroller, the microcontroller 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 a signal to control the movement trajectory of the welding torch, thereby realizing automatic tracking of the weld seam of the workpiece to be welded on the workpiece clamping workbench;
[0059] Preferably, the laser vision sensor includes a sensor housing, an industrial camera, and a laser generator, wherein the industrial camera and the laser generator are fixed inside the sensor housing.
[0060] The present invention has the following advantages and effects compared with the prior art:
[0061] (1) The present invention provides a deep learning model optimization method for weld seam target detection. It uses a multi-objective joint optimization algorithm based on the ADMM algorithm to simultaneously prune and quantize the perception training of the deep learning model. This can minimize the number of model parameters and further reduce the requirements of the deep learning model on hardware memory and computing performance, thus solving the problem of excessive consumption of hardware resources by existing deep learning algorithms.
[0062] (2) The present invention provides a deep learning model optimization method for weld seam target detection. It utilizes the redundancy in the number of weights and bit depth of the deep learning model to perform pruning, quantization and dequantization operations on the weights in one update, so that the model can learn the accuracy degradation caused by pruning and quantization at the same time, thereby improving the training efficiency of the model.
[0063] (3) The present invention provides a deep learning model optimization method for weld seam target detection. The method incorporates l1 regularization into the ADMM algorithm for pruning. The algorithm automatically configures the pruning rate of each layer. Since each layer of the deep learning network has different sensitivities to pruning, under the same overall pruning rate, the optimization efficiency is improved compared with the manual setting of the pruning rate of each layer in the prior art.
[0064] (4) The present invention provides a weld seam target detection method based on an optimized deep learning model. The optimized deep learning model is deployed on a microcontroller, which can maintain high welding accuracy and improve the real-time performance of weld seam tracking.
[0065] (5) The present invention provides a weld target detection method based on an optimized deep learning model. The optimized deep learning model automatically identifies the feature points of the weld. The microcontroller embedded in the deep learning model automatically controls the welding robot to achieve weld target tracking. The method has a high degree of automation and improves production efficiency.
[0066] (6) The present invention provides a weld seam target detection system based on an optimized deep learning model, which uses a microcontroller (STM32H743 development board) as the carrier of the deep learning model, thereby reducing the welding production cost. Attached Figure Description
[0067] Figure 1 This is a schematic diagram of the overall structure of a weld seam target detection system based on an optimized deep learning model according to the present invention.
[0068] Figure 2 This is a schematic diagram of the structure of the laser vision sensor of the present invention;
[0069] Figure 3 This is a flowchart illustrating a weld seam target detection method based on an optimized deep learning model according to the present invention.
[0070] Figure 4These are typical weld images of the present invention;
[0071] In the diagram: 1-Microcontroller; 2-Laser vision sensor; 3-Welding robot; 4-Supporting welding equipment; 5-Workpiece clamping table; 7-Control cabinet; 8-Laser stripe; 9-Weld seam feature point; 10-Welding torch; 21-Sensor housing; 22-Industrial camera; 23-Laser generator. Detailed Implementation
[0072] 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.
[0073] Example 1
[0074] like Figure 1 As shown, a weld seam target detection system based on an optimized deep learning model includes a laser vision sensor 2, a welding robot 3, supporting welding equipment 4, a workpiece clamping table 5, a control cabinet 7, and a welding torch 10. It also includes a microcontroller 1, which embeds an optimized deep learning model based on a deep learning model optimization method for weld seam target detection. The microcontroller uses an STM32H743 development board with a 480MHz Arm Cortex-M7 core, 2MB flash memory, and 1MB RAM. The workpiece clamping table 5 is equipped with G-type clamps, and the workpiece 6 is clamped and positioned by two or more G-type clamps. The laser vision sensor 2 is mounted on the welding torch 10, which is mounted on the end of the welding robot 3 via a welding torch clamping device. The welding robot 3 uses an M... The OTOMAN-MA1440 arc welding robot is equipped with a welding device 4 connected to the control cabinet 7 and the welding torch 10. The control cabinet 7 outputs signals to the welding device 4, which then provides energy and materials to the welding torch 10. The welding device 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%). After acquiring the weld seam image, the laser vision sensor 2 sends the image to the microcontroller 1. The microcontroller 1 extracts the weld seam feature points and predicted positions based on the image and transmits the predicted positions to the control cabinet 7. The control cabinet 7 outputs signals to control the movement trajectory of the welding torch 10, thereby achieving automatic tracking of the weld seam of the workpiece to be welded on the workpiece clamping table 5.
[0075] like Figure 2 As shown, the laser vision sensor 2 includes a sensor housing 21, an industrial camera 22, and a laser generator 23, with the industrial camera 22 and the laser generator 23 fixed inside the sensor housing 21.
[0076] Specifically, the laser generator 23 is connected to the sensor housing 21 by bolts, and the laser generator 23 forms a 30° angle with the industrial camera 22; the industrial camera 22 continuously acquires weld seam images and transmits the image data to the image processing device of the microcontroller 1 in real time through a gigabit industrial Ethernet interface; the laser generator 23 is a three-line laser generator with a wavelength of 645-655nm and a power of 30-35mW, and the three lines of laser are projected onto the weld seam surface to form structured light stripes that characterize the weld seam contour features.
[0077] Compared to existing welding systems that typically use CPUs to run deep learning models, this invention uses a microcontroller (STM32H743 development board) as the carrier of the deep learning model. The overall structure is highly automated and easy to maintain, greatly reducing the production cost of welding.
[0078] Example 2
[0079] A deep learning model optimization method for weld seam target detection includes the following steps:
[0080] S1. The deep learning model to be optimized is the SSD object detection algorithm. The deep learning model is initialized using pre-trained weights FP32, and then trained using a pre-collected dataset of weld seam images from the welding process to obtain the trained deep learning model.
[0081] S2. The ADMM algorithm (Alternating Direction Multiplier Method) is used to perform joint weight pruning, quantization, and dequantization on the trained deep learning model, and then quantized again to obtain an optimized deep learning model.
[0082] Specifically, this invention uses a multi-objective joint optimization algorithm based on the ADMM algorithm to simultaneously perform pruning and quantization-aware training on the deep learning model. This can minimize the number of model parameters, further reducing the hardware memory and computing performance requirements of the deep learning model, and solving the problem of excessive hardware resource consumption in existing deep learning algorithms.
[0083] Step S2 specifically includes:
[0084] S21. The loss function for pruning and quantization of the deep learning model is:
[0085]
[0086] Among them, w i Let b be the set of weights for the i-th layer of the deep learning model. i Let i be the set of biases for the i-th layer of the deep learning model;
[0087] The weight pruning and quantization problems can both be represented by the following optimization objective function:
[0088]
[0089] Among them, w i ∈S i i = 1…N
[0090] For the weight pruning problem: constraint set S i ={Total number of non-zero weights ≤ a i}, a i The expected value of the total number of non-zero weights remaining after training with weight pruning of the i-th layer;
[0091] For quantification problems: constraint set S i = {the quantized value mapped to the weight in the i-th layer}, where the quantized value is an integer centered at 0;
[0092] For the joint problem of weight pruning and quantization, the constraints of the above two constraint sets must be satisfied simultaneously.
[0093] S22. Introduce an indicator function to reconstruct the optimization objective function for weight pruning and quantization:
[0094] Define indicator function g i (w i )for:
[0095]
[0096] Merging auxiliary variables z i Then the objective function for weight pruning and quantization is updated as follows:
[0097]
[0098] Where z i =w i , i = 1…N;
[0099] S23. According to the augmented Lagrange method, formula (4) is decomposed into two subproblems:
[0100] First sub-problem:
[0101]
[0102] in, For the dual variable that is updated in each iteration, ρ i ρ is the regularization penalty parameter. i =e -2 ;
[0103] The second sub-problem:
[0104]
[0105] The analytical solution to the second subproblem is in, for In constraint set S i European-style projection on the screen;
[0106] Since the first subproblem is differentiable, it is solved using gradient descent; for the second subproblem, it is solved using L1 regularization and quantization-aware training.
[0107] S24. After iteratively solving the two sub-problems to achieve the desired accuracy, the model trained in step S23 is quantized again to obtain the optimized deep learning model.
[0108] Specifically, this invention utilizes the redundancy in the number and bit depth of weights in a deep learning model to perform pruning, quantization, and dequantization operations on the weights in a single update. This allows the model to simultaneously learn the accuracy degradation caused by pruning and quantization, thereby improving the model's training efficiency.
[0109] In step S23, when iteratively solving the second sub-problem, weights less than the constraint threshold Δ are set to 0, and the remaining non-zero weights are quantized and dequantized, allowing the model to learn and adapt to the accuracy degradation caused by the quantization process. The constraint threshold is... Where α is the weight of l1 regularization, ρ i The regularization penalty parameter is defined, and the specific steps include:
[0110] S231. Apply L1 regularization to prune the weights of the deep learning model, that is, incorporate the L1 regularization method into the ADMM algorithm to perform weight pruning on the variable z in the weight pruning process. i Update:
[0111] For variable z i The formula for solving this problem is:
[0112]
[0113] in The weight for l1 regularization is α = 5e -4 ;
[0114] Specifically, L1 regularization is incorporated into the ADMM algorithm for pruning. The algorithm automatically configures the pruning rate of each layer. Since each layer of the deep learning network has different sensitivities to pruning, under the same overall pruning rate, the optimization efficiency is improved compared to the manual setting of the pruning rate of each layer in the existing technology.
[0115] S232. Use the symmetric quantization method in quantization-aware training QAT to sequentially quantize and dequantize the deep learning model, as shown in the following formula:
[0116]
[0117] in, w-bits = 8 is the number of bits used for weight quantization; the first and last layers of the model, i.e., the input and output layers, do not require quantization.
[0118] In step S24, the desired accuracy specifically means that the distance error between the predicted feature point coordinates and the manually labeled feature point coordinates is less than 6 pixels.
[0119] In step S24, the quantization formula is:
[0120]
[0121] in, w-bits = 8 is the number of bits used for weight quantization.
[0122] Specifically, after quantization, the optimized deep learning model is obtained. Compared with the original network, the bit size of the optimized deep learning model is reduced from 32 bits to 8 bits. Furthermore, the number of parameters is compressed as much as possible while meeting the accuracy requirements. As a result, the number of parameters in the final model is significantly reduced compared to the original model, thereby reducing the use of hardware resources and improving the inference speed of the model.
[0123] Example 3
[0124] like Figure 3 The diagram shows a flowchart of a weld seam target detection method based on an optimized deep learning model, including the following steps:
[0125] S01. The optimized deep learning model, which is based on a deep learning model optimization method for weld seam target detection, is ported to the microcontroller.
[0126] S02. The microcontroller initializes the weld image acquired before welding begins, obtains the initial pixel coordinates of the weld feature points, transforms the initial pixel coordinate values into three-dimensional coordinate values in the welding robot base coordinate system, and obtains the starting position of the weld.
[0127] S03. The microcontroller initializes the weld seam image acquired after welding begins. The optimized deep learning model extracts features from the initialized weld seam image. Based on the image after feature extraction, it predicts weld seam feature points, obtains the pixel coordinate values of the weld seam feature points, and converts them into three-dimensional coordinate values in the base coordinate system of the welding robot to obtain the calculated position of the weld seam.
[0128] S04. The difference between the calculated position and the robot's current position coordinates is obtained to obtain the deviation value, which is transmitted to the control cabinet in real time for processing. The control cabinet transmits control signals to the welding robot to control the welding torch to move along the weld seam of the workpiece and complete the automatic tracking of the weld seam.
[0129] Step S02 specifically includes the following steps:
[0130] S021. Before welding begins, the industrial camera 22 acquires weld seam images and sends them to the microcontroller 1. The microcontroller 1 initializes the images and performs detection and positioning by calling the library functions of the Halcon software. Specifically, it calls the library functions of the Halcon software to acquire weld seam images and manually marks the first weld seam feature point to obtain the initial pixel coordinates of the weld seam feature point. The initial weld seam feature point is then used as the initial target of the weld seam target detection model.
[0131] S022. Through calibration algorithm, the pixel coordinate values of the initial weld feature points are converted into three-dimensional spatial coordinate values in the three-base coordinate system of the welding robot.
[0132] Step S03 specifically includes the following steps:
[0133] S031. After welding begins, the industrial camera 22 continuously acquires weld seam images at a sampling frequency of 20kHz and sends them to the microcontroller 1 for image preprocessing. The images are then fed into an optimized deep learning model for feature extraction, resulting in six feature images with scales of 38*38, 19*19, 10*10, 5*5, 3*3, and 1*1. Convolution operations are then performed on the six feature images, and the feature images of different scales are fed into different convolutional layers for feature point prediction. The center coordinates of the final target candidate box are the pixel coordinates of the predicted weld seam feature points.
[0134] S032. Through a calibration algorithm, the pixel coordinate values of the predicted weld feature points are converted into three-dimensional coordinate values in the welding robot base coordinate system.
[0135] Specifically, this invention optimizes the deep learning model and deploys it on a microcontroller, which can maintain high welding accuracy and improve the real-time performance of weld seam tracking; the optimized deep learning model automatically identifies the feature points of the weld seam, and the microcontroller automatically controls the welding robot to achieve weld seam target tracking, resulting in a high degree of automation and improved production efficiency.
[0136] 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 deep learning model optimization method for weld target detection, characterized in that, Includes the following steps: S1. Initialize the deep learning model using pre-trained weights FP32, and then train it using a pre-collected dataset of weld seam images from the welding process to obtain the trained deep learning model. S2. The ADMM algorithm is used to perform joint weight pruning, quantization and dequantization on the trained deep learning model, and then quantization is performed again to obtain an optimized deep learning model. Step S2 specifically includes: S21. The loss function for pruning and quantization of the deep learning model is: Equation (1) in, For the deep learning model The weight set of the layer, For the deep learning model The bias set of the layer; The weight pruning and quantization problems can both be represented by the following optimization objective function: in , For the weight pruning problem: constraint set ={ }, For the first The expected value of the total number of remaining non-zero weights after layer weight pruning training; For quantification problems: constraint set ={No. The weights in the layer are mapped to quantized values, where the quantized values are integers centered at 0; For the joint problem of weight pruning and quantization, the constraints of the above two constraint sets must be satisfied simultaneously. S22. Introduce an indicator function to reconstruct the optimization objective function for weight pruning and quantization: definition : Equation (3) merge Then the objective function for weight pruning and quantization is updated as follows: ; S23. According to the augmented Lagrange method, formula (4) is decomposed into two subproblems: First sub-problem: in, For the dual variable that is updated in each iteration, ; For regularization penalty parameters, ; The second sub-problem: The analytical solution to the second subproblem is ,in, for In the constraint set European-style projection on the screen; The first subproblem is solved using gradient descent; the second subproblem is solved using... Regularization methods and quantization-based training solutions; S24. After iteratively solving the two sub-problems to achieve the desired accuracy, the model trained in step S23 is quantized again to obtain the optimized deep learning model. In step S23, when iteratively solving the second sub-problem, the value will be less than the constraint threshold. The weights are set to 0, and the remaining non-zero weights are quantized and dequantized. The constraint threshold is... ,in for Regularized weights, The regularization penalty parameter is defined, and the specific steps include: S231, Use Regularization is used to prune the weights of the deep learning model: For variables The formula for solving this problem is: in , Regularized weights ; S232. Use the symmetric quantization method in quantization-aware training QAT to sequentially quantize and dequantize the deep learning model, as shown in the following formula: in, , , The number of bits used to quantize the weights.
2. The deep learning model optimization method for weld seam target detection according to claim 1, characterized in that, In step S24, the desired accuracy specifically means that the distance error between the predicted feature point coordinates and the manually labeled feature point coordinates is less than 6 pixels.
3. The deep learning model optimization method for weld seam target detection according to claim 2, characterized in that, In step S24, the quantization formula is: in, , , The number of bits used to quantize the weights.
4. A weld seam target detection method based on an optimized deep learning model, characterized in that, Includes the following steps: S01. The optimized deep learning model, which is optimized based on the deep learning model optimization method for weld target detection according to any one of claims 1-3, is ported to the microcontroller. S02. The microcontroller initializes the weld image acquired before welding begins, obtains the initial pixel coordinates of the weld feature points, transforms the initial pixel coordinate values into three-dimensional coordinate values in the welding robot base coordinate system, and obtains the starting position of the weld. S03. The microcontroller initializes the weld seam image acquired after welding begins. The optimized deep learning model extracts features from the initialized weld seam image. Based on the image after feature extraction, it predicts weld seam feature points, obtains the pixel coordinate values of the weld seam feature points, and converts them into three-dimensional coordinate values in the base coordinate system of the welding robot to obtain the calculated position of the weld seam. S04. The difference between the calculated position and the robot's current position coordinates is obtained to obtain the deviation value, which is transmitted to the control cabinet in real time. The control cabinet transmits control signals to the welding robot to control the welding torch to move along the weld seam of the workpiece and complete the automatic tracking of the weld seam.
5. The weld seam target detection method based on an optimized deep learning model according to claim 4, characterized in that, Step S02 specifically includes the following steps: S021. Before welding begins, the weld seam image is acquired by an industrial camera (22) and sent to the microcontroller (1). The microcontroller (1) initializes the image and performs detection and positioning by calling the library function of Halcon software to obtain the initial pixel coordinates of the weld seam feature points. The initial weld seam feature points are used as the initial target of the weld seam target detection model. S022. Through calibration algorithm, the pixel coordinate values of the initial weld feature points are converted into three-dimensional spatial coordinate values in the base coordinate system of the welding robot (3).
6. The weld seam target detection method based on an optimized deep learning model according to claim 4, characterized in that, Step S03 specifically includes the following steps: S031. After welding begins, the industrial camera (22) continuously acquires weld seam images at a sampling frequency of 20kHz and sends them to the microcontroller (1) for image preprocessing. The images are then fed into an optimized deep learning model for feature extraction, resulting in six feature images with scales of 38*38, 19*19, 10*10, 5*5, 3*3, and 1*1. Convolution operations are then performed on the six feature images, and the center coordinates of the target candidate box are the predicted pixel coordinates of the weld seam feature points. S032. Through a calibration algorithm, the pixel coordinate values of the predicted weld feature points are converted into three-dimensional coordinate values in the welding robot base coordinate system.
7. A weld seam target detection system based on an optimized deep learning model, comprising a laser vision sensor (2), a welding robot (3), supporting welding equipment (4), a workpiece clamping worktable (5), a control cabinet (7), and a welding torch (10), characterized in that, It also includes: a microcontroller (1), which embeds an optimized deep learning model based on the deep learning model optimization method for weld seam target detection as described in any one of claims 1-5; the laser vision sensor (2) is installed on the welding torch (10), the welding torch (10) is installed at the end of the welding robot (3), the matching welding equipment (4) provides energy and materials to the welding torch (10), the laser vision sensor (2) acquires the weld seam image and sends the image to the microcontroller (1), the microcontroller (1) extracts the weld seam feature points and predicted positions according to the image, and transmits the predicted positions to the control cabinet (7), the control cabinet outputs a signal to control the movement trajectory of the welding torch (10), and realizes automatic tracking of the weld seam of the workpiece to be welded on the workpiece clamping worktable (5).
8. The weld seam target detection system based on an optimized deep learning model according to claim 7, characterized in that, The laser vision sensor (2) includes a sensor housing (21), an industrial camera (22), and a laser generator (23), wherein the industrial camera (22) and the laser generator (23) are fixed inside the sensor housing (21).