Round billet internal defect detection method and system based on ultrasonic A scanning image

Through the internal defect detection method of the round blank based on ultrasonic A-scan images, the image recognition model is used to process the ultrasonic detection image and dynamically adjust the spacing between detection points, solving the problems of waste of resources and human factors in the traditional detection methods, and achieving efficient and accurate defect recognition.

CN120369818APending Publication Date: 2025-07-25SHANDONG IRON & STEEL CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510416737.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-03
Publication Date
2025-07-25

AI Technical Summary

Technical Problem

In the traditional ultrasonic A-scan flaw detection detection method, the setting of detection points is lacking in targetedness, resulting in waste of detection resources or loopholes, and the detection results are greatly affected by human factors, and the accuracy and reliability are insufficient.

Method used

The internal defect detection method of the round blank based on ultrasonic A-scan images is adopted, and the ultrasonic detection image is processed using an image recognition model, and the detection point spacing is dynamically adjusted. By setting the initial interval distance of adjacent detection points, and adjusting it to the second distance according to the defect recognition results, automated defect recognition and dynamic adjustment of detection points are realized.

Benefits of technology

It improves the accuracy of defect identification, avoids vulnerabilities or unnecessary detection of static detection points, has reliable design principles, simple structure, and has broad application prospects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120369818A_ABST
    Figure CN120369818A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of cast steel, and particularly provides a round billet internal defect detection method and system based on an ultrasonic A scanning image, and the method comprises the steps: setting the spacing distance between adjacent detection points as a first distance; acquiring a first group of ultrasonic detection images of any section of the round billet according to the first distance; processing the first group of ultrasonic detection images by using an image recognition model to obtain a defect recognition result; updating the spacing distance between the adjacent detection points into a second distance according to the defect identification result, and collecting an ultrasonic detection image of the undetected section of the round billet according to the second distance; when the defect identification result is that the defect exists, the second distance is smaller than the first distance; when the defect identification result is that no defect exists, the second distance is greater than the first distance. According to the invention, defect identification is carried out on the ultrasonic detection image by using the image identification model, the defect identification accuracy is improved, and the distance between the detection points is adjusted according to the defect identification result of primary detection, so that dynamic adjustment of the detection points is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of cast steel, and particularly relates to a method and system for detecting internal defects of round billets based on ultrasonic A-scan images. Background Art

[0002] As an intermediate product in industrial production, the internal quality of high-quality special steel large round billets directly affects the final service performance of the products. Therefore, the detection of internal defects has become an important link in quality control.

[0003] Traditional internal quality detection methods mainly rely on hand-held instruments for ultrasonic A-scan flaw detection. That is, the detector sets multiple equally spaced detection points on the surface of the large round billet, and then uses a hand-held instrument to perform ultrasonic A-scan flaw detection. The detector judges whether there are defects and the types of defects according to the waveforms in the ultrasonic detection images.

[0004] There are many deficiencies in this detection method: firstly, the setting of detection points is not targeted. If the distance between detection points is too small, the detection amount will be too large, wasting resources; if the distance between detection points is too large, detection loopholes are likely to occur. Secondly, the detection results are greatly affected by human factors. The experience and skill level of the detector directly affect the accuracy and reliability of the detection results. Summary of the Invention

[0005] In view of the above deficiencies of the prior art, the present invention provides a method and system for detecting internal defects of round billets based on ultrasonic A-scan images to solve the above technical problems.

[0006] In a first aspect, the present invention provides a method for detecting internal defects of round billets based on ultrasonic A-scan images, including: Setting the interval distance between adjacent detection points as a first distance; Collecting a first set of ultrasonic detection images of any section of the round billet according to the first distance; Processing the first set of ultrasonic detection images by using an image recognition model to obtain a defect recognition result; Updating the interval distance between adjacent detection points to a second distance according to the defect recognition result, and collecting ultrasonic detection images of the untested section of the round billet according to the second distance; When the defect recognition result is that there are defects, the second distance is less than the first distance; when the defect recognition result is that there are no defects, the second distance is greater than the first distance; The detection points are the positions on the outer surface of the round billet where ultrasonic detection probes are placed.

[0007] In an optional embodiment, collecting a first set of ultrasonic detection images of any section of the round billet according to the first distance includes: Collect a first set of ultrasonic detection images from a round billet segment, where the round billet segment is any one of multiple segments obtained by cutting a round billet.

[0008] In an optional embodiment, the image recognition model adopts a convolutional neural network model with a residual network architecture, and the image recognition model includes: Input layer: Receives an RGB image with a size of 112x112 pixels as input; Convolutional layer and activation function: Includes multiple convolutional layers, each followed by a ReLU activation function to increase the non-linear expression ability of the model; Pooling layer: Used to reduce the dimension of the feature map, reduce the amount of calculation, and retain important features at the same time; Residual connection: Achieves residual learning through shortcut connections to solve the problem of gradient disappearance in the training of deep networks; Fully connected layer: After the convolutional layer extracts features, the features are classified through the fully connected layer, and the classification result is finally output.

[0009] In an optional embodiment, the method further includes: Collect ultrasonic detection images of multiple round billets; Mark the positions of defect waves and corresponding defect types in the ultrasonic detection images; Store the marked ultrasonic detection images in a data set; Use the data set to train and validate the image recognition model.

[0010] In an optional embodiment, after marking the positions of defect waves and corresponding defect types in the ultrasonic detection images, the method further includes: Mark surface waves, bottom waves, and defect waves in the ultrasonic detection images; Intercept surface wave images, bottom wave images, and defect wave images from the ultrasonic detection images; Extract defect wave features from the defect wave images; Establish a mapping relationship between the defect wave features and the defect types; Divide the defect wave features with a mapping relationship to the same defect type into the same feature set; Cluster the defect wave features in the same feature set to obtain core defect wave features and boundary features; Use an image generation model to generate simulated defect wave images based on the core defect wave features and boundary features, and mark the corresponding defect types for the simulated defect wave images; The simulated defect wave image is stitched with an arbitrary surface wave image and a bottom wave image to form a simulated ultrasonic detection image, and the simulated ultrasonic detection image is stored in the data set.

