Visual positioning detection method for motor welding

By using real-time image acquisition and deep learning methods for image recognition and welding head adjustment in motor welding, the problems of inaccurate image recognition and untimely adjustment of welding head positions in the prior art are solved, and higher welding accuracy and stability are achieved.

CN119624913APending Publication Date: 2025-03-14XUZHOU ZIPU MECHANICAL & ELECTRICAL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411714738.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-27
Publication Date
2025-03-14

AI Technical Summary

Technical Problem

The existing visual positioning detection methods have problems such as inaccurate image recognition algorithms and untimely adjustment of welding head positions and motion trajectory during motor welding, which affects the quality and stability of welding.

Method used

A visual positioning detection method for motor welding is adopted, and the motor image is collected in real time through the image acquisition device, image preprocessing and recognition is performed, and the parts to be welded and feature points are confirmed by Yolo v10-based deep learning method, and the position and motion trajectory of the welding head are monitored and adjusted in real time during the welding process. After the welding is completed, the welding effect is evaluated by a deep learning method based on MemSeg.

Benefits of technology

Improve image quality, ensure the accuracy and stability of welding, accurately evaluate the welding effect and re-weld if necessary, thereby improving the quality of welding.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119624913A_ABST
    Figure CN119624913A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of motor welding, and discloses a visual positioning detection method for motor welding. Image data of the motor to be welded are collected in real time through the image collecting device, preprocessing such as graying processing, noise filtering, image enhancement and edge detection is carried out, and the image quality is improved. And a deep learning method based on Yolo v10 is adopted for image recognition, and the to-be-welded part and the motor feature points are accurately and rapidly confirmed. In the welding process, the position and the movement track of a welding head are monitored and adjusted in real time, and accurate and stable welding is ensured. And after welding is finished, the welding effect is evaluated through a deep learning method based on MemSeg, welding is conducted again when necessary, and the welding quality is improved. In conclusion, the method has certain technical advantages and application prospects, and the production efficiency and the product quality of the motor manufacturing industry can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of motor welding, and in particular to a visual positioning detection method for motor welding. Background Art

[0002] In the motor manufacturing process, welding is the key link to connect the various components of the motor. Traditional motor welding methods rely on manual operation and experience judgment, and have problems such as low welding accuracy, low efficiency, and unstable quality. With the rapid development of computer vision technology, visual positioning detection methods are gradually applied to the field of motor welding to improve the accuracy and efficiency of welding. However, the existing visual positioning detection methods still have some challenges in the motor welding process, such as the image recognition algorithm is not accurate enough, the welding head position and motion trajectory are not adjusted in time, etc. These problems affect the quality and stability of motor welding. Therefore, a more advanced and accurate visual positioning detection method is needed to solve the problems existing in the prior art. Summary of the invention

[0003] In view of the above-mentioned technical deficiencies, the purpose of the present invention is to provide a visual positioning detection method for motor welding to solve the problems in the prior art of inaccurate image recognition algorithm and untimely adjustment of welding head position and motion trajectory.

[0004] In order to solve the above technical problems, the present invention adopts the following technical solutions: In a first aspect, the present invention provides a visual positioning detection method for motor welding, the method comprising: Step S100: using an image acquisition device to acquire image data of the motor to be welded in real time; Step S200: performing image preprocessing on the collected motor image; Step S300: confirming the parts to be welded and the characteristic points of the motor in the preprocessed motor image by an image recognition algorithm; Step S400: When the welding head moves along a preset path for welding, the image acquisition device and the image recognition algorithm are continuously used to monitor the motor image in real time, and the position and movement trajectory of the welding head are adjusted accordingly; Step S500: After welding is completed, an image of the motor after welding is collected, and the welding effect is evaluated by an image analysis algorithm.

[0005] Preferably, in a possible implementation manner of the first aspect, the image preprocessing includes grayscale processing, noise filtering, image enhancement and edge detection, wherein: Grayscale processing converts color images into grayscale images; Gaussian filtering method is used for noise filtering; Image enhancement improves contrast through histogram equalization method; Edge detection uses the Canny algorithm to extract edge features.

