Gear steel shrinkage cavity defect quantitative segmentation method and system based on improved U-Net

Through improved U-Net model and image preprocessing technology, the shrink hole defects of gear steel are segmented with high precision, solving the problem of identifying and quantifying shrink hole defects in the prior art, and achieving efficient and accurate defect recognition.

CN120198908APending Publication Date: 2025-06-24NORTHEASTERN UNIV CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510262159.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-06
Publication Date
2025-06-24

AI Technical Summary

Technical Problem

The prior art is difficult to effectively identify and quantify shrinkage defects in gear steel, resulting in limitations on the optimization of gear steel product performance.

Method used

The improved U-Net model is used to segment the low-magnitude microstructure images of gear steel, and the segmentation accuracy and generalization capabilities of the model are improved through improved image preprocessing and data enhancement methods.

Benefits of technology

High-precision segmentation of shrinkage defects in gear steel billets is achieved, subjective factors are interfered with when manually identifying defects, and meet the needs of shrinkage defect identification in industrial production.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120198908A_ABST
    Figure CN120198908A_ABST
Patent Text Reader

Abstract

The invention discloses a gear steel shrinkage cavity defect quantitative segmentation method and system based on improved U-Net, and relates to the technical field of image tissue segmentation. According to the method, the central area of the image is firstly intercepted, then the intercepted central area image is subjected to secondary interception of the sub-image with the required size, the sub-images subjected to secondary interception are screened, and the invalid image is deleted, so that the protection on the spatial resolution of the image is improved, the loss of high-frequency characteristics is reduced, and the consumption of the invalid area on computing resources is reduced. According to the method, a U-Net model is improved, and a BatchNormalization layer, a Leaky ReLU activation function and a residual block are added to a convolution block, so that training is accelerated, and the stability of the model is enhanced; attention-Enhanced Skip Consection is introduced, so that the model is focused on an important region, and the segmentation precision is improved; and a Dropout layer is added, so that the generalization ability is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of image tissue segmentation, and particularly relates to a quantitative segmentation method and system for shrinkage cavity defects of gear steel based on an improved U-Net. Background Art

[0002] Gears are basic components in the machinery industry and are subjected to various stresses during operation. Therefore, it is required that the gear steel used to make gears has high performance. In recent years, with the development of the automotive industry, especially for sedans, gears have more stringent requirements in terms of strength, toughness, wear resistance, fatigue resistance, and low noise compared to other mechanical gears. This puts higher demands on the performance quality of gear steel. Continuous casting is a key process in the production of gear steel. However, shrinkage cavity defects will occur during production, which has an adverse effect on the product performance of gear steel. Therefore, quantitatively and accurately analyzing and identifying shrinkage cavity defects in gear steel is of great significance for optimizing the design, preparation, and application of gear steel.

[0003] Currently, the semantic segmentation technology for the microstructure of alloy materials is mainly based on deep learning and image processing. Especially deep learning has achieved some remarkable results. For example, Shen et al. proposed a deep learning method trained by electron backscatter diffraction (EBSD), which integrates three-dimensional material characterization informatics and artificial intelligence and can more accurately classify and quantify complex microstructures using only conventional scanning electron microscope (SEM) images. In addition, this method can be accurately applied to SEM images of DP steel with different magnifications and different imaging qualities, and has good out-of-domain expansion ability. However, it does not pay attention to the influence of model training techniques on the segmentation accuracy and lacks a methodology for building microstructure models for different tissue morphologies. Guan et al. proposed a VSD network that combines three models: VGG 19Net, structural similarity index measure, and decision tree, and achieved the classification of surface defects of industrial hot-rolled steel. Although good results have been achieved in the segmentation of the microstructure of alloy materials using semantic segmentation algorithms, it is still unknown whether such methods can be applied to the shrinkage cavity segmentation of gear steel. Moreover, the extremely small proportion of the shrinkage cavity area in gear steel has always lacked an effective method for identifying shrinkage cavities in gear steel.

