Next Article in Journal
Prediction of the Compressive Strength of Tailings-Based Cement Material Using Machine Learning Models with Experimental Validation
Previous Article in Journal
Analysis of the Influence of Crack Position and Orientation on the Stability of a Flat Al7075-T651 Plate Using the Finite Element Method and the Failure Assessment Diagram
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Automatic Segmentation and Recognition of the Microstructure of High-Strength Low-Alloy Steel

by
Lu Wang
1,
Ziying Ren
2,
Baoyu Song
2,
Bing Wang
1,
Qiaochuan Chen
1,
Jingjing Wang
2,
Tianpeng Zhou
2 and
Yuexing Han
1,*
1
School of Computer Engineering and Science, Shanghai University, 99 Shangda Road, Shanghai 200444, China
2
Ansteel Beijing Research Institute Co., Ltd., Future Science City, Changping District, Beijing 102209, China
*
Author to whom correspondence should be addressed.
Materials 2026, 19(12), 2554; https://doi.org/10.3390/ma19122554
Submission received: 8 April 2026 / Revised: 10 May 2026 / Accepted: 25 May 2026 / Published: 12 June 2026
(This article belongs to the Section Metals and Alloys)

Abstract

Metallographic microstructure analysis is essential for understanding the evolution of steel microstructures during heat treatment and mechanical processing. However, accurate analysis of optical micrographs remains difficult because of blurred grain boundaries, grayscale inhomogeneity within grains, and irregular grain morphologies. To address these issues, this work proposes an automated metallographic image-processing method based on superpixels, DPSS (dual-phase steel segmentation), with the main contribution focused on microstructure segmentation. First, image contrast and boundary visibility are enhanced by edge detection and sharpening. Then, superpixel segmentation is combined with extracted edge information to improve boundary localization and preserve irregular grain morphology, enabling more complete extraction of grain or particle regions from optical images. The proposed method is validated on optical micrographs of Mn-Si low-alloy steel, and the results show that it provides more accurate and complete segmentation than conventional ImageJ (Version: 1.54f)-based processing. Based on the segmented regions, a lightweight neural network is further used for phase identification. The final classification recognition accuracy can reach 99.91%. This classification result serves to demonstrate that the improved segmentation results can provide more reliable inputs for subsequent microstructure recognition. Overall, the proposed method offers an effective and automated solution for metallographic image segmentation and supports more accurate downstream phase analysis.

1. Introduction

High-strength low-alloy steel has excellent mechanical properties such as ultra-high strength and plasticity, excellent energy absorption, and good deformability. In practical applications, major advanced high-strength steels are used in body manufacturing to achieve both lightweight and stability of the vehicle and passenger safety. In addition to strength and ductility, modern industrial applications also require a deeper understanding of the wear mechanisms of low-alloy steels. The tribological characteristics and wear resistance of these steels are closely related to their microstructural state. Therefore, microstructural analysis is directly linked to the performance of components exposed to tribological loads, and precise phase identification is important for optimizing wear resistance in service [1]. The microstructure of metals and their content can reveal important information about mechanical properties such as strength, flexibility, yield stress, tensile strength, hardness, surface roughness, and so on [2,3]. Variations in grain size, grain morphology, and phase fraction may lead to significant changes in the final performance of the material. For example, Liu et al. [4,5,6] conducted a more systematic study on the tissue phase transformation law and mechanical properties of 300 M steel by forming 300 M steel block specimens with laser coaxial powder feeding. The tempering temperature affects the orientation of the crystal lattice in 300 M steel, as well as the martensite and bainite, but it is the phase transformation of the martensite that has the most significant effect, precipitation hardening following quenching and tempering can reach 1966 MPa. Calcagnotto et al. [7] investigated the effect of grain refinement on the mechanical properties of dual-phase steels by preparing fine-grained (2.4 μ m) and ultrafine-grained (1.2 μ m) dual-phase steels by thermal deformation with large strain and annealing in the critical zone, and testing their tensile properties and impact toughness in comparison with coarse-grained (12.4 μ m) dual-phase steels by thermal deformation, respectively. Grain refinement increased the initial strain hardening rate and impact toughness of the duplex steel, and the impact fracture of the duplex steel gradually showed a plastic fracture mode with the gradual grain refinement.
Grain refinement is one of the most important strengthening paths of the steel heat treatment. Therefore, grain size estimation is essential in metal property analysis. Furthermore, automatic segmentation of the metallographic grain image is an important step for grain classification [8]. The segmentation method directly affects the final results of the subsequent qualitative metallographic analysis. However, metallographic image segmentation is influenced not only by image noise and grayscale variation, but also by metallurgical factors such as grain-boundary inclination, intragranular grayscale inhomogeneity, and boundary precipitates, which increase the difficulty of accurate grain-boundary extraction. Digital image-processing methods are commonly used in metallographic grain segmentation. For metallographic image segmentation, existing methods can generally be divided into rule-based methods and learning-based methods [9]. Rule-based methods usually determine thresholds according to the grayscale difference between grain interiors and grain boundaries in metallographic images, or directly use edge information to extract grain-boundary contours. Common methods include adaptive thresholding [10] and maximum interclass variance (Otsu) [11]. These methods often achieve good segmentation results for metallographic images with clear grain boundaries and relatively uniform intragranular grayscale distribution. For example, Sun et al. [12] combined dual-thresholding and morphological operations for optical metallographic image segmentation, and obtained good results when the grain boundaries in the experimental images were relatively clear. However, for metallographic images with blurred grain boundaries, non-uniform grayscale distribution within grains, or weak contrast between grain interiors and grain boundaries, it is often difficult to determine an appropriate threshold, which affects the stability and accuracy of segmentation results.
In addition to threshold-based segmentation, edge-based segmentation methods are also commonly used in metallographic image processing. These methods usually first convert the original metallographic image into an edge image, and then reconstruct grain-boundary contours based on the extracted edge information. Campbell et al. [13] proposed a cascade method including filtering, watershed transformation, and region merging for segmenting microstructures in scanning electron microscopy (SEM) and optical microscopy images. This method can generate relatively closed contours, but it is prone to over-segmentation when grain boundaries are complex or local contrast is insufficient. Han et al. [14] proposed a region-clustering segmentation method combining mean shift and flow-based difference-of-Gaussians (FDOG) under conditions of limited material image samples, and achieved a segmentation accuracy of about 87%. Overall, rule-based methods are highly sensitive to image quality and grain-boundary clarity. When metallographic images contain weak grain boundaries, precipitate interference, or irregular grain morphology, their segmentation performance is often limited.
Learning-based methods include machine learning methods and deep learning methods. Compared with rule-based methods, these approaches can automatically learn texture, grayscale, spatial, and morphological features from metallographic images and use classifiers or deep networks to achieve grain or phase recognition and segmentation. Common classifiers include support vector machines (SVM) [15], multilayer perceptrons [16], neural networks [17], optimum-path forests [18], and random forests [19]. For example, Bulgarevich et al. used a fast random forest to automatically segment ferrite, pearlite, bainite, and martensite microstructures [19]. Han et al. [20] proposed a machine learning-based “center-environment segmentation” (CES) feature-learning model, which introduced domain knowledge as pixel features and adopted an iterative machine learning strategy to train and calibrate the segmentation model, achieving good results on various material images, with a segmentation accuracy of about 83%. In deep learning, Choudhury et al. combined watershed segmentation with convolutional neural networks (CNNs) for phase identification in steels [21]. Li et al. [9] proposed a richer convolutional feature (RCF) architecture based on multi-task learning for grain-boundary detection and segmentation in metallurgical images, with a segmentation accuracy of about 91%. Although learning-based methods generally achieve better segmentation accuracy than rule-based methods, their application to metallographic images is still limited by the scarcity of labeled data and the difficulty of pixel-level annotation. This is especially true for optical metallographic images with blurred grain boundaries, uneven intragranular grayscale, and irregular grain morphology. Therefore, a segmentation method that can preserve weak grain-boundary information while reducing over-segmentation is still needed for reliable microstructural characterization and phase identification.
In this study, we propose DPSS (dual-phase-steel-segmentation), a segmentation framework for optical micrographs of high-strength low-alloy steel. The framework is developed to improve the extraction of reliable grain-boundary and phase information from images affected by blurred boundaries, uneven intragranular grayscale, and irregular grain morphology. Unlike conventional ImageJ method, morphology method, and edge-based method, the proposed approach introduces linear spectral clustering into metallographic image segmentation and further combines it with a conditional region-merging strategy to suppress over-segmentation and recover more complete grain regions. In addition, rather than considering segmentation as an isolated task, this study further evaluates the usefulness of the segmented regions for subsequent microstructure recognition. In this way, the proposed method provides a practical basis for quantitative metallographic characterization and subsequent investigations of material performance.