[0011] In an alternative embodiment, extracting defect wave features from the defect wave image includes: Using the Canny operator or the Sobel operator to locate the peak edge of the defect wave image and extract the geometric parameters of the sharp peak; Marking the dense area of the forest-like wave through threshold segmentation and counting the number, area and distribution density of the connected domains; Quantifying the contrast, energy and entropy values of the high-frequency texture in the defect wave image.

[0012] In an alternative embodiment, updating the distance between adjacent detection points to a second distance according to the defect recognition result, and collecting ultrasonic detection images of the undetected section of the round billet according to the second distance, includes: If the defect recognition result is no defect, update the distance between adjacent detection points to N times the first distance, where 2 ≤ N ≤ 5; if the defect recognition result includes a defect and a defect grade and the defect grade is not the highest grade, update the distance between adjacent monitoring points to 1 / 2 of the first distance; if the defect recognition result includes a defect and a defect grade and the defect grade is the highest grade, determine that the detection is completed and output the defect recognition result; Determine the positions of multiple detection points arranged axially on the surface of the round billet according to the updated distance, and collect ultrasonic detection images at the positions of the multiple detection points to obtain a second set of ultrasonic detection images; Use the image recognition model to process the second set of ultrasonic detection images in sequence and summarize the defect recognition results.

[0013] In a second aspect, the present invention provides a round billet internal defect detection system based on ultrasonic A-scan images, including: A setting module for setting the distance between adjacent detection points to a first distance; A detection module for collecting a first set of ultrasonic detection images of any section of the round billet according to the first distance; An identification module for using an image recognition model to process the first set of ultrasonic detection images to obtain a defect recognition result; An update module for updating the distance between adjacent detection points to a second distance according to the defect recognition result, and collecting ultrasonic detection images of the undetected section of the round billet according to the second distance; When the defect recognition result is that there is a defect, the second distance is less than the first distance; when the defect recognition result is that there is no defect, the second distance is greater than the first distance; The detection point is the position on the outer surface of the round billet where an ultrasonic detection probe is placed.

[0014] In a third aspect, there is provided a device, comprising: a memory for storing a program for detecting internal defects of a round billet based on ultrasonic A-scan images; a processor for implementing the steps of the method for detecting internal defects of a round billet based on ultrasonic A-scan images provided in the first aspect when executing the program for detecting internal defects of a round billet based on ultrasonic A-scan images.

[0015] In a fourth aspect, there is provided a computer-readable storage medium storing a program for detecting internal defects of a round billet based on ultrasonic A-scan images. When the program for detecting internal defects of a round billet based on ultrasonic A-scan images is executed by a processor, the steps of the method for detecting internal defects of a round billet based on ultrasonic A-scan images provided in the first aspect are implemented.

[0016] The beneficial effects of the present invention are as follows. The method and system for detecting internal defects of a round billet based on ultrasonic A-scan images provided by the present invention adopt a phased detection strategy. At the initial detection, the default first distance is used to determine the detection points, and ultrasonic flaw detection is performed on any section of the round billet. Then, an image recognition model is used to identify defects in the ultrasonic detection images, realizing automatic defect recognition, improving the accuracy of defect recognition, and adjusting the detection point spacing according to the defect recognition results of the initial detection, thereby realizing the dynamic adjustment of the detection points and avoiding the problems of loopholes or unnecessary detections in static detection points.

[0017] In addition, the design principle of the present invention is reliable, the structure is simple, and it has a very wide application prospect. Description of the Drawings

[0018] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or in the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, for those of ordinary skill in the art, other drawings can also be obtained according to these drawings without creative efforts.

[0019] Figure 1 It is a schematic flowchart of the method according to an embodiment of the present invention.

[0020] Figure 2 It is a schematic diagram of the ultrasonic data sampling positions of a continuous casting round billet.

[0021] Figure 3 It is a network structure diagram of the image recognition model.

[0022] Figure 4 It is a schematic diagram of the training process of the image recognition model.

[0023] Figure 5 It is a typical ultrasonic A-scan waveform atlas corresponding to different defect types, where (a) is an inclusion defect, (b) is a segregation defect, (c) is a crack defect, (d) is a porosity defect, and (e) is a shrinkage cavity defect.

[0024] Figure 6 It is a low-magnification sample map corresponding to different defect types, where (a) is an inclusion defect, (b) is a segregation defect, (c) is a crack defect, (d) is a porosity defect, and (e) is a shrinkage cavity defect.

[0025] Figure 7 It is the accuracy and loss curves of the model.

[0026] Figure 8 It is the prediction accuracy rate curves of the training set and the test set.

[0027] Figure 9 It is the confusion matrices of the training set and the test set.

[0028] Figure 10 It is the loss function curves of the training set and the test set.

[0029] Figure 11 It is the ROC curve of the image recognition model.

[0030] Figure 12 It is a schematic block diagram of the system according to an embodiment of the present invention.

[0031] Figure 13 It is a schematic structural diagram of a device provided by an embodiment of the present invention. Detailed implementation manners

[0032] In order to enable those skilled in the art of the present technology to better understand the technical solutions in the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without making creative efforts shall fall within the protection scope of the present invention.

[0033] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the technical field to which the present invention belongs. The terms used in the description of the present invention herein are only for the purpose of describing specific embodiments, and are not intended to limit the present invention.

[0034] The following explains the key terms that appear in the present invention.

[0035] The Convolutional Neural Network (CNN) is a deep learning model designed specifically for processing grid-like data (such as images, videos, audio). Its core idea is to efficiently extract spatial features through local perception and parameter sharing.