[0004] Currently, the identification of casting billet tissue defects in China is still in its infancy, with few studies in related fields, and there are disadvantages such as insufficient generalization ability and poor real-time monitoring ability, and it is impossible to effectively identify shrinkage cavity defects in gear steel casting billets. Summary of the Invention

[0005] Aiming at the deficiencies of the prior art, the present invention provides a quantitative segmentation method and system for shrinkage cavity defects of gear steel based on an improved U-Net. By using the improved U-Net model, the shrinkage cavity defects of gear steel are effectively segmented, realizing the efficient identification of shrinkage cavity defects in continuous casting billets.

[0006] The technical solution of the present invention is as follows:

[0007] The first aspect of the present invention provides a quantitative segmentation method for shrinkage cavity defects of gear steel based on an improved U-Net, including the following steps:

[0008] Step 1: Construct a dataset of gear steel continuous casting billet microstructure images and perform preprocessing to obtain a preprocessed dataset of gear steel continuous casting billet microstructure images;

[0009] The dataset of gear steel continuous casting billet microstructure images includes a number of low-magnification microstructure images of gear steel continuous casting billets;

[0010] The preprocessing is: crop the low-magnification microstructure images of gear steel continuous casting billets, remove the redundant parts outside the gear steel continuous casting billet microstructure and crop them into squares;

[0011] Step 2: Construct a dataset of gear steel continuous casting billet microstructure defect images according to the preprocessed dataset of gear steel continuous casting billet microstructure images;

[0012] The dataset of gear steel continuous casting billet microstructure defect images includes several groups of samples. Each group of samples includes a cropped low-magnification microstructure image of a gear steel continuous casting billet and a defect image obtained by marking the shrinkage cavity defects of the cropped low-magnification microstructure image of the gear steel continuous casting billet;

[0013] Step 3: Divide the dataset of gear steel continuous casting billet microstructure defect images into a training set and a test set according to a set ratio;

[0014] Step 4: Perform image processing on the training set and the test set respectively to obtain the processed training set and test set;

[0015] Step 4.1: For the training set and the test set, convert the defect images in each sample into RGB three channels, and then simultaneously intercept the central regions of each defect image and its corresponding low-magnification microstructure image of the gear steel continuous casting billet; the central region is the region within a unified set pixel range centered on the defect image and the low-magnification microstructure image of the gear steel continuous casting billet;

[0016] Step 4.2: For the training set and the test set, on the central regions of the defect images and their corresponding low-magnification microstructure images of the gear steel continuous casting billet, intercept a sub-image of a set size every set pixel interval, and obtain corresponding several sub-images for each defect image and its corresponding low-magnification microstructure image of the gear steel continuous casting billet respectively;

[0017] Step 4.3: Screen the sub - images of the defect images and the corresponding sub - images of the macro - structure images of the gear steel continuous casting billets in the training set and the test set to obtain the screened training set and test set. The screened test set is the test set after image processing;

[0018] The specific method of screening is as follows: First, define the content threshold of shrinkage cavity defects in the sub - images of the defect images. If the content of shrinkage cavity defects in a sub - image of the defect image is lower than the content threshold, then delete this sub - image, and at the same time delete the corresponding sub - image of the macro - structure image of the gear steel continuous casting billet;

[0019] Step 4.4: Use the enhancement strategy to perform data enhancement processing on the sub - images of the defect images and the corresponding sub - images of the macro - structure images of the gear steel continuous casting billets in the screened training set simultaneously to obtain the training set after image processing;

[0020] Step 5: Build an improved U - Net model;

[0021] In the improved U - Net model, two 3x3 convolutional layers in the convolutional block of the U - Net model are modified to one 3x3 convolutional layer. At the same time, a BN layer, a LeakyReLU activation function, and a residual block are connected in sequence after the 3x3 convolutional layer; An attention - enhanced skip connection is introduced between the encoder and the decoder, which is used to weight the feature maps at different stages output by the encoder through the attention mechanism, and input the weighted result into the up - sampling layer of the decoder; A Dropout layer is added after each convolutional block in the bottleneck layer, and a Dropout layer is added after the conv9 layer;

[0022] Step 6: Use the training set to train the improved U - Net model to obtain the trained improved U - Net model;

