A metal plate cutting processing method and system based on image segmentation

CN116630255BActive Publication Date: 2026-08-21INST OF INTELLIGENT MFG GUANGDONG ACAD OF SCI
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310533687.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-11
Publication Date
2026-08-21
Estimated Expiration
2043-05-11

AI Technical Summary

Technical Problem

[0004]鉴于现有技术的上述不足,本发明提供一种基于图像分割的金属板材切割加工方法及系统,有效解决现有技术中金属板材表面缺陷位置标记范围不精确导致金属材料不能高效利用,以及不能根据实际金属材料的形状和表面缺陷分布特点,实时调整优化切割路径的问题

Benefits of technology

[0038] This invention designs a SCANet (Space and Channels Attention Net) attention mechanism module, which integrates spatial coordinate information extraction and channel information extraction modules into the attention network. This allows it to capture both direction and position awareness information, as well as extract information between image channels. The SCANet attention mechanism is integrated into the DeepLabV3+ backbone network. By rapidly scanning the global image, it identifies the surface defect regions of the metal material that require focused attention, thereby acquiring more detailed information about the target while suppressing other useless information, especially masking areas that are prone to causing confusion. The introduction of dilated convolution and batch normalization mechanisms further improves the accuracy and efficiency of image segmentation. During the training phase, multi-scale and random cropping strategies are employed to enhance the model's adaptability to different scales and angles. Simultaneously, a genetic algorithm is used for path planning for each defect region to obtain the optimal cutting path for each defect region, maximizing the area of ​​the cut sheet material.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116630255B_ABST
    Figure CN116630255B_ABST
Patent Text Reader

Abstract

The application provides a metal plate cutting processing method and system based on image segmentation, which comprises the following steps: collecting two-dimensional image data of a metal plate as a training data set in real time; constructing an improved DeepLabV3+ image segmentation network model, which comprises a batch normalization layer, an encoding layer, an attention mechanism network layer and a decoding layer; inputting the training data set into the improved DeepLabV3+ image segmentation network model for image segmentation training, segmenting out defect areas in the image to form metal plate contour set data; adopting a genetic algorithm for path planning on each defect area of the metal plate contour set data to obtain an optimal cutting path of each defect area, and completing the cutting of the metal plate according to the optimal cutting path. The improved DeepLabV3+ backbone network is fused with the SCANet attention mechanism, the accuracy and efficiency of image segmentation are improved, the metal material surface defect area can be accurately marked, and the adaptability of the model to different scales and angles is enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of metal processing technology and image processing and detection technology, specifically to a method and system for cutting and processing metal sheets based on image segmentation. Background Technology

[0002] Currently, sheet metal serves as the rough blank for most metal parts and is widely used in the processing and manufacturing of mechanical components. During sheet metal cutting, the cutting area needs to be planned according to the shape. Traditional sheet metal cutting relies primarily on manual experience, which is not only costly and wasteful of sheet metal, but also increases the uncertainty of the cutting process due to subjective differences in the experience of different cutters. With the development of science and technology, sheet metal cutting methods based on manual programming have begun to be widely used. However, these methods require manual planning of the cutting path and cannot be dynamically adjusted, making them unsuitable for complex cutting tasks.

[0003] With the continuous development of computer technology, automated cutting systems have gradually replaced traditional manual programming methods. However, traditional automated cutting systems still have some problems. For example, traditional sheet metal surface defect detection algorithms use rectangular boxes to mark defect areas. When the defect shape is irregular, the rectangular boxes mark too many defect background areas, resulting in the background area of ​​the defect being part of normal sheet metal, which leads to a huge waste of sheet metal during cutting. Inaccurate positioning of defect areas also leads to inaccurate cutting paths and an inability to adapt to complex shapes, different sizes, and different specifications of metal sheets. At the same time, commonly used metal sheet cutting methods cannot adjust and optimize the cutting path in real time according to the actual shape of the metal material and the distribution characteristics of surface defects. Summary of the Invention