[0006] Preferably, in a possible implementation of the first aspect, the image recognition algorithm is a deep learning method based on Yolov10, which uses historical motor images for training.

[0007] Preferably, in a possible implementation of the first aspect, the deep learning method based on Yolo v10 includes: The Yolo v10 model is used as the backbone network; The model is trained on a historical motor image dataset using a weighted loss function and a dual label assignment strategy. After training, the Yolo v10 model is deployed in the image recognition algorithm to perform real-time recognition of the preprocessed motor images.

[0008] Preferably, in a possible implementation manner of the first aspect, the step of adjusting the position and motion trajectory of the welding head includes: Calculate the relative position of the welding head and the welding part based on the identified feature points; The position and motion trajectory of the welding head are adjusted according to the calculation results through the control system; The position of the welding head is monitored in real time and adjusted dynamically during the welding process.

[0009] Preferably, in a possible implementation of the first aspect, the image analysis algorithm is a deep learning method based on MemSeg, which is trained using historical images of motors after welding.

[0010] Preferably, in a possible implementation manner of the first aspect, the MemSeg-based deep learning method includes: The MemSeg model is used as the backbone network; Model training was performed using a historical post-weld motor image dataset; The loss function combining L1 loss and focal loss is used to optimize the model parameters; The trained MemSeg model is applied to the motor image after welding, and the segmentation map of the welding effect and the anomaly score of each area are output.

[0011] Preferably, in a possible implementation manner of the first aspect, the step S500 further includes determining that the welding effect of a certain area does not meet the standard and re-performing welding if the abnormality score of the area exceeds a preset threshold.

[0012] The beneficial effects of the present invention are: the image data of the motor to be welded is collected in real time by an image acquisition device, and image preprocessing is performed, thereby effectively improving the quality of the image. At the same time, the deep learning method based on Yolo v10 is used for image recognition, which can accurately and quickly confirm the characteristic points of the parts to be welded and the motor. During the welding process, the method ensures the accuracy and stability of welding by real-time monitoring and adjusting the position and motion trajectory of the welding head. In addition, the method also uses a deep learning method based on MemSeg for image analysis, which can accurately evaluate the welding effect and re-weld when necessary, thereby further improving the quality of welding. In summary, the visual positioning detection method proposed in the present invention has certain technical advantages and application prospects, and can bring higher production efficiency and product quality to the motor manufacturing industry. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0014] Figure 1 A flow chart of a method for visual positioning detection of motor welding is provided for the present application. DETAILED DESCRIPTION

[0015] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0016] Embodiment 1: Figure 1 As shown, the present invention provides a visual positioning detection method for motor welding, the method comprising: Step S100: using an image acquisition device to acquire image data of the motor to be welded in real time.

[0017] Specifically, the industrial camera model "Basler acA1600-60gc" was used in the selection of image acquisition devices. The camera has the characteristics of high resolution (16 million pixels), high frame rate (up to 60 frames per second) and low noise, which can ensure that the acquired images are clear and accurate. In addition, it also has automatic exposure adjustment and automatic white balance correction functions, which can effectively deal with possible light changes and dust interference in the motor welding environment. The camera supports the GigE interface, which facilitates efficient connection with data centers and control systems.

[0018] In this embodiment, an industrial camera is installed above the welding workbench, the angle and focal length of the camera are adjusted, and a fixed installation method is adopted to ensure that the image quality is not affected by vibration or temperature changes during the welding process. Image acquisition is achieved through the software driver of the Basler camera. Before starting the welding task, various parameters of the camera, including resolution, frame rate, exposure time, etc., are pre-configured, and a continuous trigger mode is set. The collected image data is efficiently transmitted to the data center via the GigE interface in the form of a network interface. During the transmission process, an encryption protocol is used to ensure the security of the data. At the same time, the data center adopts a local server solution to provide stable and reliable storage and management services.

[0019] Step S200: performing image preprocessing on the collected motor image.

