A new computer vision framework has demonstrated high precision in identifying and segmenting subtle structural flaws within scanning electron microscope images of industrial steel microstructures. In a study published in Frontiers in Artificial Intelligence, researchers N. Nandhini and A. Anitha from the School of Computer Science Engineering and Information Systems at Vellore Institute of Technology introduced WRA-UNET, a specialized deep learning architecture designed for automated quality control in metal manufacturing. Scanning electron microscopy is widely regarded as an indispensable tool for analyzing the microstructural characteristics of metals, yet automating the detection of minute anomalies has remained difficult. Microscopic defects such as microcracks, voids, non-metallic inclusions, pitting, and irregular grain boundaries often exhibit low contrast against their background, irregular morphologies, and significant texture variability. The new framework directly addresses these visual inspection challenges by combining self-supervised image denoising, an expanded shallow residual encoder, and a metaheuristic attention-guided feature selection mechanism embedded within a multi-task learning architecture.
Microstructural integrity is central to the operational durability, mechanical strength, and wear resistance of components deployed in automotive, railway, and heavy structural engineering. Among common structural metals, bainitic and pearlitic steels are heavily utilized because of their mechanical resilience, but fine flaws can precipitate catastrophic operational failure if left undetected during factory quality assessment. While automated deep learning models have increasingly replaced traditional manual inspection and conventional image processing techniques like simple thresholding or edge filtering, standard convolutional neural networks often struggle with scanning electron micrographs. Standard encoder-decoder networks like the classical U-Net utilize skip connections to bridge fine spatial details with abstract semantic representations, but they frequently fail to differentiate fine defect contours from heterogeneous background textures. Although deepening a neural network through residual layers can expand its representational capacity, deeper residual architectures routinely introduce substantial computational complexity, slower inference speeds, and diminishing performance improvements that hinder their practical deployment on factory floors.
To overcome these computational and visual barriers, the researchers developed WRA-UNET around a WideResNet10-2 encoder backbone integrated into a unified multi-task U-Net network. Wide residual networks operate by widening the feature channels across fewer convolutional layers rather than stacking dozens of consecutive operations. In the proposed design, the encoder comprises ten convolutional layers distributed across four sequential residual stages, denoted as E1 through E4, with each stage consisting of paired three-by-three convolutional layers followed by batch normalization and rectified linear unit activations. Downsampling between residual stages is performed using stride-two convolutions alongside one-by-one identity mapping convolutions to preserve dimensional consistency. By expanding the network width, the architecture provides rich contextual understanding and effective multi-scale feature reuse across 256 feature channels at its deepest stage, giving the model strong spatial and channel-wise representation while holding total trainable parameters to approximately 2.3 million.
Raw micrographs obtained through electron microscopy frequently suffer from imaging noise that obscures fine boundary details, creating significant obstacles for automated segmentation. Conventional filtering methods such as Gaussian or median smoothing suppress random sensor noise only by blurring sharp transitions, which destroys fine textures and critical edge cues. To preserve delicate morphological boundaries without requiring clean ground-truth reference micrographs, the authors incorporated a self-supervised Noise-to-Void preprocessing stage into their preliminary pipeline. The Noise-to-Void technique exploits natural spatial redundancies by training a deep neural network to predict the intensity of an intentionally masked central pixel using only the surrounding neighborhood pixels. The authors noted that their initial dataset of bainite and pearlite micrographs exhibited signal-to-noise ratios below 30 decibels, a threshold where visual artifacts typically compromise defect visibility. Applying this blind-spot denoising strategy eliminated random imaging noise while reliably preserving the low-contrast edges and morphological features essential for downstream segmentation.
The central innovation of the WRA-UNET architecture is a hybrid bottleneck module positioned between the encoder and decoder that merges the Convolutional Block Attention Module with Gray Wolf Optimization. In a typical U-Net, the center block bridges downsampling and upsampling, holding the highest-level semantic representations of the input image. Although the Convolutional Block Attention Module sequentially evaluates channel and spatial attention weights to emphasize salient regions, it cannot explicitly discard redundant feature maps on its own. To achieve rigorous feature reduction, the researchers hybridized this attention mechanism with the Gray Wolf Optimization algorithm, a population-based metaheuristic inspired by the social hierarchies and cooperative hunting tactics of wolves. In standard implementations, Gray Wolf Optimization relies on problem-specific objective functions, but the proposed method formulates the fitness evaluation directly through the attention module, using mean positive attention activations after rectified linear unit filtering as the fitness score to guide feature selection.
During feature selection at the network bottleneck, the hybrid CGWO optimizer evaluates candidate channel subsets drawn from the 256 high-level feature channels produced by encoder stage E4. The optimization process operates with a population of 30 wolves over 50 iterations, where each wolf represents a unique, valid candidate subset of exactly 128 channels. Through sequential channel pooling and seven-by-seven spatial convolutions, the module computes attention maps for each candidate group, calculating a composite fitness score based on the magnitude of positive activations. Candidate subsets are ranked to identify the leading alpha, beta, and delta wolves, which then govern the mathematical position updates of the remaining population. This selective mechanism systematically discards uninformative and redundant feature representations while preserving defect-sensitive channels, effectively halving the channel volume before routing the refined feature representations through a lightweight bottleneck convolution to the decoder network.
The decoding branch of WRA-UNET progressively reconstructs the spatial resolution of the feature maps through transposed upsampling, skip-connection concatenation, and convolutional refinement across four decoder stages. The channel dimensions are systematically decreased from 256 to 128, 64, and finally 32 channels, terminating in two distinct task-specific heads that enable concurrent defect segmentation and material classification. The binary segmentation head employs a one-by-one convolution coupled with a sigmoid activation function to output a single-channel spatial probability map at the original input resolution of 256 by 256 pixels. Simultaneously, the four-class classification head applies global average pooling and a fully connected linear layer with softmax activation to the bottleneck representations. This multi-task configuration allows the model to predict pixel-level defect contours while classifying the underlying specimen into one of four distinct categories: normal pearlite, defected pearlite, normal bainite, or defected bainite.
Model training and evaluation were carried out on a curated dataset comprising 1,900 scanning electron microscope images, balanced equally across normal bainite, defected bainite, normal pearlite, and defected pearlite with 475 micrographs per category. The dataset was partitioned into an 80 percent training partition of 1,520 images and an independent holdout test set of 380 images containing exactly 95 samples per class. The training set was evaluated using five-fold cross-validation, with geometric and intensity data augmentations applied exclusively to the training folds to enhance model generalization while leaving validation folds unaugmented. Optimization was guided by a combined loss function that integrated focal loss to mitigate severe pixel-level class imbalances between small defects and vast backgrounds, Dice loss to maximize overlap between ground-truth and predicted defect masks, and categorical cross-entropy to supervise the four-class microstructure classification branch.
Systematic hyperparameter tuning revealed that the AdamW optimizer paired with an initial learning rate of 0.001, a batch size of 16, a weight decay of 0.00001, and a training duration of 50 epochs yielded the most stable convergence across all folds. Across the five cross-validation folds, the network achieved a mean accuracy of 92.08 percent, a mean precision of 90.64 percent, a mean recall of 92.18 percent, and a mean Dice similarity score of 92.14 percent. The highest-performing validation fold, designated as Fold 4, achieved a classification accuracy of 93.20 percent, a precision of 93.40 percent, a recall of 93.70 percent, a mean intersection over union of 91.80 percent, and a Dice score of 93.10 percent, accompanied by low training and validation losses of 0.05 and 0.06.
When the finalized model trained on Fold 4 was evaluated against the completely unaugmented independent test set of 380 micrographs, it demonstrated high generalization capacity across all four metallurgical categories. The framework recorded an overall mean prediction accuracy of 95.53 percent, a precision of 95.45 percent, a recall of 95.02 percent, a mean intersection over union of 89.00 percent, and an aggregate Dice score of 94.14 percent. Breaking down the classification results by class, the model attained an accuracy of 95.79 percent for defected bainite, 94.74 percent for defected pearlite, 95.79 percent for normal bainite, and 95.79 percent for normal pearlite. These balanced metrics confirmed that the model reliably preserved microcrack and pit boundaries without generating false positive defect predictions on normal, unblemished crystalline regions.
To rigorously quantify the architectural contributions of each component, the authors conducted an extensive ablation study benchmarking WRA-UNET against baseline networks executed under identical conditions on an NVIDIA RTX A2000 graphics processing unit with 12 gigabytes of memory. Standard architectures like ResNet50-UNet and WideResNet50-2-UNet required 83 million and 68.9 million parameters, demanding 672 and 833 megabytes of memory while achieving Dice scores of only 71.25 percent and 80.61 percent, respectively. A basic WideResNet10-2 encoder without attention reduced parameters to 1.26 million and memory consumption to 309 megabytes, but attained a Dice score of just 74.38 percent. Integrating alternative attention mechanisms, such as Swin transformer blocks or Squeeze-and-Excitation units, increased computational overhead without matching the hybrid CGWO approach. In contrast, the proposed WRA-UNET achieved its top-tier 93.10 percent Dice score and 93.20 percent accuracy while maintaining a lightweight footprint of 2.3 million parameters, consuming only 185 megabytes of memory, and delivering an inference throughput of 66.67 frames per second.
Despite these encouraging performance figures, the authors explicitly outlined several important limitations regarding current real-world deployment. The current investigation evaluated micrographs specifically drawn from bainitic and pearlitic steel datasets, and the authors cautioned that the model’s feature extraction mechanisms may not immediately generalize to other structural alloys or metals exhibiting radically different crystalline morphologies without domain-specific retraining. Furthermore, the laboratory evaluations on a desktop graphics card did not encompass a comprehensive edge-device assessment measuring latency across variable batch sizes, central processing unit execution speeds, or operational stability within active factory environments. Moving forward, the research team plans to extend evaluations across diverse metallurgical materials and embedded hardware platforms while integrating explainable artificial intelligence techniques to provide human metallurgists with interpretable visual rationales for automated defect classifications.
Subject of Research: Automated defect detection and segmentation in steel scanning electron microscope microstructures using deep learning
Article Title: WRA-UNET: a hybrid CGWO-enhanced deep learning framework for automated defect detection in steel SEM microstructures
Article References: Nandhini, N., & Anitha, A. (2026). WRA-UNET: a hybrid CGWO-enhanced deep learning framework for automated defect detection in steel SEM microstructures. Frontiers in Artificial Intelligence, 9, Article 1960325. https://doi.org/10.3389/frai.2026.1960325
Image Credits: AI Generated
DOI: 10.3389/frai.2026.1960325
Keywords: WRA-UNET, defect detection, steel microstructures, scanning electron microscope, bainitic steel, pearlitic steel, Noise-to-Void, WideResNet10-2, Gray Wolf Optimization, Convolutional Block Attention Module, hybrid CGWO, semantic segmentation, microstructure classification, metallurgical inspection, multi-task learning, image denoising
News Source: Blake Davidson. (November 24, 2026). Novel Deep Learning Model Accurately Detects Defects in Steel Microstructures. Scienmag.