[0004] In view of the above-mentioned shortcomings of the prior art, the present invention provides a metal sheet cutting method and system based on image segmentation, which effectively solves the problems in the prior art where the inaccurate marking range of surface defect positions on metal sheets leads to inefficient utilization of metal materials, and the inability to adjust and optimize the cutting path in real time according to the actual shape and surface defect distribution characteristics of the metal materials.

[0005] In a first aspect, the present invention provides a method for cutting metal sheets based on image segmentation, the method comprising the following steps:

[0006] Two-dimensional image data of metal sheets are acquired in real time and used as a training dataset;

[0007] An improved DeepLabV3+ image segmentation network model was constructed, including a batch normalization layer, an encoding layer, an attention mechanism network layer, and a decoding layer;

[0008] The training dataset is input into the improved DeepLabV3+ image segmentation network model for image segmentation training, and the defective regions in the image are segmented to form a set of metal sheet contour data.

[0009] A genetic algorithm is used to plan the path for each defect region of the metal sheet contour set data to obtain the optimal cutting path for each defect region, and the metal sheet is cut according to the optimal cutting path.

[0010] Preferably, the batch normalization layer in the improved DeepLabV3+ image segmentation network model is used to normalize the data in the training dataset, so that the input data of each layer has the same distribution.

[0011] Preferably, the encoding layer in the improved DeepLabV3+ image segmentation network model is used to extract features from the two-dimensional images in the training dataset to obtain shallow feature maps and deep feature maps, and to perform enhanced feature extraction on the deep feature maps. The encoding layer includes:

[0012] Deep convolutional neural networks (DCNNs) are used to extract features from two-dimensional images and obtain shallow and deep feature maps.

[0013] The Spatial Pyramid Pooling Module (ASPP) is used to further extract effective features from deep feature maps using dilated convolutions with different dilation rates.

[0014] A 1×1 convolutional layer Conv1 is used to adjust the number of channels in the deep feature map output by the spatial pyramid pooling module ASPP, thereby obtaining a deep feature map with high semantic information.

[0015] Preferably, the deep convolutional neural network (DCNN) can use any one of the ResNet, Xception, and Mobilenetv2 models as the backbone network for feature extraction.

[0016] Preferably, the attention mechanism network layer in the improved DeepLabV3+ image segmentation network model is used to extract global information from deep feature maps with high semantic information, and to increase attention to the texture changes of the metal sheet surface image in the deep feature maps with high semantic information. The attention mechanism network layer includes:

[0017] The spatial coordinate information extraction module is used to obtain the direction-aware and position-aware information in the deep feature map with high semantic information;

[0018] The channel information extraction module is used to extract information between channels of the deep feature map with high semantic information.

[0019] Preferably, the decoding layer in the improved DeepLabV3+ image segmentation network model is used to further fuse shallow and deep features, improving the accuracy of segmentation boundaries. The decoding layer includes:

[0020] A 1×1 convolutional layer, Conv2, is used to adjust the number of channels in the shallow feature map output by the deep convolutional neural network (DCNN).

[0021] The first upsampling layer is used to perform upsampling operations on the deep feature maps output by the attention mechanism network layer.

[0022] The fusion module is used to fuse the shallow feature map output by the 1×1 convolutional layer Conv2 with the deep feature map output by the first upsampling layer to obtain a feature fusion map.

[0023] The attention mechanism network module is used to extract features of the defect region on the surface of the metal sheet in the feature fusion image;

[0024] A 3×3 convolutional layer is used to further extract features from the feature map output by the attention mechanism network module;

[0025] The second upsampling layer is used to perform upsampling operations on the feature maps output by the 3×3 convolutional layer.

[0026] Preferably, the step of inputting the training dataset into the improved DeepLabV3+ image segmentation network model for image segmentation training specifically includes:

[0027] The training dataset is input into the batch normalization layer for normalization and then input into the encoding layer;

[0028] The encoding layer extracts features from the two-dimensional images in the training dataset to obtain shallow feature maps and deep feature maps. The shallow feature maps are then input into the decoding layer, and the deep feature maps are processed by enhanced feature extraction and input into the attention mechanism network layer.

[0029] The attention mechanism network layer extracts global information from the deep feature map, adds attention to the texture changes of the metal plate surface image in the deep feature map, and then inputs it into the decoding layer;

