Image-based robot welding positioning method and system thereof

By using an image-based robot welding positioning method, the position of the welding target is calculated using a target detection neural network model, which solves the problem of automatic positioning of welding robots and realizes automated and real-time positioning of welding robots.

CN122473433APending Publication Date: 2026-07-28JIANGSU SUFENG LOCOMOTIVE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
JIANGSU SUFENG LOCOMOTIVE CO LTD
Filing Date
2026-05-12
Publication Date
2026-07-28

AI Technical Summary

Technical Problem

Existing welding robots rely on manual setting of the welding target position, which cannot achieve automatic positioning and makes it difficult to form a true welding robot automation solution.

Method used

An image-based robot welding positioning method is adopted, which acquires workpiece images through an image acquisition device on the welding robot, and uses a trained target detection neural network model to calculate the position detection box of the welding target and generate the positioning position of the welding target.

Benefits of technology

Automatic positioning of welding robots has been achieved. Real-time positioning is achieved by using an improved target detection neural network model structure. The calculation process is simple and the number of parameters is small.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122473433A_ABST
    Figure CN122473433A_ABST
Patent Text Reader

Abstract

The application discloses a kind of robot welding positioning method and system based on image, comprising: step 1: by the image acquisition device installed on welding robot, the image of current workpiece is obtained, and workpiece image is generated, wherein, workpiece image is RGB color space image;Step 2: workpiece image is input into the target detection neural network model completed training, and the position detection frame of current welding target in workpiece image is obtained by calculation by target detection neural network model;Step 3: according to the position detection frame of current welding target in workpiece image, the positioning position of current welding target is generated, and the positioning position of welding target is generated using the method of computer vision in the present application, so that welding robot can be positioned to the position of welding target automatically.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of robot control computing, and specifically to an image-based robot welding positioning method and system. Background Technology

[0002] Welding technology plays a crucial role in the manufacturing industry, from parts production to aerospace and military applications. With the rapid development of manufacturing and technological evolution, higher requirements have been placed on welding quality and speed. As a result, robotic welding technology has emerged. Compared with manual welding, robotic welding has a higher degree of standardization, larger output, and can replace welders in welding operations in dangerous environments.

[0003] However, existing welding robots still rely on manual setting of the welding target position, and cannot automatically position the welding robot to the welding target position, making it difficult to form a truly automated welding robot solution. Summary of the Invention

[0004] The purpose of this invention is to provide an image-based robot welding positioning method and system, which aims to solve the problem that existing welding robots still rely on manual setting of the welding target position, making it impossible for the welding robot to automatically position itself to the welding target and thus difficult to form a truly automated welding robot solution.

[0005] In view of the above problems, this application provides an image-based robot welding positioning method and system.

[0006] The first aspect disclosed in this application provides an image-based robot welding positioning method, the method comprising: Step 1: Use the image acquisition device installed on the welding robot to acquire an image of the current workpiece and generate a workpiece image, wherein the workpiece image is an RGB color space image; Step 2: Input the workpiece image into the trained target detection neural network model. The target detection neural network model calculates and obtains the position detection box of the current welding target in the workpiece image. Step 3: Based on the position detection box of the current welding target in the workpiece image, generate the positioning position of the current welding target.

[0007] Preferably, the training step of the target detection neural network model in step 2 includes: Collect image samples of the workpieces to be welded, convert all image samples of the workpieces to grayscale, and generate the input dataset. The welding targets in the image samples of the workpiece to be welded are labeled and correspond one-to-one with the images of the workpiece to be welded in the input dataset to generate the output dataset. The labeling method is to select the welding targets in the image of the workpiece to be welded by using a selection box. The selection box is represented by the relative width and height of the selection box and the relative horizontal and vertical coordinates of the center point of the selection box. A neural network model for object detection is constructed, and the parameters are initialized by random sampling from a standard normal distribution; The input dataset is fed into the object detection neural network model, and the output dataset is used as the target output of the object detection neural network model. The object detection neural network model is trained iteratively until the loss function of the object detection neural network model tends to converge.

[0008] Preferably, the calculation steps of the target detection neural network model in step 2 include: W ordered residual network layers are constructed. The workpiece image is input into the first residual network layer. The input of each subsequent residual network layer is the result of the output of the previous residual network layer calculated by the self-attention mechanism. Each residual network layer contains two convolutional layers and an activation function, and there are residual connections between each convolutional layer. The output of the Wth residual network layer is input into a convolutional layer with a kernel size of 3×3. After average pooling, it is vectorized in row-first order and then processed by four fully connected neural networks to generate the relative height and relative width of the welding target's position detection box in the workpiece image, as well as the relative x and y coordinates of the center point of the position detection box.

