# Accessing topological feature of polycrystalline microstructure using object
detection technique

Mridhula Venkatanarayanan  P G Kubendran Amos<EMAIL_ADDRESS>Theoretical
Metallurgy Group, Department of Metallurgical and Materials Engineering,
National Institute of Technology Tiruchirappalli,
Tamil Nadu, India  Institute of Applied Materials (IAM-MMS), Karlsruhe
Institute of Technology (KIT),
Strasse am Forum 7, 76131 Karlsruhe, Germany

###### Abstract

Faces-classes of grains, often referred to as topological features, largely
dictate the evolution of polycrystalline microstructures during grain growth.
Realising these topological features is generally an arduous task, often
demanding sophisticated techniques. In the present work, a distinct machine-
learning algorithm is extended for the first time to comprehend the
topological distribution of the grains constituting a polycrystalline
continuum. This regression-based object-detection approach, besides
significantly reducing human-efforts and ensuring computational efficiency,
predicts the face-class of the grains by introducing appropriate ‘bounding
boxes’ . After sufficient training and validation, over $500$ epochs, the
current model exhibits a remarkable overlap with the ground truth that
encompasses manually realised topological features of the polycrystalline
microstructures. Accuracy of this treatment is further substantiated by
relevant statistical studies including precision-recall analysis. The model is
exposed to unknown test dataset and its performance is assessed by comparing
its predictions with the labelled microstructures. Reflecting the statistical
accuracy, a strong agreement between the algorithm-predictions and the ground
truth is noticeable in these comparative studies involving polycrystalline
systems with varying number of grains.

###### keywords:

Topological feature, face class, polycrystalline microstructure, object
detection, computer vision

††journal: Materialia

##  1 Introduction

Besides phase transformations, microstructural changes include morphological
evolution of the constituent phases driven by the ability of the system to
reduce the interfacial-energy density. The overtly energy-minimisation
changes, that are not accompanied by any change in the existing phase
fraction, manifest in varied form depending on the characteristic feature of
the microstructure. In system with distinguishable matrix and precipitate,
coarsening reduces the interfacial energy per unit volume [1]. On the other
hand, in polycrystalline systems, the interfacial-energy density is reduced by
the overall increase in the average size of the grains rendered by the growth
of larger grains at the expense of smaller ones [2]. Despite the rather
straightforward, the effect of energy-minising microstructural changes on the
properties of the materials are noticeable [3]. Consequently, numerous
attempts have been made to understand and predict the kinetics of these
transformations, particularly in polycrystalline systems [4, 5, 6].

The energy-minising transformation, in polycrystalline systems, is induced by
the curvature-difference in the inherent morphology of the grains.
Correspondingly, the kinetics of grain growth is dictated primarily by the
integral of the mean curvature over the walls that contribute to the
morphology of the grains [7, 8]. In other words, growth kinetics are
essentially governed by the walls of the grains and vary significantly with
the change in the number of faces. The seminal expression describing the
kinetics of grain growth in two-dimensional isotropic systems, incidentally,
replaces the integral of mean curvature with number of faces [9]. The
extension of this expression to three-dimensional isotropic polycrystalline
microstructures, though includes size of the grains, the role of face-class,
id est number of faces, continues to remain dominant [10].

In addition to dictating the growth rate, the face class of a grain directly
indicates its surrounding. Stated otherwise, the continuum in a microstructure
is established by the grains sharing their sides (faces) with immediate
neighbours. Accordingly, a face class further represents the number of
neighbours encapsulating a given grain. The local evolution of a grain, beside
being controlled by the curvature of the faces, it also effected by its
neighbour [11]. A face class then, in addition to offering a direct influence,
is indicative of the role of neighbouring grains in the temporal change [12].

Treating the grains in a polycrystalline system analogously to space filling
cellular structures, statically relates the size to the number of sides [13].
Such insight relating the size and face class, which are contextually referred
to geometrical and topological features, lends itself in quantitatively
delineating the distribution of grains in a polycrystalline microstructure. To
that end, one primary criterion for re-creating realistic microstructure in
simulation setup involves establishing the appropriate distribution of face
classes in the system [14]. The topological features, therefore, characterise
a polycrystalline system both locally and globally, through the immediate
neighbours and the number-density distribution of the various face classes,
respectively.