[0030] The decoding layer fuses the shallow feature map with the deep feature map to extract the features of the defect area on the surface of the metal sheet, accurately detects and segments the defect area on the surface of the metal sheet, and obtains the metal sheet contour set data.

[0031] Secondly, the present invention provides a metal sheet cutting and processing system based on image segmentation, the system comprising:

[0032] The image acquisition unit is used to acquire two-dimensional image data of metal sheets in real time as a training dataset;

[0033] The model building unit is used to build an improved DeepLabV3+ image segmentation network model, including a batch normalization layer, an encoding layer, an attention mechanism network layer, and a decoding layer.

[0034] The model training unit is used to input the training dataset into the improved DeepLabV3+ image segmentation network model for image segmentation training, segment out the defective regions in the image, and form a set of sheet metal contour data.

[0035] The path planning unit is used to perform path planning for each defect region of the contour set data using a genetic algorithm to obtain the optimal cutting path for each defect region, and to complete the cutting of the metal sheet according to the optimal cutting path.

[0036] Thirdly, the present invention provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor executes the program to implement the steps of the metal sheet cutting and processing method based on image segmentation as described in the first aspect of the present invention.

[0037] Fourthly, the present invention provides a non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, when the computer program is executed by a processor, it implements the steps of the metal sheet cutting and processing method based on image segmentation as described in the first aspect of the present invention.

[0038] This invention designs a SCANet (Space and Channels Attention Net) attention mechanism module, which integrates spatial coordinate information extraction and channel information extraction modules into the attention network. This allows it to capture both direction and position awareness information, as well as extract information between image channels. The SCANet attention mechanism is integrated into the DeepLabV3+ backbone network. By rapidly scanning the global image, it identifies the surface defect regions of the metal material that require focused attention, thereby acquiring more detailed information about the target while suppressing other useless information, especially masking areas that are prone to causing confusion. The introduction of dilated convolution and batch normalization mechanisms further improves the accuracy and efficiency of image segmentation. During the training phase, multi-scale and random cropping strategies are employed to enhance the model's adaptability to different scales and angles. Simultaneously, a genetic algorithm is used for path planning for each defect region to obtain the optimal cutting path for each defect region, maximizing the area of ​​the cut sheet material. Attached Figure Description

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

[0040] Figure 1 This is a flowchart of a metal sheet cutting method based on image segmentation according to an embodiment of the present invention;

[0041] Figure 2 This is a schematic diagram of a structure based on an improved DeepLabV3+ network according to an embodiment of the present invention;

[0042] Figure 3 This is a schematic diagram of the workflow of the attention mechanism network SCANet according to an embodiment of the present invention;

[0043] Figure 4 This is a structural block diagram of a metal sheet cutting and processing system based on image segmentation according to an embodiment of the present invention;

[0044] Figure 5 This is a schematic diagram of the electronic device structure according to an embodiment of the present invention. Detailed Implementation

[0045] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be further described clearly and completely below with reference to the accompanying drawings of the embodiments of this invention. It should be noted that the described embodiments are merely some embodiments of this invention, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.

[0046] In the embodiments of this application, the term "and / or" is merely a description of the relationship between related objects, indicating that there can be three relationships. For example, A and / or B can represent three situations: A exists alone, A and B exist simultaneously, and B exists alone.

[0047] The terms "first" and "second" used in the embodiments of this application are for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this application, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a system, product, or device that includes a series of components or units is not limited to the listed components or units, but may optionally include unlisted components or units, or may optionally include other components or units inherent to such products or devices. In the description of this application, "a plurality of" means at least two, such as two, three, etc., unless otherwise explicitly specified.

[0048] In the field of sheet metal cutting, traditional automated cutting systems have some problems. For example, traditional sheet metal surface defect detection algorithms use rectangular boxes to mark defect areas. When the defect shape is irregular, the rectangular boxes mark too many defect background areas, resulting in the background area of ​​the defect being a normal sheet metal, which leads to a huge waste of sheet metal during cutting. Inaccurate positioning of defect areas also leads to inaccurate cutting paths and an inability to adapt to complex shapes, different sizes, and different specifications of sheet metal. At the same time, commonly used sheet metal cutting methods cannot adjust and optimize the cutting path in real time according to the actual shape of the metal material and the distribution characteristics of surface defects.