[0009] Preferably, the computational steps of the self-attention mechanism include: The output of the residual network layer is divided into k equal square regions of size a×a, arranged from left to right and from top to bottom. Edge regions that do not meet the square criteria are padded with zero pixels, where k is a value of... , represents the quantity, M and N are the height and width of the input image respectively, and a is a preset value representing the width of the square region; Transform each of the k a×a square regions into matrix form, and then vectorize them sequentially in row-major order to generate k vectors of dimension a. 2 ; Let k dimensions be a 2 The vectors are concatenated to form a k×a dimension. 2 The matrices are linearly projected to generate a query matrix Q, a key matrix K, and a value matrix V. The self-attention matrix is ​​generated in the following manner, where, Let K be the transpose of the matrix. The self-attention matrix is ​​split into k dimensions, a. 2 The vector is matrixed sequentially in row-major order to generate k a×a matrices, which are then visualized and merged to generate the output of the residual network layer after self-attention calculation.

[0010] Preferably, step 3 specifically includes: Step 3.1: Based on the position detection box of the current welding target in the workpiece image, obtain the relative horizontal and vertical coordinates of the center point of the position detection box in the workpiece image; Step 3.2: Calculate the horizontal and vertical offsets of the relative abscissa and ordinate of the workpiece image center point from Step 3.1 to generate the current positioning position of the welding target. The relative abscissa and ordinate of the workpiece image center point are both 0.5.

[0011] The second aspect disclosed in this application provides an image-based robot welding positioning system, the system being used in the aforementioned image-based robot welding positioning method, the system comprising: The image acquisition module is used to acquire an image of the current workpiece through an image acquisition device installed on the welding robot and generate a workpiece image, wherein the workpiece image is an RGB color space image; The target detection module is used to input the workpiece image into the trained target detection neural network model. The target detection neural network model calculates and obtains the position detection box of the current welding target in the workpiece image. The positioning module is used to generate the positioning position of the current welding target based on the relative coordinate position of the center point of the position detection box in the workpiece image.

[0012] A third aspect of this application discloses a computer device including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the above-described image-based robot welding positioning method.

[0013] The fourth aspect disclosed in this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-described image-based robot welding positioning method.

[0014] The fifth aspect disclosed in this application provides a computer program product, including a computer program or instructions that, when executed by a processor, implement the steps of the above-described image-based robot welding positioning method.

[0015] The beneficial effects of this invention are as follows: (1) Use computer vision to generate the positioning position of the welding target so that the welding robot can automatically position itself to the welding target. (2) An improved target detection neural network model structure is proposed to locate the welding target of the welding robot. The improved target detection neural network model structure has a simple calculation process, a small number of parameters, and can realize the real-time positioning of the welding target. Attached Figure Description

[0016] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0017] Figure 1 This is an overall flowchart of an image-based robotic welding positioning method.

[0018] Figure 2 This is an overall structural diagram of an image-based robotic welding positioning system. Detailed Implementation

[0019] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0020] Example 1: like Figure 1 As shown in the figure, this application provides an image-based robot welding positioning method, the method comprising: Step 1: Use the image acquisition device installed on the welding robot to acquire the image of the current workpiece and generate a workpiece image, wherein the workpiece image is an RGB color space image.

[0021] Step 2: Input the workpiece image into the trained target detection neural network model. The target detection neural network model calculates and obtains the position detection box of the current welding target in the workpiece image.

[0022] The computational steps of the object detection neural network model include: W ordered residual network layers are constructed. The workpiece image is input into the first residual network layer. The input of each subsequent residual network layer is the result of the output of the previous residual network layer calculated by the self-attention mechanism. That is, a self-attention mechanism calculation process is interspersed between every two adjacent residual network layers as a transition for feature extraction. Each residual network layer contains two convolutional layers and an activation function, and there are residual connections between each convolutional layer. The output of the Wth residual network layer is input into a 3×3 convolutional layer. After average pooling, it is vectorized in row-first order and then processed by four fully connected neural networks to generate the relative height and relative width of the welding target's position detection box in the workpiece image, as well as the relative x-coordinate and relative y-coordinate of the center point of the position detection box. That is, the position detection box of the welding target in the workpiece image can be determined by the four-tuple method. The relative height and relative width are the ratios between the width and height of the position detection box and the height and width of the workpiece image. The relative x-coordinate and relative y-coordinate are the relative positions of the x-coordinate and y-coordinate of the center point of the position detection box in the workpiece image, assuming that the height and width of the workpiece image are in units of 1. The values ​​range from [0,1]. For example, when the center point of the position detection box is in the exact center of the workpiece image, the relative x-coordinate and relative y-coordinate of the center point of the position detection box are 0.5 and 0.5, respectively.