2. Dataset

2.1. Experimental Materials

In the work, the microstructure of dual-phase (DP) steel consists of austenite and martensite, which is produced by temperature-induced martensite transformation in austenite stainless steel. Such a dual-phase microstructure is more complex than usual DP steel (ferrite and martensite [22]), representing a bigger challenge for accurate microstructural analysis. As an advanced high-strength steel, dual-phase steel has a two-way structure of ferrite and martensite, which provides good strength plasticity, low yield ratio, and high work hardening rate. It is extensively employed in the production of high-strength steel.
The annealing process of cold-rolled dual-phase steel in the two-phase zone will have a significant impact on its microstructure and mechanical properties. The dual-phase steels in the sample were subjected to heat treatment at temperatures of 740 °C, 760 °C, 780 °C, 800 °C, 820 °C, 840 °C, 860 °C, and 900 °C in the two-phase zone. After annealing in the two-phase zone, the cold-rolled dual-phase steel forms ferrite and martensite structures.
The microstructure of dual-phase steel exhibits significant differences at different annealing temperatures. With the increase of continuous annealing temperature, the grain size of ferrite (F) gradually increases while the content of martensite (M) gradually increases, and the grain is refined. During the segmentation process, we also obtained consistent conclusions. The sample was prepared using Mn-Si type dual-phase steel and photographed under laboratory conditions using a metallographic optical microscope.

2.2. Validation Materials

To ensure the feasibility of the method, we prepared validation steel and designed an experimental component, Mn-Si DP validation steel, to ensure the feasibility of the experimental segmentation algorithm. Table 1 provides detailed information. We validated the algorithm using the following components to validate the steel. Two-phase steel samples were heat-treated at temperatures of 740 °C, 760 °C, 780 °C, 800 °C, 820 °C, 840 °C, 860 °C, and 900 °C, respectively.

2.3. Microstructure Characterization

Metallographic microstructure analysis is a basic and commonly used method. The performance of a material depends on its internal microstructure, which is also the core link of material design. Obtaining the microstructure of materials is a routine task in the study of materials. In metallographic preparation and analysis, metallographic techniques are used to obtain in-depth internal microstructure details of materials at the micrometer and submicrometer scales. Through general metallographic analysis, for microstructure analysis, it is necessary to first obtain an optical photograph of the tissue. The experiment used a normal imaging rate (1000 ns/pixel) to generate high-quality images for constructing training and testing datasets. After grinding and polishing, the sample was rotated at 300 rpm for 20 s. A typical backscattered electron (BSE) image of DP steel contains martensite (M) and austenite (A). It can be observed that most of the grain boundaries were somewhat fuzzy, and the morphological features of austenite in different locations were not consistent, representing a difficulty in the accurate classification. After heat treatment, the sample was processed by electric discharge wire cutting, sandpaper mechanical grinding, and polished with 1.5 μ m diamond polishing paste. After polishing, it was cleaned with alcohol and blow-dry and eroded with 4 % nitric acid alcohol. Finally, metallographic microscopy (OM) observation was performed.