[0036] Residual refers to the difference between the actual observed value and the model predicted value. In deep learning, Residual Learning is a method of optimizing the model by directly learning the difference (residual) between the input and the output. Its core idea is: "Make it easier for the network to learn the subtle changes between the input and the output, rather than directly fitting a complex mapping." The method for detecting internal defects of a round billet based on ultrasonic A-scan images provided by an embodiment of the present invention is executed by a computer device. Correspondingly, the system for detecting internal defects of a round billet based on ultrasonic A-scan images runs in the computer device.

[0037] Figure 1 It is a schematic flowchart of the method of an embodiment of the present invention. Among them, Figure 1 The execution subject can be a system for detecting internal defects of a round billet based on ultrasonic A-scan images. According to different requirements, the order of the steps in this flowchart can be changed, and some can be omitted.

[0038] As Figure 1 shown, the method includes: S1. Set the interval distance between adjacent detection points as the first distance; S2. Collect the first set of ultrasonic detection images of any section of the round billet according to the first distance; S3. Process the first set of ultrasonic detection images using an image recognition model to obtain a defect recognition result; S4. Update the interval distance between adjacent detection points to the second distance according to the defect recognition result, and collect ultrasonic detection images of the untested section of the round billet according to the second distance; When the defect recognition result is that there is a defect, the second distance is less than the first distance; when the defect recognition result is that there is no defect, the second distance is greater than the first distance; The detection point is the position on the outer surface of the round billet where the ultrasonic detection probe is placed.

[0039] In an embodiment of the present invention, based on step S2, the following will give a possible embodiment to non-restrictively elaborate on its specific implementation.

[0040] Take multiple sections of the round billet after being cut as samples for batch detection, and set equally spaced axially arranged detection points on one section of the round billet according to the default first distance (such as 10 cm).

[0041] As Figure 2 shown, the detection point is a 10 cm * 5 cm area. The surface at the sampling point is polished bright according to the 10 cm * 5 cm area, a chemical paste with good sound permeability is used as the coupling agent, and an ultrasonic flaw detector is used to collect ultrasonic detection images, and the ultrasonic detection images contain the spectrograms of ultrasonic detection signals.

[0042] In an embodiment of the present invention, based on step S3, a possible embodiment will be given below to non - restrictively elaborate on its specific implementation.

[0043] Use the image recognition model to sequentially recognize the first group of ultrasonic detection images to obtain the defect recognition result.

[0044] Specifically, the image recognition model uses a convolutional neural network model with a residual network architecture. The image recognition model is as Figure 3 shown and includes: ‌Input layer‌: Receives an RGB image with a size of 112x112 pixels as input; ‌Convolution layer and activation function‌: Contains multiple convolutional layers, and each convolutional layer is followed by a ReLU activation function to increase the non - linear expression ability of the model; ‌Pooling layer‌: Used to reduce the dimension of the feature map, reduce the amount of calculation, and retain important features at the same time; ‌Residual connection‌: Achieves residual learning through shortcut connections to solve the problem of gradient disappearance in the training of deep networks; ‌Fully - connected layer‌: After the convolutional layer extracts features, the fully - connected layer classifies the features and finally outputs the classification result.

[0045] The image recognition model of this application has the following improvement points compared with the existing convolutional neural network models: Introduce grouped convolution, divide each residual block into multiple parallel paths, and finally merge and output; Adopt ‌cross - level skip connections‌ to fuse features between multiple residual blocks, and optimize the feature fusion process by combining the attention mechanism; Optimize the calculation efficiency by ‌dynamically adjusting the number of residual blocks and lightweight modules; Adopt ‌layer normalization‌ or ‌Swish activation function; Combine ‌dilated convolution and ‌upsampling module‌ to retain more spatial information at the high level.

[0046] This image model needs to be trained before use, and the training process is as Figure 4As shown, it is implemented using MATLAB software. It includes importing data, dividing data sets, obtaining the number of categories, loading training networks, modifying the last layer of the network, data enhancement, setting training parameters, model training, simulation testing, output setting, performance evaluation, displaying accuracy, confusion matrix, training loss function curve, testing loss function curve, drawing ROC curve, and saving the trained network.

[0047] A large amount of labeled data is required during the training process, that is, ultrasonic inspection images marked with defect wave positions and defect types. However, since the number of real ultrasonic inspection images with defects obtained during the actual defect detection process is small, if a large number of ultrasonic inspection images with defect waves are to be collected, it will take a long time and need to be marked one by one, and the marking cost is also high.

[0048] In order to solve this problem, this embodiment further provides an ultrasonic detection image collection method: (1) marking surface waves, bottom waves and defect waves in the ultrasonic detection image; Based on OpenCV's ROI selection function (supports manual correction of automatic marking results), ultrasonic detection images of surface waves, bottom waves and defect waves are marked. Figure 5 As shown, the corresponding low-magnification sample image of the defect is as follows Figure 6 shown.

[0049] (2) Extracting a surface wave image, a bottom wave image, and a defect wave image from the ultrasonic detection image.

[0050] Crop the image area with fixed window size or adaptive size centered at the marker position. Adjust the contrast / resolution of the captured image to remove background noise.

[0051] (3) extracting defect wave features from the defect wave image; 1) Use the Canny operator or the Sobel operator to locate the peak edge of the defect wave image and extract the geometric parameters of the sharp peak; the Canny operator uses a double threshold (low threshold 0.3max_grad, high threshold 0.7max_grad) and combines the hysteresis threshold to connect the edges.

[0052] Calculation of geometric parameters: Peak height: signal amplitude after baseline correction; Peak width: Full width at half maximum (FWHM) calculation; Curvature radius: Calculated by the second-order derivative after cubic spline interpolation.

[0053] 2) Mark the dense areas of forest waves through threshold segmentation and count the number, area and distribution density of connected domains.

[0054] The Otsu adaptive thresholding method is combined with morphological opening operation to segment the forest-like wave region. Based on the 8-neighborhood connected component labeling (CCL), morphological parameters such as the equivalent circle diameter and Euler number are calculated.