Given the extended importance of the topological features in dictating the
growth kinetics and grain distribution in polycrystalline microstructure,
numerous techniques have been adopted to comprehend the face classes of the
grains. Sophisticated sequence of treatments are developed to recreate the
topology of the grains in a three-dimensional polycrystalline system [15, 16,
17, 18]. With the advent of artificial intelligence and other related
techniques, human efforts in deciphering complex images have significantly
been reduced [19, 20]. Consequently, these approaches are recently adopted to
understand and classify microstructures [21, 22]. Despite the progressive
involvement of the deep learning treatments in microstructural analyses, their
contribution in investigating polycrystalline systems has thus far been
marginal. Therefore, in the present work, regression-based object counting
technique is extended to quantify the topological features of the grains in
the polycrystalline system.

##  2 Topology-based realisation of grains

The object-detection has thus far been largely adopted in ‘non-technical’ ,
yet equally complex, applications [23]. An extension of this treatment to
realise grains in polycrystalline systems, primarily based on their
topological features, begins with a parallel perception of the microstructure
that is relatable to the underlying algorithm. Correspondingly, the grains
constituting a polycrystalline microstructure are viewed as individual objects
analogous to the foreground. However, as opposed to a conventional image,
wherein generally the background is noticeably different, in polycrystalline
microstructure, the background surrounding the focused object continue to
remain other similar objects, id est grains. The performance of object-
detection treatment in systems exclusively comprising of similar objects,
distinguished only by their features, have not been reported yet. Therefore,
besides offering a technique for realising the topological features of the
grains, the present work, by exposing a well-known object-detection technique,
YOLOv5, to polycrystalline microstructure attempts to assess and expand its
applicability [24]. Furthermore, the established distinction of grains based
on their number of sides incidentally translate to object-class in the current
analysis.

###  2.1 Extending objection-detection treatment

---
Figure 1:  Schematic representation of the data acquisition scheme employed
for generating training and test dataset. Besides numerically generated
images, experimentally-observed microstructures gathered from open online
searches have been included in training and test dataset (presented in
supplementary document).

Though apparently different from a conventional machine-learning based data-
analysis, the development of the present model adheres to the framework of a
supervised treatment. However, the key difference is that, in the current
treatment, polycrystalline microstructures replace conventional numerical
and/or categorical data, and are subsequently analysed. Its adherence to
supervised learning means that the accuracy of the present topology-detection
technique is principally dictated by the wealth of the dataset. The required
information to develop the technique is rendered as numerically-generated
polycrystalline microstructure. Despite its largely theoretical conception,
the proximity of the generated polycrystalline microstructures to the physical
systems is ensured by adopting the proven Poisson-Voronoi tessellation [25],
expressed as

$R_{i}=\\{\textbf{x}\in D\leavevmode\nobreak\ :\leavevmode\nobreak\
||\textbf{P}_{i}-\textbf{x}||<||\textbf{P}_{j}-\textbf{x}||\quad\forall i\neq
j\quad i,j=1,2,\dots,n\\}.$ (1)

Under the above tessellation scheme, the domain $D\in\mathbb{R}^{d}$, where
$d=2$ all through the present study, is partitioned into distinct regions
$R_{i}$ through the seed points $\textbf{P}_{i}$. These seed points are
randomly placed in the domains and are allowed to grow into regions (grains)
till they impinge on a neighbour. The section wherein the two regions
intersect form the face, with the triple junctions formed by the meeting of
three regions. After establishing a continuum, the regions essentially appear
as the grains in a polycrystalline system. In order to further ensure the
morphology of these grains are indicative of physical systems, and are not
unreal, the microstructure generated by the Poisson-Voronoi tessellation is
initialised in a multiphase-field framework [26, 27].

The entire approach employed in developing the topology-based grain detecting
model is shown in Fig.1. Using Poisson-Voronoi tessellation, five populous
microstructures, each comprising of approximately $500$ grain with average
size of $50\mu m$ are developed. Each of these microstructure, that constitute
the principal dataset, are sliced to make them computationally ‘manageable’ .
In machine-learning based image analysis of microstructure, slicing the larger
microstructures into smaller sections without the loss of any characteristic
feature has generally been a common practise [28]. Besides making the data
manageable, the section of larger microstructures reduce the training efforts
and seemingly increase the magnitude of data.