2.4. Dataset Construction

The segmentation method validation set includes two DP images. The recognition method mainly utilizes 40 DP steel images to construct a dataset of depth models, including 15,162 patches for training and 5968 patches for validation.

3. Methods

The section details the metallographic organization segmentation method, DPSS. The optical image segmentation method consists of the following steps: image enhancement, edge detection, superpixel segmentation, and region merging. The region-merging method used here is a new merging algorithm (ERAG) that conforms to the characteristics of optical images. Finally, the metallographic grains are extracted according to the segmented results. Based on the extracted grains, the microstructure is then identified using a deep learning network structure. Figure 1 shows the overall flow chart of the main methods implemented in the work. High-strength duplex steels have a wide range of applications in the automotive manufacturing industry due to their excellent mechanical properties. The study uses the low-alloy dual-phase steel (DP-type base material) dataset as a demonstration material to validate the effectiveness of the proposed method.

3.1. Optical Image Segmentation

In an optical microscopy image, the ideal grain interior is a smooth area with distinct grain boundaries between adjacent grains. However, most optical images have complication texture, including noise and false edges. The study proposes a superpixel-based segmentation method to address the above problems. The method is roughly divided into two modules. The first, image pre-processing, focuses on enhancing the overall contrast of the image using the automatic color gradation method. Then, the edge detection method is used to detect the edge information of the grains. In the second step, the superpixel method is used to segment the optical image. Thus, the grains can be extracted. The specific detailed methods are as follows.

3.1.1. Image Pre-Processing

In general, optical images are affected by some factors, such as material modulation as well as the constraints of the equipment. The grain images under the optical microscope suffer from blurred grain boundaries and similar grayscale between grain interiors and edges. As shown in Figure 2a, the grains and grain boundaries can be initially observed. The microstructure of the specimens consists of grains of ferrite and grain-boundary precipitation of martensite. To increase the accuracy of segmentation, the method of adjusting the color scale is used to increase the contrast between ferrite and martensite, laying the foundation for subsequent segmentation. In general, the color scale of an image is essentially a grayscale distribution of the image. The process of adjusting the color scale is the process of adjusting the grayscale distribution of the image. Here, the image histogram is first used to obtain the overall grayscale distribution. The darkest areas of the image are set to 0, and the brightest areas are set to 255. The pixels in the middle areas are redistributed according to a certain proportion of their gray value. The step increases the overall contrast of the image and achieves an image enhancement effect. The effect is shown in Figure 2b.
Segmenting metallographic grains is a process of grain identification. Edge detection is performed on the metallographic grain images, and edge information is used in the second module for region merging. Here, the boundaries are detected using a flow-based difference-of-Gaussians method [14]. The method calculates the gradient g ( p i ) and normal vector t ( p i ) of each pixel point p i in the image, and then finds the cumulative contrast on both sides of the normal pixel vector. If the contrast between the two sides of the pixel is greater, then the pixel is at the edge. The cumulative contrast is calculated as in Equation (1).
H ( p i ) = s F ( p s ) G σ m ( p s ) ,
where p s is the s pixels on either side of the pixel normal vector t ( p i ) , Specifically, three pixels are taken in the forward direction and three pixels in the backward direction, corresponding to s ∈ [−3, 3]. G σ m is a Gaussian filter. F ( p s ) is the contrast function on both sides of the gradient g ( p s ) . The step detects most of the grain boundaries and removes most of the noise from inside the grain. However, some boundaries are not closed. The effect is shown in Figure 2c.

3.1.2. Image Segmentation