[0049] This invention provides a metal sheet cutting method and system based on image segmentation, which effectively solves the problems in the prior art where the inaccurate marking range of surface defect locations on metal sheets leads to inefficient utilization of metal materials, and the inability to adjust and optimize the cutting path in real time according to the actual shape and surface defect distribution characteristics of the metal materials.

[0050] Figure 1 This is a flowchart of a metal sheet cutting method based on image segmentation according to an embodiment of the present invention, as shown below. Figure 1 As shown, the method includes the following steps:

[0051] Step S1: Real-time acquisition of two-dimensional image data of metal sheets as training dataset;

[0052] Two-dimensional image data of metal sheets are acquired in real time using cameras or industrial cameras. The two-dimensional image data is used as a training dataset and transmitted to subsequent units through reliable data transmission methods such as RTMP and FTP.

[0053] Step S2: Construct an improved DeepLabV3+ image segmentation network model, including a batch normalization layer, an encoding layer, an attention mechanism network layer, and a decoding layer;

[0054] Figure 2 This is a schematic diagram of a structure based on an improved DeepLabV3+ network according to an embodiment of the present invention, as shown below. Figure 2 As shown, the improved DeepLabV3+ network includes:

[0055] 1. Batch Normalization Layer: This layer normalizes the data in the training dataset, ensuring that the input data for each layer has the same distribution. The improved DeepLabV3+ model introduces Batch Normalization (BN) to normalize the input data, ensuring that the input data for each layer has the same distribution. This reduces internal covariate shifting issues during training, accelerates model convergence, and reduces the model's dependence on hyperparameters. Specifically, the BN mechanism standardizes the input data for each layer, transforming it into a distribution with a mean of 0 and a variance of 1 through mean and variance normalization.

[0056] 2. An encoding layer, used to extract features from the two-dimensional images in the training dataset to obtain shallow feature maps and deep feature maps, and to perform enhanced feature extraction on the deep feature maps. The encoding layer mainly includes:

[0057] Deep Convolutional Neural Networks (DCNNs) are used to extract features from two-dimensional images, obtaining shallow and deep feature maps. DCNNs can use any of the ResNet, Xception, and Mobilenetv2 models as the backbone network for feature extraction.

[0058] The Atrous Spatial Pyramid Pooling (ASPP) module is used to further extract effective features from deep feature maps using dilated convolutions with different dilation rates. The ASPP module consists of a 1×1 convolutional layer, three dilated convolutional layers with dilation rates of 6, 12, and 18, and a global average pooling layer. By introducing dilated convolutions, the receptive field of the convolutional kernel can be expanded, while avoiding excessive shrinking of the feature map size. This allows for better capture of feature information of objects of different sizes, enhancing the model's ability to perceive object edges and details.

[0059] A 1×1 convolutional layer Conv1 is used to adjust the number of channels in the deep feature map output by the spatial pyramid pooling module ASPP, thereby obtaining a deep feature map with high semantic information.

[0060] 3. An attention mechanism network layer, used to extract global information from deep feature maps with high semantic information, and to increase attention to the texture changes of the metal sheet surface image in the deep feature maps with high semantic information. The attention mechanism network layer includes:

[0061] The spatial coordinate information extraction module is used to obtain the direction-aware and position-aware information in the deep feature map with high semantic information;

[0062] The channel information extraction module is used to extract information between channels of the deep feature map with high semantic information.

[0063] Figure 3 This is a schematic diagram of the workflow of the attention mechanism network SCANet according to an embodiment of the present invention, as shown below. Figure 3 As shown, the workflow of the attention mechanism network SCANet is as follows:

[0064] (1) The input data of the attention mechanism network SCANet is 3-channel image data, with image width W and image height H, denoted as D.

[0065] (2) Input data D undergoes feature extraction via the spatial coordinate information network module and the channel information network module, respectively:

[0066] The channel information network module first compresses the input data D, enabling the model to extract global information. The compression formula is as follows:

[0067]

[0068] In the above formula, o c It is the output of the c-th channel, d c (i,j) is the image data of the position coordinates (i,j) of the c-th channel image. The image has 3 channels, i.e., c∈[1,2,3].

[0069] Then, through incentive operations, the dependencies between channels are obtained. The incentive operation formula is as follows:

[0070]

[0071]

[0072] In the above formula, δ represents the Sigmoid function, and T1 and T2 represent learnable linear transformations to extract the importance parameters of the channels. This is the final data output by the channel information network module.

[0073] The spatial coordinate information network module first uses pooling layers of (H,1) and (1,W) to encode each channel along the X and Y coordinate directions of the image, where:

[0074] The output of the c-th channel at height h is represented as:

[0075]

[0076] In the above formula, d c (h,j) is the image data of the position coordinates (h,j) of the c-th channel image; the image has 3 channels, i.e., c∈[1,2,3];

[0077] The output of the c-th channel with width w is represented as:

[0078]

[0079] In the above formula, d c (i,w) is the image data of the position coordinates (i,w) of the c-th channel image. The image has 3 channels, i.e., c∈[1,2,3].

[0080] These two transformations enable the attention mechanism network SCANet to extract dependencies along one spatial direction and preserve precise location information along the other spatial direction, allowing the network to more accurately locate the target of interest.

[0081] Then cascaded through connection operations and After a 1x1 convolution and transformation F1, feature maps f of spatial information in the X and Y directions are generated, as shown in the following formula:

[0082] f=δ(F1([o h ,o w ])) (6)

[0083] Next, divide f into two separate tensors along the spatial dimension, and then use two 1*1 convolutions to transform the tensors to obtain the final output result as follows:

[0084]

[0085] In the above equation, the two individual tensors are respectively and r is the downsampling ratio coefficient.

[0086] (3) The outputs of the spatial coordinate information network module and the channel information network module are weighted and fused to obtain the final result F as follows:

[0087]

[0088] In the above formula, g h and g w This is the output of the spatial coordinate information network module. This is the output of the channel information network module.

[0089] 4. Decoding layer: Used to further fuse shallow and deep features, improving the accuracy of segmentation boundaries. The decoding layer includes:

[0090] A 1×1 convolutional layer, Conv2, is used to adjust the number of channels in the shallow feature map output by the deep convolutional neural network (DCNN).

[0091] The first upsampling layer is used to perform upsampling operations on the deep feature maps output by the attention mechanism network layer.

[0092] The fusion module is used to fuse the shallow feature map output by the 1×1 convolutional layer Conv2 with the deep feature map output by the first upsampling layer to obtain a feature fusion map.

[0093] The attention mechanism network module is used to extract features of the defect region on the surface of the metal sheet in the feature fusion image;

[0094] A 3×3 convolutional layer is used to further extract features from the feature map output by the attention mechanism network module;

[0095] The second upsampling layer is used to perform upsampling operations on the feature maps output by the 3×3 convolutional layer.

[0096] Step S3: Input the training dataset into the improved DeepLabV3+ image segmentation network model for image segmentation training, segment the defective regions in the image, and form a set of metal sheet contour data. The specific training steps are as follows:

[0097] The training dataset is input into the batch normalization layer. The batch normalization layer normalizes the input data of each layer by normalizing the mean and variance, transforming it into a distribution with a mean of 0 and a variance of 1 before inputting it into the encoding layer.

[0098] The deep convolutional neural network (DCNN) in the encoding layer extracts features from the two-dimensional images in the training dataset, obtaining shallow and deep feature maps. The shallow feature maps are then directly input into the decoding layer, while the deep feature maps are input into the Spatial Pyramid Pooling Module (ASPP) in the encoding layer. Within the ASPP structure, the features are further extracted in parallel through 1×1 convolutions with dilated convolutions of 6, 12, and 18, followed by global average pooling to fuse the feature maps and avoid information loss. Next, a 1×1 convolutional layer (Conv1) is used to adjust the number of channels in the deep feature maps output by the ASPP, obtaining deep feature maps with high semantic information, which are then input into the attention mechanism network layer.

