A glue coating size measurement method based on semantic segmentation

By using a semantic segmentation-based adhesive coating detection method, the adhesive strip and workpiece areas are directly segmented, and the distance between the adhesive strip and the workpiece edge is calculated. This solves the problems of long detection time and poor accuracy in existing technologies, and achieves efficient and accurate adhesive coating quality assessment.

CN116777872BActive Publication Date: 2026-06-02NANJING ZHUOYU INTELLIGENT TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
NANJING ZHUOYU INTELLIGENT TECH CO LTD
Filing Date
2023-06-20
Publication Date
2026-06-02

AI Technical Summary

Technical Problem

Existing adhesive coating detection methods are time-consuming and inaccurate, and are easily affected by background information, resulting in low detection efficiency and low accuracy.

Method used

A semantic segmentation-based approach is adopted. By training a semantic segmentation model with attention fusion and pyramid pooling, the adhesive strip and workpiece regions are directly segmented. The central contour is extracted using a region skeleton algorithm, the distance between the adhesive strip and the workpiece edge is calculated, a rectangular detection box is set to fit the contour, parallel line segments are generated, and the maximum and minimum margin widths of the detection box are statistically analyzed to determine whether the adhesive application process meets the requirements.

Benefits of technology

It achieves efficient and accurate glue coating detection, avoids the complexity of parameter adjustment in traditional algorithms, adapts to various complex scenarios, and improves detection speed and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116777872B_ABST
    Figure CN116777872B_ABST
Patent Text Reader

Abstract

The application discloses a glue coating size measurement method based on semantic segmentation, and technical solution points thereof comprise the following steps: labeling a glue coating sample image and constructing a data set; training a semantic segmentation model based on attention fusion and pyramid pooling; segmenting the glue coating image by using the model to obtain a mask result; traversing pixel points in the mask, and classifying point sets with a gray scale of 1 as glue strip areas and point sets with a gray scale of 2 as workpiece areas; using a region skeleton algorithm to extract the center axis contour of the glue strip and workpiece areas; using a rectangular detection frame to fit the contour to generate parallel lines and calculate the distance between the lines; counting the maximum and minimum distances in all detection frames to determine whether the glue coating process meets the requirements; the method can quickly measure the glue coating, does not need a teaching process, has good real-time performance, strong robustness and is suitable for various glue strip and workpiece scenes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of adhesive coating inspection technology, and more specifically to a method for measuring adhesive coating dimensions based on semantic segmentation. Background Technology

[0002] Currently, adhesive application technology is widely used by major automotive OEMs and auto parts manufacturers. It is commonly seen in the body-in-white and hood application in automotive welding workshops, and in windshields in final assembly workshops, directly affecting the vehicle's vibration damping, noise reduction, and windproof performance. To evaluate the quality of the adhesive strips, dimensional inspection of the applied strips is necessary to ensure that the position and continuity of the strips meet process requirements.

[0003] Existing detection methods require manual instruction of the adhesive strip trajectory, meaning that the adhesive head position and adhesive strip trajectory points must be manually selected before detection. Then, traditional image algorithms such as threshold segmentation, morphological operations, and edge extraction are used to extract the adhesive strip region and workpiece edges. The existing technical solutions have the following problems:

[0004] 1. The teaching process is time-consuming, which is not conducive to the efficient operation of the glue coating production line. When the workpiece to be coated is large, the number of images that need to be collected will also increase. At this time, the teaching time will increase exponentially.

[0005] 2. Existing methods for detecting the edge of adhesive strips are susceptible to interference from background information and have inaccurate threshold segmentation, which can easily lead to false detections and missed detections of edge points.

[0006] There is an urgent need to develop a method for measuring the dimensions of adhesive coating to address the problems of low efficiency and poor accuracy in the detection of adhesive coating quality in industrial production. This method should achieve high efficiency, high accuracy, and strong objectivity in the detection of adhesive strips, thereby significantly improving the quality and efficiency of adhesive coating. Summary of the Invention