Superpixels aggregate pixel points with similar characteristics to form prominent representative “pixel” blocks of an image for segmentation. The microstructure of a metallographic grain is made up of multiple grains and precipitations at their boundaries. Common superpixel methods include simple linear iterative clustering (SLIC) algorithm [23], superpixels extracted via energy-driven sampling (SEEDS) algorithm [24], etc. In this study, we adopt the linear spectral clustering (LSC) algorithm proposed by Li and Chen [25] and combine it with an improved region-merging strategy to obtain the final segmentation. In LSC, each pixel is first represented by five normalized variables, ( l , α , β , x , y ) , where l , α , β denote the CIELAB color components and x, y denote the spatial coordinates. The CIELAB space is used because Euclidean distances in this space are approximately perceptually uniform. To construct an explicit feature space for clustering, each of the five variables is further mapped into a cosine-sine pair, yielding a 10-dimensional weighted feature representation. This mapping enables weighted K-means in the transformed space to approximate the normalized-cuts objective. The explicit form of the 10-dimensional feature space is provided in Equation (2),
ϕ ( p ) = 1 ω ( p ) C c cos π 2 l p , C c sin π 2 l p , 2.55 C c cos π 2 α p , 2.55 C c sin π 2 α p , 2.55 C c cos π 2 β p , 2.55 C c sin π 2 β p , C s cos π 2 x p , C s sin π 2 x p , C s cos π 2 y p , C s sin π 2 y p ,
where p is an image pixel point. C c and C s are two parameters controlling color and spatial importance. According to the original LSC formulation, ω ( p ) is defined as the sum of similarities between pixel p and all other pixels, i.e., the node degree in the affinity graph. Thus, ω ( p ) reflects the overall connectivity of pixel p, whereas the relative importance of color and spatial components is determined by C c and C s . r c = C s / C c denotes the ratio of C s to C c . A smaller r c generally improves boundary adherence, whereas a larger r c tends to produce more regular superpixel shapes. Following the original LSC study, four representative values of r c = (0.05, 0.075, 0.1, and 0.15) were considered to examine the effect of the color-spatial weighting ratio on superpixel segmentation. In our experiments, r c = 0.1 achieved the best segmentation performance for the metallographic images used in this study, as shown in Figure 3. W ( p , q ) denotes the similarity matrix between the current pixel and the surrounding pixels within its neighborhood. Specifically defined in Equations (3) and (4).
ω ( p ) = q V W ( p , q ) = ω ( p ) ϕ ( p ) q V ω ( q ) ϕ ( q ) ,
and
W ( p , q ) = C s 2 [ cos π 2 ( x p x q ) + cos π 2 ( y p y q ) ] + C c 2 [ cos π 2 ( l p l q ) + 2.55 ( cos π 2 ( α p α q ) + cos π 2 ( β p β q ) ) ] .
After the information of the pixel is transformed from color space and coordinate space to feature space, the distance between the pixel point and the cluster center is calculated within the given search area, and the pixel is added to the nearest set of clusters. By iterating continuously and updating the cluster centroids m k during the iterations until the final cluster centroids are not changed, the minimum value F k m of Equations (5) and (6) is reached.
F k m = k = 1 K p π k ω ( p ) ϕ ( p ) m k 2 ,
and
m k = q π k ω ( q ) ϕ ( q ) q π k ω ( q ) .
As shown in Figure 2d, after the initial segmentation of the metallographic image by the LSC superpixel algorithm, the superpixel block boundary basically coincides with the grain edge and forms a closed-grain boundary. Unlike most methods, which rely on global segmentation, the superpixel method is based on local segmentation. However, this method suffers from over-segmentation, causing a complete grain boundary to be split into multiple smaller parts. This causes errors in the subsequent measurement of grain size. Therefore, the study proposes a new region-merging model (ERAG) and redefines the merging criteria. The work uses the ERAG method to correct the superpixel block over-segmentation problem.
After the metallic phase image segmentation, it can be initialized into a neighborhood graph model G = ( V , E ) according to the adjacency of the superpixel blocks, where V represents the set of superpixels in the image and E represents the relationship between two superpixel blocks. By traversing the E within the model, the smallest weight w n ( s , t ) is found, and if it satisfies the merging threshold, region s and region t are merged, and the region neighborhood map is updated. Here, the merge threshold is the optimal empirical value selected according to the edge points contained in most over-segmented regions. The weights between all adjacent regions are recalculated according to the similarity criterion. The above steps are cycled through until no more merging occurs, and the final neighborhood graph model G = ( V , E ) is returned.
In particular, the textures of the over-segmented grains are similar, and there is no clear grain-boundary information between them. Therefore, the work redefined merging criteria, i.e., the average gray difference I and the edge length S. The average gray level I is calculated in the LAB color space for the color similarity of neighboring objects. To facilitate the calculation, after determining the color space, the three dimensions of the regional color space are converted into one dimension by means of averaging, and the absolute value distance is found for adjacent regions. The regions are judged according to their color similarity. The edge length S is mainly a count of the number of edge points in each region block. Image pre-processing method mentioned in Section 3.1.1. The edge image of the metallographic micrograph is first extracted, and it contains most of the grain-boundary information. If the gray value of a pixel is 0, the pixel is regarded as an edge point, if the gray value is 255, it is regarded as a non-edge point. The edge length of each superpixel block is then calculated from the edge image by counting the corresponding pixels. Finally, adjacent regions are merged according to Equations (7) and (8), where 1 indicates that two regions are merged and 0 indicates that they are not merged.
M e r g e = 1 , m 0 , o t h e r w i s e
m = a d j i ( I ) a d j j ( I ) < I a n d a d j i ( S ) < S a n d a d j j ( S ) < S ,
Here, a d j i ( I ) denotes the mean gray value of the region, with the threshold set to 50, and a d j i ( S ) denotes the number of edge pixels in the region, with the threshold set to 300. These values were determined empirically for the current dataset. After conditional region merging, the over-segmented grains are effectively combined, and the original grain morphology is largely restored, as shown in Figure 2e.

3.2. Identifying Phase Organization

In the work, a deep learning approach is mainly used to identify the microstructure of metal phases. A lightweight convolutional neural network model is constructed to learn the microstructural features of metal phases and identify their phase organization.
Here, a complex texture image recognition and segmentation model based on a superpixel algorithm and deep learning proposed by Han et al. [26] is referenced. As shown in Figure 4, the superpixel-based recognition algorithm mainly distinguishes the two major phases in the metallographic image, namely ferrite and martensite. Each segmentation block can be extracted based on the results of the superpixel segmentation. The feature provides a good basis for creating a training set. Many segmentation blocks can be extracted based on the results of superpixel segmentation and used to create a training set. The extracted segmentation results of the metallographic images are divided into two parts based on their average gray values, and both of them are used as training sets. Because the initial segmentation result is irregular in shape, the method crops out the part of each grain block that can be used for learning and classification. The constructed lightweight convolutional neural network consists of multiple types of layers, including convolutional layers for feature extraction, pooling layers for down-sampling, and a fully connected layer for classification, as shown in Figure 5.

4. Results and Discussion