[0023] Step 7: Input the test set into the trained improved U - Net model to obtain the segmentation result, where the shrinkage cavity defect area and the other areas except the shrinkage cavity defect area are segmented into different colors.

[0024] The second aspect of the present invention provides a quantitative segmentation system for shrinkage cavity defects of gear steel based on an improved U - Net, which is used to implement the quantitative segmentation method for shrinkage cavity defects of gear steel based on an improved U - Net, including:

[0025] A gear steel continuous casting billet tissue image acquisition module, which is used to acquire the macro - structure image of the gear steel continuous casting billet;

[0026] An improved U-Net model is used to segment the low-magnification microstructure image of the continuously cast bloom of gear steel to obtain a segmentation result, where the shrinkage cavity defect area and other areas except the shrinkage cavity defect area are segmented into different colors.

[0027] The third aspect of the present invention provides an electronic device, including: a processor, a memory, and a bus. The memory stores machine-readable instructions executable by the processor. When the electronic device runs, the processor communicates with the memory through the bus. When the machine-readable instructions are executed by the processor, the steps of the method for quantitatively segmenting shrinkage cavity defects of gear steel based on the improved U-Net are executed.

[0028] The fourth aspect of the present invention provides a computer-readable storage medium, in which a computer program is stored. When the computer program is run by a processor, the steps of the method for quantitatively segmenting shrinkage cavity defects of gear steel based on the improved U-Net as described above are executed.

[0029] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0030] In the image preprocessing process, compared with the traditional method of directly intercepting the defect area in the central area and compressing it to the required size, the present invention first intercepts the central area of the image, then intercepts sub-images of the required size from the intercepted central area image and screens the sub-images after the secondary interception, and deletes the invalid images. Through the above improvement, the protection of the image spatial resolution can be improved, and compared with compression after interception, the loss of high-frequency features is reduced; secondly, the improved preprocessing method can more effectively remove the influence of the invalid area on the model segmentation effect and reduce the consumption of computing resources by the invalid area.

[0031] The present invention improves the image architecture of the U-Net model. By improving the structure of the convolutional block, adding a BatchNormalization (BN) layer, a LeakyReLU activation function, and a residual block, the training is accelerated and the stability of the improved U-Net model is enhanced. An Attention-Enhanced Skip Connection is introduced, and the weighted result is input into the upsampling layer of the decoder, enabling the improved U-Net model to focus on important regions and improve the segmentation accuracy. A Dropout layer is added to reduce the dependence of the improved U-Net model on specific neurons, thereby improving the generalization ability. A quantitative segmentation method and system for shrinkage cavity defects in gear steel based on the improved U-Net are successfully established, achieving high-precision segmentation of shrinkage cavity defects in gear steel billets, consuming less actual time, and avoiding the interference of subjective factors during manual defect recognition. From the results, the method established by the present invention can basically meet the requirements for shrinkage cavity defect recognition in industrial production. The present invention is simple to implement, rapid and effective, meeting the application requirements. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] Figure 1 is a flowchart of the quantitative segmentation method for shrinkage cavity defects in gear steel based on the improved U-Net in an embodiment of the present invention;

[0033] Figure 2 is a schematic diagram of the image processing flow in an embodiment of the present invention;

[0034] Figure 3 is a structural diagram of the improved U-Net model in an embodiment of the present invention;

[0035] Figure 4 is a schematic diagram of the recognition results of the test set in an embodiment of the present invention;

[0036] Among them, (a) is a photo of the billet structure; (b) is a photo of the defect annotation; (c) is a photo of the defect segmentation; (d) is the converted photo;

[0037] Figure 5 is the evaluation index result in an embodiment of the present invention;

[0038] Among them, (a) is the relative distribution of the evaluation index MIoU; (b) is the distribution of the relative error between the predicted value and the true value of the relative content of the evaluation index. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0039] The present invention will be described in detail below with reference to the drawings and embodiments.

[0040] As Figure 1 shown, the quantitative segmentation method for shrinkage cavity defects in gear steel based on the improved U-Net includes the following steps:

[0041] Step 1: Construct a dataset of gear steel continuous casting billet microstructure images and perform preprocessing to obtain a preprocessed dataset of gear steel continuous casting billet microstructure images; the dataset of gear steel continuous casting billet microstructure images includes a number of macrostructure images of gear steel continuous casting billets.

[0042] The preprocessing is as follows: Crop the macrostructure images of gear steel continuous casting billets, remove the extra parts other than the gear steel continuous casting billet microstructure, and crop them into squares.

[0043] Step 2: According to the preprocessed dataset of gear steel continuous casting billet microstructure images, construct a dataset of gear steel continuous casting billet microstructure defect images; the dataset of gear steel continuous casting billet microstructure defect images includes several groups of samples, and each group of samples includes a cropped macrostructure image of a gear steel continuous casting billet and a defect image obtained by marking shrinkage cavity defects on the cropped macrostructure image of the gear steel continuous casting billet.

[0044] In this embodiment, the Photoshop image processing software is used to crop the macrostructure images of gear steel continuous casting billets and mark shrinkage cavity defects.

[0045] Step 3: Divide the dataset of gear steel continuous casting billet microstructure defect images into a training set and a test set according to a set ratio, and the training set needs to reflect the data distribution characteristics.

[0046] Step 4: As Figure 2 shown, perform image processing on the training set and the test set respectively to obtain the processed training set and test set.

[0047] Step 4.1: For the training set and the test set, convert the defect images in each sample to RGB three channels, and then simultaneously intercept the central regions of each defect image and its corresponding macrostructure image of the gear steel continuous casting billet. The central region is the region within a unified set number of pixels centered on the defect image and the macrostructure image of the gear steel continuous casting billet.

[0048] In this embodiment, the central region intercepts an image of 512×512 pixels.

[0049] Step 4.2: For the training set and the test set, on the central regions of the defect images and their corresponding macrostructure images of the gear steel continuous casting billets, intercept a sub-image of a set size every set number of pixels, and obtain corresponding several sub-images for each defect image and its corresponding macrostructure image of the gear steel continuous casting billet respectively.

[0050] In this embodiment, the cropping starts from the upper left corner, and a cut is made every 32 pixels. The selected size during cropping is 128 * 128 pixels. The training set and the test set are processed in the same way;

[0051] Step 4.3: Screen the sub - images of the defective images and the corresponding sub - images of the macro - structure images of the gear steel continuous casting billets in the training set and the test set to obtain the screened training set and test set. The screened test set is the test set after image processing;

[0052] The specific method for screening is as follows: First, define the content threshold of shrinkage cavity defects in the sub - images of the defective images. If the content of shrinkage cavity defects in a sub - image of the defective image is lower than the content threshold, then delete this sub - image, and at the same time delete the corresponding sub - image of the macro - structure image of the gear steel continuous casting billet. The training set and the test set are processed in the same way;

[0053] Step 4.4: Use the enhancement strategy to simultaneously perform data enhancement processing on the sub - images of the defective images and the corresponding sub - images of the macro - structure images of the gear steel continuous casting billets in the screened training set to obtain the training set after image processing;

[0054] In this embodiment, the enhancement strategy includes rotation and mirror flipping. After data enhancement, rename the images in the training set and the test set. After naming, save them and save the naming information of the images into the corresponding table;

[0055] Step 5: As Figure 3 shown, construct an improved U - Net model;

[0056] The U - Net model is a classic deep - learning architecture for image segmentation tasks. It mainly consists of an encoder, a decoder, and skip connections;

[0057] Encoder: It consists of a series of convolutional blocks and downsampling layers. Each convolutional block usually contains two 3x3 convolutional layers (Conv2D) and a ReLU activation function to extract features at different scales. After each convolutional block, usually a 2x2 max - pooling layer is followed for downsampling, that is, reducing the resolution of the feature map. Through the encoder, multi - level features of the image can be gradually extracted.