In the current investigation, as shown in Fig.1, each larger microstructure is
sliced into $64$ sections. This slicing ensures that atleast fifteen
individual, and topologically-distinct, grains are included in each section.
Owing to the sectioning, the entire dataset comprised of $320$ smaller, yet
polycrystalline, microstructure. While a significant number of the smaller
microstructures ($80\%$) are involved in training the model, the validation is
performed on the remnant ($20\%$). Besides the numerically-established
microstructures, polycrystalline images from open searches are also included
to train the algorithm.

---
Figure 2:  The approach adopted by the current object detection algorithm in
realising grains of specific topological class in the polycrystalline
continuum..

The present technique that detects the grains in a polycrystalline
microstructure, while distinguishing their topological feature, is trained by
manually locating the individual grains and labelling them based on the number
of sides. A representative depiction of the manual demarcation of the grains,
and the inclusion of the corresponding labels, is shown in Fig.1. Using an
appropriate tool, LabelImg, the individual grains in the training dataset are
located and labelled [29]. The spatial position of a given grain the
microstructure is registered by introducing a suitable bounding box around it.
Moreover, the labels are appropriately titled to indicate the topological
feature of the grains. The bounding boxes along with the labels serve as the
ground truth of the microstructure while training the model. Considering that,
in two microstructures, number of sides assumed by a grain generally varies
from four to seven, these face classes are exclusively focused in this
analysis. Consequently, topological features of the grains constituting the
microstructure are largely distinguished based on one of these four labels
indicating face-class four to seven. Close to 250 sectioned microstructures,
each warranting on an average of fifteen individual bounding boxes, are
manually labelled for training.

###  2.2 Operating principle

The approach adopted by the underlying algorithm (YOLOv5) in detecting the
grains based on their topological feature is illustrated in Fig.2. Owing to
its regression-based formulation, the present technique essentially predicts
the spatial location of a given class of grain, and gradually improving its
accuracy in the subsequent iteration [30]. This approach, by obviating the
need for scanning the entire microstructure, ensures the optimal use of the
computational resource.

As indicated in Fig.2, the topology-based grain detection treatment begins
with the discretisation of the microstructure into identically-sized $M\times
M$ grids. Each of these grids serve as the spatial pivot for the predicting
the position of the object initially. Following the discretisation of the
microstructure, an assumption is made concerning the center of the object. In
the present consideration, the center of the object is typically a point
within the grain which is equidistant from all its faces. For a grain of
specific face-class, assuming that its equidistant point coincides with the
respective center of the grids, each discretised cell predicts a bounding box
with the intent to envelop the entire object. Consequently, as shown in Fig.2,
the initial prediction yields several bounding boxes encircling a given
object.

By their predictions, each grid generates a vector,
$\textbf{b}\in\\{\text{b}_{x},\text{b}_{y},\text{b}_{w},\text{b}_{h}\\}$,
which includes the spatial coordinates of the centre of the bounding box
($\text{b}_{x}$ and $\text{b}_{y}$), along with their dimensions as breath and
height $\text{b}_{x}$ and $\text{b}_{y}$. The components of the predicted
vector characteristically vary with each discretised cell, despite all
bounding boxes encompassing a specific grain (object). The subsequent steps
following the introduction of the predictive bounding boxes involve
identifying the most suitable encapsulation and refining its dimension to
accurately capture the position of the object. To that end, the predictions of
the discretised grids are analysed in view of the ground truth established
through the manual labelling. The agreement between the prediction and the
ground truth is quantified as confidence [31].

Initially, the confidence is estimated for all predicted bounding boxes,
irrespective of the class of grains they encompass, through the relation

$\mathcal{C}_{\text{box}}=\mathcal{P}(\text{ob})\times IoU.$ (2)

The above expression yields box confidence ($\mathcal{C}_{\text{box}}$) by
combining the probability of locating any object, irrespective of its class,
in a predicted box, $\mathcal{P}(\text{ob})$, with the Intersection over
Union, $IoU$. While the probability of encapsulating an object is dictated by
vector components associated with the bounding box, the Intersection over
Union quantifies the spatial overlap between the prediction and ground truth,
as shown in Fig.2. Given that the present model is developed to detect four
different classes grains, a refined confidence of locating a desired class of
object is ascertained. The resulting class confidence reads

$\displaystyle\mathcal{C}_{\text{class:}i}$
$\displaystyle=\mathcal{P}(\text{cl}_{i}|\text{ob})\times\mathcal{C}_{\text{box}}$
(3)
$\displaystyle=\mathcal{P}(\text{cl}_{i}|\text{ob})\times\mathcal{P}(\text{ob})\times
IoU,$

