An End-to-End Computer Vision Methodology for Quantitative Metallography

Matan Rusanovsky, Ofer Beeri, Sigalit Ifergane, Gal OrenarXiv 2021

Abstract

Quantitative Metallography (QM) is critical for assessing the structural integrity and performance of alloys, yet traditional manual methods are subjective and labor-intensive. This paper presents an end-to-end computer vision pipeline that automates the identification of impurities and grain boundaries in metal microstructures. By integrating deep semantic segmentation, generative image inpainting, and a multi-faceted anomaly detection framework, the proposed system achieves high precision with minimal labeled data. Experimental results on a Uranium-Chromium alloy dataset demonstrate that the pipeline's grain size calculations correlate within 8% of human expert measurements, while effectively flagging structural anomalies.

Introduction

The performance of an alloy—including its strength, corrosion resistance, and fatigue life—is fundamentally determined by its microstructure. Metallurgists analyze "slices" of metal under microscopes to quantify grain sizes and identify inclusions (impurities). However, this process is traditionally manual and prone to subjectivity. Classic image processing often fails due to the chaotic nature of metal surfaces, which exhibit inconsistent colors, complex textures, and overlapping features. There is a significant need for an automated, objective methodology to quantify these features and identify anomalies that may indicate potential structural failure.

Methodology

The authors propose a multi-stage "holistic" pipeline designed to decouple complex vision tasks.

1. Impurity and Grain Boundary Segmentation

The pipeline begins with impurity segmentation using a modified U-Net with a VGG16 encoder. To process large metallographic scans, a high-overlap sliding window approach is employed. Following impurity identification, a deep image inpainting model "erases" these inclusions, filling the gaps with synthetic grain textures. This creates a "clean" background, allowing a subsequent model to focus exclusively on grain boundary (GB) segmentation without interference from dark inclusion spots. A Watershed algorithm is used as a post-processing step to ensure boundaries are closed and measurable.

Overview of the end-to-end metallographic scan segmentation pipeline.

2. Anomaly Detection Framework

The most novel component of the methodology is a three-tiered anomaly detection system:

  • Spatial Anomaly (WKthNN): A weighted K-Nearest Neighbors approach that considers both the proximity of impurities and their relative areas.
  • Shape Anomaly (Auto-Encoder): An Auto-Encoder is trained to reconstruct "normal" shapes. By providing blank images as labels for anomalous shapes during training, the model produces high reconstruction errors for unusual geometries, effectively flagging them.
  • Area Anomaly (Market-Clustering): A novel clustering algorithm where clusters "bid" to absorb nearby impurities based on their anomaly scores, highlighting regions of high risk.
Visualization of spatial, shape, and area anomaly detection stages.

Datasets and Experimental Setup

The study utilizes the open-sourced MLography dataset, focusing on a Uranium-Chromium alloy (U-0.1wt%Cr). The dataset includes 243 scans for anomaly detection and hundreds of manually tagged images for segmentation. Notably, the researchers employed a "few-shot" approach, achieving high performance by labeling only approximately 1% of the total available data.

Results and Discussion

The impurity segmentation achieved a ROC-AUC of 0.944, while the more complex grain boundary segmentation reached 0.868. The generative inpainting model produced high-quality results with a Peak Signal-to-Noise Ratio (PSNR) of 34.68. Crucially, the model's grain size calculations were within 8% of those produced by human experts using industry-standard software.

A key insight of this work is the decoupling of tasks via inpainting, which prevents the GB model from being confused by inclusions. Furthermore, the "Market-Clustering" approach effectively treats anomaly detection as an economic system where "wealthy" (highly anomalous) clusters expand, highlighting critical material regions.

Conclusion and Future Work

While the pipeline demonstrates robust performance, some limitations remain. The inpainting model occasionally merges very small grains into larger neighbors, and the final determination of "failure-inducing" defects still requires expert-set thresholds. Future research will focus on testing the pipeline across a broader range of alloys and crystalline structures to further validate its generalizability.

Summary updated

BibTeX
@misc{rusanovsky2021end,
  author = {Matan Rusanovsky and Ofer Beeri and Sigalit Ifergane and Gal Oren},
  title = {{An End-to-End Computer Vision Methodology for Quantitative Metallography}},
  year = {2021},
  eprint = {2104.11159},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2104.11159},
}
Figure