To evaluate the effectiveness of the proposed method for optical image segmentation, experiments were first performed on optical micrographs of low-alloy steel. A comparison among SLIC, SEEDS, and LSC showed that the superpixels produced by LSC adhered more closely to the grain boundaries, resulting in more accurate grain delineation and providing a solid foundation for the subsequent region-merging step, as illustrated in Figure 6. Different segmentation methods were then further compared to demonstrate the advantage of the proposed method.
As can be seen from the results in Figure 7 and Figure 8, the segmentation method is effective in segmenting metallographic grains and grain-boundary precipitation. The original image in Figure 7 shows a representative sample of the micrographs used in our experiments and their local enlargements. In the micrograph, most grain boundaries and grains can be observed relatively clearly. In general, the microstructure of the specimen consists of ferrite and bainite. We use the FDOG method, the ImageJ method, and the morphological method to compare the effectiveness of the proposed method. The specific results are shown in Figure 7. Figure 7a presents the original sample image, in which the grain morphology and grayscale distribution can be directly observed. The FDOG result in Figure 7b shows the extracted grain information and its local enlargement obtained using the modified FDOG method. However, this method extracts only limited grain information, and considerable image information is lost. The ImageJ result in Figure 7c shows the grain information extracted using ImageJ software (Version: 1.54f). In this result, the extracted grain-boundary information is excessively cluttered, and the intragranular precipitates are also detected as edges, resulting in incorrect boundary information. This makes subsequent grain measurement more difficult. Figure 7d shows the result of an adaptive image morphology-based method proposed by Siddhartha Banerjee in 2019 for analyzing the sample image. Although this method can extract most of the grain information more completely, it still produces errors in the detection of some small grains. Figure 7e,f present the contour extraction result and the final segmentation result of the proposed method, respectively, as well as the effect of superimposing the segmentation result on the original image. As shown in the figure, there are four advantages of segmentation using the automatic segmentation method: first, the method enhances the overall contrast of the image by reprogramming the grayscale distribution of the optical image. Second, the pixel point features in the image are transformed from low-dimensional to higher-dimensional pixel features with stronger differentiability, which improves the segmentation accuracy of the algorithm. Third, the number of pixels and edge points of each superpixel block is detected to complete the merging of similar superpixel blocks, which finally restores the grain morphology. Fourth, the principle of superpixel segmentation is used to recover most of the weak edge information. In addition to the segmentation comparison graph, we calculated the pixel accuracy (acc), Mean Intersection over Union (mIOU), and Frequency Weighted Intersection over Union (FWIOU) of each segmentation result graph. Based on the calculation results, the average accuracy of the segmentation model proposed in the study is 89 % . The specific data are shown in Figure 9.
It can be observed visually that the original image in Figure 8a, unlike the image shown in Figure 7a, the intensity within the grains is not uniform enough, there is more bainite precipitated from the grain boundaries, the grain boundaries are blurred, and the image itself suffers from poor microscopic sampling. The results of the grain boundaries extracted by the four methods are shown in Figure 8. Obviously, the method proposed in the work can identify grain boundaries and extract grains more accurately than the other three methods. The quantitative metrics for each segmentation result are presented in Figure 10.
Based on the above experimental results of the segmentation of optical images, the microstructure of optical images can be identified. The work used microstructure superpixel blocks extracted from steel optical images as the dataset for the recognition classification model. A total of 46,920 microstructure image blocks were extracted from 40 low-alloy steel optical images. In order to illustrate the auto recognition effectiveness, our method is compared with multiple models. The specific experimental results are shown in Table 2. Upon comparison, our model performs better in recognition accuracy. The final classification recognition accuracy can reach 99.91 % . Compared with the fully connected models, the convolutional neural network is more suitable for this task because it can better extract local spatial features from the segmented microstructure blocks. The fully connected layers mainly transform the input into vectors and output classification probabilities through weighting and nonlinear operations, whereas convolution extracts localized texture and morphological features through sliding windows. Since the input samples in this study are relatively small segmented image blocks, a lightweight convolutional architecture is sufficient to capture the discriminative information required for classification. Compared with LeNet5 [27], the proposed model has a more compact structure, fewer layers, and only one fully connected layer. This design reduces the number of parameters and improves parameter efficiency. For the relatively small image patches used in this study, a deeper network such as LeNet5 is not necessarily more effective, because deeper feature extraction stages may provide limited additional useful information. In contrast, the lightweight network proposed in this work can better utilize the valid information in the image for classification and recognition, thereby achieving high accuracy with lower computational cost. Since the main purpose of the classification module is to verify the effectiveness of the proposed segmentation method rather than to develop a new deep classification framework, the lightweight model is an appropriate choice in this work.
The percentage of different microstructures in dual-phase steel produces modulated alloys with different characteristics. With different heat treatments and processing of the alloy, the metallographic characteristics will also change, resulting in various phase microstructures. The microstructure composition and morphology of complex metallographic images are diverse, making it difficult to extract useful information. Only by accurately segmenting grains can a reliable basis be provided for material performance analysis.
The superpixel-based segmentation method proposed in this study can extract closed grain contours from dual-phase steel metallographic images with higher accuracy and completeness than the comparison methods. Compared with conventional segmentation methods, the proposed approach shows better adaptability in dealing with blurred grain boundaries, complex microstructural morphologies, and non-uniform grayscale variations within grains. Although certain grayscale variations exist inside the grains and the contrast between grain boundaries and intragranular regions is not always pronounced, the proposed method can still recover the actual grain-boundary positions with relatively high accuracy and obtain more continuous and complete grain contours. This demonstrates that the method has strong segmentation capability for complex metallographic microstructure images and can effectively reduce the under-segmentation and over-segmentation problems commonly encountered in traditional methods. The proposed method can serve as an effective alternative to conventional material image segmentation methods, such as the FDOG method, ImageJ method, and Morphological method. On this basis, when combined with a deep-learning-based recognition method, the proposed framework can further improve the identification accuracy of martensite and ferrite. Because the segmentation results preserve the boundary information and morphological features of the target regions more completely, they provide more reliable inputs for subsequent phase classification, thereby improving the stability and accuracy of automated microstructure recognition. Based on the segmentation and recognition results, further analyses can also be carried out, including grain size statistics, microstructural composition analysis, and the investigation of the relationships among processing parameters, grain size, and microstructural evolution, thus providing a reliable basis for performance evaluation and microstructure control of dual-phase steels.
The experiments in this study were all conducted on metallographic images obtained under a standard 4% Nital etching condition. However, variations in etching severity may affect grain-boundary clarity, phase contrast, and local texture features, which may in turn influence superpixel partitioning and the subsequent region-merging process. In addition, the proposed method still relies on preset parameters, and its robustness and generalization under different sample preparation and imaging conditions have not yet been fully validated. Therefore, future work will extend this framework to other classes of steels with more complex microstructures, such as ferrite-pearlite steels, bainitic steels, martensitic steels, and multiphase steels, in order to evaluate its transferability and practical potential in broader metallographic analysis.