with $\mathcal{P}(\text{cl}_{i}|\text{ob})$ indicating the condition
probability of locating an object of class-$i$ within the bounding box. The
estimated confidence for the four difference classes of grains are augmented
to the vector b which consequently reads

$\displaystyle\bm{b}=\begin{bmatrix}b_{x}\\\ b_{y}\\\ b_{w}\\\ b_{h}\\\
\mathcal{C}_{\text{FC4}}\\\ \vdots\\\ \mathcal{C}_{\text{FC7}}\end{bmatrix}$
(4)

where $\mathcal{C}_{\text{FC4}}$ and $\mathcal{C}_{\text{FC7}}$
correspondingly represent the class confidence of locating four- and seven-
sided grains.

---
Figure 3:  The deviation in the predicted topological class of the grain from
the ground truth is quantified over the epochs using the loss functions. The
decrease in the loss function for both test and validation dataset indicates
the convergence of the model detection to the ground truth.

The revised vector $\bm{b}$ is iteratively examined and varied in relation to
the corresponding vector generated by the ground truth to perfect the bounding
box detecting the grains of specific topological feature. As the vector
$\bm{b}$ gets increasingly proximate to the ground truth, for a given bounding
box, only the confidence associated with the specific class assumes a non-
trivial value while other class confidences turn null. Principally based on
the confidence, and involving non-max suppression treatment, the best fitted
bounding box is realised and refined [32].

###  2.3 Comprehending accuracy

Considering that grain boundaries in a polycrystalline system are inherently
distinguishable from the bulk of the microstructure, a sophisticated
visualisation tool could be adopted to isolate these interfaces. Subsequently,
suitable image analysis technique can be involved to examine the configuration
of the segmented grain boundaries. Though such treatment is conceivable,
quantifying its accuracy poses a challenge on its own. On the other hand,
techniques built on a robust statistical framework facilitate, akin to the one
employed in this investigation, offer definite ways of understanding the
accuracy. To that end, the present detection approach and its corresponding
outcomes are analysed through the associated methods in order to explicate the
accuracy.

###  2.4 Minimising deviations

Although the prediction of the algorithm is translated to a vector in Eqn.
(4), this representation denotes bounding box generated by a discretised grid
for an object of a specific class. Correspondingly, the prediction vector
assumes a multidimensional form depending on the number of discretised cells,
objects, their classes and anchor boxes. Despite the extensive dimensionality
of the vector, the associated components can be compared with the ground truth
to ascertain the accuracy of the prediction. Based primarily on the predicted
bounding-box vector, and its corresponding components, the deviation from the
ground truth can be quantified as loss through suitable formulations called
loss function [33].

The various forms of losses rendered by the present topological predictions
are iteratively determined, over 500 epochs, for batches comprising of $15$
sliced-microstructures. The progressive change in the respective box, class
and object loss across the epochs are graphically presented in Fig. 3.
Monitoring the losses, particularly in the validation dataset, enables the
fine tuning of the hyperparameters and consequently, the accuracy of the
treatment.

Bounding box indicating the ground truth is compared with the prediction to
estimate the box loss. Stated otherwise, the box loss quantifies the disparity
between the ground truth and the predictions through the features of the
bounding box including center, aspect ratio, dimensions and Intersection over
Union (IoU). Object loss, on the other hand, focuses on the ability of the
model to distinguish an object (a specific grain) from its background. Any
deficiency in realising the grains in a microstructure is captured as the
object loss. Inaccuracy in identifying the topological feature of the detected
grains is expressed as the class loss. Both object and class loss are
ascertained from the probabilities indicating the confidence in the bounding
box vector through binary cross entropy. Irrespective of the nature of
deviation the losses indicate, Fig. 3 demonstrates that at the end of the 400
epochs the model is adequately trained, and exhibits marginal disparity from
the ground truth. Furthermore, the minimal losses at the end of the epoch in
the validation dataset assert the choice of the hyperparameters which include
learning rate of 0.1 along with momentum and weight decay of 0.937 and 0.0005,
respectively.

###  2.5 Detection accuracy