[0099] The attention mechanism network layer obtains direction and position awareness information in the deep feature map with high semantic information through the spatial coordinate information extraction module, and extracts information between channels of the deep feature map with high semantic information through the channel information extraction module, thereby extracting global information of the deep feature map. After adding attention to the texture changes of the metal plate surface image in the deep feature map, it is input into the decoding layer.

[0100] The 1×1 convolutional layer Conv2 in the decoding layer adjusts the channels of the shallow feature map with low semantic information output from the encoding layer. The first upsampling layer upsamples the deep feature map with high semantic information output from the attention mechanism network layer. Then, the feature is fused through the fusion module. The fused feature map is then input into the attention mechanism network module to extract the features of the defect area on the surface of the metal sheet. Finally, the 3×3 convolutional layer and the second upsampling layer output the segmented defect area feature map, forming the metal sheet contour set data.

[0101] Step S4: Use a genetic algorithm to plan the path for each defect region of the metal sheet contour set data to obtain the optimal cutting path for each defect region, and complete the cutting of the metal sheet according to the optimal cutting path.

[0102] Two-dimensional images of the metal sheet are segmented using an improved DeepLabV3+ network. Defect regions are extracted from the images, and the segmented image data contains the edge contour information of the defects, forming a metal sheet contour set data, including the surface defect contours and the sheet's own contour. Path planning employs a genetic algorithm. Inputting the metal sheet contour set data, path planning is performed for each defect region to obtain the optimal cutting path for each defect region, maximizing the area of ​​the cut sheet material.

[0103] Another aspect of the present invention provides a metal sheet cutting and processing system based on image segmentation. Figure 4 This is a structural block diagram of a metal sheet cutting and processing system based on image segmentation according to an embodiment of the present invention, such as... Figure 4 As shown, the system includes:

[0104] Image acquisition unit 410 is used to acquire two-dimensional image data of metal sheet in real time as a training dataset;

[0105] Model building unit 420 is used to build an improved DeepLabV3+ image segmentation network model, including a batch normalization layer, an encoding layer, an attention mechanism network layer, and a decoding layer;

[0106] The model training unit 430 is used to input the training dataset into the improved DeepLabV3+ image segmentation network model for image segmentation training, segment out the defect region in the image, and form a set of board contour data.

[0107] The path planning unit 440 is used to perform path planning for each defect region of the contour set data using a genetic algorithm to obtain the optimal cutting path for each defect region, and to complete the cutting of the metal sheet according to the optimal cutting path.

[0108] Based on the same concept, embodiments of the present invention also provide a schematic diagram of an electronic device structure, such as... Figure 5 As shown, the server may include a processor 510, a communications interface 520, a memory 530, and a communication bus 540, wherein the processor 510, communications interface 520, and memory 530 communicate with each other via the communication bus 540. The processor 510 can call logical instructions in the memory 530 to execute the steps of the metal sheet cutting method based on image segmentation as described in the above embodiments. For example, this includes:

[0109] S1. Real-time acquisition of two-dimensional image data of metal sheets as training dataset;

[0110] S2. Construct an improved DeepLabV3+ image segmentation network model, including a batch normalization layer, an encoding layer, an attention mechanism network layer, and a decoding layer;

[0111] S3. Input the training dataset into the improved DeepLabV3+ image segmentation network model for image segmentation training, segment out the defective regions in the image, and form a set of metal sheet contour data.

[0112] S4. For each defect region of the metal sheet contour set data, a genetic algorithm is used for path planning to obtain the optimal cutting path for each defect region, and the metal sheet is cut according to the optimal cutting path.

[0113] The processor 510 can be a central processing unit (CPU). The processor can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or combinations thereof.

[0114] Furthermore, the logical instructions in the aforementioned memory 530 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, essentially, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0115] The memory 530 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created by the processor, etc. Furthermore, the memory may include high-speed random access memory and non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, the memory may optionally include memory remotely located relative to the processor, which can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0116] Based on the same concept, embodiments of the present invention also provide a non-transitory computer-readable storage medium storing a computer program containing at least one piece of code executable by a master control device to control the master control device to implement the steps of the image segmentation-based metal sheet cutting method described in the above embodiments. For example, it includes:

