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 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.
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
. 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
. 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.