[0023] In the computation steps of the above object detection neural network model, a self-attention mechanism is used as a transition between each residual network layer to integrate global correlation information in the image. The calculation of the self-attention mechanism includes the following steps: The output of the residual network layer is divided into k equal square regions of size a×a, arranged from left to right and from top to bottom. Edge regions that do not meet the square criteria are padded with zero pixels, where k is a value of... , represents the quantity, M and N are the height and width of the input image respectively, and a is a preset value representing the width of the square region; Transform each of the k a×a square regions into matrix form, and then vectorize them sequentially in row-major order to generate k vectors of dimension a. 2 ; Let k dimensions be a 2 The vectors are concatenated to form a k×a dimension. 2 The matrices are linearly projected to generate a query matrix Q, a key matrix K, and a value matrix V. The self-attention matrix is ​​generated in the following manner, where, Let K be the transpose of the matrix. The self-attention matrix is ​​split into k dimensions, a. 2The vector is matrixed sequentially in row-major order to generate k a×a matrices, which are then visualized and merged to generate the output of the residual network layer after self-attention calculation.

[0024] Step 3: Based on the position detection box of the current welding target in the workpiece image, generate the positioning position of the current welding target.

[0025] Step 3 specifically includes the following steps: Step 3.1: Based on the position detection box of the current welding target in the workpiece image, obtain the relative horizontal and vertical coordinates of the center point of the position detection box in the workpiece image; Step 3.2: Calculate the horizontal and vertical offsets of the relative abscissa and ordinate of the workpiece image center point from Step 3.1 to generate the current positioning position of the welding target. The relative abscissa and ordinate of the workpiece image center point are both 0.5.

[0026] Based on the lateral and longitudinal offsets, the welding robot can determine the position and direction of movement of the welding target, thus achieving the positioning of the welding target.

[0027] As a deep learning neural network model, the object detection neural network model requires training. The training steps include: Collect image samples of the workpieces to be welded, convert all image samples of the workpieces to grayscale, and generate the input dataset. The welding targets in the image samples of the workpiece to be welded are labeled and correspond one-to-one with the images of the workpiece to be welded in the input dataset to generate the output dataset. The labeling method is to select the welding targets in the image of the workpiece to be welded by using a selection box. The selection box is represented by the relative width and height of the selection box and the relative horizontal and vertical coordinates of the center point of the selection box. A neural network model for object detection is constructed, and the parameters are initialized by random sampling from a standard normal distribution; The input dataset is fed into the object detection neural network model, and the output dataset is used as the target output of the object detection neural network model. The object detection neural network model is trained iteratively until the loss function of the object detection neural network model tends to converge.

[0028] In summary, the image-based robot welding positioning method provided in this application has the following technical effects: (1) Use computer vision to generate the positioning position of the welding target so that the welding robot can automatically position itself to the welding target. (2) An improved target detection neural network model structure is proposed to locate the welding target of the welding robot. The improved target detection neural network model structure has a simple calculation process, a small number of parameters, and can realize the real-time positioning of the welding target.

[0029] Example 2: Based on the same inventive concept as the image-based robot welding positioning method in Embodiment 1, such as Figure 2 As shown, this application provides an image-based robot welding positioning system, the system comprising: The image acquisition module is used to acquire an image of the current workpiece through an image acquisition device installed on the welding robot and generate a workpiece image, wherein the workpiece image is an RGB color space image; The target detection module is used to input the workpiece image into the trained target detection neural network model. The target detection neural network model calculates and obtains the position detection box of the current welding target in the workpiece image. The positioning module is used to generate the positioning position of the current welding target based on the relative coordinate position of the center point of the position detection box in the workpiece image.

[0030] Through the foregoing detailed description of an image-based robot welding positioning method, those skilled in the art can clearly understand that this embodiment provides an image-based robot welding positioning system. Since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and relevant details can be found in the method section.

[0031] Example 3: In Embodiment 3, a computer device is provided, including a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, it implements the steps of the above-described image-based robot welding positioning method.

[0032] Example 4: In Embodiment 4, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, it implements the steps of the above-described image-based robot welding positioning method.

