CNN-Based Segmentation and Characterization of Gray Cast Iron Microstructures
(2026) FYSM34 20261Department of Physics
- Abstract
- The quantification of microstructural features is essential in materials science, as the microstructure can be linked with the mechanical performance of the material. Gray cast iron (GCI) is a type of cast iron used mainly for its excellent machinability and vibration damping, along with high compressive strength and good thermal conductivity. GCI is characterized by graphite flakes dispersed in a pearlitic/ferritic matrix. Traditionally, the dark graphite flakes can be distinguished from the light-reflecting matrix in unetched samples using a simple color threshold on optical microscopy micrographs. However, in order to reveal the matrix microstructure and
distinguish ferrite from pearlite, the samples need to be etched using Nital. A... (More) - The quantification of microstructural features is essential in materials science, as the microstructure can be linked with the mechanical performance of the material. Gray cast iron (GCI) is a type of cast iron used mainly for its excellent machinability and vibration damping, along with high compressive strength and good thermal conductivity. GCI is characterized by graphite flakes dispersed in a pearlitic/ferritic matrix. Traditionally, the dark graphite flakes can be distinguished from the light-reflecting matrix in unetched samples using a simple color threshold on optical microscopy micrographs. However, in order to reveal the matrix microstructure and
distinguish ferrite from pearlite, the samples need to be etched using Nital. A simple color threshold technique for extraction of ferrite/pearlite/graphite fractions is thus not viable.
In this study, we introduce an automated segmentation technique for GCI microstructures.
The first model was trained on Nital-etched GCI micrographs containing pearlite, ferrite, and graphite. The segmentation is based on a convolutional neural network (CNN) with a U-Net architecture. Image augmentation improved robustness to variations in illumination and contrast. Dice scores above 0.94 across two datasets of varying magnification were obtained for graphite. Ferrite scores were similarly high, above 0.93 for both datasets. Performance was lower for a third dataset acquired using a different microscope, with Dice scores of 0.812 for graphite and 0.420 for ferrite. The lower ferrite performance is attributed to the very low ferrite phase fraction and the presence of coarse pearlite. Still, the CNN segmentation outperforms the
threshold-based method for all available classes and datasets.
GCI often undergoes ferritic nitrocarburizing (FNC), introducing nitrogen to the surface of GCI in order to improve hardness. An important parameter is the thickness of the resulting FNC compound layer. A thin oxide layer is often formed on the surface as well, whose thickness is also of interest. These thicknesses are typically measured at a limited number of points to obtain a representative thickness profile of the sample.
For this purpose, we also introduce a CNN for five-class segmentation of the FNC compound layer, oxide layer, graphite, matrix, and region outside the sample. Utilizing the same U-Net architecture, the CNN successfully extracted the FNC compound layer with good precision. This allowed for a continuous thickness profile, which is a clear improvement compared to the discrete, single point measurements typically utilized. The CNN outperformed the threshold based approach, which failed completely for the oxide layer, achieving average Dice scores up to 0.968 for the compound layer and 0.869 for the oxide layer for the best performing dataset. (Less) - Popular Abstract (Swedish)
- Fordonsindustrin har alltid varit drivande i användningen av ny teknik för att effektivisera produktion, från rullbandet som möjliggjorde massproduktion av bilar, till robotik som numera utför stora delar av det tidigare manuella arbetet.
I takt med att vår förståelse kring olika materials mikrostrukturer har ökat har materialberoende industrier såsom fordonsindustrin lagt stora resurser på forskning inom området. Det är materialets mikrostruktur som avgör vilka egenskaper materialet får, vilket innebär att om en tillverkningsprocess är lyckad eller inte kan avgöras direkt från materialets mikrostruktur.
Världen står nu inför en stor omställning tack vare teknisk innovation. Inom flera industrier används olika typer av artificiell... (More) - Fordonsindustrin har alltid varit drivande i användningen av ny teknik för att effektivisera produktion, från rullbandet som möjliggjorde massproduktion av bilar, till robotik som numera utför stora delar av det tidigare manuella arbetet.
I takt med att vår förståelse kring olika materials mikrostrukturer har ökat har materialberoende industrier såsom fordonsindustrin lagt stora resurser på forskning inom området. Det är materialets mikrostruktur som avgör vilka egenskaper materialet får, vilket innebär att om en tillverkningsprocess är lyckad eller inte kan avgöras direkt från materialets mikrostruktur.
Världen står nu inför en stor omställning tack vare teknisk innovation. Inom flera industrier används olika typer av artificiell intelligens för att förenkla och effektivisera arbetet, på samma sätt som robotik har effektiviserat massproduktion. Gjutjärn, som består av järn med små mängder kol och andra ämnen, är ett material vars egenskaper kan variera mycket beroende på mikrostruktur.
Neurala nätverk är självlärande modeller baserade på neuroner i hjärnan, som möjliggör att lösa problem som skulle vara svårt att lösa med konventionella datorbaserade metoder. Ett sådant problem är att segmentera bilder. Genom att träna nätverket på bilder där olika objekt, som ”banan” och ”äpple”, har blivit manuellt märkta, lär sig nätverket att avgöra vad som är ett äpple och vad som är en banan.
Gjutjärn är ett material som används i mängder av industrier, inte minst bilindustrin. Så kallat grått gjutjärn består av grafitflagor omgivna av järn, vilket ger det goda vibrationsdämpande och värmeledande egenskaper. I denna avhandling har ett neuralt nätverk lärt sig att känna igen mikrostrukturen i gjutjärn. Olika mätvärden, som annars kräver mycket manuellt arbete, kan extraheras enbart genom att förse nätverket med en bild av mikrostrukturen. Detta möjliggjordes genom att lära upp nätverket med hjälp av bilder av etsad mikrostruktur, där strukturen runtom grafitflagorna även kan studeras. Till skillnad från icke-etsad mikrostruktur, där den omgivande strukturen huvudsakligen framstår som vit, gör denna metod det möjligt att analysera grafitflagorna samtidigt som den omgivande mikrostrukturen. Grafitflagorna behöver därmed inte studeras separat i en icke-etsad bild av mikrostrukturen.
Ferritisk nitrokarburering är en process som bildar ett slitstarkt skikt vid materialets yta. Ett neuralt nätverk lärdes även upp för att extrahera detta lager från mikrostrukturen, och på så sätt mäta dess tjocklek. Att mäta denna tjocklek är viktigt, eftersom den påverkar hur väl materialet står emot nötning i till exempel bromsskivor.
Båda dessa modeller lyckades segmentera strukturen, med goda värden jämfört med de manuellt markerade bilderna som användes för att lära upp nätverken. Dessa resultat visar att sådana modeller kan användas för att automatiskt segmentera mikrostrukturen i grått gjutjärn, vilket kan användas inom industrin för att förenkla det tidskrävande arbete som normalt krävs. (Less)
Please use this url to cite or link to this publication:
https://lup.lub.lu.se/student-papers/record/9248890
- author
- Winsnes, Elliot LU
- supervisor
- organization
- course
- FYSM34 20261
- year
- 2026
- type
- H2 - Master's Degree (Two Years)
- subject
- keywords
- Gray cast iron, microstructure, graphite morphology, pearlite, ferrite, phase fraction, convolutional neural networks, U‑Net, semantic segmentation, deep learning, micrograph analysis, ferritic nitrocarburizing, compound layer, oxide layer, thickness measurement
- language
- English
- id
- 9248890
- date added to LUP
- 2026-09-02 08:24:40
- date last changed
- 2026-12-01 01:39:17
@misc{9248890,
abstract = {{The quantification of microstructural features is essential in materials science, as the microstructure can be linked with the mechanical performance of the material. Gray cast iron (GCI) is a type of cast iron used mainly for its excellent machinability and vibration damping, along with high compressive strength and good thermal conductivity. GCI is characterized by graphite flakes dispersed in a pearlitic/ferritic matrix. Traditionally, the dark graphite flakes can be distinguished from the light-reflecting matrix in unetched samples using a simple color threshold on optical microscopy micrographs. However, in order to reveal the matrix microstructure and
distinguish ferrite from pearlite, the samples need to be etched using Nital. A simple color threshold technique for extraction of ferrite/pearlite/graphite fractions is thus not viable.
In this study, we introduce an automated segmentation technique for GCI microstructures.
The first model was trained on Nital-etched GCI micrographs containing pearlite, ferrite, and graphite. The segmentation is based on a convolutional neural network (CNN) with a U-Net architecture. Image augmentation improved robustness to variations in illumination and contrast. Dice scores above 0.94 across two datasets of varying magnification were obtained for graphite. Ferrite scores were similarly high, above 0.93 for both datasets. Performance was lower for a third dataset acquired using a different microscope, with Dice scores of 0.812 for graphite and 0.420 for ferrite. The lower ferrite performance is attributed to the very low ferrite phase fraction and the presence of coarse pearlite. Still, the CNN segmentation outperforms the
threshold-based method for all available classes and datasets.
GCI often undergoes ferritic nitrocarburizing (FNC), introducing nitrogen to the surface of GCI in order to improve hardness. An important parameter is the thickness of the resulting FNC compound layer. A thin oxide layer is often formed on the surface as well, whose thickness is also of interest. These thicknesses are typically measured at a limited number of points to obtain a representative thickness profile of the sample.
For this purpose, we also introduce a CNN for five-class segmentation of the FNC compound layer, oxide layer, graphite, matrix, and region outside the sample. Utilizing the same U-Net architecture, the CNN successfully extracted the FNC compound layer with good precision. This allowed for a continuous thickness profile, which is a clear improvement compared to the discrete, single point measurements typically utilized. The CNN outperformed the threshold based approach, which failed completely for the oxide layer, achieving average Dice scores up to 0.968 for the compound layer and 0.869 for the oxide layer for the best performing dataset.}},
author = {{Winsnes, Elliot}},
language = {{eng}},
note = {{Student Paper}},
title = {{CNN-Based Segmentation and Characterization of Gray Cast Iron Microstructures}},
year = {{2026}},
}