Analysis method for nonmetallic inclusions in steel based on machine learning and pattern recognition
Through analysis methods based on machine learning and graph recognition, non-metal inclusions in steel are automatically identified and classified, and the problems of insufficient identification accuracy and manual intervention in the prior art are solved, and a high degree of automation is achieved.
Patent Information
- Application Number
- CN202510228997.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-28
- Publication Date
- 2025-06-10
AI Technical Summary
The existing non-metallic inclusion analysis methods have the problems that software scans impurities with manual removal, insufficient identification accuracy, and requires manual writing of rules.
Using an analysis method based on machine learning and graph recognition, we use analytical methods to obtain sample data from various production stages of steel, build component data sets and image data sets, and train them using deep neural network models to realize automatic identification and classification of non-metallic inclusions.
It improves the recognition accuracy of non-metallic inclusions, reduces the discrimination error caused by human operations, and realizes a high degree of automation analysis.
Smart Images

Figure CN120126602A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of metal material analysis, and particularly to a method for analyzing non-metallic inclusions in steel based on machine learning and pattern recognition. Background Art
[0002] The quality of steel products depends on their purity and uniformity, and non-metallic inclusions are one of the key factors affecting the quality of steel. Non-metallic inclusions refer to heterogeneous substances formed in molten steel that cannot be removed by conventional steelmaking methods. They may originate from raw materials, the smelting process, or furnace lining materials. The presence of these inclusions can lead to a decline in the mechanical properties, corrosion resistance, and processing performance of steel, and even cause serious production accidents.
[0003] In terms of the impact of non-metallic inclusions on the quality of steel, the type, size, shape, and distribution of inclusions all have a significant impact on the mechanical properties of steel. For example, large inclusions may cause steel to fracture during mechanical property tests such as tensile and impact tests, while small inclusions may lead to a shortened fatigue life.
[0004] Existing methods for analyzing non-metallic inclusions mainly involve scanning specimens using an ASPEX inclusion analysis system and classifying and counting the inclusions. However, its limitations are mainly reflected in the following aspects: 1) The software will scan out impurities that were not removed during the sample preparation process, which need to be manually removed; 2) Existing analysis methods have certain limitations in identifying the morphology, color, and composition of non-metallic inclusion particles, resulting in inaccurate analysis results of inclusions. Although classification rules are built into the software, rules still need to be manually written for different steel grades. Summary of the Invention
[0005] The technical problem to be solved by the present invention is to overcome the shortcomings of the prior art and provide a method for analyzing non-metallic inclusions in steel based on machine learning and pattern recognition.
[0006] To solve the above technical problems, the technical solution of the present invention is as follows: A method for analyzing non-metallic inclusions in steel based on machine learning and pattern recognition, comprising: Obtaining production specimens at each production stage of typical steel grades, and obtaining composition data and image data of the inclusions in the specimens; Preprocessing the composition data of the inclusions in the specimens and constructing an inclusion composition data set; Preprocessing the image data of the inclusions in the specimens and constructing an inclusion image data set; Dividing the composition data set and the image data set to form a training set for model training and a test set for model testing; Train the analysis model with the training set and test the trained analysis model with the test set; Input the image data of the inclusions in the sample to be tested into the analysis model to obtain the inclusion composition data of the sample to be tested.
[0007] As a preferred solution of the method for analyzing non-metallic inclusions in steel based on machine learning and pattern recognition according to the present invention, wherein: the obtaining of production samples at each production stage of typical steel grades and the obtaining of the composition data and image data of the inclusions in the samples include: Obtain converter steel water samples, steel samples before and after ladle furnace refining, before and after wire feeding, and before and after static stirring, steel samples before and after vacuum furnace refining, before and after wire feeding, and before and after static stirring, tundish steel water samples, billet samples, and rolled material samples; Obtain the composition data and image data of the inclusions in each sample in sequence through Aspex inclusion analysis software.
[0008] As a preferred solution of the method for analyzing non-metallic inclusions in steel based on machine learning and pattern recognition according to the present invention, wherein: the preprocessing of the composition data of the inclusions in the samples and the construction of the inclusion composition data set include: Determine the first element, second element, and maximum particle size of the inclusions, and eliminate non-inclusion particles; Screen the elements of Mg, Al, Ca, Mn, Si, S, and Ti in the non-metallic inclusion composition, perform normalization processing and composition calculation on the inclusion composition data, and convert the results into the composition ratios of MgO, Al2O3, CaS, CaO, MnS, MnO, and SiO2; Merge the composition data of all samples and number them to generate an inclusion composition data set D, and the inclusion composition data set D is ( ), wherein, C is the corresponding composition ratio.
[0009] As a preferred solution of the method for analyzing non-metallic inclusions in steel based on machine learning and pattern recognition according to the present invention, wherein: the preprocessing of the image data of the inclusions in the samples and the construction of the inclusion image data set include: Unify the pixels of the non-metallic inclusion images; Use image processing technology to perform noise reduction processing on the non-metallic inclusion images and optimize the image quality; Perform edge feature extraction, corner feature extraction, local feature extraction, and contrast feature extraction on the non-metallic inclusion images; Merge the image data of all samples and number them to generate an inclusion image data set M, and the inclusion image data set M is ( ), wherein, F1 For edge feature extraction, F 2 For corner feature extraction, F 3 For local feature extraction, F 4 For contrast feature extraction.
[0010] As a preferred embodiment of the method for analyzing non-metallic inclusions in steel based on machine learning and pattern recognition according to the present invention, wherein: the partitioning of the composition data set and the image data set to form a training set for model training and a test set for model testing includes: Partition the composition data set D and the inclusion image data set M according to a ratio of 7:3 to form a training set for model training and a test set for model testing.
[0011] As a preferred embodiment of the method for analyzing non-metallic inclusions in steel based on machine learning and pattern recognition according to the present invention, wherein: the training of the analysis model using the training set and the testing of the trained analysis model using the test set include: Construct an association analysis between the inclusion composition data set D and the inclusion image data set M using the training set, and use Pytorch to construct a deep neural network model for training with the inclusion image data set M as the input and the inclusion composition data set D as the output to obtain a trained model; Test the trained model using the test set.
[0012] As a preferred embodiment of the method for analyzing non-metallic inclusions in steel based on machine learning and pattern recognition according to the present invention, wherein: after inputting the image data of the inclusions in the test sample into the analysis model to obtain the inclusion composition data of the test sample, it further includes: Construct an Origin Pro ternary phase diagram template, import the composition to be analyzed, and create a ternary phase diagram.
[0013] As a preferred embodiment of the method for analyzing non-metallic inclusions in steel based on machine learning and pattern recognition according to the present invention, wherein: the composition calculation includes: ; ; ; ; ; ; .
[0014] As a preferred solution of the method for analyzing non-metallic inclusions in steel based on machine learning and pattern recognition according to the present invention, wherein: the algorithms used for edge feature extraction include algorithms such as Sobel, Canny, and Laplacian; the algorithms used for corner feature extraction include corner detection algorithms such as Harris and Shi-Tomasi; the algorithm used for local feature extraction is the Scale Invariant Feature Transform (SIFT) algorithm; and the algorithms used for contrast feature extraction are HSV and RGB histogram extraction algorithms.
[0015] The beneficial effects of the present invention are as follows: (1) Through machine learning and image recognition technologies, the present invention can achieve automatic recognition and classification of non-metallic inclusions in steel, with a high degree of automation and reduced discrimination errors caused by manual operations.
[0016] (2) Through feature extraction and model training, the present invention can improve the accuracy of recognition and reduce misjudgment and missed judgment. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0018] Figure 1 It is a schematic flow chart of the method for analyzing non-metallic inclusions in steel based on machine learning and pattern recognition provided by the present invention; Figure 2 It is a ternary phase diagram formed in the embodiment. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0019] To make the content of the present invention easier to be clearly understood, the following will further elaborate on the present invention based on the specific embodiments and in combination with the drawings.
[0020] The embodiment of the present application provides a method for analyzing non-metallic inclusions in steel based on machine learning and pattern recognition, which specifically includes the following steps: Step S101: Obtain production specimens at each production stage of typical steel grades, and obtain the composition data and image data of the inclusions in the specimens.
[0021] Specifically, select production specimens at different stages of typical steel grades and perform high-precision sample preparation. Then, use Aspex inclusion analysis software to obtain the main composition and morphological images of the inclusions in the specimens, and obtain the composition data and image data of the inclusions in the specimens.
[0022] Among them, the production samples at the above different stages include converter steel water samples, steel ladle furnace samples before and after refining, before and after wire feeding, and before and after static stirring, vacuum furnace samples before and after refining, before and after wire feeding, and before and after static stirring, tundish steel water samples, continuous casting billet samples, and rolled material samples.
[0023] Step S102: Preprocess the composition data of inclusions in the samples and construct an inclusion composition data set.
[0024] Specifically, first, determine the first element, the second element, and the maximum particle size of the inclusions, and eliminate non-inclusion particles. Then, screen out the seven elements of Mg, Al, Ca, Mn, Si, S, and Ti in the composition of non-metallic inclusions, perform normalization processing and composition calculation on the inclusion composition data, and convert the results into the composition ratios of MgO, Al2O3, CaS, CaO, MnS, MnO, and SiO2. Finally, merge the composition data of all samples and number them to generate an inclusion composition data set D, and the inclusion composition data set D is ( ), where C is the corresponding composition ratio.
[0025] It should be noted that due to the deviation in the detection ability of Aspex for light elements such as N and O, Ti-containing inclusions are classified as Ti x .
[0026] The above composition calculation is specifically as follows: ; ; ; ; ; ; .
[0027] Step S103: Preprocess the image data of inclusions in the samples and construct an inclusion image data set.
[0028] Specifically, first, unify the non-metallic inclusion images to 256 pixels * 256 pixels. Use image processing technology to perform noise reduction processing on the images to eliminate impurities and interference signals in the images. Subsequently, optimize the image quality through means such as contrast enhancement and sharpening, so that the characteristics of non-metallic inclusions are more prominent, facilitating subsequent identification and analysis.
[0029] After that, the image features of non-metallic inclusions are extracted, specifically including edge feature extraction, corner feature extraction, local feature extraction, and contrast feature extraction. Among them, edge feature extraction is to detect the brightness change of the edge between the inclusion and the background and mark the contour of the inclusion; corner feature extraction is to detect and identify the inclusion and its surrounding discontinuous areas for inclusion identification and geometric shape correction; local feature extraction is to perform local Gaussian blur on the image and extract the directional gradient histogram for the inclusion and inclusion morphology of complex inclusions; contrast feature extraction is color feature extraction, which reflects the gray-scale change between the inclusion background and each phase in the complex inclusion for identifying each phase.
[0030] Finally, construct edge feature extraction F 1 、corner feature extraction F 2 、local feature extraction F 3 and contrast feature extraction F 4 。Merge the image documents of each sample, re-number each image, and generate an image dataset M ,The inclusion image dataset M is ( ).
[0031] It should be noted that the algorithms used for edge feature extraction include Sobel, Canny, Laplacian and other algorithms, the algorithms used for corner feature extraction include Harris, Shi-Tomasi and other corner detection algorithms, the algorithm used for local feature extraction is the SiFT scale-invariant feature transform algorithm, and the algorithm used for contrast feature extraction is the HSV, RGB histogram extraction algorithm.
[0032] Step S104: Divide the composition dataset and the image dataset to form a training set for model training and a test set for model testing.
[0033] Specifically, divide the composition dataset D and the inclusion image dataset M according to a ratio of 7:3 to form a training set for model training and a test set for model testing.
[0034] Step S105: Train the analysis model with the training set and test the trained analysis model with the test set.
[0035] Specifically, construct the correlation analysis between the inclusion composition dataset D and the inclusion image dataset M through the training set, use the inclusion image dataset M as the input and the inclusion composition dataset D as the output, and use Pytorch to construct a deep neural network model for training to obtain the trained model.
[0036] The trained model is tested and evaluated using a test set. If the evaluation comparison is qualified, the trained ensemble learning model is used as the analysis model; if the classification is unqualified, it returns to data and image preprocessing for manual analysis and definition again.
[0037] Step S106: Input the image data of the inclusions in the sample to be tested into the analysis model to obtain the inclusion composition data of the sample to be tested.
[0038] Specifically, import the inclusion composition data and image data of the sample to be tested into the trained analysis model to obtain the corresponding classification prediction results. Then, construct an Origin Pro ternary phase diagram template, import the required components for analysis, and create a ternary phase diagram. Finally, use Python to construct a GUI interface for external use of the model and encapsulate the model. Implement file import, data and image analysis, result display, and ternary phase diagram display.
[0039] The following is illustrated through specific embodiments.
[0040] This embodiment applies the present invention to the analysis of molten steel samples after refining and static stirring of a certain steel grade in a certain steel plant: Step 1: Check the.csv file output by Aspex to ensure that there are no malfunctions such as garbled characters or missing in the title row.
[0041] Step 2: Upload the.csv file to the model, and the model automatically extracts the following data columns.
[0042]
[0043] Table 1 Step 3: After the model runs, enter the output interface, which includes inclusion data statistics and ternary phase diagram generation.
[0044] Step 4: The inclusion statistical data is classified according to MgO, Al2O3, CaS, CaO, MnS, MnO, SiO2, Tix and their composite inclusions, the quantity and average size are counted, and clicking the export button can output a.csv format file.
[0045]
[0046] Step 5: In the ternary phase diagram generation interface, the three-phase composition can be selected, and after clicking the generation button, the phase diagram is updated. See Figure 2 , and after clicking the save button, the phase diagram is stored locally.
[0047] Thus, the technical solution of this application can achieve the automatic identification and classification of non-metallic inclusions in steel through machine learning and image recognition technologies, with a high degree of automation, reducing the discrimination errors caused by manual operations. Moreover, through feature extraction and model training, the accuracy of recognition can be improved, reducing misjudgment and missed judgment.
[0048] In addition to the above embodiments, the present invention may have other embodiments; all technical solutions formed by equivalent substitution or equivalent transformation fall within the protection scope required by the present invention.
Claims
1. A method for analyzing non-metallic inclusions in steel based on machine learning and graphic recognition, characterized in that: include: Obtain production samples of typical steel grades at various production stages, and obtain composition data and image data of inclusions in the samples; Preprocess the composition data of inclusions in the sample and construct an inclusion composition data set; Preprocess the image data of inclusions in the sample and construct an inclusion image data set; The component dataset and the image dataset are divided into a training set for model training and a test set for model testing; The analysis model is trained using the training set, and the trained analysis model is tested using the test set; The image data of the inclusions of the sample to be tested is input into the analysis model to obtain the inclusion composition data of the sample to be tested.
2. The method for analyzing non-metallic inclusions in steel based on machine learning and graphic recognition according to claim 1, characterized in that: The method of obtaining production samples of typical steel grades at various production stages and obtaining composition data and image data of inclusions in the samples includes: Obtain molten steel samples from converters, ladle furnaces before and after refining, wire feeding, and static stirring, vacuum furnaces before and after refining, wire feeding, and static stirring, tundishes, ingots, and rolled products; The composition data and image data of inclusions in each sample were obtained in turn using Aspex inclusion analysis software.
3. The method for analyzing non-metallic inclusions in steel based on machine learning and graphic recognition according to claim 2, characterized in that: The preprocessing of the composition data of inclusions in the sample and constructing the inclusion composition data set includes: Determine the first element, second element and maximum particle size of inclusions, and remove non-inclusion particles; Screen the Mg, Al, Ca, Mn, Si, S, and Ti elements in the non-metallic inclusions, normalize the inclusion composition data and calculate the composition, and convert the results into the composition proportions of MgO, Al2O3, CaS, CaO, MnS, MnO, and SiO2; The composition data of all samples are combined and numbered to generate an inclusion composition data set D, which is ( ),in, C is the corresponding component ratio.
4. The method for analyzing non-metallic inclusions in steel based on machine learning and graphic recognition according to claim 3 is characterized in that: The preprocessing of the image data of inclusions in the sample and constructing the inclusion image data set includes: Unify the pixels of the non-metallic inclusion image; Image processing technology is used to reduce noise in non-metallic inclusion images and optimize image quality; Perform edge feature extraction, corner feature extraction, local feature extraction and contrast feature extraction on non-metallic inclusion images; The image data of all samples are combined and numbered to generate an inclusion image dataset M, which is ( ),in, F 1 is edge feature extraction, F 2 is corner feature extraction, F 3 is local feature extraction, F 4 is the contrast feature extraction.
5. The method for analyzing non-metallic inclusions in steel based on machine learning and graphic recognition according to claim 4 is characterized in that: The step of dividing the component dataset and the image dataset to form a training set for model training and a test set for model testing includes: The component dataset D and the inclusion image dataset M are divided in a ratio of 7:3 to form a training set for model training and a test set for model testing.
6. The method for analyzing non-metallic inclusions in steel based on machine learning and graphic recognition according to claim 5, characterized in that: The step of training the analysis model by using the training set and testing the trained analysis model by using the test set includes: The correlation analysis between the inclusion component dataset D and the inclusion image dataset M is constructed through the training set, and the inclusion image dataset M is used as input and the inclusion component dataset D is used as output. A deep neural network model is constructed using Pytorch for training to obtain the trained model; The trained model is tested using the test set.
7. The method for analyzing non-metallic inclusions in steel based on machine learning and graphic recognition according to claim 6, characterized in that: After inputting the image data of the inclusions of the sample to be tested into the analysis model to obtain the inclusion composition data of the sample to be tested, the method further includes: Build an Origin Pro ternary phase diagram template, import the components to be analyzed, and create a ternary phase diagram.
8. The method for analyzing non-metallic inclusions in steel based on machine learning and graphic recognition according to claim 3, characterized in that: The composition calculation includes: ; ; ; ; ; ; 。 9. The method for analyzing non-metallic inclusions in steel based on machine learning and graphic recognition according to claim 4, characterized in that: The algorithms used for edge feature extraction include Sobel, Canny, Laplacian and other algorithms, the algorithms used for corner feature extraction include Harris, Shi-Tomasi and other corner detection algorithms, the algorithm used for local feature extraction is SiFT size invariant feature transformation algorithm, and the algorithm used for contrast feature extraction is HSV, RGB histogram extraction algorithm.
Citation Information
Cited By
Method, device, equipment and system for detecting MnS-Al2O3 composite inclusions
CN121414745A
Detection methods, apparatus, equipment and systems for MnS-Al2O3 composite inclusions
CN121414745B