[0117] S1. Real-time acquisition of two-dimensional image data of metal sheets as training dataset;

[0118] S2. Construct an improved DeepLabV3+ image segmentation network model, including a batch normalization layer, an encoding layer, an attention mechanism network layer, and a decoding layer;

[0119] S3. Input the training dataset into the improved DeepLabV3+ image segmentation network model for image segmentation training, segment out the defective regions in the image, and form a set of metal sheet contour data.

[0120] S4. For each defect region of the metal sheet contour set data, a genetic algorithm is used for path planning to obtain the optimal cutting path for each defect region, and the metal sheet is cut according to the optimal cutting path.

[0121] Based on the same technical concept, this application also provides a computer program, which, when executed by a main control device, is used to implement the above-described method embodiments.

[0122] The program may be stored, in whole or in part, on a storage medium packaged with the processor, or in part or in whole on a memory not packaged with the processor.

[0123] Based on the same technical concept, this application also provides a processor for implementing the above-described method embodiments. The processor can be a chip.

[0124] In summary, this invention designs a SCANet attention mechanism module, integrating spatial coordinate information extraction and channel information extraction modules into the attention network. This module can capture both direction and position awareness information, as well as extract information between image channels. The SCANet attention mechanism is integrated into the DeepLabV3+ backbone network. By rapidly scanning the global image, it identifies the surface defect regions of the metal material requiring focused attention, thereby acquiring more detailed information about the target while suppressing other useless information, particularly masking areas prone to confusion. The introduction of dilated convolution and batch normalization mechanisms further improves the accuracy and efficiency of image segmentation. During the training phase, multi-scale and random cropping strategies are employed to enhance the model's adaptability to different scales and angles. Simultaneously, a genetic algorithm is used for path planning for each defect region, obtaining the optimal cutting path for each defect region to maximize the area of ​​the cut sheet material.

[0125] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0126] The embodiments described above are merely illustrative of several implementations of the present invention, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these modifications and improvements all fall within the scope of protection of the present invention. Therefore, the scope of protection of this patent should be determined by the appended claims.

[0127] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for cutting and processing metal sheets based on image segmentation, characterized in that, The method includes the following steps: Two-dimensional image data of metal sheets are acquired in real time and used as a training dataset; An improved DeepLabV3+ image segmentation network model was constructed, including a batch normalization layer, an encoding layer, an attention mechanism network layer, and a decoding layer; The training dataset is input into the improved DeepLabV3+ image segmentation network model for image segmentation training, and the defective regions in the image are segmented to form a set of metal sheet contour data. A genetic algorithm is used to plan the path for each defect region of the metal sheet contour set data to obtain the optimal cutting path for each defect region, and the metal sheet is cut according to the optimal cutting path. The step of inputting the training dataset into the improved DeepLabV3+ image segmentation network model for image segmentation training specifically includes: The training dataset is input into the batch normalization layer for normalization and then input into the encoding layer; The encoding layer extracts features from the two-dimensional images in the training dataset to obtain shallow feature maps and deep feature maps. The shallow feature maps are then input into the decoding layer, and the deep feature maps are processed by enhanced feature extraction and input into the attention mechanism network layer. The attention mechanism network layer extracts global information from the deep feature map, adds attention to the texture changes of the metal plate surface image in the deep feature map, and then inputs it into the decoding layer; The decoding layer fuses the shallow feature map with the deep feature map to extract the features of the defect area on the surface of the metal sheet, accurately detects and segments the defect area on the surface of the metal sheet, and obtains the metal sheet contour set data.

2. The metal sheet cutting method based on image segmentation according to claim 1, characterized in that, The batch normalization layer in the improved DeepLabV3+ image segmentation network model is used to normalize the data in the training dataset, so that the input data of each layer has the same distribution.