[0020] Specifically, image preprocessing includes grayscale processing, noise filtering, image enhancement, and edge detection. Grayscale processing converts color images into grayscale images; noise filtering uses Gaussian filtering; image enhancement uses histogram equalization to improve contrast; and edge detection uses the Canny algorithm to extract edge features.

[0021] In this embodiment, the image data of the motor to be welded is first collected in real time by an image acquisition device, and the image data is stored in a specified path. Then, an image preprocessing function preprocess_image(image_path) is defined, which accepts an image file path as an input parameter and returns the preprocessed image. Inside the function, the cv2.imread() function is first used to read the image file from the specified path. If the image cannot be read, a ValueError exception is thrown, and a prompt is given that the path of the image file cannot be read.

[0022] Next, use the cv2.cvtColor() function to convert the color image to a grayscale image. Grayscale processing can reduce the amount of image processing computation, and for tasks such as edge detection, grayscale images are usually sufficient.

[0023] Then, the grayscale image is filtered for noise. Use cv2.GaussianBlur() function to perform Gaussian filtering on the image to reduce noise. Gaussian filtering is a linear smoothing filter whose weight distribution conforms to the Gaussian function, which can effectively smooth the image and reduce noise.

[0024] Next, perform image enhancement on the Gaussian filtered image. Use the cv2.equalizeHist() function to perform histogram equalization on the image to improve the contrast of the image. Histogram equalization enhances the contrast of the image by adjusting the grayscale distribution of the image, making the details in the image clearer.

[0025] Finally, use the cv2.Canny() function to perform edge detection. The Canny algorithm is a classic edge detection algorithm that can detect better edges in the presence of more noise. By setting a suitable threshold, edge features in the image can be extracted, providing key information for subsequent image recognition algorithms.

[0026] Step S300: confirming the parts to be welded and the characteristic points of the motor in the pre-processed motor image through an image recognition algorithm.

[0027] Specifically, the image recognition algorithm is a deep learning method based on Yolo v10, which is trained using historical motor images.

[0028] The deep learning method based on Yolo v10 includes: using the Yolo v10 model as the backbone network; using the weighted loss function and the dual label assignment strategy to train the model on the historical motor image dataset; after the training is completed, the Yolo v10 model is deployed in the image recognition algorithm to perform real-time recognition of the pre-processed motor images.

[0029] In this embodiment, the image recognition algorithm adopts a deep learning method based on Yolo v10. Yolo v10 is a real-time target detection algorithm with high precision and high speed, suitable for the visual positioning task of motor welding. The following are the implementation steps of the deep learning method based on Yolo v10: First, a historical motor image dataset is established. The dataset is obtained from the data center and contains images of this model of motor in different postures. These images fully cover various situations that may be encountered during the welding process. These images are then labeled. The LabelImg tool is used to label the parts to be welded (such as solder joints, pins, etc.) and the characteristic points of the motor (such as edges, corners, etc.) in the image, and the corresponding annotation files are generated.

[0030] In terms of model selection, the Yolo v10 model is used as the backbone network. According to the characteristics of the motor welding task, a weighted loss function is designed. The weights can be dynamically adjusted according to the importance of different targets to improve the detection accuracy of the model. Specifically, the weighted loss function formula is , the total loss L_total consists of three parts: cross entropy loss L_cls, coordinate loss L_coord and confidence loss L_conf. Among them, L_cls is used to measure the difference between the predicted category probability distribution and the true category distribution; L_coord is used to measure the difference between the predicted bounding box and the true bounding box; L_conf is used to measure the confidence of whether the predicted bounding box contains the target. The dynamic weight coefficient is dynamically adjusted according to the change of loss value and the number of iterations during training to ensure that the model can focus on the most important loss items at different stages.

[0031] In addition, a dual label assignment strategy is adopted to assign two most likely labels to each object based on its size and position information, thus improving the robustness of the model.

[0032] During the model training phase, the annotated historical motor image dataset was input into the Yolo v10 model and trained using the weighted loss function and dual label assignment strategy designed above. The performance of the model was continuously optimized by adjusting hyperparameters such as learning rate and batch size.