[0055] 3) Quantify the contrast, energy, and entropy values of the high-frequency texture in the defective wave image to distinguish the uniform distribution of white dot defects from the linear pattern of crack defects.

[0056] Gray-level co-occurrence matrix (GLCM) parameter settings: Step size: 1 pixel; Directions: 0°, 45°, 90°, 135°; Gray levels: 16 levels; Feature calculation: Contrast: ; Energy: ; Entropy value: .

[0057] P(i,j) represents the occurrence probability of pixel pairs with gray levels i and j in the image under a specific spatial relationship. In the analysis of defective wave images, P(i,j) can quantify the directionality and complexity of defective textures.

[0058] (4) Establish the mapping relationship between the defective wave features and the defective types.

[0059] According to the defective types corresponding to the defective wave images to which the defective wave features belong, establish the mapping relationship between the defective wave features and the defective types, that is, inherit the corresponding relationship between the defective wave images and the defective types from the defective wave features. This facilitates automatically labeling the defective types for the generated simulation images in the later stage.

[0060] (5) Divide the defective wave features having a mapping relationship with the same defective type into the same feature set.

[0061] For example, divide all the defective wave features having a mapping relationship with segregation defects into the same feature set, and this feature set is the segregation feature set.

[0062] (6) Cluster the defective wave features in the same feature set to obtain the core defective wave features and boundary features.

[0063] Separate the internal distribution in the feature set through density clustering (such as DBSCAN) to obtain multiple clustering clusters. DBSCAN parameter selection: Radius of ε-neighborhood: Determine the inflection point position based on the k-distance graph; MinPts: 2 times the number of feature dimensions.

[0064] First, determine the core features. The core features usually correspond to the centroid or mode of the clustering cluster, reflecting the commonalities of most samples within the cluster.

[0065] Use K-means or Gaussian mixture model to calculate the geometric center (mean or median) of each cluster. Extract the parameter values corresponding to the cluster center point (such as peak height, mean distribution density) as candidate core feature values.

[0066] Screen features with high contribution to clustering through analysis of variance (ANOVA) or chi-square test. Statistically analyze the variance of features within each clustering cluster, and retain parameters with low variance (such as the variance of sharp peak height is small, indicating high stability).

[0067] Combined with physical meaning, preferentially select parameters directly related to segregation (such as distribution density reflects the degree of defect aggregation).

[0068] Then determine the feature boundary values. The boundary values are determined by the data distribution within the cluster (such as quantiles, standard deviations) or the overlapping area between clusters.

[0069] Calculate the upper and lower quartiles (Q1, Q3) of each feature within the clustering cluster, and use the range of Q1~Q3 as the preliminary boundary. For overlapping features between clusters (such as high-frequency texture entropy value), use Mahalanobis distance or confidence interval to divide clear boundaries.

[0070] Adjust the mathematical boundary according to the physical law of segregation defects in ultrasonic flaw detection: Distribution density boundary: According to the description that "ingot segregation is annularly distributed", limit the density threshold to be higher than non-segregation defects (such as porosity).

[0071] Peak sharpness boundary: Combining the observation that "the peak of white point is sharp and powerful", set the lower limit of peak curvature to exclude flat waveforms.

[0072] Verify the core defect wave features and boundary features: Verify the effectiveness of the feature combination through Pearson correlation coefficient or principal component analysis (PCA). For example: The sharp peak height is positively correlated with the high-frequency texture contrast (reflecting local stress concentration).

[0073] The number of connected components is negatively correlated with the distribution density (connected components in high-density areas are easy to merge).

[0074] (7) Use an image generation model to generate a simulated defect wave image according to the core defect wave features and boundary features, and label the corresponding defect type for the simulated defect wave image.

[0075] Generate an image that conforms to the core features based on a generative adversarial network (GAN), and bind the generated image to the original defect type label.

[0076] The image generation method includes: ‌Core feature‌ (c core ): As the main conditional vector, it controls the main feature of the defect type of the generated image (such as the annular distribution pattern of segregation).

[0077] ‌Boundary feature‌ (c boundary ): As an auxiliary condition, it is injected in the following two ways: ‌Vector splicing‌: Splice c core and c boundary and then input the result into the generator.

[0078] ‌Weight modulation‌: Dynamically adjust the weights of the convolutional layers of the generator (such as the FiLM layer) using the boundary feature.

[0079] ‌Core feature reconstruction loss‌: Ensure that the features of the generated image are consistent with c core .

[0080]

[0081] Where E is the feature extractor and z is the feature of the generated image.

[0082] ‌Boundary feature constraint loss‌: Limit the features of the generated image not to exceed the boundary defined by c boundary .

[0083]

[0084] ‌Adversarial loss‌: Distinguish the distribution difference between the generated image and the real image through the discriminator.

[0085] ‌Parameterized boundary threshold‌: Allow users to dynamically adjust the intensity of the boundary feature (such as using a slider to control the gradual change of segregation density from the core to the boundary).

[0086] ‌Multi-modal generation‌: For the same c core input different c boundary , generate multiple variants of the same defect type (such as segregation waveforms with different noise levels).

[0087] The role of the boundary feature in the generation model: Take the boundary features as part of the generation conditions to constrain the generator to introduce controllable variations within the range dominated by the core features. For example, in conditional GAN (cGAN), the boundary features can be incorporated into the input of the generator through vector concatenation or attention mechanisms. Generate transitional samples (such as mild segregation and moderate segregation) between different defect types to avoid over-homogenization of the generated data. Simulate the boundary waveforms (such as the superposition of weak defect waves and background clutter) caused by noise or interference in real detection.

[0088] Define a safe generation region of the feature space through boundary features to restrict the generator from outputting data that violates physical laws (such as the peak height cannot be negative). By adding a boundary feature constraint term to the loss function, avoid generating abnormal images that exceed the actual detection range (such as mutant waveforms without physical meaning). Ensure that the generated defect wave images conform to the ultrasonic propagation law (such as the time sequence relationship between peaks and valleys).