Author Contributions

L.W.: Methodology, Formal analysis, Investigation, Writing—Original Draft; Z.R.: Methodology, Formal analysis, Investigation, Resources, Writing—Original Draft; B.S.: Resources; B.W.: Conceptualization, Resources, Writing—Review and Editing; Q.C.: Methodology, Writing—Review and Editing; J.W.: Resources; T.Z.: Resources; Y.H.: Conceptualization, Methodology, Software, Writing—Original Draft, Funding acquisition. All authors have read and agreed to the published version of the manuscript.

Funding

The research is sponsored by National Natural Science Foundation of China (Grant No. 52273228), the National Science Foundation for Young Scientists of China (62401352), the Project of Key Laboratory of Silicate Cultural Relics Conservation (Shanghai University), Ministry of Education (SCRC2024ZZ07TS).

Data Availability Statement

The data presented in this study are available on request from the corresponding author due to all data involve a confidential project of Ansteel Group Beijing Research Institute Co., Ltd.

Acknowledgments

The author would like to thank Ansteel Group Beijing Research Institute Co., Ltd. for its support in key research projects, as well as Academician Zhang Tongyi’s guidance.

Conflicts of Interest

Authors Ziying Ren, Baoyu Song, Jingjing Wang and Tianpeng Zhou were employed by the company Ansteel Beijing Research Institute Co., Ltd. The remaining authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.

References

  1. Bukvić, M.; Vencl, A.; Milojević, S.; Skulić, A.; Gajević, S.; Stojanović, B. The Influence of Carbon Nanotube Additives on the Efficiency and Vibrations of Worm Gears. Lubricants 2025, 13, 327. [Google Scholar] [CrossRef]
  2. Banerjee, S.; Chakraborti, P.C.; Saha, S.K. An automated methodology for grain segmentation and grain size measurement from optical micrographs. Measurement 2019, 140, 142–150. [Google Scholar] [CrossRef]
  3. Rosochowski, A.; Olejnik, L. Severe plastic deformation for grain refinement and enhancement of properties. In Microstructure Evolution in Metal Forming Processes; Elsevier: Amsterdam, The Netherlands, 2012; pp. 114–141. [Google Scholar]
  4. Liu, F.; Lin, X.; Song, M.; Yang, H.; Song, K.; Guo, P.; Huang, W. Effect of tempering temperature on microstructure and mechanical properties of laser solid formed 300 M steel. J. Alloys Compd. 2016, 689, 225–232. [Google Scholar] [CrossRef]
  5. Liu, F.; Lin, X.; Song, M.; Yang, H.; Zhang, Y.; Wang, L.; Huang, W. Microstructure and mechanical properties of laser solid formed 300 M steel. J. Alloys Compd. 2015, 621, 35–41. [Google Scholar] [CrossRef]
  6. Liu, F.; Lin, X.; Yang, H.; Wen, X.; Li, Q.; Liu, F.; Huang, W. Effect of microstructure on the fatigue crack growth behavior of laser solid formed 300 M steel. Mater. Sci. Eng. A 2017, 695, 258–264. [Google Scholar] [CrossRef]
  7. Calcagnotto, M.; Ponge, D.; Raabe, D. Effect of grain refinement to 1 μm on strength and toughness of dual-phase steels. Mater. Sci. Eng. A 2010, 527, 7832–7840. [Google Scholar] [CrossRef]
  8. Zhang, H.; Wang, C. Study on processing technique in 12cr1mov steel’s metallography image. J. Inn. Mong. Agric. Univ. Nat. Sci. Ed. 2010, 33, 114–141. [Google Scholar]
  9. Li, M.; Chen, D.; Liu, S.; Liu, F. Grain boundary detection and second phase segmentation based on multi-task learning and generative adversarial network. Measurement 2020, 162, 107857. [Google Scholar] [CrossRef]
  10. Ridler, T.; Calvard, S. Picture thresholding using an iterative selection method. IEEE Trans. Syst. Man Cybern. 1978, 8, 630–632. [Google Scholar]
  11. Otsu, N. A threshold selection method from gray-level histograms. IEEE Trans. Syst. Man Cybern. 1979, 9, 62–66. [Google Scholar] [CrossRef]
  12. Sun, Q.D.; Gao, S.F.; Huang, J.W.; Chen, W. Metallographical image segmentation and compression. Appl. Mech. Mater. 2012, 152, 276–280. [Google Scholar] [CrossRef]
  13. Campbell, A.; Murray, P.; Yakushina, E.; Marshall, S.; Ion, W. New methods for automatic quantification of microstructural features using digital image processing. Mater. Des. 2018, 141, 395–406. [Google Scholar] [CrossRef]
  14. Han, Y.; Lai, C.; Wang, B.; Gu, H. Segmenting images with complex textures by using hybrid algorithm. J. Electron. Imaging 2019, 28, 013030. [Google Scholar] [CrossRef]
  15. Gola, J.; Britz, D.; Staudt, T.; Winter, M.; Schneider, A.S.; Ludovici, M.; Mücklich, F. Advanced microstructure classification by data mining methods. Comput. Mater. Sci. 2018, 148, 324–335. [Google Scholar] [CrossRef]
  16. de Albuquerque, V.H.C.; de Alexandria, A.R.; Cortez, P.C.; Tavares, J.M.R. Evaluation of multilayer perceptron and self-organizing map neural network topologies applied on microstructure segmentation from metallographic images. NDT E Int. 2009, 42, 644–651. [Google Scholar] [CrossRef]
  17. de Albuquerque, V.H.C.; Silva, C.C.; Menezes, T.I.d.S.; Farias, J.P.; Tavares, J.M.R. Automatic evaluation of nickel alloy secondary phases from SEM images. Microsc. Res. Tech. 2011, 74, 36–46. [Google Scholar] [CrossRef]
  18. Papa, J.P.; Nakamura, R.Y.; De Albuquerque, V.H.C.; Falcão, A.X.; Tavares, J.M.R. Computer techniques towards the automatic characterization of graphite particles in metallographic images of industrial materials. Expert Syst. Appl. 2013, 40, 590–597. [Google Scholar] [CrossRef]
  19. Bulgarevich, D.S.; Tsukamoto, S.; Kasuya, T.; Demura, M.; Watanabe, M. Pattern recognition with machine learning on optical microscopy images of typical metallurgical microstructures. Sci. Rep. 2018, 8, 2078. [Google Scholar] [CrossRef]
  20. Han, Y.; Li, R.; Yang, S.; Chen, Q.; Wang, B.; Liu, Y. Center-environment feature models for materials image segmentation based on machine learning. Sci. Rep. 2022, 12, 12960. [Google Scholar] [CrossRef]
  21. Choudhury, A.; Pal, S.; Naskar, R.; Basumallick, A. Computer vision approach for phase identification from steel microstructure. Eng. Comput. 2019, 36, 1913–1933. [Google Scholar] [CrossRef]
  22. Ajioka, F.; Wang, Z.L.; Ogawa, T.; Adachi, Y. Development of high accuracy segmentation model for microstructure of steel by deep learning. ISIJ Int. 2020, 60, 954–959. [Google Scholar] [CrossRef]
  23. Van den Bergh, M.; Boix, X.; Roig, G.; Van Gool, L. Seeds: Superpixels extracted via energy-driven sampling. Int. J. Comput. Vis. 2015, 111, 298–314. [Google Scholar] [CrossRef]
  24. Wang, S.; Lu, H.; Yang, F.; Yang, M.H. Superpixel tracking. In Proceedings of the 2011 International Conference on Computer Vision; IEEE: Piscataway, NJ, USA, 2011; pp. 1323–1330. [Google Scholar]
  25. Li, Z.; Chen, J. Superpixel segmentation using linear spectral clustering. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition; IEEE: Piscataway, NJ, USA, 2015; pp. 1356–1363. [Google Scholar]
  26. Han, Y.; Yang, S.; Chen, Q. Recognition and segmentation of complex texture images based on superpixel algorithm and deep learning. Comput. Mater. Sci. 2022, 209, 111398. [Google Scholar] [CrossRef]
  27. LeCun, Y.; Bottou, L.; Bengio, Y.; Haffner, P. Gradient-based learning applied to document recognition. Proc. IEEE 1998, 86, 2278–2324. [Google Scholar] [CrossRef]