[0058] Decoder: It consists of an upsampling layer and a convolutional block. The upsampling layer (Conv2DTrans 2x2 + BN + LeakyRELU) is used to restore the low-resolution feature map to a higher resolution. Usually, a 2x2 transposed convolution (deconvolution) with a stride of 2 is used to double the width and height of the feature map. After upsampling, usually two consecutive 3x3 convolutional layers are used, followed by an activation function (such as ReLU), to further extract features and refine the upsampled result. The decoder gradually restores the low-resolution abstract features extracted by the encoder to a high resolution and combines the fine-grained features in the encoder to generate the final segmentation map.

[0059] Skip Connection: Directly transfer the feature maps at different stages in the encoder to the decoder, helping the model retain low-level detail information when restoring the high-resolution segmentation map and alleviating the vanishing gradient problem at the same time;

[0060] In the improved U-Net model described in this embodiment, the two 3x3 convolutional layers in the convolutional block of the U-Net model are modified to one 3x3 convolutional layer, enhancing the feature reuse ability. At the same time, a BatchNormalization (BN) layer, a LeakyReLU activation function, and a residual block are sequentially connected after the 3x3 convolutional layer. LeakyReLU allows small negative values to pass through, avoiding the "dead neuron" problem that may occur in traditional ReLU (i.e., the neuron output is always zero). BatchNormalization helps to normalize the input of each layer during training, reduce internal covariate shift, accelerate training, and enhance the stability of the improved U-Net model; An Attention-Enhanced Skip Connection is introduced between the encoder and the decoder to weight the feature maps at different stages output by the encoder through the attention mechanism and input the weighted result into the upsampling layer of the decoder, which helps the improved U-Net model focus on important regions and improve the segmentation accuracy of the improved U-Net model; A Dropout(0.5) layer is added after each convolutional block in the bottleneck layer, and a Dropout(0.5) layer is added after the conv9 layer. The Dropout layer is a method to prevent overfitting. It forces the network to learn more robust features by randomly "dropping" a part of the neurons, reducing the dependence of the improved U-Net model on specific neurons, thereby improving the generalization ability;

[0061] Step 6: Use the training set to train the improved U-Net model to obtain the trained improved U-Net model;

[0062] In this embodiment, since a large amount of resources are consumed during model training, it is necessary to rent a corresponding server for model training. When selecting a server, select a server with a video memory of 16G or more and a configuration version of TensorFlow 1.15 for training the model. After successfully renting the server, use the server to open the JupyterLab software, and put the model, relevant code image folders into the home folder for model training. After putting them in, open the program terminal and enter the following three commands in sequence: pip install keras==2.3.1; pip install scikit-image; pip install xlwt. These three commands are used to configure the environment. After the configuration is completed, training can be carried out.

[0063] Step 7: Input the test set into the trained improved U-Net model to obtain the segmentation result, where the shrinkage defect area and other areas except the shrinkage defect area are segmented into different colors.

[0064] In this embodiment, the shrinkage defect area is segmented into red, and the remaining areas are segmented into blue.

[0065] Subsequently, users can be selected for the initial use of the model and the software can be integrated; the model is deployed to the production environment and provided to the target users for use to ensure the performance and stability of the model; the feedback from users is integrated and further adjusted according to the user feedback.

[0066] In this embodiment, after obtaining the segmentation result, open the folder of the segmentation result, convert all the images in the folder to RGB mode to ensure that the pictures are loaded in RGB format. After the conversion is completed, load the pixel data of the image and obtain the length and width of the image. After loading is completed, use a double loop to traverse each pixel of the picture and obtain the RGB values of the pixels at each coordinate. Subsequently, each one is judged according to the condition (r>117, g<50, b<50). If the condition is satisfied, it is modified to (255, 0, 0), otherwise it is modified to (0, 0, 255). After color correction, the image only contains these two types of pixel points (255, 0, 0) and (0, 0, 255). After the modification is completed, the prediction result is renamed so that the name of the prediction result corresponds to the original image in the test set.

[0067] On the test set, evaluate the recognition results using two types of metrics: MIoU and the relative error between the predicted value and the true value of the subgraph.