[0089] Take the boundary features as adversarial training samples to force the generator to learn to maintain the stability of the core features under noise interference. In the generator, the boundary features can be encoded as low-probability regions in the latent space, and the intensity of the generated noise can be controlled by adjusting the variance of the latent variables. The generated simulated images contain interference patterns common in real detection (such as random small connected regions in forest-like waves), improving the fault tolerance of downstream classifiers.

[0090] (8) Stitch the simulated defect wave image with any surface wave image and bottom wave image to form a simulated ultrasonic detection image, and store the simulated ultrasonic detection image in the dataset.

[0091] Use the surface wave and bottom wave images as the background. Superimpose the simulated defect wave image on the background and adjust the position and amplitude to match the physical laws. After generating the image, generate defect wave markers at the corresponding positions of the generated image according to the superimposition position of the defect wave image, and label the generated image with the corresponding defect type according to the defect type corresponding to the core features used when generating the defect wave image. Store the labeled image in the dataset.

[0092] This method can generate simulated ultrasonic detection images that are extremely similar to real ultrasonic detection images, and the generated images come with annotation content without manual annotation. The generated simulated ultrasonic detection images can be used to train image recognition models. In this way, the collection cost and annotation cost of training images are reduced.

[0093] The training process of the image recognition model will be introduced in detail below: Import data. Use the imageDatastore function to read the folder name, determine whether it contains subfolders, and use the subfolder names as labels. Among them, the labels are divided into five types, namely segregation, inclusion, porosity, shrinkage cavity, and crack. Each subfolder contains ultrasonic A-scan images of internal defects in continuous casting round billets with five labels.

[0094] Divide the dataset and obtain the data categories. Randomly divide the dataset variable, divide the training set and test set in a ratio of 8:2, and obtain the data label categories by automatic acquisition.

[0095] Load the training network. First, create a network structure of a residual network (ResNet-18) with 18 layers deep, as Figure 6 shown, and load the pre-trained weights. The input data passes through the convolutional layer, normalization layer, undergoes activation, pooling layer, passes through several convolutional modules, and finally undergoes activation, pooling, and fully connected layers to obtain the classification result; secondly, analyze the structure of this network, as Figure 7 shown, including Figure 6A total of 71 network node names, types, activation features, and learnable parameters. Among them, the total amount of learnable parameters is 11.6M; finally, the height and width of the image input are obtained from the input layer and saved in the img_size variable for subsequent image processing. The specific algorithm code constructs a variant of the ResNet-18 structure. First, the network creates the network structure of a residual network (ResNet-18) with 18 layers of deep convolution neural networks, adjusts the fully connected layer to adapt to the 5-classification task, the input is a 224x224 RGB image, and the training effect is improved through residual learning. Finally, the probability distribution of 5 categories is output. The specific steps are as follows: (1) Environment initialization. Clear the previous variables, figure windows, and command lines to ensure a clean running environment. (2) Network structure construction. Input layer: Receive a 224x224x3 RGB image and use Z-Score normalization; Initial convolution layer: 7x7 convolution kernel, 64 filters, stride 2, padding 3, followed by batch normalization and ReLU activation, and then 3x3 max pooling (stride 2), output a 56x56 feature map. (3) Residual block design. Each residual block contains two 3x3 convolution layers, and each convolution is followed by batch normalization and ReLU. Use a shortcut connection, and add the outputs of the main branch and the shortcut branch through the additionLayer. When the feature map size is halved (such as downsampling), the shortcut branch uses a 1x1 convolution to adjust the number of channels and stride to ensure size matching; Four stages: res2 (64 channels), res3 (128 channels), res4 (256 channels), res5 (512 channels), each stage contains two residual blocks, a total of 8 residual blocks. The first residual block of each stage can perform downsampling (stride 2), and the subsequent blocks maintain the size. (4) Classification layer. The global average pooling layer converts the feature map into 1x1x512; the fully connected layer (5 neurons) corresponds to the 5-classification task, followed by Softmax and the classification layer outputs the probability. (5) Network connection. Clearly define the connection relationship of each layer through connectLayers to ensure the correct implementation of the residual connection. (6) Visualization: Use plot(lgraph) to draw the network structure diagram for intuitive inspection.

[0096] Figure 8 For the accuracy and loss curves of the model. Among them, in the accuracy curve, the blue line represents the training set and the black line represents the test set; in the loss curve, the orange line represents the training set and the black line represents the test set. The test accuracy of the model reaches 93.62%, the training time is 25 minutes and 4 seconds, the training cycle is a total of 30 rounds, a total of 420 iterations are performed, the number of iterations per round is 14 times, the maximum number of iterations is 420 times. The test frequency is 20 iterations. The segmented learning rate is 0.0001.

[0097] Get the network layer and modify the last fully connected layer and classification layer. The function is to replace the last two layers (fully connected layer and classification layer) of the pre-trained model to adapt to the new classification task. The number of classes is specified by numClasses. This enables the model to be applicable to different tasks. It is specifically divided into two steps. First, create the new layers. The fully connected layer (fcLayer). Use numClasses (the number of classes specified by the user) as the output dimension to replace the fully connected layer fc1000 of the original network. Here, numClasses is set to 5. Update the classification layer (classificationLayer) to match the new number of classes and ensure the correct loss function and output format. Second, replace the original layers. The replaceLayer function replaces the fully connected layer named "fc1000" and the classification layer "ClassificationLayer_predictions" in the original network with the newly defined fcLayer and classificationLayer respectively.