3. The metal sheet cutting method based on image segmentation according to claim 1, characterized in that, The encoding layer in the improved DeepLabV3+ image segmentation network model is used to extract features from the two-dimensional images in the training dataset, obtaining shallow feature maps and deep feature maps, and to perform enhanced feature extraction on the deep feature maps. The encoding layer includes: Deep convolutional neural networks (DCNNs) are used to extract features from two-dimensional images and obtain shallow and deep feature maps. The Spatial Pyramid Pooling Module (ASPP) is used to further extract effective features from deep feature maps using dilated convolutions with different dilation rates. A 1×1 convolutional layer Conv1 is used to adjust the number of channels in the deep feature map output by the spatial pyramid pooling module ASPP, thereby obtaining a deep feature map with high semantic information.

4. The metal sheet cutting method based on image segmentation according to claim 3, characterized in that, The deep convolutional neural network (DCNN) can use any one of the ResNet, Xception, and Mobilenetv2 models as the backbone network for feature extraction.

5. The metal sheet cutting method based on image segmentation according to claim 1, characterized in that, The attention mechanism network layer in the improved DeepLabV3+ image segmentation network model is used to extract global information from deep feature maps with high semantic information, and to increase attention to the texture changes of the metal sheet surface image in the deep feature maps with high semantic information. The attention mechanism network layer includes: The spatial coordinate information extraction module is used to obtain the direction-aware and position-aware information in the deep feature map with high semantic information; The channel information extraction module is used to extract information between channels of the deep feature map that has high semantic information.

6. The metal sheet cutting method based on image segmentation according to claim 1, characterized in that, The decoding layer in the improved DeepLabV3+ image segmentation network model is used to further fuse shallow and deep features, improving the accuracy of segmentation boundaries. The decoding layer includes: A 1×1 convolutional layer, Conv2, is used to adjust the number of channels in the shallow feature map output by the deep convolutional neural network (DCNN). The first upsampling layer is used to perform upsampling operations on the deep feature maps output by the attention mechanism network layer. The fusion module is used to fuse the shallow feature map output by the 1×1 convolutional layer Conv2 with the deep feature map output by the first upsampling layer to obtain a feature fusion map. The attention mechanism network module is used to extract features of the defect region on the surface of the metal sheet in the feature fusion image; A 3×3 convolutional layer is used to further extract features from the feature map output by the attention mechanism network module; The second upsampling layer is used to perform upsampling operations on the feature maps output by the 3×3 convolutional layer.

7. A metal sheet cutting and processing system based on image segmentation, characterized in that, The system includes: The image acquisition unit is used to acquire two-dimensional image data of metal sheets in real time as a training dataset; The model building unit is used to build an improved DeepLabV3+ image segmentation network model, including a batch normalization layer, an encoding layer, an attention mechanism network layer, and a decoding layer; The model training unit is used to input the training dataset into the improved DeepLabV3+ image segmentation network model for image segmentation training, segment out the defective regions in the image, and form a set of sheet metal contour data. The path planning unit is used to perform path planning for each defect region of the contour set data using a genetic algorithm to obtain the optimal cutting path for each defect region, and to complete the cutting of the metal sheet according to the optimal cutting path. The step of inputting the training dataset into the improved DeepLabV3+ image segmentation network model for image segmentation training specifically includes: The training dataset is input into the batch normalization layer for normalization and then input into the encoding layer; The encoding layer extracts features from the two-dimensional images in the training dataset to obtain shallow feature maps and deep feature maps. The shallow feature maps are then input into the decoding layer, and the deep feature maps are processed by enhanced feature extraction and input into the attention mechanism network layer. The attention mechanism network layer extracts global information from the deep feature map, adds attention to the texture changes of the metal plate surface image in the deep feature map, and then inputs it into the decoding layer; The decoding layer fuses the shallow feature map with the deep feature map to extract the features of the defect area on the surface of the metal sheet, accurately detects and segments the defect area on the surface of the metal sheet, and obtains the metal sheet contour set data.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the metal sheet cutting method based on image segmentation as described in any one of claims 1 to 6.

9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program implements the steps of the image segmentation-based metal sheet cutting method as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Mechanical part image segmentation algorithm based on improved DeepLabV3 + network

    CN114627290A

  • Semantic segmentation-based image composite defect detection method and system

    CN114820579A