[0007] To address the shortcomings of existing technologies, the present invention aims to provide a method for measuring adhesive coating dimensions based on semantic segmentation. This method can directly detect adhesive strips and features high efficiency, high accuracy, and strong objectivity, thereby significantly improving adhesive coating quality and efficiency.

[0008] To achieve the above objectives, the present invention provides the following technical solution:

[0009] A method for measuring adhesive coating dimensions based on semantic segmentation includes the following steps:

[0010] S1: Collect sample images, label the adhesive strip area and workpiece edge, and divide the training set and validation set;

[0011] S2: Input dataset, used to train a semantic segmentation model based on attention fusion and pyramid pooling;

[0012] S3: The semantic segmentation model segments the glue application image, generates mask results, and classifies the glue strip and workpiece areas;

[0013] S4: Use the region skeleton algorithm to extract the contour of the adhesive strip and the workpiece's central axis;

[0014] S5: Set a rectangular detection frame, fit the rubber strip inside the frame to the workpiece contour, generate parallel line segments, and calculate the line segment distance;

[0015] S6: Calculate the maximum and minimum margin widths of all detection frames to determine whether the adhesive application process meets the requirements.

[0016] As a further improvement of the present invention, the specific steps of step S1 are as follows:

[0017] LabelMe software was used for annotation. Polygonal line segments were used to annotate the adhesive strip area, and strip line segments were used to annotate the workpiece edge. The training set and the validation set were divided at a ratio of 9:1.

[0018] As a further improvement of the present invention, the specific steps of S2 are as follows:

[0019] Resize the image to 1024*512 pixels;

[0020] To improve the speed of a semantic segmentation model, pyramid pooling is added to reduce the number of channels in intermediate feature maps, skip connections are removed, and an attention fusion module is added to enhance feature representation and improve model accuracy.

[0021] The training and validation sets are input into the semantic segmentation model. The cross-entropy loss function is used as the network evaluation metric. The training period is set to 20, the learning rate is 0.025, the model is trained, and the semantic segmentation model is saved after the loss converges to the optimal value.

[0022] As a further improvement of the present invention, the specific steps of S3 are as follows:

[0023] The detection image is segmented using a semantic segmentation model to generate a mask result;

[0024] Iterate through all pixels in the mask, classifying the set of pixels with a gray level of 1 as the adhesive strip area and the set of pixels with a gray level of 2 as the workpiece area.

[0025] As a further improvement to the present invention, the specific steps of S4 are as follows:

[0026] The maximum disk method was used to extract the skeleton lines of the adhesive strip and the workpiece area, respectively.

[0027] The skeletal line point set is projected onto the least squares fitting line to smooth the contour and obtain the final central axis contour.

[0028] As a further improvement of the present invention, the specific steps of S5 are as follows:

[0029] The direction of adhesive application is parallel to the row direction of the image. Calculate the row coordinate range R of the adhesive strip outline C1: R = RowMax - RowMin.

[0030] Set the number of rectangular detection boxes to N, with each detection box having a height of R / N and a width equal to the image width;

[0031] Fit the contour within the detection box, generate parallel line segments, and calculate the distance L between the parallel lines. i (i = 0, ..., N-1).

[0032] As a further improvement of the present invention, the specific steps of S6 are as follows: Statistical L i The maximum and minimum values ​​in the data are used to determine whether the adhesive application is too far, too close, or in a normal state.

[0033] The beneficial effects of this invention are:

[0034] The trained semantic segmentation network model segments the adhesive strip and workpiece regions, fits the central contour of the regions, calculates the distance from the center of the adhesive strip to the edge of the workpiece, and judges the quality of the adhesive application process. Specifically, after learning, the segmentation network can output a classification result for each pixel on the feature map. During detection, all pixels classified as adhesive strip and workpiece are grouped into the corresponding regions, eliminating the need for filtering, binarization, edge segmentation, and other operations found in traditional algorithms. Furthermore, traditional algorithms cannot be applied to different scenarios with the same set of parameters, which can easily lead to false detections. This method avoids the problem of repeatedly adjusting parameters such as the filter kernel and grayscale threshold, making it more robust. Compared with existing technologies, this invention has a faster detection speed, higher accuracy, adaptability to various complex scenarios, no need for additional parameter adjustments, and simple operation, which can significantly improve the efficiency of adhesive application detection. Attached Figure Description