[0098] Data augmentation. It is used to implement image data augmentation and create a storage for the augmented image data. The purpose is to improve the generalization ability of the model and at the same time adjust the image size and color channels to meet the network input requirements. First, define the parameters for data augmentation. This includes defining the range of pixel translation or rotation pixelRange = [-10, 10]. Create an augmented image database (imageDataAugmenter) and define the function of each parameter: the range of rotation angles (RandRotation), random reflection in the up and down directions (RandXReflection), horizontal translation range (RandXTranslation), vertical translation range (RandYTranslation). Second, create a data storage object with image augmentation capabilities (augmentedImageDatastore) for the training and test sets. Training set (Train): DataAugmentation: Apply the above-defined augmentation operations (rotation, flipping, translation). ColorPreprocessing: Convert single-channel grayscale images to three-channel RGB format to meet the input requirements of the ResNet pre-trained network. Test set (Test): Only perform color space conversion and do not apply data augmentation to reflect the performance in the real scenario.

[0099] Set training parameters. This algorithm code configures various hyperparameters for the training process, aiming to efficiently train the model and avoid overfitting through means such as the Adam optimizer, learning rate decay, data shuffling, and validation monitoring. At the same time, it visualizes the training progress but turns off redundant output information. Specify the use of the Adam optimizer; set the number of samples per mini-batch to 64; the maximum number of training epochs to 30; the initial learning rate to 0.001; the learning rate scheduling method to piecewise constant decay; the learning rate decay factor to 0.1, that is, the learning rate is multiplied by 0.1 each time it is adjusted; the learning rate is reduced every 20 epochs; the data order is shuffled at the beginning of each epoch to prevent the model from being biased by the data order and improve generalization ability; the validation dataset uses the previously defined Test data storage object to prevent overfitting; validation is performed every 20 iterations; a training progress graph is drawn to show the changes in loss and accuracy; the detailed output in the command line is turned off to make the interface more concise.

[0100] Model training. Train the model according to the specified data and hyperparameters, and update the network weights. Use the Train data, the lgraph layer graph, and the options training options to train the network, and return the trained network net and the training information Loss. Among them, Loss contains the loss and other information during the training process. By adjusting the network structure (lgraph) and training options (options), the model performance can be optimized.

[0101] Simulation test: Its function is to use the trained model to make predictions on the training set and the test set, and obtain the prediction results respectively. Users may need subsequent steps to analyze these results to evaluate the performance of the model.

[0102] Output settings: Extract the true labels from the training and test data storages and save them into variables for subsequent use in evaluating the model performance.

[0103] Such as Figure 9 are the prediction accuracy rate curves on the training set and the test set, which are used to measure the correctness of the model prediction. Output the previously calculated training set and test set accuracies in a readable form to the command window for users to view the performance of the model.

[0104] Figure 10It is the confusion matrix of the training set and the test set, used to generate and visualize the confusion matrix of the training set and the test set, helping to analyze the performance of the classification model more deeply. The classification results of the internal defects of the continuous casting round billet in the training set are five types, including: segregation, inclusion, porosity, shrinkage cavity, crack, and their classification accuracies are 97.3%, 97.8%, 96.0%, 94.9%, 97.8% respectively; the classification results of the internal defects of the continuous casting round billet in the test set are five types, including: segregation, inclusion, porosity, shrinkage cavity, crack, and their classification accuracies are 95.7%, 97.8%, 92.0%, 93.3%, 89.6% respectively.

[0105] Figure 11 It is the loss function curve of the training set and the test set, and the script for plotting the training loss function curve and the training accuracy curve in the MATLAB environment. It is divided into the following 4 steps: 1. Create a figure window; 2. Plot the training accuracy curve; 3. Plot the training loss function curve; 4. Verify the loss function curve.

[0106] Figure 12 It is the ROC curve of the model. The main purpose is to plot the ROC curve of the multi-classification problem and calculate the macro-average and micro-average ROC curves. In this way, the classification performance of different classes can be visually compared and the performance of the overall model can be evaluated. It includes the following 4 steps: 1. Obtain the predicted probabilities of the test set; 2. Obtain the true labels; 3. Plot the ROC curve of each class; 4. Calculate the macro-average and micro-average ROC curves: (1) Calculate the number of samples in each class. (2) Calculate the macro-average ROC curve: Take the average of the TPRs of all classes and plot the macro-average ROC curve. (3) Calculate the micro-average ROC curve: Weighted average the FPR and TPR according to the number of samples in each class and plot the micro-average ROC curve (4) Plotting settings.

[0107] Finally, save the trained image recognition model. This image recognition model can extract the waveform features in the ultrasonic detection image and classify the waveform features to obtain the defect type and defect level.

[0108] In an embodiment of the present invention, based on step S4, the following will give a possible embodiment to non-restrictively elaborate on its specific implementation scheme.

[0109] S401. Decision logic for dynamically adjusting the detection interval 1. No-defect situation When no defect is detected at multiple consecutive detection points (such as 3), start the interval amplification mechanism. Select the N value based on the historical data of the current detection area (such as the defect density at a similar location); if no defect is found after 3 consecutive amplifications, N is incremented by 1 (upper limit 5).

[0110] The movement of the probe is controlled by a lead screw stage driven by a motor. The step angle of the stepper motor corresponds to N times the distance.

[0111] 2. The defect is not of the highest level When a defect is detected and the level ≥ the set threshold (such as Class B in ISO 5817), a closed-loop feedback system is used to adjust the encoder pulse count in real time, and the original step distance is divided by 2; the updated step distance is not less than the wavelength corresponding to the center frequency of the probe (such as the minimum interval of a 5MHz probe is 0.3mm).

[0112] Generate a grid of dense detection points around the defect area, covering a 360° range of the circumference where the defect is located.

[0113] 3. The highest level of defect When the defect level reaches Class A in ISO 5817 or a custom highest standard, and the defect size exceeds the acceptance standard (such as depth > 1mm), lock the current position and automatically generate the three-dimensional coordinates of the defect (based on the data fusion of a laser displacement sensor and an encoder).

[0114] S402. Detection point positioning and image acquisition Establish a round billet coordinate system: Axial direction: Take the rotation axis of the round billet as the Z-axis, and the encoder accuracy is 0.01mm / pulse; Circumferential direction: Establish an angular coordinate system through a rotary encoder (resolution 0.01°).