[0033] Example 5: In Embodiment 5, a computer program product is provided, including a computer program or instructions, which, when executed by a processor, implement the steps of the above-described image-based robot welding positioning method.

[0034] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0035] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. An image-based robot welding positioning method, characterized in that, The method includes: Step 1: Use the image acquisition device installed on the welding robot to acquire an image of the current workpiece and generate a workpiece image, wherein the workpiece image is an RGB color space image; Step 2: Input the workpiece image into the trained target detection neural network model. The target detection neural network model calculates and obtains the position detection box of the current welding target in the workpiece image. Step 3: Based on the position detection box of the current welding target in the workpiece image, generate the positioning position of the current welding target.

2. The image-based robot welding positioning method as described in claim 1, characterized in that, The training steps for the target detection neural network model described in step 2 include: Collect image samples of the workpieces to be welded, convert all image samples of the workpieces to grayscale, and generate the input dataset. The welding targets in the image samples of the workpiece to be welded are labeled and correspond one-to-one with the images of the workpiece to be welded in the input dataset to generate the output dataset. The labeling method is to select the welding targets in the image of the workpiece to be welded by using a selection box. The selection box is represented by the relative width and height of the selection box and the relative horizontal and vertical coordinates of the center point of the selection box. A neural network model for object detection is constructed, and the parameters are initialized by random sampling from a standard normal distribution; The input dataset is fed into the object detection neural network model, and the output dataset is used as the target output of the object detection neural network model. The object detection neural network model is trained iteratively until the loss function of the object detection neural network model tends to converge.

3. The image-based robot welding positioning method as described in claim 2, characterized in that, The calculation steps of the target detection neural network model in step 2 include: W ordered residual network layers are constructed. The workpiece image is input into the first residual network layer. The input of each subsequent residual network layer is the result of the output of the previous residual network layer calculated by the self-attention mechanism. Each residual network layer contains two convolutional layers and an activation function, and there are residual connections between each convolutional layer. The output of the Wth residual network layer is input into a convolutional layer with a kernel size of 3×3. After average pooling, it is vectorized in row-first order and then processed by four fully connected neural networks to generate the relative height and relative width of the welding target's position detection box in the workpiece image, as well as the relative x and y coordinates of the center point of the position detection box.

4. The image-based robot welding positioning method as described in claim 3, characterized in that, The computational steps of the self-attention mechanism include: The output of the residual network layer is divided into k equal square regions of size a×a, arranged from left to right and from top to bottom. Edge regions that do not meet the square criteria are padded with zero pixels, where k is a value of... , represents the quantity, M and N are the height and width of the input image respectively, and a is a preset value representing the width of the square region; Transform each of the k a×a square regions into matrix form, and then vectorize them sequentially in row-major order to generate k vectors of dimension a. 2 ; Let k dimensions be a 2 The vectors are concatenated to form a k×a dimension. 2 The matrices are linearly projected to generate a query matrix Q, a key matrix K, and a value matrix V. The self-attention matrix is ​​generated in the following manner, where, Let K be the transpose of the matrix. The self-attention matrix is ​​split into k dimensions, a. 2 The vector is matrixed sequentially in row-major order to generate k a×a matrices, which are then visualized and merged to generate the output of the residual network layer after self-attention calculation.

5. The image-based robot welding positioning method as described in claim 4, characterized in that, Step 3 specifically includes: Step 3.1: Based on the position detection box of the current welding target in the workpiece image, obtain the relative horizontal and vertical coordinates of the center point of the position detection box in the workpiece image; Step 3.2: Calculate the horizontal and vertical offsets of the relative abscissa and ordinate of the workpiece image center point from Step 3.1 to generate the current positioning position of the welding target. The relative abscissa and ordinate of the workpiece image center point are both 0.

5.

6. An image-based robotic welding positioning system, characterized in that, The system includes: The image acquisition module is used to acquire an image of the current workpiece through an image acquisition device installed on the welding robot and generate a workpiece image, wherein the workpiece image is an RGB color space image; The target detection module is used to input the workpiece image into the trained target detection neural network model. The target detection neural network model calculates and obtains the position detection box of the current welding target in the workpiece image. The positioning module is used to generate the positioning position of the current welding target based on the relative coordinate position of the center point of the position detection box in the workpiece image.

7. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the image-based robot welding positioning method according to any one of claims 1 to 5.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the image-based robot welding positioning method according to any one of claims 1 to 5.

9. A computer program product, comprising a computer program or instructions, characterized in that, When the computer program or instructions are executed by the processor, they implement the steps of the image-based robot welding positioning method according to any one of claims 1 to 5.