---
Figure 4:  The rigour of the approach in making accurate topology-based
detection of the grains is estimated as Precision and Recall. These parameters
are collectively analysed for the individual face-classes, and the overall
performance is ascertained from the mean average-precision (mAP) represented
in dark-red line.

Considering that the model fundamentally detects grains along with their
topological classes, besides losses, the accuracy of its performance are
further investigated by closely examining the detections. The regression-based
detections made by the current approach, in relation to the ground truth, can
be categorised as true positive (TP), false positive (FP) and false negative
(FN). While true positive is the accurate detection of the algorithm, the
erroneous attribution to a face class different from the ground truth is
referred as false positive. Similarly, false negative indicates failure to
accurately detect a specific class of object. Using these categories of
positives and negative, which extensively encompasses both accurate and faulty
detections, the precision of the model can be estimated by

$\displaystyle\text{P}=\leavevmode\nobreak\ \frac{\text{TP}}{\text{TP+FP}}.$
(5)

Furthermore, an analogous parameter called recall is determined through

$\displaystyle\text{R}=\leavevmode\nobreak\ \frac{\text{TP}}{\text{TP+FN}},$
(6)

to gauge the performance of the detection treatment. As indicated by Eqn. (5),
precision realises the accuracy of the approach by augmenting inaccurate
detection to the true positive in the formulation. Recall, on the other hand,
describes the performance in the context of failure to definitively detect the
existing face-class, id est false negative.

Both the parameters, precision and recall are collectively examined in
relation to one other to demonstrate the accuracy of the present topology-
detection model, as shown in Fig. 4 [34]. When the detection is absolute, with
marginal inaccuracies in the form of false positive and negative, the
corresponding precision-recall (PR) curve establishes an area of 1.0,
encapsulating the entire plot. Accordingly, any deviation from the complete
encapsulation reflects the non-compliance of the detection with the ground
truth, which can be ascertained from the area under the PR curve. Considering
that the terms contributing to the precision and recall (Eqns. (5) and (6))
are realised for individual object (face) class, four distinct PR-curves
constitute the graphical representation in Fig. 4. It is evident from this
depiction that the present algorithm renders seemingly convincing detection of
grains with topological classes ranging from four to seven. Owing to its
increased presence in the polycrystalline microstructure, the model detects
six-sided grains more accurately when compared to the rest of the face-
classes. Furthermore, the solid red line in Fig. 4 indicates average of the
PR-curves pertaining to the individual face-classes. The overall performance
of the model is affirmed by the red mean average-precision (mAP) curve through
its predominant encapsulation ($95\%$) of the PR plot [35].

---
Figure 5:  Besides the accurate detections represented by the diagonal
entries, the inaccurate predictions in the form of false-positives and
-negatives, across various topological classes, are normalised and presented
as a confusion matrix. In the present representation, a blank entry indicates
insignificant contribution to the overall detections.

Before exposing the trained and validated model to detect grains in unknown
microstructure, model is examined for any biases [36]. In other words, when
employed to detect object of different classes in a microstructure, the
underlying algorithm can get skewed towards (or against) a specific class. In
order to ensure that such biases are rather absent in the present, a relevant
confusion matrix is devised and shown in Fig. 5. The diagonal elements of the
confusion matrix expresses the true positive, the components of false positive
and false negative across the different face classes are expressed as the non-
diagonal entries. The confusion matrix rendered by the present model in Fig. 5
unravels that the model is not biased towards any particular face-class and
the true positive significantly dominates inaccuracies of any form.

##  3 Results and Discussion

The trained and validated algorithm is employed to detect grains in the
polycrystalline microstructures, which have not been involved in the
development of the approach thus far. In order to ensure that the performance
of the model is not restricted to the number density of the objects, the
testing is extended to both sliced microstructure with dimensions identical to
the training data, and larger polycrystalline systems with significantly
greater number of grains.

(a)

(b)

Figure 6:  (a) Topology-based detection rendered by the model in a sliced
microstructure with fewer grains. The realisation of grains with specific
number of sides are presented separately. (b) Adopting the trained model to
analyse the topological features of larger microstructures with increased
number of grains.

###  3.1 Detection face-classes