[0115] Probe positioning: Use a six-axis robotic arm to achieve spatial positioning, and the repeat positioning accuracy is ±0.05mm; obtain the transformation matrix between the probe coordinate system and the round billet coordinate system through checkerboard calibration.

[0116] Dynamic path planning: Use a path generation algorithm to plan a route for the probe and set an anti-collision strategy: Detect the surface state of the round billet through a laser rangefinder before stepping, and trigger an emergency stop when abnormal. Use an S-shaped acceleration and deceleration control algorithm to reduce mechanical vibration.

[0117] S403. Image acquisition and processing Use an image recognition model to identify the ultrasonic detection images obtained at each sampling point to obtain the corresponding defect types.

[0118] S404. Defect identification and result summary Map the defect positions to the three-dimensional model of the round billet, and represent the defect severity with a color gradient.

[0119] In some embodiments, the internal defect detection system of the round billet based on ultrasonic A-scan images may include multiple functional modules composed of computer program segments. The computer programs of each program segment in the internal defect detection system of the round billet based on ultrasonic A-scan images may be stored in the memory of a computer device and executed by at least one processor to perform the functions of internal defect detection of the round billet based on ultrasonic A-scan images (see details in Figure 1 description).

[0120] In this embodiment, the internal defect detection system of the round billet based on ultrasonic A-scan images can be divided into multiple functional modules according to the functions it performs, as Figure 12 shown. The module referred to in the present invention means a series of computer program segments that can be executed by at least one processor and can complete fixed functions, and are stored in the memory. In this embodiment, the functions of each module will be described in detail in subsequent embodiments.

[0121] A setting module, configured to set the interval distance between adjacent detection points to a first distance; A detection module, configured to collect a first set of ultrasonic detection images of any section of the round billet according to the first distance; An identification module, configured to process the first set of ultrasonic detection images by using an image recognition model to obtain a defect identification result; An update module, configured to update the interval distance between adjacent detection points to a second distance according to the defect identification result, and collect ultrasonic detection images of the undetected section of the round billet according to the second distance; When the defect identification result is that there is a defect, the second distance is less than the first distance; when the defect identification result is that there is no defect, the second distance is greater than the first distance; The detection point is the position on the outer surface of the round billet where an ultrasonic detection probe is placed.

[0122] Figure 13 The internal defect detection method of the round billet based on ultrasonic A-scan images provided in the embodiments of the present application can be applied to a device. Those skilled in the art can understand that the device structure involved in the embodiments of the present invention does not constitute a limitation on the device. The device may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements. In the embodiments of the present invention, the device includes but is not limited to a laptop computer, a desktop computer, a workbench, a personal digital assistant, a server, a blade server, a mainframe computer, and other suitable computers. The device may also represent various forms of mobile devices, such as a personal digital processor, a cellular phone, a smart phone, a wearable device, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the embodiments of the present application described herein and / or claimed.

[0123] Among them, the device 1300 may include: a processor 1310, a memory 1320, and a communication unit 1330. These components communicate through one or more buses. Those skilled in the art can understand that the structure of the server shown in the figure does not constitute a limitation on the present invention. It can be a bus structure, a star structure, and may also include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0124] Among them, the memory 1320 can be used to store the execution instructions of the processor 1310. The memory 1320 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk, or optical disk. When the execution instructions in the memory 1320 are executed by the processor 1310, the device 1300 can execute some or all of the steps in the above method embodiments.

[0125] The processor 1310 is the control center of the storage device, connecting various parts of the entire electronic device through various interfaces and lines. By running or executing software programs and / or modules stored in the memory 1320, and by calling the data stored in the memory, it executes various functions of the electronic device and / or processes data. The processor can be composed of an integrated circuit (IC). For example, it can be composed of a single packaged IC, or can be composed of multiple packaged ICs with the same or different functions connected together. For example, the processor 1310 may only include a central processing unit (CPU). In the embodiment of the present invention, the CPU can be a single arithmetic core or can include multiple arithmetic cores.

[0126] The communication unit 1330 is used to establish a communication channel so that the storage device can communicate with other devices. It receives user data sent by other devices or sends user data to other devices.

[0127] The present invention also provides a computer storage medium. Among them, the computer storage medium can store a program, and when the program is executed, it can include some or all of the steps in the various embodiments provided by the present invention. The storage medium can be a magnetic disk, an optical disk, a read-only memory (ROM), a random access memory (RAM), etc.

[0128] Those skilled in the art can clearly understand that the technology in the embodiments of the present invention can be implemented by means of software plus a necessary general hardware platform. Based on such an understanding, the technical solutions in the embodiments of the present invention, in essence, or the parts that contribute to the prior art can be embodied in the form of a software product. This computer software product is stored in a storage medium such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disc, etc., various media that can store program codes, including several instructions to enable a computer device (which can be a personal computer, a server, or a second device, a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention.

[0129] For the same or similar parts among the various embodiments in this specification, reference can be made to each other. In particular, for the device embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the descriptions in the method embodiments.

[0130] In the several embodiments provided by the present invention, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the system embodiments described above are only illustrative. For example, the division of the modules is only a logical function division. In actual implementation, there can be other division methods. For example, multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections to each other can be through some interfaces. The indirect couplings or communication connections of the systems or modules can be in electrical, mechanical, or other forms.

[0131] The modules described as separate components may or may not be physically separated. The components displayed as modules may or may not be physical modules, that is, they can be located in one place, or they can be distributed to multiple network modules. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0132] In addition, in each embodiment of the present invention, the various functional modules can be integrated in a processing module, or each module can exist physically alone, or two or more modules can be integrated in one module.

[0133] Although the present invention has been described in detail by reference to the accompanying drawings and in conjunction with the preferred embodiments, the present invention is not limited thereto. Without departing from the spirit and essence of the present invention, those of ordinary skill in the art can make various equivalent modifications or substitutions to the embodiments of the present invention, and these modifications or substitutions should all fall within the scope of the present invention. / Any person skilled in the art within the technical scope disclosed by the present invention can easily conceive of changes or substitutions, which should all be covered within the protection scope of the present invention.