[0035] Figure 1 A flowchart illustrating the present invention;

[0036] Figure 2 The image shows the segmentation results of the semantic segmentation model.

[0037] Figure 3 This is a schematic diagram of the central axis outline;

[0038] Figure 4 This is a schematic diagram of the detection frame. Detailed Implementation

[0039] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Identical components are denoted by the same reference numerals. It should be noted that the terms "front," "rear," "left," "right," "upper," and "lower" used in the following description refer to directions in the accompanying drawings, and the terms "bottom surface," "top surface," "inner," and "outer" refer to directions toward or away from the geometric center of a specific component, respectively.

[0040] refer to Figures 1 to 4 The image shows a specific embodiment of a semantic segmentation-based adhesive coating size measurement method of the present invention, which includes the following steps:

[0041] S1: Collect sample images, label the adhesive strip area and workpiece edge, and divide the training set and validation set;

[0042] S2: Input dataset, used to train a semantic segmentation model based on attention fusion and pyramid pooling;

[0043] S3: The semantic segmentation model segments the glue application image, generates mask results, and classifies the glue strip and workpiece areas;

[0044] S4: Use the region skeleton algorithm to extract the contour of the adhesive strip and the workpiece's central axis;

[0045] S5: Set a rectangular detection frame, fit the rubber strip inside the frame to the workpiece contour, generate parallel line segments, and calculate the line segment distance;

[0046] S6: Calculate the maximum and minimum margin widths of all detection frames to determine whether the adhesive application process meets the requirements.

[0047] The specific steps of step S1 are as follows:

[0048] LabelMe software was used for annotation. Polygonal line segments were used to annotate the adhesive strip area, and strip line segments were used to annotate the workpiece edge. The training set and the validation set were divided at a ratio of 9:1.

[0049] The specific steps of S2 are as follows:

[0050] Resize the image to 1024*512 pixels;

[0051] To improve the speed of a semantic segmentation model, pyramid pooling is added to reduce the number of channels in intermediate feature maps, skip connections are removed, and an attention fusion module is added to enhance feature representation and improve model accuracy.

[0052] The training and validation sets are input into the semantic segmentation model. The cross-entropy loss function is used as the network evaluation metric. The training period is set to 20, the learning rate is 0.025, the model is trained, and the semantic segmentation model is saved after the loss converges to the optimal value.

[0053] The specific steps of S3 are as follows:

[0054] The detection image is segmented using a semantic segmentation model to generate a mask result;

[0055] Iterate through all pixels in the mask, classifying the set of pixels with a gray level of 1 as the adhesive strip area and the set of pixels with a gray level of 2 as the workpiece area.

[0056] The specific steps of S4 are as follows:

[0057] The maximum disk method was used to extract the skeleton lines of the adhesive strip and the workpiece area, respectively.

[0058] The skeletal line point set is projected onto the least squares fitting line to smooth the contour and obtain the final central axis contour.

[0059] The specific steps of S5 are as follows:

[0060] The direction of adhesive application is parallel to the row direction of the image. Calculate the row coordinate range R of the adhesive strip outline C1: R = RowMax - RowMin.

[0061] Set the number of rectangular detection boxes to N, with each detection box having a height of R / N and a width equal to the image width;

[0062] Fit the contour within the detection box, generate parallel line segments, and calculate the distance L between the parallel lines. i (i = 0, ..., N-1).

[0063] The specific steps of S6 are as follows: Statistical analysis of L i The maximum and minimum values ​​in the data are used to determine whether the adhesive application is too far, too close, or in a normal state.

[0064] Working principle and its effects:

[0065] The trained semantic segmentation network model segments the adhesive strip and workpiece regions, fits the central contour of the regions, calculates the distance from the center of the adhesive strip to the edge of the workpiece, and judges the quality of the adhesive application process. Specifically, after learning, the segmentation network can output a classification result for each pixel on the feature map. During detection, all pixels classified as adhesive strip and workpiece are grouped into the corresponding regions, eliminating the need for filtering, binarization, edge segmentation, and other operations found in traditional algorithms. Furthermore, traditional algorithms cannot be applied to different scenarios with the same set of parameters, which can easily lead to false detections. This method avoids the problem of repeatedly adjusting parameters such as the filter kernel and grayscale threshold, making it more robust. Compared with existing technologies, this invention has a faster detection speed, higher accuracy, adaptability to various complex scenarios, no need for additional parameter adjustments, and simple operation, which can significantly improve the efficiency of adhesive application detection.

[0066] The above description is merely a preferred embodiment of the present invention. The scope of protection of the present invention is not limited to the above embodiments. All technical solutions falling within the scope of the present invention's concept are within the scope of protection of the present invention. It should be noted that for those skilled in the art, any improvements and modifications made without departing from the principles of the present invention should also be considered within the scope of protection of the present invention.

Claims

1. A method for measuring adhesive coating dimensions based on semantic segmentation, characterized in that, Includes the following steps: S1: Collect sample images, label the adhesive strip area and workpiece edge, and divide the training set and validation set; S2: Input dataset, used to train a semantic segmentation model based on attention fusion and pyramid pooling; S3: The semantic segmentation model segments the glue application image, generates mask results, and classifies the glue strip and workpiece areas; S4: Use the region skeleton algorithm to extract the contour of the adhesive strip and the workpiece's central axis; S5: Set a rectangular detection frame, fit the rubber strip inside the frame to the workpiece contour, generate parallel line segments, and calculate the line segment distance; S6: Calculate the maximum and minimum margin widths of all detection frames to determine whether the adhesive application process meets the requirements; The specific steps of step S1 are as follows: LabelMe software was used for annotation. Polygonal line segments were used to annotate the glue strip area, and strip line segments were used to annotate the workpiece edge. The training set and the validation set were divided into a 9:1 ratio. The specific steps of S2 are as follows: Resize the image to 1024*512 pixels; To improve the speed of a semantic segmentation model, pyramid pooling is added to reduce the number of channels in intermediate feature maps, skip connections are removed, and an attention fusion module is added to enhance feature representation and improve model accuracy. The training and validation sets are input into the semantic segmentation model. The cross-entropy loss function is used as the network evaluation metric. The training period is set to 20, the learning rate is 0.025, the model is trained, and the semantic segmentation model is saved after the loss converges to the optimal value. The specific steps of S3 are as follows: The detection image is segmented using a semantic segmentation model to generate a mask result; Traverse all pixels in the mask, classify the set of pixels with a gray level of 1 as the adhesive strip area, and classify the set of pixels with a gray level of 2 as the workpiece area; The specific steps of S4 are as follows: The maximum disk method was used to extract the skeleton lines of the adhesive strip and the workpiece area, respectively. The skeletal line point set is projected onto the least squares fitting line to smooth the contour and obtain the final central axis contour.

2. The method for measuring adhesive coating dimensions based on semantic segmentation according to claim 1, characterized in that, The specific steps of S5 are as follows: The direction of adhesive application is parallel to the row direction of the image. Calculate the row coordinate range R of the adhesive strip outline C1: R = RowMax - RowMin. Set the number of rectangular detection boxes to N, with each detection box having a height of R / N and a width equal to the image width; Fit the contour in the detection box, generate parallel line segments, and calculate the distance Li between the parallel lines, where i is an integer from 0 to N-1.

3. The method for measuring adhesive coating dimensions based on semantic segmentation according to claim 2, characterized in that, The specific steps of S6 are as follows: Calculate the maximum and minimum values ​​in Li to determine whether the adhesive application is too far, too close, or in a normal state.