[0068] MIoU is a commonly used evaluation metric in semantic segmentation tasks. It is the average of Intersection over Union (IoU) across all classes and is used to measure the prediction performance of the model on each class. MIoU can intuitively reflect the segmentation accuracy of the model on different classes and is widely used in image segmentation tasks. IoU refers to the ratio of the intersection area to the union area between the predicted target and the ground truth target. MIoU is the average value obtained by calculating IoU for all classes, which can more comprehensively evaluate the performance of the model on different classes. By calculating MIoU, the accuracy and segmentation quality of the model for different targets in the image can be quantified, thus better evaluating the performance of the model. The relative error between the predicted value and the ground truth value of the subgraph mainly refers to the proportion of the area of shrinkage cavities in each image of the test set that needs to be predicted. By comparing the relative error between the predicted value and the ground truth value of the shrinkage cavity content in each picture, the prediction results of the model can be intuitively obtained.

[0069] In this example, the prediction evaluation metric MIoU of the model for the test set data has basically reached 90%, and the relative error of the shrinkage cavity content in the image is also within 20%. This shows that the improved U-Net model has a high prediction accuracy and high accuracy and efficiency in segmenting shrinkage cavity defects. The specific prediction results are as Figure 4 and 5 shown.

[0070] By comparing the obtained MIoU and the average value of the relative error with the qualified range of the semantic segmentation evaluation metric, the results show that the results of the present invention have met the segmentation requirements.

[0071] The present invention realizes the high-precision identification of shrinkage cavity defects in gear steel continuous casting billets through steps such as image preprocessing (cropping, annotation), dataset division, image re-preprocessing and data augmentation (central cropping, deletion of unlabeled images, rotation and mirror flipping), server environment configuration, model training and color correction post-processing. In addition, through the preliminary use and feedback integration of users, the performance of the model is further optimized, and finally it is integrated into the relevant software system to realize automatic identification and processing.

[0072] In this embodiment, a quantitative segmentation system for shrinkage cavity defects of gear steel based on the improved U-Net is also provided to implement the quantitative segmentation method for shrinkage cavity defects of gear steel based on the improved U-Net, including:

[0073] A gear steel continuous casting billet microstructure image acquisition module for acquiring the low-magnification microstructure image of the gear steel continuous casting billet;

[0074] An improved U-Net model is used to segment the low-magnification microstructure image of the continuously cast bloom of gear steel, and a segmentation result is obtained, where the shrinkage cavity defect area and other areas except the shrinkage cavity defect area are segmented into different colors;

[0075] In this embodiment, an electronic device is further provided, including: a processor, a memory, and a bus. The memory stores machine-readable instructions executable by the processor. When the electronic device runs, the processor communicates with the memory through the bus. When the machine-readable instructions are executed by the processor, the steps of the method for quantitatively segmenting shrinkage cavity defects of gear steel based on the improved U-Net are executed;

[0076] In this embodiment, a computer-readable storage medium is further provided. A computer program is stored in the computer-readable storage medium. When the computer program is run by a processor, the steps of the method for quantitatively segmenting shrinkage cavity defects of gear steel based on the improved U-Net are executed.

Claims

1. A quantitative segmentation method for gear steel shrinkage defects based on improved U-Net, characterized in that: The following steps are involved: Step 1: construct a gear steel continuous casting billet structure image dataset and preprocess it to obtain a preprocessed gear steel continuous casting billet structure image dataset; Step 2: construct a gear steel continuous casting billet structure defect image dataset based on the preprocessed gear steel continuous casting billet structure image dataset; Step 3: Divide the gear steel continuous casting billet structure defect image dataset into a training set and a test set according to a set ratio; Step 4: Perform image processing on the training set and the test set respectively to obtain the image-processed training set and the test set; Step 5: Build an improved U-Net model; Step 6: Use the training set to train the improved U-Net model to obtain a trained improved U-Net model; Step 7: Input the test set into the trained improved U-Net model to obtain the segmentation result.

2. The gear steel shrinkage defect quantitative segmentation method based on improved U-Net according to claim 1 is characterized in that: The gear steel continuous casting billet structure image data set in step 1 includes a plurality of low-magnification microstructure images of gear steel continuous casting billets.