[0033] After training is completed, the Yolo v10 model is exported as an ONNX model and integrated into the image recognition algorithm. Using the deployed Yolo v10 model, the welded parts and feature points in the image can be accurately detected, and information such as the detection box and confidence level can be output.

[0034] Step S400: When the welding head moves along a preset path for welding, the image acquisition device and the image recognition algorithm are continuously used to monitor the motor image in real time, and the position and movement trajectory of the welding head are adjusted accordingly.

[0035] Specifically, the relative position of the welding head and the welding part is calculated based on the identified feature points; the position and motion trajectory of the welding head are adjusted according to the calculation results through the control system; and the position of the welding head is monitored in real time and dynamically adjusted during the welding process.

[0036] In this embodiment, the initial position and motion trajectory of the welding head are first set as a preset path. During the welding process, the image acquisition device collects motor images at the welding site in real time and transmits these images to the image recognition algorithm for processing. The image recognition algorithm quickly identifies the parts to be welded and the feature points in the motor image, and calculates the relative position of the welding head and the welding part.

[0037] Next, the control system will calculate the position and movement trajectory of the welding head based on this relative position information. This process is carried out in real time, that is, every time the welding head moves to a new position, image acquisition, image recognition and position calculation will be re-performed to ensure that the welding head always remains in the correct position.

[0038] In this way, the accuracy and efficiency of welding are effectively improved. Even if there is a deviation between the preset path and the actual welding position due to changes in the size, shape or position of the motor, real-time monitoring and dynamic adjustment can ensure that the welding head can accurately move to the welding position for welding.

[0039] Step S500: After welding is completed, an image of the motor after welding is collected, and the welding effect is evaluated by an image analysis algorithm.

[0040] Specifically, the image analysis algorithm is a deep learning method based on MemSeg, which is trained using historical images of motors after welding. The deep learning method based on MemSeg includes using the MemSeg model as the backbone network; using the historical data set of motor images after welding for model training; using the loss function combining L1 loss and focal loss to optimize the model parameters; applying the trained MemSeg model to the motor images after welding, and outputting the segmentation map of the welding effect and the abnormality score of each area.

[0041] In this embodiment, an image analysis algorithm based on the MemSeg deep learning method is used to evaluate the motor image after welding. The backbone network uses the MemSeg model, which has excellent image segmentation capabilities and sensitivity to fine structure recognition. The algorithm aims to identify the state of the welding area and quantitatively evaluate the welding effect by analyzing the motor image after welding.

[0042] First, a historical dataset of motor images after welding is constructed. This dataset contains motor images under various welding conditions, covering successful welding, welding defects (such as bubbles, cracks, lack of fusion, etc.) and samples of different welding qualities. These images are annotated to clarify information such as welding area, defect type and location.

[0043] During the model training phase, a loss function combining L1 loss and focal loss was used to optimize the parameters of the MemSeg model. L1 loss can measure the pixel-level difference between the predicted image and the real image, which is crucial for capturing the detailed features of the welding area. Focal loss focuses on dealing with the problem of class imbalance. By reducing the weight of easy-to-classify samples, the model pays more attention to difficult-to-classify samples, which is particularly important for identifying welding defects. During the training process, hyperparameters such as learning rate and batch size are continuously adjusted, and data enhancement techniques (such as rotation, scaling, flipping, etc.) are introduced to increase the generalization ability of the model.

[0044] After the model training is completed, by inputting the motor image after welding, the MemSeg model can quickly output the segmentation map of the welding effect, showing the welding area and its internal structure. At the same time, the model will also calculate the abnormality score of each area, which reflects the quality of welding. The higher the score, the greater the possibility of welding defects in the area.

[0045] Based on this output information, the welding effect can be intuitively evaluated and potential welding problems can be discovered in time. For example, if the anomaly score of a certain area is high and the segmentation map shows that there is an obvious structural anomaly in the area, it can be immediately determined that there is a defect in the welding at that location.

