Chromium-molybdenum steel spheroidizing rating method based on pearlite feature extraction
The method improves chromium-molybdenum steel inspection by using deep learning and quantitative analysis to objectively assess ballization, addressing inefficiencies and subjectivity in existing methods, enabling accurate and efficient evaluation.
Patent Information
- Application Number
- CN202510338333.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-21
- Publication Date
- 2025-07-15
AI Technical Summary
The metallographic inspection method of high-temperature chromium molybdenum steel in the prior art is inefficient and has strong subjectivity, making it difficult to achieve quantitative ratings, which affects the detection accuracy and efficiency.
The local adaptive contrast enhancement algorithm and the deep learning network Segformer are used to combine grayscale processing and mask segmentation to extract pearlite features, establish a quantitative rating model, and determine the grayscale segmentation threshold by calculating grayscale entropy and inter-class variance to achieve objective assessment of the spheroidization level of chromium-molybdenum steel.
The detection accuracy and efficiency of metallographic inspection of chromium-molybdenum steel is improved, and the online detection and rating of metallographic phase of chromium-molybdenum steel is realized, the detection cost is reduced, and the objectivity and reproducibility of the detection results are improved.
Smart Images

Figure CN120318158A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of material deterioration detection in the regular inspection of special equipment made of chromium-molybdenum steel, and particularly to a method for spheroidization rating of chromium-molybdenum steel based on pearlite feature extraction. Background Technique
[0002] High-temperature chromium-molybdenum steels (such as 12CrMoV, 15CrMo, etc.) are widely used in boilers, pressure vessels, and pressure pipeline special equipment in large petrochemical enterprises such as Sinopec, PetroChina, and CNOOC. Equipment accidents often cause significant property losses, seriously threaten national life safety, and affect social stability. The performance failure of high-temperature chromium-molybdenum steel is one of the main reasons for accidents.
[0003] Metallographic inspection of high-temperature chromium-molybdenum steel is a key means to timely detect its mechanical property failure. Standards such as DL / T773-2016 "Spheroidization Rating Standard for 12Cr1MoV Steel Used in Thermal Power Plants" and DL / T 787-2001 "Pearlite Spheroidization Rating Standard for 15CrMo Steel Used in Thermal Power Plants" stipulate the assessment of the spheroidization grade of the microstructure of components such as boiler headers, steam pipes and fittings, and heating surfaces made of steel after long-term use at high temperatures. Currently, the spheroidization rating of high-temperature alloy steel mainly relies on relevant inspectors to classify the microstructure into 5 levels according to the spheroidization degree with reference to the standard definition atlas. The manual inspection method has low efficiency, strong subjectivity, and weak reproducibility of the rating results. Therefore, it is of great significance to study a quantitative rating method for the metallographic spheroidization of high-temperature alloy steel.
[0004] For the work of pearlite spheroidization detection, the existing technologies relatively relevant to this field include:
[0005] ① Patent CN 114581719 A discloses an intelligent rating method for pearlite spheroidization of heat-resistant steel based on noise learning. Its technical solution includes: collecting metallographic images of heat-resistant steel to form an original data set; training a deep learning model on the original data set to obtain a noise filtering model; setting a confidence threshold, and using the noise filtering model to divide the original data set into noise samples and correct samples; training a deep learning model on the correct sample set to obtain a classification model; using the classification model for pearlite spheroidization rating. This patent can only qualitatively analyze the spheroidization registration and cannot quantitatively analyze the spheroidization rating.
[0006] ② Patent CN201310345194.4 discloses a field detection method for the pearlite spheroidization grade of 12Cr1MoV based on laser-induced breakdown spectroscopy. Its technical solution includes: using pulsed laser to directly act on the pipe surface to remove the oxide layer and decarburized layer at the inspection site, collecting and analyzing the plasma spectral data, obtaining the tensile strength σb of the measured pipe material, and directly outputting the pearlite spheroidization grade. This patent cannot perform on-line detection and has low detection efficiency.
[0007] ③ Zhang Hongqi of Inner Mongolia Agricultural University published the "Metallographic Image Processing Technology of 12Cr1MoV Steel" in the Journal of Inner Mongolia Agricultural University, No. 3, 2012. After performing histogram equalization image gray processing, wavelet transform processing, and Robert operator edge detection on the metallographic image of 12Cr1MoV steel, the edge contour information of pearlite in 12Cr1MoV steel was obtained, and the spheroidization degree of pearlite in 12Cr1MoV steel was rated using a standard atlas. This rating method is essentially still manual reference to the atlas for rating, with strong subjectivity. Summary of the Invention
[0008] The purpose of the present invention is to overcome the deficiencies in the above background technology and provide a spheroidization rating method for chromium-molybdenum steel based on pearlite feature extraction, which should be able to effectively improve the detection accuracy and detection efficiency of the metallographic inspection work of chromium-molybdenum steel.
[0009] The technical solution of the present invention is as follows:
[0010] A spheroidization rating method for chromium-molybdenum steel based on pearlite feature extraction, comprising the following steps:
[0011] Step 1, preprocess the chromium-molybdenum steel, take a metallographic photo I of the chromium-molybdenum steel, and obtain image A after processing by the local adaptive contrast enhancement algorithm;
[0012] Step 2, input image A into the deep learning network to obtain the mask result O, calculate the mask segmentation pixel coverage rate R. If R is less than the mask segmentation pixel coverage rate threshold T, it is determined as spheroidization level 5, and the rating ends. Otherwise, the preliminary rating is spheroidization levels 1, 2, 3, or 4, and proceed to Step 3;
[0013] Step 3, perform an intersection operation on image A and the mask result O to obtain image K, perform gray processing on image K to obtain the gray image G, calculate the cumulative probability histogram P of each pixel in the gray image G, and calculate the gray entropy μ and between-class variance σ of the cumulative probability histogram P 2 , from the gray entropy μ and between-class variance σ 2 Determine the gray segmentation threshold T g , according to the gray segmentation threshold T g Perform re-segmentation on the gray image G to obtain image E;
[0014] Step 4, calculate the gray distribution probability H within each pearlite feature region F in image E, take the pixel probability with a gray value of [0, 10] as the spheroidization level, calculate the spheroidization level index, and obtain the pearlite spheroidization rating result.
[0015] The preprocessing in Step 1 includes grinding, polishing, and etching the chromium-molybdenum steel.
[0016] The local adaptive contrast enhancement algorithm in Step 1 is:
[0017]
[0018] Where: I(x, y) is the gray value of the pixel coordinate system (x, y) of the metallographic photo I; (2n + 1) 2 is a square window area centered on (x, y) with a length of 2n + 1, and n is an empirical number; m h (x, y) is approximately the background part; [I(x, y) - m h (x, y)] is the high-frequency detail part; is the variance; D is an empirical number; f(x, y) is the reconstructed enhanced image pixel value; k, l are accumulator iteration symbols.
[0019] The deep learning network in step 2 is the Segformer network.
[0020] During the training process of the deep learning network in step 2, the network true label is F out , and the network output is F o ′ ut , F out and F o ′ ut The image sizes of are W*H*N c , and the network training loss L is:
[0021]
[0022] Where: W is the image height, H is the image height, N c is the number of channels; i, j, k are accumulator iteration symbols.
[0023] In step 3,
[0024] the image K is: K = A ∩ O
[0025] The cumulative probability histogram P is:
[0026] The gray entropy μ is:
[0027] The between-class variance σ 2 is:
[0028] The gray segmentation threshold T g is: T g = max(σ 2 )
[0029] Where: i is the enumeration algebra of 256 gray values, and j is the accumulator iteration symbol.
[0030] In the said step 4,
[0031] The set of pearlite characteristic regions F is: F = {f1, f2, …, f n}
[0032] For each pearlite characteristic region f i (i = 1, 2, …, n), the gray - level distribution probability H is:
[0033] H = {H1, H2, …, H n},
[0034] The probability of pixel points with gray - level values in [0, 10] is:
[0035] The index of the spheroidization grade is:
[0036] In the formula: λ j is an empirical number; when 0 ≤ α < 20, the spheroidization rating is grade 4; when 20 ≤ α < 30, the spheroidization rating is grade 3; when 30 ≤ α < 40, the spheroidization rating is grade 2; when 40 ≤ α, the spheroidization rating is grade 1.
[0037] The beneficial effects of the present invention are:
[0038] Aiming at the problem that the metallographic inspection of chrome - molybdenum steel cannot objectively and quantitatively detect, the present invention provides a spheroidization rating method for chrome - molybdenum steel based on pearlite feature extraction, aiming to achieve accurate assessment of the spheroidization grade of chrome - molybdenum steel metallography, complete on - line detection and rating of chrome - molybdenum steel metallography, and effectively improve the detection accuracy and detection efficiency of chrome - molybdenum steel metallographic inspection. The present invention focuses on establishing a mathematical model for quantitative spheroidization rating of chrome - molybdenum steel. By formulating spheroidization quantization indexes for different spheroidization grades from the standard - defined rating atlas, the spheroidization rating results are objective and reproducible, the automation level of the detection industry is improved, and the detection cost is reduced. At the same time, the present invention adopts a visual detection method, which is relatively simple to operate and has a high detection efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 is the flow chart of the present invention.
[0040] Figure 2 is the metallographic image I taken by the metallographic equipment of the present invention.
[0041] Figure 3 is the metallographic image A after contrast enhancement in step 1 of the present invention.
[0042] Figure 4 is the mask result O output by the deep - learning network in step 2 of the present invention.
[0043] Figure 5It is the image K obtained through the intersection operation in step 3 of the present invention.
[0044] Figure 6 It is the image G obtained through the grayscale processing in step 3 of the present invention.
[0045] Figure 7 It is the image E obtained through the segmentation in step 3 of the present invention. Detailed implementation manners
[0046] In order to make the objectives, technical solutions and advantages of the present invention clearer and more understandable, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0047] As Figure 1 shown, a spheroidization rating method for chromium-molybdenum steel based on pearlite feature extraction includes the following steps:
[0048] Step 1
[0049] Perform pretreatment on the chromium-molybdenum steel, take a metallographic photo I of the chromium-molybdenum steel, and perform contrast enhancement processing on the metallographic photo I through a local adaptive contrast enhancement algorithm to obtain an image A.
[0050] The pretreatment includes grinding, polishing, and etching the chromium-molybdenum steel.
[0051] The local adaptive contrast enhancement algorithm is:
[0052]
[0053] In the formula: I(x,y) is the grayscale value of the pixel coordinate system (x,y) of the metallographic photo I; (2n + 1) 2 is a square window area centered on (x,y) with a length of 2n + 1, and n is an empirical number; m h (x,y) is approximately the background part; [I(x,y) - m h (x,y)] is the high-frequency detail part; is the variance; D is the weight coefficient (empirical number); f(x,y) is the reconstructed enhanced image pixel value (image A); k, l are accumulator iteration symbols.
[0054] Step 2
[0055] Input the image A into the deep learning network to obtain a mask result O, calculate the proportion of the mask result O in the image A, and the proportion is the mask segmentation pixel coverage rate R. Set a mask segmentation pixel coverage rate threshold T. If R < T, it is determined as grade 5 spheroidization and the rating ends. If R ≥ T, it is initially rated as grade 1, 2, 3, or 4 spheroidization, and enter step 3.
[0056] The masking segmentation pixel coverage threshold T is an empirical number.
[0057] The deep learning network is the Segformer network. The training dataset of the Segformer network is spheroidized metallographic photos of levels 1, 2, 3, 4, and 5 with manual annotations. It is trained in the way of an image + annotation label dataset. The training loss function of the network is:
[0058] During the training process, the true label of the network is F out and the network output is F ′ out F out and F ′ out The image size of is W*H*N c Then the network training loss L can be calculated as:
[0059]
[0060] Where: W is the image height, H is the image height, and N c is the number of channels; i, j, k are accumulator iteration symbols.
[0061] Step 3
[0062] Perform an intersection operation on image A and the masking result O to obtain image K. Perform grayscale processing on image K to obtain a grayscale image G. Calculate the cumulative probability histogram P of each pixel in the grayscale image G, and calculate the grayscale entropy μ and between-class variance σ of the cumulative probability histogram P 2 From the grayscale entropy μ and between-class variance σ 2 Determine the grayscale segmentation threshold T g According to the grayscale segmentation threshold T g Perform re-segmentation on the grayscale image G to obtain image E.
[0063] The calculation of image K is:
[0064] K = A ∩ O
[0065] The calculation of the cumulative probability histogram P is:
[0066]
[0067] The calculation of the grayscale entropy μ is:
[0068]
[0069] The between-class variance σ 2 is calculated as:
[0070]
[0071] The grayscale segmentation threshold Tg The calculation is as follows:
[0072] T g = max(σ 2 )
[0073] In the formula: i is the enumeration algebra of 256 gray values, and j is the accumulator iteration symbol.
[0074] Step 4
[0075] Calculate the gray distribution probability H within each pearlite characteristic region F in the image E. Take the pixel point probability with gray value in [0, 10] as the spheroidization grade, calculate the spheroidization grade index, and obtain the pearlite spheroidization rating result.
[0076] The set of pearlite characteristic regions F is:
[0077] F = {f1, f2, …, f n}
[0078] In the formula, n is the number of pearlite characteristic regions.
[0079] Calculate the gray distribution probability H within each pearlite characteristic region f i (i = 1, 2, …, n) respectively:
[0080] H = {H1, H2, …, H n}
[0081] This formula represents the set of gray distribution probabilities H of the pearlite characteristic regions in the image E.
[0082]
[0083] This formula represents a subset of the set H, that is, the distribution probability of gray within the gray value range from 0 to 255.
[0084] The pixel point probability with gray value in [0, 10] can be expressed as Then the index α for calculating the spheroidization grade can be calculated as:
[0085]
[0086] In the formula: {λ0, λ1, λ2, λ3, λ4, λ5, λ6, λ7, λ8, λ9, λ 10} are spheroidization grade evaluation coefficients (evaluation coefficients corresponding to different gray values). The spheroidization grade evaluation coefficients are empirical numbers, and the spheroidization grade is determined by the magnitude of the α value.
[0087] Embodiment
[0088] Step 1: As Figure 2As shown, after a series of pretreatment such as grinding, polishing, and etching of the chromium molybdenum steel, a metallographic photograph I is obtained by a metallographic device. As Figure 3 shown, the contrast of the metallographic photograph I is enhanced to obtain image A.
[0089] Step 2: As Figure 4 shown, image A is input into a deep learning network, and the deep learning network outputs a mask result O (the blue area in the figure is the spheroidization of pearlite). Calculate the proportion of the mask result O in the input image A, that is, the mask segmentation pixel coverage rate R, and R is calculated to be 0.1285. Set the mask segmentation pixel coverage rate threshold T = 0.05.
[0090] Step 3: As Figure 5 shown, the intersection operation of image A and the mask result O is performed to obtain image K. As Figure 6 shown, image K is subjected to gray-scale processing to obtain image G. As Figure 7 shown, image G is further segmented to obtain image E (the blue area in the figure is the spheroidization of pearlite).
[0091] Step 4:
[0092] Let the evaluation coefficient be {255, 254, 253, 252, 251, 250, 249, 248, 247, 246, 245}.
[0093] Let when 0 ≤ α < 20, the spheroidization rating is grade 4; when 20 ≤ α < 30, the spheroidization rating is grade 3; when 30 ≤ α < 40, the spheroidization rating is grade 2; when 40 ≤ α, the spheroidization rating is grade 1.
[0094] Figure 7 In , α = 31.79, so the spheroidization rating is grade 2.
[0095] It can be seen from the spheroidization rating results that the quantitative index α can better reflect the spheroidization grade of pearlite, and can better solve the problems of low efficiency, strong subjectivity, and weak reproducibility of the rating results in the manual inspection method.
[0096] Although the embodiments disclosed in the present invention are as above, the content described is only the embodiments adopted for the convenience of understanding the present invention, and is not intended to limit the present invention. Any person skilled in the art within the technical field to which the present invention pertains can make any modifications and changes in the form of implementation and details without departing from the spirit and scope disclosed by the present invention. However, the scope of patent protection of the present invention shall still be subject to the scope defined by the appended claims.
Claims
1. A spheroidization rating method for chromium-molybdenum steel based on pearlite feature extraction, comprising the following steps: Step 1, preprocess the chromium-molybdenum steel, take a metallographic photo of the chromium-molybdenum steel to obtain Photo I, and obtain Image A after processing by the local adaptive contrast enhancement algorithm; Step 2, input Image A into the deep learning network to obtain the mask result O, calculate the mask segmentation pixel coverage rate R. If R is less than the mask segmentation pixel coverage rate threshold T, it is determined as spheroidization grade 5, and the rating ends. Otherwise, the preliminary rating is spheroidization grades 1, 2, 3, or 4, and enter Step 3; Step 3, perform an intersection operation on image A and the masking result O to obtain image K, perform grayscale processing on image K to obtain a grayscale image G, calculate the cumulative probability histogram P of each pixel in the grayscale image G, and calculate the grayscale entropy μ and between-class variance σ of the cumulative probability histogram P 2 , from the grayscale entropy μ and between-class variance σ 2 determine the grayscale segmentation threshold T g , according to the grayscale segmentation threshold T g perform re-segmentation on the grayscale image G to obtain image E; Step 4, calculate the gray distribution probability H within each pearlite feature region F in Image E, take the pixel probability with a gray value of [0, 10] as the spheroidization grade, calculate the spheroidization grade index, and obtain the pearlite spheroidization rating result.
2. The spheroidization grading method of chromium molybdenum steel based on pearlite feature extraction according to claim 1, wherein: The preprocessing in Step 1 includes grinding, polishing, and etching the chromium-molybdenum steel.
3. A spheroidization grading method for chromium-molybdenum steel based on pearlite feature extraction according to claim 1, characterized in that: The local adaptive contrast enhancement algorithm in Step 1 is as follows: Where: I(x, y) is the gray value of the pixel coordinate system (x, y) of the metallographic photo I; (2n + 1) 2 is a square window area centered on (x, y) and with a length of 2n + 1, where n is an empirical number; m h (x, y) is approximately the background part; [I(x, y) - m h (x, y)] is the high-frequency detail part; is the variance; D is an empirical number; f(x, y) is the pixel value of the reconstructed enhanced image; k, l are accumulator iteration symbols.
4. A spheroidization rating method for chromium-molybdenum steel based on pearlite feature extraction according to claim 1, characterized in that: The deep learning network in Step 2 is the Segformer network.
5. A spheroidization rating method for chromium-molybdenum steel based on pearlite feature extraction according to claim 4, characterized in that: During the training process of the deep learning network in step 2, the true label of the network is F out , the network output is F o ′ ut , F out and the image sizes of F o ′ ut are W*H*N c , and the network training loss L is: Where: W is the image height, H is the image height, N c is the number of channels; i, j, k are accumulator iteration symbols.
6. A spheroidization rating method for chromium molybdenum steel based on pearlite feature extraction according to claim 1, characterized in that: In Step 3, Image K is: K = A ∩ O The cumulative probability histogram P is as follows: The gray entropy μ is: Between-class variance σ 2 is: Gray-scale segmentation threshold T g is: T g = max(σ 2 ) Where: i is the enumeration algebra of 256 gray values, and j is the accumulator iteration symbol.
7. A spheroidization grading method for chromium-molybdenum steel based on pearlite feature extraction according to claim 1, characterized in that: In Step 4, The set of pearlite characteristic regions F is: F = {f1, f2, …, f n} Each pearlite characteristic region f i (where i = 1, 2, …, n), the gray level distribution probability H is as follows: H = {H1, H2, …, H n}, The probability of pixel points with gray values in [0, 10] is: The indicators of the spheroidization grade are as follows: where: λ j is an empirical number; when 0 ≤ α < 20, the spheroidization rating is grade 4; when 20 ≤ α < 30, the spheroidization rating is grade 3; when 30 ≤ α < 40, the spheroidization rating is grade 2; when 40 ≤ α, the spheroidization rating is grade 1.
Citation Information
Patent Citations
Field Detection Method for Spheroidization Grade of 12Cr1MoV Pearlite Based on Laser Plasma Spectroscopy
CN103424397B
Cited By
Rating method and system for organization structure of cold heading steel wire rod
CN121838140A