3. The gear steel shrinkage defect quantitative segmentation method based on improved U-Net according to claim 2 is characterized in that: The preprocessing described in step 1 is: cropping the low-magnification microstructure image of the gear steel continuous casting billet, removing the excess parts except the gear steel continuous casting billet structure and cropping it into a square.

4. The gear steel shrinkage defect quantitative segmentation method based on improved U-Net according to claim 1 is characterized in that: The gear steel continuous casting billet structural defect image data set in step 2 includes several groups of samples, each group of samples includes a low-magnification microstructure image of a cropped gear steel continuous casting billet and a defect image obtained by annotating shrinkage defects on the low-magnification microstructure image of the cropped gear steel continuous casting billet.

5. The method for quantitative segmentation of gear steel shrinkage defects based on improved U-Net according to claim 4 is characterized in that: Step 4 specifically includes: Step 4.1: For the training set and the test set, the defect image in each sample is converted into RGB three channels, and then the central area of ​​each defect image and its corresponding low-magnification microstructure image of the gear steel continuous casting billet are simultaneously intercepted; the central area is the area within a uniformly set pixel range of the defect image and the low-magnification microstructure image of the gear steel continuous casting billet; Step 4.2: For the training set and the test set, a sub-image of a set size is intercepted at every set pixel interval in the central area of ​​the defect image and its corresponding low-magnification microstructure image of the gear steel continuous casting billet, and several corresponding sub-images are obtained for each defect image and its corresponding low-magnification microstructure image of the gear steel continuous casting billet; Step 4.3: Screen the sub-images of defect images in the training set and the test set and the sub-images of low-magnification microstructure images of the gear steel continuous casting billet corresponding thereto to obtain the screened training set and the test set. The screened test set is the test set after image processing. The screening method is specifically as follows: first, a content threshold of shrinkage defects in a sub-image of a defect image is defined; if the content of shrinkage defects in a sub-image of the defect image is lower than the content threshold, the sub-image is deleted, and at the same time, the corresponding sub-image of the low-magnification microstructure image of the gear steel continuous casting billet is deleted; Step 4.4: Use the enhancement strategy to simultaneously perform data enhancement processing on the sub-images of the defect images in the screened training set and the sub-images of the corresponding low-magnification microstructure images of the gear steel continuous casting billet to obtain the training set after image processing.

6. The method for quantitative segmentation of gear steel shrinkage defects based on improved U-Net according to claim 1, characterized in that: The improved U-Net model described in step 5 modifies the two 3x3 convolutional layers in the convolutional block of the U-Net model into one 3x3 convolutional layer, and connects a BN layer, a LeakyReLU activation function and a residual block in sequence after the 3x3 convolutional layer; introduces an attention-enhanced jump link between the encoder and the decoder to weight the feature maps of different stages of the encoder output through the attention mechanism, and inputs the weighted results into the upsampling layer of the decoder; adds a Dropout layer after each convolutional block of the bottleneck layer, and adds a Dropout layer after the conv9 layer.

7. The method for quantitative segmentation of gear steel shrinkage defects based on improved U-Net according to claim 1, characterized in that: In the segmentation result described in step 7, the shrinkage defect area and other areas except the shrinkage defect area are segmented into different colors.

8. A gear steel shrinkage defect quantitative segmentation system based on improved U-Net, used to implement the gear steel shrinkage defect quantitative segmentation method based on improved U-Net according to any one of claims 1 to 7, characterized in that: include: Gear steel continuous casting billet structure image acquisition module, used to obtain low-magnification microstructure images of gear steel continuous casting billets; The improved U-Net model is used to segment the input low-magnification microstructure image of the gear steel continuous casting billet to obtain the segmentation result, in which the shrinkage defect area and other areas except the shrinkage defect area are segmented into different colors.

9. An electronic device, characterized in that: include: A processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor. When the electronic device is running, the processor and the memory communicate through the bus. When the machine-readable instructions are executed by the processor, the steps of the method for quantitative segmentation of gear steel shrinkage defects based on improved U-Net are performed as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which, when executed by a processor, executes the steps of the method for quantitative segmentation of gear steel shrinkage defects based on improved U-Net as described in any one of claims 1 to 7.