[0046] In one embodiment, step S500 also includes determining that the welding effect of a certain area does not meet the standard and re-performing welding if the abnormality score of the area exceeds a preset threshold.

[0047] Specifically, after the MemSeg model outputs the segmentation map of the welding effect and the abnormality score of each area, the algorithm will evaluate this information. The abnormality score threshold used in this embodiment is 0.5. If the abnormality score of a certain area is higher than this threshold, the system automatically determines that the welding effect of the area does not meet the requirements. The system issues an early warning to the operator and displays specific defect location, type, and abnormality score information through the user interface. At the same time, the system records this event and generates a detailed welding quality report to facilitate subsequent quality traceability.

[0048] After receiving the early warning, the operator quickly locates the specific location of the welding defect based on the defect information provided by the system. Then, the system starts the re-welding process. Before re-welding, the operator will fine-tune the welding parameters to improve the welding quality. At the same time, in order to ensure the accuracy of re-welding, the system will use image acquisition devices and image recognition algorithms to monitor the motor image in real time to ensure that the welding head can accurately move to the part that needs to be re-welded.

[0049] After the re-welding is completed, the system will capture the image of the welded motor again and evaluate the quality through the MemSeg model. This process will be repeated until the welding effect of all areas meets the preset standards. In this way, it can be ensured that the welding quality of each motor meets the design requirements, thereby improving the overall performance and reliability of the product.

[0050] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.

Claims

1. A visual positioning detection method for motor welding, characterized in that: The method comprises: Step S100: using an image acquisition device to acquire image data of the motor to be welded in real time; Step S200: performing image preprocessing on the collected motor image; Step S300: confirming the parts to be welded and the characteristic points of the motor in the preprocessed motor image by an image recognition algorithm; Step S400: When the welding head moves along a preset path for welding, the image acquisition device and the image recognition algorithm are continuously used to monitor the motor image in real time, and the position and movement trajectory of the welding head are adjusted accordingly; Step S500: After welding is completed, an image of the motor after welding is collected, and the welding effect is evaluated by an image analysis algorithm.

2. The visual positioning detection method according to claim 1, characterized in that: The image preprocessing includes grayscale processing, noise filtering, image enhancement and edge detection, wherein: Grayscale processing converts color images into grayscale images; Gaussian filtering method is used for noise filtering; Image enhancement improves contrast through histogram equalization method; Edge detection uses the Canny algorithm to extract edge features.

3. The visual positioning detection method according to claim 1, characterized in that: The image recognition algorithm is a deep learning method based on Yolov10, which uses historical motor images for training.

4. The visual positioning detection method according to claim 3, characterized in that: The deep learning method based on Yolo v10 includes: The Yolo v10 model is used as the backbone network; The model is trained on a historical motor image dataset using a weighted loss function and a dual label assignment strategy. After training, the Yolo v10 model is deployed in the image recognition algorithm to perform real-time recognition of the preprocessed motor images.

5. The visual positioning detection method according to claim 1, characterized in that: The step of adjusting the position and motion trajectory of the welding head comprises: Calculate the relative position of the welding head and the welding part based on the identified feature points; The position and motion trajectory of the welding head are adjusted according to the calculation results through the control system; The position of the welding head is monitored in real time and adjusted dynamically during the welding process.

6. The visual positioning detection method according to claim 1, characterized in that: The image analysis algorithm is a deep learning method based on MemSeg, which is trained using historical post-welding motor images.

7. The visual positioning detection method according to claim 6, characterized in that: The MemSeg-based deep learning method includes: The MemSeg model is used as the backbone network; Model training was performed using a historical post-weld motor image dataset; The loss function combining L1 loss and focal loss is used to optimize the model parameters; The trained MemSeg model is applied to the motor image after welding, and the segmentation map of the welding effect and the anomaly score of each area are output.

8. The visual positioning detection method according to claim 7, characterized in that: The step S500 also includes determining that the welding effect of a certain area does not meet the standard and re-welding if the abnormality score of the area exceeds a preset threshold.