In Fig. 6(a), the performance of the model in detecting grains based on their
topological feature across the smaller sliced microstructure is illustrated.
In this representative depiction of the four sliced polycrystalline systems,
detection of grains in one of the microstructure is expanded and presented
individually based on their topological class. The relatively low number-
density of grains constituting the microstructures in Fig. 6(a) lends itself
to a rather direct assessment of the model performance. Stated otherwise,
besides the various statistical metrics, the accuracy of the model in making
topology-based detection across the previously unknown sliced microstructures
can be verified against the unaided conventional perception. Such cross-
examination of detections in Fig. 6(a) explicates the convincing performance
of the model.

###  3.2 Applicability to larger systems

The test data for analysing the detection approach is replaced with
microstructures of larger dimension encompassing increased number of grains.
The topology-based grain detection rendered by the algorithm in representative
large-polycrystalline systems is shown in Fig. 6(b). Considering that each of
these microstructures include atleast 50 detectable grains, a direct cross-
examination of the performance is rather an arduous task. However, from the
density of the bounding boxes in Fig. 6(b), it is indicative that the model
captures almost all the grains, irrespective of the size of the microstructure
and number of grains it accommodates. The seemingly unwavered performance of
the model, despite the increased population of grains, affirms the versatile
applicability of the model.

###  3.3 EBSD microstructures

The training, validation and testing of the present topology-based grain
detection model has predominantly dictated by numerically-devised
polycrystalline microstructure. Owing to underlying scheme, though the
simulated microstructures can be claimed to principally reflect the
experimentally observed polycrystalline microstructure, the definitive
performance of the model can only gauged when it is exposed to physical
systems. To that end, besides analysing the topological features of the grains
in polycrystalline systems rendered by open searches, which is collectively
presented in the supplementary document, a set of rather complex
microstructures are investigated using the present approach.

Desired properties in a material are generally established by exposing to
suitable processing technique. These processing techniques achieve the desired
behaviour by characteristically altering the microstructure. In
polycrystalline materials, the configuration of the constituent grains get
significantly changed to the extent that these microstructures exhibit
noticeable deviation from the numerically-generated ones. Particularly, when
the polycrystalline materials are exposed to large-scale deformation
processes, like rolling, the conventional grain boundary structures get
distorted and a typifying texture is introduced. Stated otherwise, as opposed
to generally straight faces connecting triple junctions, curved grain
boundaries are not uncommon in rolled materials. The performance of the
present model in handling textured microstructures is analysed by considering
Electron Back Scattered Diffraction (EBSD) micrographs of rolled magnesium
alloy (AZ31) sample. For direct comparison with the ground truth, in Fig. 7
the topology based grain detection of the model is placed against the manual-
labelled textured microstructure of AZ31 sample. Evidently, the model captures
major portion of the grains along with its topological feature, despite the
characteristic change in the morphology of the grain and the variation in the
colour scheme generally associated with the numerically-generated
polycrystalline systems. Besides, this investigation further unravels that
performance of the model is rather inadequate when the boundaries of the
grains are curved and ill-defined. The model offers similar outcomes on other
textured EBSD micrographs included in Fig. 7. This rather atypical performance
of the present technique on textured microstructures can be attributed to the
nature of the training and validation dataset which primarily comprised of
pristine numerically-generated microstructure. Based on the performance of the
algorithm in the conventional microstructure, it can reasonably be stated that
the accuracy of detection in deformed systems can be improved by adopting
sufficient number of the textured microstructures in the development.

---
Figure 7:  a) Manually labeled and detected topological features of a textured
polycrystalline microstructure. b) Detection rendered by the present technique
on other textured micrographs.

##  4 Conclusion

Image processing techniques have long since been employed to quantitatively
describe a microstructure. With of advent artificial intelligence and related
algorithm, aide offered by such external treatments have increased
considerably. Though recently the sophisticated techniques of deep learning
are progressively employed in microstructure analysis, their role in
extracting features of polycrystalline systems is rather marginal. Therefore,
in the present work, a regression-based object counting algorithm is trained,
and developed, for comprehending the topological features of the grains
constituting polycrystalline microstructures.

The topological features of a given polycrystalline system, in the current
approach, is ascertained by detecting and counting grains based on their face
classes. In other words, the algorithm is trained to examine individual grains
of the polycrystalline microstructure, and handle them as distinct object-
classes depending on the number of sides. Correspondingly, the grains with
five sides are detected and counted as a specific object class, as opposed
face-class six or seven grains. When the resulting approach is allowed to
explore the entire microstructure, it yields the spatial and numerical
distribution of the grains based on the topological feature. While the spatial
distribution is rendered by the detection aspect of the algorithm, the object
counting offers the number density of individual face-class in a
polycrystalline system.