Claims

1. A method for detecting internal defects of round billets based on ultrasonic A-scan images, characterized in that, Including: Set the interval distance between adjacent detection points to a first distance; Collect a first set of ultrasonic detection images of any section of the round billet according to the first distance; Use an image recognition model to process the first set of ultrasonic detection images to obtain a defect recognition result; Update the interval distance between adjacent detection points to a second distance according to the defect recognition result, and collect ultrasonic detection images of the untested section of the round billet according to the second distance; When the defect recognition result is that there is a defect, the second distance is less than the first distance; when the defect recognition result is that there is no defect, the second distance is greater than the first distance; The detection point is the position on the outer surface of the round billet where the ultrasonic detection probe is placed.

2. The method according to claim 1, wherein Collecting a first set of ultrasonic detection images of any section of the round billet according to the first distance includes: Collect a first set of ultrasonic detection images from the round billet section according to the first distance, and the round billet section is any one of the multiple sections cut from the round billet.

3. The method according to claim 1, characterized in that, The image recognition model uses a convolutional neural network model with a residual network architecture, and the image recognition model includes: Input layer: Receive an RGB image with a size of 112x112 pixels as input; Convolutional layer and activation function: Include multiple convolutional layers, and each convolutional layer is followed by a ReLU activation function to increase the non-linear expression ability of the model; Pooling layer: Used to reduce the dimension of the feature map, reduce the amount of calculation, and retain important features at the same time; Residual connection: Realize residual learning through shortcut connections to solve the problem of gradient disappearance in the training of deep networks; Fully connected layer: After the convolutional layer extracts features, classify the features through the fully connected layer and finally output the classification result.

4. The method according to claim 1, wherein The method further includes: Collect ultrasonic detection images of multiple round billets; Mark the positions of defect waves and corresponding defect types in the ultrasonic detection images; Store the marked ultrasonic detection images in the data set; Use the data set to train and validate the image recognition model.

5. The method according to claim 4, characterized in that, After marking the positions of defect waves and corresponding defect types in the ultrasonic detection images, the method further includes: Mark surface waves, bottom waves and defect waves in the ultrasonic detection images; Intercept surface wave images, bottom wave images and defect wave images from the ultrasonic detection images; Extract defect wave features from the defect wave images; Establish a mapping relationship between the defect wave features and the defect types; Divide the defect wave features with a mapping relationship to the same defect type into the same feature set; Cluster the defect wave features in the same feature set to obtain core defect wave features and boundary features; Use an image generation model to generate simulated defect wave images according to the core defect wave features and boundary features, and mark the corresponding defect types for the simulated defect wave images; Stitch the simulated defect wave images with arbitrary surface wave images and bottom wave images into simulated ultrasonic detection images, and store the simulated ultrasonic detection images in the data set.

6. The method according to claim 5, wherein Extracting defect wave features from the defect wave images includes: Use the Canny operator or the Sobel operator to locate the wave peak edge of the defect wave image and extract the geometric parameters of the sharp wave peak; Mark the dense area of the forest-like wave through threshold segmentation, and count the number, area and distribution density of connected components; Quantify the contrast, energy and entropy values of the high-frequency texture in the defect wave image.

7. The method according to claim 1, wherein Update the interval distance between adjacent detection points to a second distance according to the defect recognition result, and collect ultrasonic detection images of the undetected section of the round billet according to the second distance, including: If the defect recognition result is no defect, update the interval distance between adjacent detection points to N times the first distance, and 2 ≤ N ≤ 5; if the defect recognition result includes defects and defect levels and the defect level is not the highest level, update the interval distance between adjacent monitoring points to 1 / 2 of the first distance; if the defect recognition result includes defects and defect levels and the defect level is the highest level, determine that the detection is completed and output the defect recognition result; Determine the positions of multiple detection points arranged axially on the surface of the round billet according to the updated interval distance, and collect ultrasonic detection images at the positions of the multiple detection points to obtain a second set of ultrasonic detection images; Use the image recognition model to process the second set of ultrasonic detection images in sequence and summarize the defect recognition results.

8. An internal defect detection system for round billets based on ultrasonic A-scan images, characterized in that, Including: ‌ A setting module for setting the interval distance between adjacent detection points to the first distance; A detection module for collecting a first set of ultrasonic detection images of any section of the round billet according to the first distance; An identification module for using an image recognition model to process the first set of ultrasonic detection images to obtain a defect recognition result; An update module for updating the interval distance between adjacent detection points to a second distance according to the defect recognition result, and collecting ultrasonic detection images of the undetected section of the round billet according to the second distance; When the defect recognition result is that there is a defect, the second distance is less than the first distance; when the defect recognition result is that there is no defect, the second distance is greater than the first distance; The detection point is the position on the outer surface of the round billet where the ultrasonic detection probe is placed.

9. The system according to claim 8, wherein The image recognition model adopts a convolutional neural network model with a residual network architecture, and the image recognition model includes: ‌Input layer‌: Receives an RGB image with a size of 112x112 pixels as input; ‌Convolutional layer and activation function‌: Includes multiple convolutional layers, and each convolutional layer is followed by a ReLU activation function to increase the non-linear expression ability of the model; ‌Pooling layer‌: Used to reduce the dimension of the feature map, reduce the amount of calculation, and retain important features at the same time; ‌Residual connection‌: Realize residual learning through shortcut connections to solve the problem of gradient disappearance in the training of deep networks; ‌Fully connected layer‌: After the convolutional layer extracts features, the fully connected layer classifies the features and finally outputs the classification result.

10. The system according to claim 8, wherein The system further includes: Collect ultrasonic detection images of multiple round billets; Mark the positions of defect waves and corresponding defect types in the ultrasonic detection images; Store the marked ultrasonic detection images in the data set; Use the data set to train and validate the image recognition model.