Figure 1. Overall flow chart of the methodology used in this work. The arrows indicate the sequential flow and logical progression of the proposed methodology. The red dashed boxes present the results obtained at different methodological stages, while the blue dashed boxes provide explanations of the key methodological steps.
Figure 1. Overall flow chart of the methodology used in this work. The arrows indicate the sequential flow and logical progression of the proposed methodology. The red dashed boxes present the results obtained at different methodological stages, while the blue dashed boxes provide explanations of the key methodological steps.
Materials 19 02554 g001
Figure 2. Results of segmentation method step: (a) original, (b) automatic color gradation, (c) edge detection, (d) superpixel segmentation (The right panel shows a magnified view of the region outlined in red in the original image), (e) region merging (The right panel shows a magnified view of the region outlined in red in the original image).
Figure 2. Results of segmentation method step: (a) original, (b) automatic color gradation, (c) edge detection, (d) superpixel segmentation (The right panel shows a magnified view of the region outlined in red in the original image), (e) region merging (The right panel shows a magnified view of the region outlined in red in the original image).
Materials 19 02554 g002
Figure 3. Superpixel segmentation results obtained with different r c values. The yellow boxes in the first row mark the selected local regions, whose magnified views are presented in the second row for clearer comparison.
Figure 3. Superpixel segmentation results obtained with different r c values. The yellow boxes in the first row mark the selected local regions, whose magnified views are presented in the second row for clearer comparison.
Materials 19 02554 g003
Figure 4. Schematic optical image of the microstructure of steel, ferrite in grain form, martensite precipitated at grain boundaries.
Figure 4. Schematic optical image of the microstructure of steel, ferrite in grain form, martensite precipitated at grain boundaries.
Materials 19 02554 g004
Figure 5. Metallographic microstructure recognition model, a lightweight classification model consisting of two convolutional layers, two pooling layers, and a fully connected layer. The arrows indicate the sequential workflow of the proposed method. The red boxes illustrate the intermediate effects of the classification process, while the yellow boxes present the final recognition results for each class.
Figure 5. Metallographic microstructure recognition model, a lightweight classification model consisting of two convolutional layers, two pooling layers, and a fully connected layer. The arrows indicate the sequential workflow of the proposed method. The red boxes illustrate the intermediate effects of the classification process, while the yellow boxes present the final recognition results for each class.
Materials 19 02554 g005
Figure 6. Visual comparison of superpixel segmentation results when K = 2000.
Figure 6. Visual comparison of superpixel segmentation results when K = 2000.
Materials 19 02554 g006
Figure 7. Comparison of grain extraction results for the sample optical image. The red boxes in the first row mark the selected local regions, whose magnified results are presented in the second row for detailed comparison. (a) Original image with the expert-annotated reference label for the selected local region, (b) result obtained by the modified FDOG method, (c) result obtained by the ImageJ method, (d) result obtained by the adaptive morphology-based method, (e) contour result of the proposed method, (f) segmentation result of the proposed method overlaid on the original image. The proposed method preserves grain-boundary information more clearly, produces fewer false edges, and gives the same grain size number of 9 as the manual measurement.
Figure 7. Comparison of grain extraction results for the sample optical image. The red boxes in the first row mark the selected local regions, whose magnified results are presented in the second row for detailed comparison. (a) Original image with the expert-annotated reference label for the selected local region, (b) result obtained by the modified FDOG method, (c) result obtained by the ImageJ method, (d) result obtained by the adaptive morphology-based method, (e) contour result of the proposed method, (f) segmentation result of the proposed method overlaid on the original image. The proposed method preserves grain-boundary information more clearly, produces fewer false edges, and gives the same grain size number of 9 as the manual measurement.
Materials 19 02554 g007
Figure 8. Comparison of grain extraction results for the sample optical image. The red boxes in the first row mark the selected local regions, whose magnified results are presented in the second row for detailed comparison. (a) Original image with the expert-annotated reference label for the selected local region, (b) result obtained by the modified FDOG method, (c) result obtained by the ImageJ method, (d) result obtained by the adaptive morphology-based method, (e) contour result of the proposed method, (f) segmentation result of the proposed method overlaid on the original image. For this metallographic image, martensite is the main segmentation target, and the proposed method extracts the martensitic regions more effectively. The manual measurement gave a grain size number of 10, whereas the proposed method gave a grain size number of 9, indicating that the proposed method achieves results close to expert evaluation.
Figure 8. Comparison of grain extraction results for the sample optical image. The red boxes in the first row mark the selected local regions, whose magnified results are presented in the second row for detailed comparison. (a) Original image with the expert-annotated reference label for the selected local region, (b) result obtained by the modified FDOG method, (c) result obtained by the ImageJ method, (d) result obtained by the adaptive morphology-based method, (e) contour result of the proposed method, (f) segmentation result of the proposed method overlaid on the original image. For this metallographic image, martensite is the main segmentation target, and the proposed method extracts the martensitic regions more effectively. The manual measurement gave a grain size number of 10, whereas the proposed method gave a grain size number of 9, indicating that the proposed method achieves results close to expert evaluation.
Materials 19 02554 g008
Figure 9. Accuracy (acc), Mean Intersection over Union (mIOU), and Frequency Weighted Intersection over Union (FWIOU) results of the four segmentation methods in Figure 7.
Figure 9. Accuracy (acc), Mean Intersection over Union (mIOU), and Frequency Weighted Intersection over Union (FWIOU) results of the four segmentation methods in Figure 7.
Materials 19 02554 g009
Figure 10. Accuracy (acc), Mean Intersection over Union (mIOU), and Frequency Weighted Intersection over Union (FWIOU) results of the four segmentation Methods in Figure 8.
Figure 10. Accuracy (acc), Mean Intersection over Union (mIOU), and Frequency Weighted Intersection over Union (FWIOU) results of the four segmentation Methods in Figure 8.
Materials 19 02554 g010
Table 1. Verify the experimental composition of steel.
Table 1. Verify the experimental composition of steel.
CMnSiFe
DP verification steel 102098
DP verification steel 20 1.5 0 98.5
Table 2. Accuracy of metallographic image recognition models. (“FC-1, FC-2, FC-3” denote three fully connected baseline networks with progressively increasing architectural complexity, in which nonlinear activation functions and normalization components are introduced step by step, while LeNet5 is included as a classical convolutional neural network baseline for comparison).
Table 2. Accuracy of metallographic image recognition models. (“FC-1, FC-2, FC-3” denote three fully connected baseline networks with progressively increasing architectural complexity, in which nonlinear activation functions and normalization components are introduced step by step, while LeNet5 is included as a classical convolutional neural network baseline for comparison).
ModelFC-1FC-2FC-3LeNet5OurModel
Structurefc1 30 × 27fc1 30 × 27fc1 30 × 27conv2d 5 × 5.6conv2d 3 × 3.64
fc2 27 × 20ReLUnormReLUnorm
fc3 20 × 2fc2 27 × 20ReLUmaxpool2d 2 × 2ReLU
ReLUfc2 27 × 20conv2d 5 × 5.16maxpool2d 2 × 2
fc3 20 × 2normReLUconv2d 3 × 3.64
ReLUmaxpool2d 2 × 2norm
fc3 20 × 2fc1 400 × 120ReLU
fc2 120 × 84maxpool2d 2 × 2
fc3 84 × 2fc 256 × 2
Acc 99.74 % 99.71 % 99.58 % 99.73 % 99.91 %
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Wang, L.; Ren, Z.; Song, B.; Wang, B.; Chen, Q.; Wang, J.; Zhou, T.; Han, Y. Automatic Segmentation and Recognition of the Microstructure of High-Strength Low-Alloy Steel. Materials 2026, 19, 2554. https://doi.org/10.3390/ma19122554

AMA Style

Wang L, Ren Z, Song B, Wang B, Chen Q, Wang J, Zhou T, Han Y. Automatic Segmentation and Recognition of the Microstructure of High-Strength Low-Alloy Steel. Materials. 2026; 19(12):2554. https://doi.org/10.3390/ma19122554

Chicago/Turabian Style

Wang, Lu, Ziying Ren, Baoyu Song, Bing Wang, Qiaochuan Chen, Jingjing Wang, Tianpeng Zhou, and Yuexing Han. 2026. "Automatic Segmentation and Recognition of the Microstructure of High-Strength Low-Alloy Steel" Materials 19, no. 12: 2554. https://doi.org/10.3390/ma19122554

APA Style

Wang, L., Ren, Z., Song, B., Wang, B., Chen, Q., Wang, J., Zhou, T., & Han, Y. (2026). Automatic Segmentation and Recognition of the Microstructure of High-Strength Low-Alloy Steel. Materials, 19(12), 2554. https://doi.org/10.3390/ma19122554

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop