Laser cleaning residue identification and re-cleaning method and system based on improved U-Net semantic segmentation model
By improving the U-Net semantic segmentation model and combining it with Transformer and CBAM attention mechanisms, the robustness and accuracy issues of residue identification in laser cleaning were resolved, enabling efficient and intelligent residue detection and re-cleaning, and improving the automation and accuracy of the cleaning system.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ZHEJIANG UNIV OF TECH
- Filing Date
- 2026-01-14
- Publication Date
- 2026-05-01
AI Technical Summary
Existing laser cleaning methods struggle to achieve high-precision residue detection and re-cleaning control on complex surfaces. Traditional CNN and Vision Transformer models lack robustness in complex backgrounds and lack an adaptive attention allocation mechanism for multi-scale residues.
An improved U-Net semantic segmentation model is adopted, which combines Transformer and CBAM attention mechanisms. Through encoder-decoder structure and skip connections, the ability to identify global context and local details is enhanced. The model is trained by loss function and combined with path planning algorithm to achieve high-precision residue identification and re-cleaning.
It achieves high-precision residue identification and re-cleaning, reduces manual intervention, improves cleaning efficiency and integrity, and ensures the comprehensiveness and intelligence of cleaning.
Smart Images

Figure CN121963203A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the technical field of image or video recognition or understanding, and in particular to a method and system for laser cleaning residue identification and re-cleaning based on an improved U-Net semantic segmentation model. Background Technology
[0002] Surface cleaning of workpieces is a crucial step in industrial manufacturing to ensure the surface quality of components, extend their service life, and improve assembly accuracy. Laser cleaning offers significant advantages over traditional physical or chemical cleaning methods. It utilizes a high-energy-density laser beam to irradiate the workpiece surface, instantly vaporizing or peeling off the contaminant layer through photothermal, photopressure, and plasma effects without damaging the substrate surface. Furthermore, it eliminates the need for chemical solvents or abrasives, causes no mechanical wear on the workpiece surface, and avoids secondary contamination. The laser beam can be positioned and controlled at the micron level, making it suitable for cleaning complex structures and localized areas.
[0003] However, in existing laser cleaning methods, the identification and positioning of the cleaning area generally rely on manual methods or simple image processing algorithms, making it difficult to achieve high-precision detection and re-cleaning control of residues on complex surfaces. When using traditional image processing methods such as image acquisition, threshold segmentation, edge detection, and fuzzy logic reasoning to identify workpiece features, they often depend on a stable imaging environment and fixed parameter thresholds, making them extremely sensitive to factors such as illumination, noise, and surface reflection. When the workpiece surface material is complex, the contaminant morphology is diverse, or the ambient light varies greatly, the robustness of identification decreases significantly, leading to inaccurate or missed identification of the target area.
[0004] While existing deep learning models can perform semantic segmentation tasks in various scenarios, they have some limitations in identifying residues from laser cleaning processes:
[0005] (1) Traditional CNNs accumulate contextual information through local convolution operations. Their receptive field is limited and expands slowly. The background of the residue after laser cleaning is complex, such as substrate texture, uneven brightness, oxidation color difference, etc. The feature extraction capability of CNN models is insufficient, and they are prone to misjudging the background texture as residue.
[0006] (2) Although pure attention mechanism models such as Vision Transformer can establish global dependencies, they will lose high-frequency detail information during downsampling, which will result in the inability to detect sub-pixel level residue boundary information. Furthermore, Transformer has high computational complexity and low efficiency in processing images acquired by high-resolution industrial cameras. It requires a large amount of labeled data to train fully, while residue samples from laser cleaning are usually scarce and have high labeling costs, which can easily lead to overfitting.
[0007] (3) Existing models lack an adaptive attention allocation mechanism for multi-scale residues specific to laser cleaning. Residues of different sizes require different levels of attention to local details and global context. Traditional models suffer from blurred boundaries and insufficient accuracy in residue edge segmentation, while the cleaning process requires precise boundary positioning to avoid damaging the substrate. Summary of the Invention
[0008] This invention solves the problems existing in the prior art and provides a method and system for laser cleaning residue identification and re-cleaning based on an improved U-Net semantic segmentation model.
[0009] The technical solution adopted in this invention is a laser cleaning residue identification and re-cleaning method based on an improved U-Net semantic segmentation model. An improved U-Net semantic segmentation model integrating Transformer and CBAM attention mechanisms is established to identify residue areas after laser cleaning. Image samples of surface residues on the workpiece after one or more cleanings are collected to train the improved U-Net semantic segmentation model.
[0010] Images of surface residues on the workpiece are collected after each cleaning, and the improved U-Net semantic segmentation model is trained to identify the residues.
[0011] The preset image processing algorithm is used to extract the identification area of the residue from the output identification image and perform contour regularization processing to obtain the coordinates and contour information of all residues in the image. The path planning is performed on the identified residues to obtain the optimal re-cleaning galvanometer scanning sequence.
[0012] Preferably, the improved U-Net semantic segmentation model adopts an encoder-decoder structure;
[0013] The encoder includes three sequentially arranged convolutional layers and a downsampling module, which are used to progressively extract low-level texture information and high-level semantic representation. A Transformer module is set after the downsampling module to enhance the ability to model global contextual relationships and long-distance dependencies.
[0014] The decoder includes an upsampling module corresponding to the convolutional layer. The upsampling module is skipped between the convolutional layer and the upsampling module to progressively restore the spatial resolution and predict the category of each pixel.
[0015] Preferably, a CBAM attention module is embedded in the skip connection to simultaneously enhance the importance weights of the channel and spatial dimensions, enabling shallow texture and deep semantic information to be fused more efficiently, thereby improving the model's ability to recognize complex contours and weak texture regions of residues.
[0016] Preferably, a loss function is established to train the improved U-Net semantic segmentation model, and the loss function is correlated with the classification error and the region overlap error.
[0017] Preferably, the output recognition image is binarized and rasterized, and the raster is clustered based on connected component analysis to identify the image location corresponding to one or more regions where the residue is located, thus completing the preprocessing.
[0018] Preferably, the location description information of all residues in the target area within the processing area is extracted, and path planning is performed on these distributed location points to finally obtain an optimal galvanometer scanning motion trajectory.
[0019] Preferably, the location description information includes the center point of each region and the envelope of the region.
[0020] Preferably, based on the optimal galvanometer scanning motion trajectory, cleaning commands are sent to the scanning galvanometer one by one, the processing surface of the galvanometer is adjusted to be parallel to the workpiece surface, and the processing area of the laser scanning galvanometer can cover the target residue area.
[0021] Preferably, cleaning parameters are configured according to the type of residue, and the corresponding laser energy is obtained after being transmitted to the scanning galvanometer to clean the residue.
[0022] A laser cleaning residue identification and re-cleaning system based on an improved U-Net semantic segmentation model includes:
[0023] An image acquisition unit is used to acquire images of surface residues on the workpiece after each cleaning.
[0024] A control terminal is used to identify residues and plan a re-cleaning path based on the laser cleaning residue identification and re-cleaning method based on the improved U-Net semantic segmentation model.
[0025] A robotic arm is used to perform actions based on the re-cleaning path output from the control terminal.
[0026] This invention relates to a method and system for laser cleaning residue identification and re-cleaning based on an improved U-Net semantic segmentation model. The improved U-Net semantic segmentation model, integrating Transformer and CBAM attention mechanisms, is used to identify residue regions after laser cleaning. Image samples of surface residues on the workpiece are acquired after one or more cleaning cycles to train the improved U-Net semantic segmentation model. Image images of surface residues on the workpiece after each cleaning cycle are acquired, and the trained improved U-Net semantic segmentation model is used to identify the residues. A preset image processing algorithm is used to extract the identification regions of the residues from the output identification images and perform contour regularization processing to obtain the coordinates and contour information of all residues in the image. Path planning is performed on the identified residues to obtain the optimal scanning sequence of the re-cleaning galvanometer. The system uses an image acquisition unit to acquire surface residue images of the workpiece after each cleaning cycle, and the control end identifies the residues and plans the re-cleaning path based on the method, with a robotic arm executing the actions.
[0027] The beneficial effects of this invention are as follows:
[0028] (1) A dataset is established based on the image features of residues after laser cleaning. A deep learning model is used to extract the residue features to achieve high-precision identification, thereby achieving automated and intelligent detection, reducing manual intervention, and being more efficient than traditional methods.
[0029] (2) By extracting the regularized contour of the residue mask image from the model recognition result, the vector regularized outer contour information of the residue is obtained, which can be directly controlled by the galvanometer.
[0030] (3) Based on the path planning algorithm, the cleaning control of the optimal path is realized, the redundancy and repetition of the cleaning path are reduced, the cleaning efficiency is improved, the loopholes in the cleaning work are reduced, and the integrity and comprehensiveness of the cleaning are ensured. Attached Figure Description
[0031] Figure 1 This is a flowchart of the method of the present invention;
[0032] Figure 2 This is a schematic diagram of the improved U-Net semantic segmentation model of the present invention;
[0033] Figure 3 This is a schematic diagram of the system structure of the present invention. Detailed Implementation
[0034] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, 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, 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.
[0035] This invention relates to a method for identifying and re-cleaning residues after laser cleaning based on an improved U-Net semantic segmentation model. By acquiring images of residues after laser cleaning, an encoder with a fully convolutional feature extraction structure, mainly composed of convolution and downsampling operations, is used to extract and encode features from the residue images. A Transformer module is introduced at the bottom of the encoder to enhance global context modeling capabilities. The upsampling structure of the improved U-Net semantic segmentation model is used to decode the encoded feature map to full pixel density, enabling the identification and detection of residue images during laser cleaning. This improves upon the low efficiency and over-reliance on experience inherent in manual intervention. By combining the global context understanding capabilities of Transformer with the local detail refinement capabilities of U-Net, high-precision image segmentation is achieved. The use of channel and spatial attention mechanisms (CBAM) and U-Net's perception of local details allows the model to consider both local and global features, enabling accurate segmentation of residue images after laser cleaning. Based on the above, the model not only solves the balance problem between global context and local details through the collaboration of Transformer-CNN, but also achieves adaptive refinement of features through the channel-space dual-dimensional attention of CBAM. Ultimately, it realizes an efficient, accurate and easily integrated recognition framework into intelligent laser cleaning systems, which can provide accurate target area localization for laser cleaning. This establishes a closed-loop system from image acquisition and intelligent recognition to galvanometer scanning control, solving the problems of traditional cleaning systems relying on manual adjustment and low robustness detection. It provides an efficient, intelligent and green solution for the detection and re-cleaning of residues on complex workpiece surfaces.
[0036] The method includes the following steps:
[0037] (1) Establish an improved U-Net semantic segmentation model that integrates Transformer and CBAM attention mechanisms to identify residual areas after laser cleaning;
[0038] (2) Collect image samples of surface residues on the workpiece after one or more cleanings, and train the network model of the improved U-Net semantic segmentation model.
[0039] (3) Collect images of surface residues on the workpiece after each cleaning and use the trained improved U-Net semantic segmentation model to identify the residues;
[0040] (4) Extract the identification region of the residue from the output identification image using a preset image processing algorithm and perform contour regularization processing to obtain the coordinates and contour information of all residues in the image;
[0041] (5) Path planning is performed on the identified residues to obtain the optimal re-cleaning galvanometer scanning sequence.
[0042] The method is explained below with specific steps.
[0043] (1) Establish an improved U-Net semantic segmentation model that integrates Transformer and CBAM attention mechanisms to identify residual areas after laser cleaning;
[0044] The improved U-Net semantic segmentation model adopts an encoder-decoder structure;
[0045] The encoder includes three sequentially arranged convolutional layers and a downsampling module, with a Transformer module following the downsampling module.
[0046] The decoder includes an upsampling module corresponding to the convolutional layer, and the upsampling module is connected to the convolutional layer in a skip connection.
[0047] Embed the CBAM attention module in the skip connection.
[0048] In this invention, the U-Net model framework is used to extract features from the data. In this embodiment, the encoder uses ResNet50 as the backbone to improve the model's representation ability in the feature extraction stage. Its residual structure enables shallow texture information and deep semantic information to be fused more efficiently, improving the continuity of feature transmission and the stability of gradient flow. Furthermore, the richness of its multi-level convolutional feature maps at the semantic level provides more discriminative feature representations for upsampling and fine segmentation in the subsequent decoder part.
[0049] Furthermore, this invention adds a Transformer module as a bottleneck layer after the encoder, combining the global contextual understanding capability of the Transformer with the local detail refinement capability of U-Net to achieve high-precision image segmentation. In this combination, the Transformer simulates long-distance dependencies between image patches, capturing global information, while the U-Net encoder / decoder and skip connections maintain and restore local details, ensuring segmentation accuracy. Specifically, the feature map output by the encoder is divided into fixed-size patches and flattened into a vector sequence to meet the input format of the Transformer. The Transformer captures the correlation between features globally through a multi-head self-attention mechanism, enabling the model to more effectively distinguish residual regions under complex metallic textures and background interference. Since the Transformer is only located in the bottleneck layer, its computational cost is significantly lower than that of a full Transformer structure, while further enhancing deep semantic expression and providing the decoder with features richer in contextual information. U-Net, combined with the Transformer module, can not only identify fine structures and texture information in images, but also understand the spatial relationships and contextual information between different parts. By capturing long-distance dependencies through a multi-head self-attention mechanism, the model can more effectively distinguish between residue regions and metal surface textures in complex backgrounds, thereby achieving high-precision residue region segmentation. Using Transformer in the bottleneck layer can significantly enhance deep feature representation while maintaining low computational overhead, providing high-quality features with stronger contextual information for subsequent decoding stages.
[0050] Furthermore, the U-Net semantic segmentation model incorporates a channel-spatial joint attention mechanism (CBAM). The input is a channel-weighted feature map, which undergoes convolutional operations to model and extract dependencies between adjacent pixels. This is then normalized using a sigmoid function to generate a spatial attention weight map. This weight map is used to weight the original features pixel-by-pixel, enhancing the salient response of residue regions on the workpiece surface and suppressing noise information from irrelevant background regions. This achieves adaptive focusing on contaminated areas on the workpiece surface. Through the combined use of CBAM, the model can achieve significant region enhancement at the pixel level, enabling more precise focusing on the residue surface and improving the robustness of residue recognition and the accuracy of segmentation boundaries.
[0051] (2) Collect image samples of surface residues on the workpiece after one or more cleanings, and train the network model of the improved U-Net semantic segmentation model.
[0052] When collecting image samples of surface residues on a workpiece after one or more cleaning processes, it is necessary to calibrate the camera parameters in advance to ensure that the residue images captured by the camera are consistent with the target position during actual processing by the laser galvanometer. This includes confirming the camera's internal parameters, such as focal length and principal point coordinates, and confirming the camera's external parameters, such as the camera's position and orientation. This is usually done through a camera calibration process, which can be performed using a specific calibration plate or an object of known size. Subsequently, feature points are extracted from each image, including but not limited to corner points and edge points. Attempts are made to match these feature points between different images to determine the correspondence of the same spatial point in different images.
[0053] The improved U-Net semantic segmentation model is trained by establishing a loss function, which is correlated with classification error and region overlap error.
[0054] Total loss function satisfy,
[0055]
[0056] For pixel-level classification error,
[0057]
[0058] in, Here, N represents the class weights, and N is the total number of pixels. For each pixel i, the model's predicted output is transformed using the Softmax function to obtain the probability. ,
[0059]
[0060] Where K is the number of categories, Let be the predicted logit value of pixel i for category k; the cross-entropy loss function is used to measure the deviation between the prediction and the true label, when the classification probability of the pixel is... When the value is close to 1, the loss approaches 0, which can encourage the network model to output a low loss value for correctly classified categories.
[0061] This is for regional overlap error.
[0062]
[0063] in, These represent the number of pixels predicted for true positive, false positive, and false negative, respectively. This is a smoothing constant to prevent the denominator from being zero.
[0064] (3) Collect images of surface residues on the workpiece after each cleaning and use the trained improved U-Net semantic segmentation model to identify the residues;
[0065] After the improved U-Net semantic segmentation model was used for recognition, most of the remaining objects were pixel-level irregular masks with complex regional morphology and jagged segmentation edges, making it difficult to directly convert them into vector trajectories that could be used by the galvanometer control system. If the original mask data was used directly for galvanometer scanning, it would lead to problems such as trajectory overlap, scanning blind spots, and uneven distribution of capabilities.
[0066] (4) Extract the identification region of the residue from the output identification image using a preset image processing algorithm and perform contour regularization processing to obtain the coordinates and contour information of all residues in the image;
[0067] In this invention, the output recognition image is binarized and rasterized, and the raster is clustered based on connected component analysis to identify the image location corresponding to one or more regions where the residue is located, thus completing the preprocessing.
[0068] Specifically, a grid-fill-based algorithm is used to generate coordinate information of the regularized contour of the residue region, which facilitates the control of the galvanometer for secondary processing scanning. This includes the following steps:
[0069] (4-1) Input the initial surface residue image The improved U-Net outputs a binary mask after recognition.
[0070]
[0071] in, Represents the set of residual pixels;
[0072] The image coordinate system is divided into uniform parts according to the set resolution. There are G grid cells, and the center coordinates of each grid cell are: ;
[0073] It should be noted that, based on the recognition results of the model, the preset image processing algorithm will cover the residue with a semi-transparent mask of different colors according to the type of residue, such as rust spots, paint stains, etc. Therefore, the type of residue can be determined based on the recognition results, and the corresponding process parameters will be used for scanning in the future. The process parameters are obtained through pre-processing.
[0074] (4-2) Connectivity analysis and filling reconstruction: Using eight-neighborhood-based connectivity analysis, the raster set is clustered and identified to identify each independent residual region. Based on this, the outer contour of each residual block is reconstructed using a filling algorithm to obtain a continuous boundary raster sequence.
[0075] Specifically, the process begins by traversing from the top left corner of the image until the first grid cell containing residue is found. Starting from this position, the search for the next connected grid cell proceeds counter-clockwise. To ensure the final regularized border closely matches the outline of the residue, the connectivity is determined using the 8-neighborhood rule. During the determination, the area occupied by the residue is calculated for each region. For satisfying To retain, This is the set threshold; after traversal, a set of discrete regions composed of regular grid cells is obtained.
[0076]
[0077] Each of them Describe a connected region of residues that satisfies ;
[0078] After obtaining all the outer grid information of the residue mask, these unit coordinates are connected into a smooth profile curve and converted into a galvanometer control coordinate format.
[0079] This invention employs a grid-fill-based method for regularizing the contour of residue regions. This method takes the binary mask output by the recognition model as input and performs block division, gridding, contour extraction and smoothing on the residue region to achieve a controllable transformation from pixel-level information to geometric contours.
[0080] (5) Path planning is performed on the identified residues to obtain the optimal re-cleaning galvanometer scanning sequence.
[0081] Extract the location description information of all residues in the target area within the processing area, perform path planning on these distributed locations, and finally obtain the optimal galvanometer scanning motion trajectory.
[0082] The location description information includes the center point of each region and the region's envelope.
[0083] Based on the optimal galvanometer scanning motion trajectory, cleaning commands are sent to the scanning galvanometer one by one. The processing surface of the galvanometer is adjusted to be parallel to the workpiece surface, and the processing area of the laser scanning galvanometer is ensured to cover the target residue area.
[0084] Cleaning parameters are configured according to the type of residue, and then transmitted to the scanning galvanometer to obtain the corresponding laser energy for residue cleaning.
[0085] In this invention, a scanning path is generated based on the contour direction and laser energy distribution strategy (spot characteristics). The spacing of the scanning path is adjusted according to the magnitude of the laser energy to achieve uniform energy distribution and avoid local overheating or cleaning. The galvanometer parameters are configured according to the path planning of multiple residue regions. For multiple residue targets, a lower power is used for scanning smaller targets. After the recognition model extracts multiple residue regions, to avoid frequent switching and repeated start-stop of the laser galvanometer between regions, which would reduce processing efficiency, a global analysis of the geometric positional relationship of each region is performed based on the recognition of multiple independent residue contours. This is combined with path cost function calculation and optimization algorithm to achieve overall motion optimization of the laser scanning system.
[0086] Specifically, the location information of all residue areas is extracted and modeled. First, the centroid coordinates, bounding rectangles, and area information are extracted to construct a set of regions.
[0087]
[0088] in, Let represent the i-th independent residue region, and each region corresponds to an independent laser scanning task unit. For ease of path planning, the geometric center of each region is defined as the node location. This is used to construct a spatial coordinate node graph for path planning algorithms.
[0089] Based on the motion characteristics of the laser galvanometer, including response speed, rotation angle limitations, and scanning delay, a movement cost function between regions is defined.
[0090]
[0091] in, This represents the Euclidean distance between the centroids of two regions. It reflects the scanning direction deviation when the laser galvanometer switches between adjacent regions; These are weighting coefficients. The angle change weight parameter is used to balance the galvanometer movement distance and the cost of direction switching. When the scanning direction of adjacent areas differs greatly, the algorithm will increase its path cost to guide the overall path to be consistent in direction, thereby optimizing the dynamic performance and scanning stability of the system. The cost function can quantitatively describe the energy consumption and time cost of switching the galvanometer between different areas.
[0092] The centroid positions of all target areas are converted into nodes in a coordinate system, and then an ant colony algorithm is used to solve the problem. Specifically, pheromones are initialized for each path, indicating that all paths initially have no priority. Then, by simulating the process of ants searching for food, combined with the enhancement and evaporation mechanisms of pheromones, the laser cleaning scanning path is optimized. Through continuous iteration, the algorithm can find the shortest path covering all target residue areas, thereby improving cleaning efficiency.
[0093] At this point, the total path cost function is:
[0094]
[0095] The final result is the region access sequence that minimizes the total path cost function;
[0096] Trajectory fusion and dynamic parameter optimization; in each sub-region The internal scanning path is further generated, and different strategies can be adopted according to the shape of the residue, including but not limited to zigzag, back-shaped, and bow-shaped patterns. During the transition between regions, the laser power needs to be reduced and the galvanometer acceleration needs to be increased. The power and speed are gradually stabilized before entering the scanning area to achieve a smooth transition. The overlapping paths at the boundaries of adjacent regions are automatically merged to avoid repeated processing.
[0097] This invention also relates to a laser cleaning residue identification and re-cleaning system based on an improved U-Net semantic segmentation model, comprising:
[0098] An image acquisition unit is used to acquire images of surface residues on the workpiece after each cleaning.
[0099] A control terminal 3 is used to identify residues and plan a re-cleaning path based on the laser cleaning residue identification and re-cleaning method based on the improved U-Net semantic segmentation model.
[0100] A robotic arm 4 is used to perform actions based on the re-cleaning path output from the control terminal.
[0101] In this invention, the image acquisition unit is generally an industrial camera 1 fixed on the laser scanning galvanometer 2. By installing it in a manner consistent with the field of view of the galvanometer 2, real-time image acquisition of the workpiece surface within the processing area of the galvanometer 2 is achieved. The acquired image data is transmitted to the control terminal 3 via an industrial communication interface as input to the improved U-Net semantic segmentation model. The field of view coverage area of the industrial camera 1 and the scanning area of the galvanometer are calibrated in the same coordinate system, realizing the spatial correspondence between the image coordinates and the laser action coordinates, providing a precise basis for subsequent path planning and re-cleaning control.
[0102] The control terminal 3 is equipped with a detection module containing a trained and optimized improved U-Net semantic segmentation model. During system operation, the detection module performs pixel-level feature extraction and semantic segmentation on the input image and outputs the identification results of the residue region. The identification results are represented in the form of binary or multi-class masks, including the spatial location, boundary contour and area information of each residue region. Subsequently, the control module in the control terminal 3 performs image to galvanometer 2 coordinate transformation calculation, contour parsing and path planning, as well as instruction encoding and execution information generation: converting the region contour, position and scanning order into a data format that conforms to the galvanometer 2 control protocol and sending it to the execution module.
[0103] The execution module outputs execution commands to the robotic arm 4, which is equipped with a laser scanning galvanometer 2. The camera 1 is also fixed on the galvanometer 2 for easy image acquisition and coordinate system transformation. The laser scanning galvanometer 2 receives execution commands sent by the control terminal 3 and re-cleans the identified residue areas. The execution commands include information such as the location of the residue, its contour boundary, scanning path, and energy parameters. When multiple residue areas exist, the system automatically generates the optimal scanning sequence based on the path planning algorithm, reducing the number of galvanometer jumps and idle movement time, thereby improving the overall cleaning efficiency and energy utilization.
[0104] In actual execution, the position of the robot arm 4 is preset according to the position of the workpiece to be cleaned, the processing surface of the galvanometer 2 is adjusted to be parallel to the workpiece surface, and the processing area of the laser scanning galvanometer 2 is ensured to cover the target residue area. In order to achieve the best cleaning effect, the distance between the laser scanning galvanometer 2 and the processing surface must meet the focal depth requirements of the galvanometer 2.
[0105] After the camera 1 and the galvanometer 2 are calibrated, the position coordinates of the residue in the image of the camera 1 can be accurately converted into the processing scanning coordinates of the galvanometer 2;
[0106] Based on the type of residue, such as paint, oil, and rust, the galvanometer 2 loads preset process parameters to achieve optimal cleaning;
[0107] After the laser scanning galvanometer 2 completes the cleaning of residues within the processing area, it controls the six-axis robot (manipulator 4) to move to the next area to be cleaned.
[0108] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0109] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0110] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0111] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0112] Although preferred embodiments of the invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including both the preferred embodiments and all changes and modifications falling within the scope of the invention.
[0113] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.
Claims
1. A method for laser cleaning residue identification and re-cleaning based on an improved U-Net semantic segmentation model, characterized in that: An improved U-Net semantic segmentation model integrating Transformer and CBAM attention mechanisms is established to identify residual areas after laser cleaning; surface residual image samples of workpieces after one or more cleanings are collected and used to train the improved U-Net semantic segmentation model. Images of surface residues on the workpiece are collected after each cleaning, and the improved U-Net semantic segmentation model is trained to identify the residues. The preset image processing algorithm is used to extract the identification area of the residue from the output identification image and perform contour regularization processing to obtain the coordinates and contour information of all residues in the image. The path planning is performed on the identified residues to obtain the optimal re-cleaning galvanometer scanning sequence.
2. The laser cleaning residue identification and re-cleaning method based on an improved U-Net semantic segmentation model according to claim 1, characterized in that: The improved U-Net semantic segmentation model adopts an encoder-decoder structure; The encoder includes three sequentially arranged convolutional layers and a downsampling module, with a Transformer module following the downsampling module. The decoder includes an upsampling module corresponding to the convolutional layer, and the upsampling module is connected to the convolutional layer in a skip connection.
3. The laser cleaning residue identification and re-cleaning method based on an improved U-Net semantic segmentation model according to claim 2, characterized in that: Embed the CBAM attention module in the skip connection.
4. The laser cleaning residue identification and re-cleaning method based on an improved U-Net semantic segmentation model according to claim 1, characterized in that: The improved U-Net semantic segmentation model is trained by establishing a loss function, which is correlated with classification error and region overlap error.
5. The laser cleaning residue identification and re-cleaning method based on an improved U-Net semantic segmentation model according to claim 1, characterized in that: The output recognition image is binarized and rasterized. Based on connected component analysis, the raster is clustered to identify the image location corresponding to one or more regions where the residue is located, thus completing the preprocessing.
6. The laser cleaning residue identification and re-cleaning method based on an improved U-Net semantic segmentation model according to claim 5, characterized in that: Extract the location description information of all residues in the target area within the processing area, perform path planning on these distributed locations, and finally obtain the optimal galvanometer scanning motion trajectory.
7. The laser cleaning residue identification and re-cleaning method based on an improved U-Net semantic segmentation model according to claim 6, characterized in that: The location description information includes the center point of each region and the region's envelope.
8. The laser cleaning residue identification and re-cleaning method based on an improved U-Net semantic segmentation model according to claim 6, characterized in that: Based on the optimal galvanometer scanning motion trajectory, cleaning commands are sent to the scanning galvanometer one by one. The processing surface of the galvanometer is adjusted to be parallel to the workpiece surface, and the processing area of the laser scanning galvanometer is ensured to cover the target residue area.
9. A method for laser cleaning residue identification and re-cleaning based on an improved U-Net semantic segmentation model according to claim 8, characterized in that: Cleaning parameters are configured according to the type of residue, and then transmitted to the scanning galvanometer to obtain the corresponding laser energy for residue cleaning.
10. A laser cleaning residue identification and re-cleaning system based on an improved U-Net semantic segmentation model, characterized in that: include: An image acquisition unit is used to acquire images of surface residues on the workpiece after each cleaning. A control terminal is used to identify residues and plan a re-cleaning path based on the laser cleaning residue identification and re-cleaning method based on the improved U-Net semantic segmentation model as described in any one of claims 1 to 9. A robotic arm is used to perform actions based on the re-cleaning path output from the control terminal.