Though the present approach, owing to its regression based algorithm, is
efficient in detecting the topological features of the polycrystalline system,
its accuracy relies heavily on the training and validation dataset.
Correspondingly, despite performing convincingly in polycrystalline
microstructures with definite and flat grain boundaries, the deviation from
the ground truth becomes noticeable while handling processed grains with
curved interfaces. This limitation of the detection treatment will be explored
in the upcoming works by primarily examining microstructure of systems exposed
to various processing techniques.

## Data Availability

As a key feature, the model and dataset developed in the present investigation
is made available for its usage, particularly on experimentally-observed
microstructures, in:
https://github.com/theormets/Topological-features-of-grains.

## Acknowledgments

PGK Amos thanks the financial support of the SCIENCE & ENGINEERING RESEARCH
BOARD (SERB) under the project SRG/2021/000092.

## References

  * [1] Alexis Deschamps and CR Hutchinson.  Precipitation kinetics in metallic alloys: Experiments and modeling.  Acta Materialia, 220:117338, 2021.
  * [2] Gregory S Rohrer.  Influence of interface anisotropy on grain growth and coarsening.  Annual Review of Materials Research, 35(1):99–126, 2005.
  * [3] RW Armstrong.  Metallurgical and Materials Transactions B, 1(5):1169–1176, 1970\.
  * [4] Seong Gyoon Kim, Dong Ik Kim, Won Tae Kim, and Yong Bum Park.  Computer simulations of two-dimensional and three-dimensional ideal grain growth.  Physical Review E, 74(6):061605, 2006.
  * [5] Ramanathan Perumal, PG Kubendran Amos, Michael Selzer, and Britta Nestler.  Quadrijunctions-stunted grain growth in duplex microstructure: a multiphase-field analysis.  Scripta Materialia, 182:16–20, 2020.
  * [6] PG Kubendran Amos, Ramanathan Perumal, Michael Selzer, and Britta Nestler.  Multiphase-field modelling of concurrent grain growth and coarsening in complex multicomponent systems.  Journal of Materials Science & Technology, 45:215–229, 2020.
  * [7] William W Mullins.  Two-dimensional motion of idealized grain boundaries.  Journal of Applied Physics, 27(8):900–904, 1956.
  * [8] James A Glazier.  Grain growth in three dimensions depends on grain topology.  Physical Review Letters, 70(14):2170, 1993.
  * [9] John Von Neumann.  Metal interfaces.  American Society for Metals, Cleveland, 108, 1952.
  * [10] Robert D MacPherson and David J Srolovitz.  The von neumann relation generalized to coarsening of three-dimensional microstructures.  Nature, 446(7139):1053–1055, 2007.
  * [11] Burton R Patterson.  Relationship between mean grain face curvature and number of faces in normal grain growth: The meaning of normalized integral mean curvature.  Acta Materialia, 229:117724, 2022.
  * [12] Fumihiro Wakai, Naoya Enomoto, and Hiroshi Ogawa.  Three-dimensional microstructural evolution in ideal grain growth—general statistics.  Acta Materialia, 48(6):1297–1311, 2000.
  * [13] N Rivier.  Statistical crystallography structure of random cellular networks.  Philosophical Magazine B, 52(3):795–819, 1985.
  * [14] Asad Ullah, Matiullah Khan, Xue Weihua, Safdar Hussain, Mujeeb ur Rahman, Nadeem Salamat, Fazal Haq, et al.  Simulations of grain growth in realistic 3d polycrystalline microstructures and the macpherson–srolovitz equation.  Materials Research Express, 4(6):066502, 2017.
  * [15] J Alkemper and PW1827210 Voorhees.  Quantitative serial sectioning analysis.  Journal of microscopy, 201(3):388–394, 2001.
  * [16] Michael A Groeber, BK Haley, Michael D Uchic, Dennis M Dimiduk, and Somnath Ghosh.  3d reconstruction and characterization of polycrystalline microstructures using a fib–sem system.  Materials characterization, 57(4-5):259–273, 2006.
  * [17] Y Bhandari, S Sarkar, M Groeber, MD Uchic, DM Dimiduk, and S Ghosh.  3d polycrystalline microstructure reconstruction from fib generated serial sections for fe analysis.  Computational Materials Science, 41(2):222–235, 2007.
  * [18] Asad Ullah, Guoquan Liu, Hao Wang, Matiullah Khan, Dil Faraz Khan, and Junhua Luan.  Optimal approach of three-dimensional microstructure reconstructions and visualizations.  Materials Express, 3(2):109–118, 2013.
  * [19] Wuxin Sha, Yaqing Guo, Qing Yuan, Shun Tang, Xinfang Zhang, Songfeng Lu, Xin Guo, Yuan-Cheng Cao, and Shijie Cheng.  Artificial intelligence to power the future of materials science and engineering.  Advanced Intelligent Systems, 2(4):1900143, 2020.
  * [20] PG Kubendran Amos, Arnd Koeppe, Ramanathan Perumal, and Britta Nestler.  High-fidelity simulations and data-driven insights on rate-governing phases in duplex and triplex systems during isotropic normal grain growth.  Physical Review Materials, 6(11):113401, 2022.
  * [21] Brian L DeCost and Elizabeth A Holm.  A computer vision approach for automated analysis and classification of microstructural image data.  Computational materials science, 110:126–133, 2015.
  * [22] Seyed Majid Azimi, Dominik Britz, Michael Engstler, Mario Fritz, and Frank Mücklich.  Advanced steel microstructural classification by deep learning methods.  Scientific reports, 8(1):1–14, 2018.
  * [23] Zhengxia Zou, Zhenwei Shi, Yuhong Guo, and Jieping Ye.  Object detection in 20 years: A survey.  arXiv preprint arXiv:1905.05055, 2019.
  * [24] Do Thuan.  Evolution of yolo algorithm and yolov5: The state-of-the-art object detention algorithm.  2021\.
  * [25] Susmit Kumar, Stewart K Kurtz, Jayanth R Banavar, and MG Sharma.  Properties of a three-dimensional poisson-voronoi tesselation: A monte carlo study.  Journal of statistical physics, 67(3):523–551, 1992.
  * [26] Ramanathan Perumal, PG Kubendran Amos, Michael Selzer, and Britta Nestler.  Phase-field study on the formation of first-neighbour topological clusters during the isotropic grain growth.  Computational Materials Science, 140:209–223, 2017.
  * [27] Ramanathan Perumal, PG Kubendran Amos, Michael Selzer, and Britta Nestler.  Phase-field study of the transient phenomena induced by ‘abnormally’large grains during 2-dimensional isotropic grain growth.  Computational Materials Science, 147:227–237, 2018.
  * [28] Elizabeth A Holm, Ryan Cohn, Nan Gao, Andrew R Kitahara, Thomas P Matson, Bo Lei, and Srujana Rao Yarasi.  Overview: Computer vision and machine learning for microstructural characterization and analysis.  Metallurgical and Materials Transactions A, 51(12):5985–5999, 2020\.
  * [29] Tzutalin.  Labelimg.  Free Software: MIT License, 2015.
  * [30] Peiyuan Jiang, Daji Ergu, Fangyao Liu, Ying Cai, and Bo Ma.  A review of yolo algorithm developments.  Procedia Computer Science, 199:1066–1073, 2022.
  * [31] Philip Thomas, Georgios Theocharous, and Mohammad Ghavamzadeh.  High confidence policy improvement.  In International Conference on Machine Learning, pages 2380–2388. PMLR, 2015.
  * [32] Jan Hosang, Rodrigo Benenson, and Bernt Schiele.  Learning non-maximum suppression.  In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 4507–4515, 2017.
  * [33] Rachel Huang, Jonathan Pedoeem, and Cuixian Chen.  Yolo-lite: a real-time object detection algorithm optimized for non-gpu computers.  In 2018 IEEE International Conference on Big Data (Big Data), pages 2503–2510. IEEE, 2018.
  * [34] Michael Buckland and Fredric Gey.  The relationship between recall and precision.  Journal of the American society for information science, 45(1):12–19, 1994.
  * [35] Luis Torgo and Rita Ribeiro.  Precision and recall for regression.  In International Conference on Discovery Science, pages 332–346. Springer, 2009.
  * [36] Brian P Salmon, Waldo Kleynhans, Colin P Schwegmann, and Jan C Olivier.  Proper comparison among methods using a confusion matrix.  In 2015 IEEE International Geoscience and Remote Sensing Symposium (IGARSS), pages 3057–3060. IEEE, 2015.