# Fileset

[Manuscript.pdf](https://mdr.nims.go.jp/filesets/12a96c0e-a23d-45ff-9cac-8ac79eb2a09f/download)

## Creator

[N. Kulesh](https://orcid.org/0000-0001-7046-2671), [A. Bolyachkin](https://orcid.org/0000-0003-0420-1806), [I. Suzuki](https://orcid.org/0000-0002-8932-8226), [Y.K. Takahashi](https://orcid.org/0000-0001-9197-7236), [H. Sepehri-Amin](https://orcid.org/0000-0002-7856-7897), [K. Hono](https://orcid.org/0000-0001-7367-0193)

## Rights

[Creative Commons BY-NC-ND Attribution-NonCommercial-NoDerivs 4.0 International](https://creativecommons.org/licenses/by-nc-nd/4.0/)

## Other metadata

[Data-driven optimization of FePt heat-assisted magnetic recording media accelerated by deep learning TEM image segmentation](https://mdr.nims.go.jp/datasets/f990c8ad-de6e-4119-b269-4489f4afc132)

## Fulltext

1  Data-driven optimization of FePt heat-assisted magnetic recording media accelerated by deep learning TEM image segmentation  N. Kulesh*1, A. Bolyachkin1,2, I. Suzuki1, Y. K. Takahashi1, H. Sepehri-Amin1, and K. Hono1 1National Institute for Materials Science, Tsukuba 305-0047, Japan 2International Center for Young Scientists, National Institute for Materials Science, Tsukuba, 305-0047, Japan * kulesh.nikita@nims.go.jp, Tel. 080-4148-3513  ABSTRACT The main bottleneck for heat-assisted magnetic recording (HAMR) to achieve a potential areal density of 4 Tb/in2 is the difficulty in obtaining FePt-X nanogranular media with an ideal stacking structure of perfectly isolated L10-FePt columnar nanograins. Here, we present a fully automated routine that combines a convolutional neural network and machine vision to enable data mining from transmission electron microscopy images of FePt-C nanogranular media. This allowed us to generate a dataset and implement a machine learning optimization model that guides process parameters to achieve the desired nanostructure, i.e., small grain size with unimodal distribution and a large coercivity, which was successfully validated experimentally. This work demonstrates the promise of data-driven design of high-density HAMR media. KEYWORDS: Heat-assisted magnetic recording (HAMR), FePt, deep learning, machine learning, image segmentation  2  1. Introduction The ever-increasing amount of globally created data has driven the growth in storage capacity of inexpensive and reliable hard disk drives (HDDs) [1]. Heat-assisted magnetic recording (HAMR) is the technology that has made it possible to increase in the HDD areal density of data storage beyond 1 Tb/in2. HAMR has the potential to reach at least 4 Tb/in2 if the nanostructure of the recording media is optimized [2–4]. Current HAMR technology uses granular films based on the tetragonal L10-ordered FePt phase, which is known to have a high magnetic anisotropy constant KU ∼ 4.5 × 106 J/m3 and a fine grain size of 7-9 nm [5–7]. To reach the target of 4 Tb/in2, the grain size must be reduced to 4-5 nm with a standard deviation (SD) below 15% [3,8]. In addition, other microstructural features affect the magnetic recording performance of FePt-X media, i.e., the thickness of segregant X isolating FePt grains, grain morphology, degree of L10 order, and misoriented grains and twins [9–11]. The realization of the desired nanostructure requires the optimization of a wide range of process parameters, such as sputtering rates, substrate temperature, selected underlayers, segregant type, its volume fraction etc. [12,13]. To optimize the nanostructure of HAMR media, it is essential to consider the correlations between process parameters and the resulting nanostructures and their magnetic properties. The nanostructure optimization problem of HAMR media can be addressed by machine learning (ML) of process parameters, nanostructures and magnetic properties. The benefits of ML-assisted material development have already been demonstrated for other thin-film systems such as Ti-Ni and SrRuO3 [14,15]. However, the data-driven optimization of HAMR media is hindered by a data acquisition because processing transmission electron microscopy (TEM) images, which are  3  the primary source of nanostructure data, is laborious and time-consuming. Such a bottleneck can be overcome by using state-of-the-art deep learning models that can perform filtering, image segmentation, and contour detection in a fast and automated manner [16,17]. Deep learning models, including convolutional neural networks (CNN), have been widely used in medical imaging, materials science, and other fields [18–20]. Introduced in 2015, U-Net has become one of the most important CNN architectures for semantic image segmentation [21]. Recent advances in the organization of skip connections have led to modifications, such as U-Net++ [22] and U-Net 3+ [23], which could help to improve object recognition at different scales while being less sensitive to noise. A comparison of semantic segmentation models made for transmission electron microscopy (TEM) images of Pt nanoparticles showed that U-Net 3+ could be considered the current state-of-the-art [24]. Although many advanced deep learning models have been proposed for fast and efficient instance segmentation such as YOLO and Mask R-CNN have been proposed [25,26], they are generally more demanding in terms of dataset size and computational resources required for training. Stardist is a compromise case among instance segmentation models which achieves a high performance and low training requirements by assuming a star-like shape of instances [27]. This model is often used for segmentation of microscopy images with objects of relatively simple shapes such as bacteria, cells, nuclei or small particles. In this study we realized an automatic analysis of bright-field (BF)-TEM (further TEM for simplicity) images of nanogranular media based on U-Net 3+, Stardist, and Mask R-CNN models and compared their performance. The selected models provide a state-of-the-art  4  performance for retrieving accurate microstructural data (U-Net 3+) with the potential to overcome some problems such as interconnected grains (Stardist and Mask R-CNN). The developed TEM image segmentation routine was used to enable the data-driven optimization of FePt granular media. We selected the FePt-C system for the proof-of-concept study because it is under intensive development for higher areal density HAMR media through nanostructure optimization. Our data-driven optimization workflow consists of several steps. First, automatic segmentation was performed on a series of plane-view TEM images of FePt-C nanogranular films deposited under different sputtering conditions. Second, computer vision algorithms were used to extract microstructural features from the segmented images, i.e., grain size distribution, pitch distance, and grain roundness. The extracted microstructural data was enriched with process parameters and magnetic properties to form an extended dataset. Finally, machine learning regressors were trained and combined with a differential evolution algorithm to predict optimal conditions leading to a small grain size and large coercivity. The predicted conditions were experimentally verified by preparing and evaluating corresponding FePt-C media samples. The proposed workflow can significantly advance the development of high-density HAMR media and promote data-driven strategies for materials research.  2. Experiment and methods FePt-C films were deposited on MgO(001) single crystal substrates by magnetron sputtering of Fe50Pt50 and C targets under 0.48 Pa Ar. The MgO substrate was cleaned with acetone,  5  rinsed with ethanol in an ultrasonic bath, and annealed at 650 °C in an ultra-high vacuum chamber with a pressure of better than ~6×10-6 Pa. Each film was deposited in several stages with individual temperatures and sputtering rates (resulting in different C contents). Finally, the as-deposited FePt-C films were covered with a 3 nm C capping layer. The magnetic properties of the films were measured at room temperature using a superconducting quantum interference device equipped with a vibrating sample magnetometer (SQUID-VSM, Quantum Design) with an applied magnetic field of up to ± 7 T. Microstructural observations were made using a Titan G2 80-200 scanning transmission electron microscope (FEI) with a probe aberration correction system. For binary segmentation of BF-TEM images with grains and segregant matrix as two classes, we selected U-Net 3+, Stardist, and Mask R-CNN models. All models were trained using the same 24 representative 300 × 300 nm2 manually segmented BF-TEM images of FePt-C media containing approximately 600 - 1000 grains each. Since each model requires a unique format of training data, three datasets were prepared and formatted accordingly. For the Stardist and U-Net 3+ models, large images and corresponding segmented masks were cut into patches of 256 × 256 pixel2. The image augmentation step included random intensity shifting and patch flipping, resulting in a final training set of approximately 5900 patches. For Mask R-CNN model, a training set was prepared in the common objects in context (COCO) format. The general workflow, with examples of training and predicted patches, as well as the CNN architecture, is shown in Fig. 1 for the U-Net 3+ model as an illustrative case. Since the final high-resolution segmented image in Fig. 1 is composed out of several predicted patches,  6  stitching with smooth blending was used to avoid artifacts at the edges [28]. The layers of U-Net 3+ were composed using the Keras and TensorFlow Python libraries. A detailed description of each layer and its processing steps are available elsewhere [21,23]. A combined metric consisting of focal Tversky loss [29], intersection-over-union (IoU) [30], and a custom loss function for the improved detection of topological features was used. Stardist and Mask R-CNN were taken from the official repositories and used with recommended loss functions and backbone architectures [31,32]. A single NVIDIA A100 with 80 Gb GPU memory was used for training.   Figure 1 Left to right: sample images used to train the CNN model, the schematic representation of the U-Net 3+ architecture used for semantic segmentation with two classes (grains and a segregant matrix), patched bright field (BF)-TEM image along with the predicted segmentation.  To analyze the dataset and develop an optimization model for FePt-C media, we used regressors based on support vector machines (Scikit-learn library), fully connected neural networks (TensorFlow library), and gradient boosting (Catboost library). Gradient boosting  7  regressors (GBRs) were chosen for their best performance and robustness against overfitting. For the optimization task, we used the differential evolution algorithm [33] implemented in the SciPy library.  3. Results and discussion 3.1 BF-TEM image processing Trained segmentation models were tested on six previously unseen BF-TEM images with manually segmented masks as ground truth (GT). All the models showed good performance on images with low noise level and well-isolated grains with a unimodal size distribution. However, performance begins to differ when a TEM image has significant contrast variation, interconnected or overlapping grains, and grain size bimodality. An example with such problems is shown in Fig. 2(a). Both the Unet 3+ and Stardist models still perform well giving similar mean grain diameters D for the main peak in the grain size distributions that match those evaluated from GT (see (a-c) and (e-g) in Fig. 2). It is worth noting that higher IoU for Unet 3+ indicates a more accurate reproduction of grain shapes, especially for large grains with complicated contours. Both Stardist and Unet 3+ detects many small grains which are often neglected in tedious manual segmentation. Small grains missing in the manual segmentation artificially reduce the IoU for Stardist and Unet 3+ (minor peak in Fig. 2(e) vs. one in (f,g)). On the other hand, some small grains may originate from misinterpreted image noise in low-contrast regions, or they can be irrelevant for statistical analysis of the media (e.g., FePt grains with D < 3 nm do not maintain L10 ordering and are thermally unstable  8  [34]). These grains can be ignored by introducing a grain size threshold. At the same time, information on small grains could be useful for evaluating magnetic recording performance, local switching, and signal-to-noise ratio. For the given training data, Mask R-CNN shows the lowest performance missing some of the grains (Fig. 2(d)), despite the necessary adjustments of the maximum number of instances and the detection probability threshold. It also fails to detect relatively small grains, i.e., those with 𝐷 < 5 nm (Fig. 2(h)), which could be due to the insufficient number of pixels assigned to each grain.   Figure 2 Original BF-TEM image (a) along with segmented images obtained with U-Net 3+ (b), Stardist (c), and Mask R-CNN (d) models. All images are cropped from and area of 300 × 300 nm2, which was used to extract a statistical information. Color variation from dark blue to yellow corresponds to grain size variation from smallest to largest. Legend for original image (a) shows diameter D and number of grains for ground truth (GT) manual segmentation. The legends for each segmented image show the estimated diameter value, the intersection over union (IoU) value calculated by comparing with a ground truth manually segmented image, and the total number of grains detected. Grain diameter distributions obtained for manually segmented images (e), with U-Net 3+ (f), Stardist (g), and Mask R-CNN (h) are shown in the lower panel.  9   The above comparison shows that both the U-Net 3+ and Stardist models are suitable for segmenting typical TEM images of FePt media and have comparable performance. To choose one of the models, their advantages and limitations should be considered in more detail – Fig. 3 serves to illustrate the difference. Double-layered grains, visible as overlapping instances of different contrast (Fig. 3(a)), and coalesced grains, visible as chains of instances having similar brightness and contrast (Fig. 3(b)), pose a challenge to plain view TEM image analysis. Low-noise TEM images with double-layer grains (Fig. 3(c)) can be better processed by instance segmentation models such as Stardist rather than by semantic segmentation models such as U-Net 3+ (Fig. 3, (e) vs. (d) respectively). In addition, excessive contrast details at high-resolution may be misleading for U-Net 3+. When TEM images are less resolved and have a higher level of noise, as one shown in Fig. 3(f), U-Net 3+ starts to outperform Stardist (Fig. 3, (g) vs. (h)), giving a segmentation closer to the actual contrast (higher IoU). Finally, the worst case of a TEM image with coalesced grains forming a maze microstructure (Fig. 3(i)) cannot be processed well by Stardist (Fig. 3(k)), since some grain deviate too much from the round shapes in the training set or even from the star-like shapes assumed by the model. Since U-Net 3+ does not rely on grain shape, it can easily perform segmentation (Fig. 3(j)). To deal with seemingly connected grains, we complemented the U-Net 3+ model with a watershed algorithm to separate weakly connected instances in a post-processing step.  10  In this work, our goal was to collect a dataset for FePt-C media that summarizes years of research using BF-TEM images of varying quality, including challenging examples such as those in Fig. 3. Therefore, we chose the U-Net 3+ model as the most universal and robust option. At the same time, the workflow based on Stardist could be a better choice for HAMR media obtained under a relatively narrow range of sputtering conditions leading to rounded grain shapes, especially if segmentation of interconnected grains is of a high priority.   Figure 3 Schematic illustrations showing a top view and a side view for a typical case of (a) overlapping grains and (b) coalesced grains. Top-view BF-TEM images of FePt-C media with overlapping grains and coalesced grains are shown in images (c, f) and (f, i), respectively. Segmentation results obtained for each BF-TEM image by U-Net 3+ (d, g, j) and Stardist (e, h, k) models are shown on the right-hand side.  11   3.2 Building and analyzing a dataset The U-Net 3+ segmentation model was used to extract microstructural data from BF-TEM images obtained for 70 FePt-C thin-film samples in a fast, uniform, and unbiased manner. A post-processing of the segmented images was performed using OpenCV and Scikit-image libraries. The contour of each grain was detected, then the corresponding area A was calculated and used to estimate an effective diameter by 𝐷 = 2√𝐴/𝜋 as well as a roundness defined as 𝑅 = 𝐴 𝐴𝑐⁄ , where Ac is an area of the smallest circle enclosing the contour. Grain centers were evaluated based on the extrema of the Euclidean distance map within the contours. The pitch distance Dp was obtained for each grain by averaging the distances from its center to those of the nearest grains. Thus, the microstructural features extracted from the TEM images included mean values of D, Dp, and R, along with their standard deviations. Grains that crossed the image boundaries were automatically excluded from the post-processing. The microstructural data were combined with details of sputtering conditions and magnetic properties. The films were varied in substrate temperature, number of layers, sputtering rates and time for each layer. First, to make the feature-description universal and equipment-independent, the sputtering rate of carbon was converted to the C content of a layer while the sputtering time was converted to the layer thickness. Then, to unify the feature-description of the films with a different number of layers, the total FePt-C stack was represented as “1st layer”, “2nd layer”, and “top layers” as shown in Fig. 4(a) [35]. Another reason for combining  12  the layers above the second one was that these layers individually had little effect on predicting performance. Therefore, only the parameters corresponding to the first two layers as well as the total thickness and C content are considered in the following discussion. Among the magnetic properties, the coercivities Hc measured in the out-of-plane (OOP) and in-plane (IP) directions were selected, and the former together with the grain diameter, were considered as the main targets for ML. The ratio of IP and OOP coercivity was added as a parameter important for estimating the content of misoriented grains.   Figure 4 A schematic representation of the FePt-C stack used to formulate a feature vector of deposition conditions (a). A heat map of Pearson’s correlation coefficients (PCC) between selected features, mean grain size D, pitch distance Dp, grain roundness R, their standard deviations (denoted by σ), and coercivities Hc measured both OOP and IP (b).  A heat map illustrating the pairwise Pearson’s correlation coefficients (PCC) of the designed features and the targets is shown in Fig. 4 (b). The concentration of C in the entire stack is negatively correlated with the grain size D (PCC = -0.29) and the pitch distance Dp (PCC =  13  -0.47). This means that both D and Dp decrease as the total volume fraction of carbon increases, which is a natural trend. Higher PCC for Dp indicates that this trend is usually accompanied by a segregant thickening. Opposite sign of PCC for C content in 1st (-0.40) and 2nd (0.25) layer with OOP coercivity shows that nucleation layer with reduced C content could be beneficial to increase OOP coercivity, but further grain growth should be controlled by increasing the C content in the 2nd layer. Apparently, less amount of C in the 1st layer leads to better interfaces between FePt grains and the MgO substrate, which improves L10 ordering and coercivity respectively. For the IP coercivity, the total C content has a PCC close to zero due to the absence of low C content samples. However, the overall trend for individual layers shows a tendency for the coercivity to increase with increasing C content (PCC is 0.23 for C content in the second layer and 0.07 for the first layer). Another important parameter set in Fig. 4 (b) is the layer thicknesses. The correlation map shows that the 1st layer should be thin to realize media with round grains (-0.29) and high OOP coercivity (-0.28). Correlations with the total film thickness show that thick films tend to have larger grains (0.49) with better grain separation (0.32), reflecting a continuous volumetric growth of grains during the deposition. The increased total film thickness is beneficial for enhancing the OOP coercivity (0.31), but it can also lead to the formation of a double layer with misoriented grains and consequently an increased IP coercivity (0.38). Substrate temperature has significant positive correlations with grain size (0.40), pitch distance (0.37) and grain roundness (0.29). Thus, the temperature should be high enough to initiate L10 ordering, but not too high to prevent a grain growth. In addition, selecting a  14  reasonable substrate temperature helps to suppress the IP coercivity (0.44) by preventing the formation of in-plane variants and {111} twins. Finally, let us highlight some of the strongest correlations between microstructural features and coercivity. OOP coercivity and grain size have a strong positive correlation (0.69). Therefore, it is necessary to find an optimal trade-off between reducing D and increasing OOP Hc is necessary. Note that a narrow distribution of grain roundness indirectly means a small number of interconnected and coalesced grains. Therefore, improving roundness (0.45) and reducing its standard deviation (-0.59) are required for high OOP coercivity. Reducing the variances of D and Dp are also important to achieve this. The described competing trends motivated us to implement ML for multi-objective optimization of FePt-C granular films. Several ML regression models were trained to predict OOP coercivity and grain size based on the features related to sputtering conditions. Leave-one-out cross-validation was used, and the performance of the regressors was evaluated by mean absolute error (MAE) and root mean square error (RMSE): 𝑀𝐴𝐸 =∑|𝑦𝑖−𝑦𝑝|𝑛 (1) 𝑅𝑀𝑆𝐸 = √∑(𝑦𝑖−𝑦𝑝)2𝑛 (2) where 𝑦𝑖 is an actual value, 𝑦𝑝 is a predicted value, and 𝑛 is the number of samples. The achieved performance of the gradient boosting regressors is summarized in Fig. 5(a,b). Despite the small number of samples and their uneven distribution across the feature space,  15  the overall predictive performance achieved reasonable accuracy with MAE (RMSE) of 0.32 (0.39) T for OOP coercivity and 0.80 (1.12) nm for grain diameter.   Figure 5 Comparison between actual and predicted values of OOP coercivity (a) and grain diameter (b) obtained using regressor models based on GBRs trained on sputtering conditions. The relative feature importance for coercivity (c) and diameter (d) is shown in the bottom section.  GBRs allow analysis of the relative importance of features in predicting targets, as shown in Fig. 5(c,d). These bar plots are complemented by PCC signs, which are indicated by corresponding colors. Thickness of the total FePt-C stack and its C content play the most  16  important role in predicting OOP coercivity. The grain diameter is mainly determined by the C content in the 1st layer, the total thickness, and the temperature of the substrate. Feature importance confirms the critical role of nucleation layer for both coercivity and grain diameter. The demonstrated gradation of feature importance helps to quantify priorities in the design of HAMR media. The differential evolution algorithm can search for extrema of any function in a restricted multidimensional space, so that a complex function can be constructed based on the trained GBRs, taking into account all the necessary physical constraints. Each optimization session was run multiple times with different population sizes to ensure the convergence of the result. The constraints used are listed in Table 1, some of which represent the technical limitations such as the highest available substrate temperature, while others were chosen to address the limited training set. Table 1 Deposition details of FePt-C media proposed by the differential evolution algorithm to achieve the highest OOP coercivity (max µ0Hc) or a small diameter and high coercivity simultaneously (max µ0Hc & min D) considering the listed constraints.  1st layer 2nd layer Total stack Temp. (°C) µ0Hc (T) D (nm) C content (vol.%) Thickness (nm) C content (vol.%) Thickness (nm) C content (vol.%) Thickness (nm) Constraints 0-50 1-5 0-50 2-5 0-50 6-15 300-750 - - max Hc 7 1.1 40 2.3 28 12.5 700 4.5 9.8 max Hc & min D 31 1.9 49 1.9 30 7.5 680 4.1 7.5  First, we maximized the OOP coercivity 𝐻𝑐  by searching max𝒔∈[𝒂,𝒃](𝐻𝑐(𝒔)), where 𝒔  is the feature vector, [a, b] – applied constraints. The optimization resulted in the feature vector  17  denoted by “max Hc” in Table 1. The differential evolution optimizer proposed a low C content in the nucleation layer (7 vol.%) with its drastic increase in the 2nd layer (40 vol.%) and a moderate amount in the total film (28 vol.%). Both the film thickness and the substrate temperature are relatively high – 12.5 nm and 700 °C respectively. Under these conditions, the OOP coercivity is expected to reach 4.5 T. At the same time, the grain diameter is predicted to be 9.8 nm, which is too large for practical applications. After verifying the stability of the coercivity prediction algorithm, we designed the optimization function min𝒔∈[𝒂,𝒃](D(s) − 𝐻𝑐(𝒔)) to maximize the OOP coercivity 𝐻𝑐 and minimize the grain size D at the same time (D and 𝐻𝑐 are min-max normalized, “max Hc & min D” in Table 1). Increasing the C content in the first layer (31 vol.%) and reducing the total film thickness (7.5 nm) results in a more balanced combination of 4.1 T coercivity and 7.5 nm grain size. It should be noted that the algorithm can prioritize coercivity or grain diameter by introducing weighting coefficients into the optimization function. 3.3 Experimental verification The parameter sets proposed by the optimization algorithm were tested experimentally by depositing several samples with sputtering parameters close to the predicted values. Candidate samples with the highest OOP coercivity and simultaneously high OOP coercivity and small average grain diameter were selected for demonstration, as described in Table 1. BF-TEM images and experimental grain diameter distributions of are shown in Fig. 6 (a-b).   18   Figure 6 BF-TEM images obtained for samples deposited according to the optimized sputtering conditions providing maximum coercivity (a) and high coercivity while keeping grain diameter as small as possible (b). Grain size distributions with predicted average grain diameters marked with black dashed lines are shown in the insets of (a) and (b). Data points forming the training set (black points), experimentally verified samples (blue and red points), and proposed candidates with reduced total film thickness (green points with arrow indicating the trend toward reduced thickness constraint) are shown in the coercivity vs. grain diameter plot (c).  For both samples, the predicted coercivity values were within ± 0.1 T of the experimentally measured OOP coercivity. Thus, the predicted values for both coercivity and average grain diameter are in good agreement with the experimentally obtained values, confirming the applicability of our approach. Regarding the achieved target properties, the test samples show performance comparable to the best samples in the dataset, but not exceeding them, which may indicate that the applied constraints are too strict (see Fig. 6 (c)). First, we slightly adjusted the constraints for the sputtering conditions by reducing the minimum thickness of the second layer and reducing the importance of coercivity by searching for min𝒔∈[𝒂,𝒃](D(s) −0.3 ∙ 𝐻𝑐(𝒔)). This approach allowed us to reduce the predicted grain diameter to 5.6 nm at  19  the expense of the coercivity, which dropped to 2.9 T (see the first row in Table 2). The deposition conditions for this sample correspond to a microstructure with large pitch distance due to the relatively high C content (see PCCs in Fig. 4), which could reduce the media performance, so further fine-tuning of the constraint may be required. Second, we gradually reduced the constraints on the thickness of individual layers and the entire stack toward 0.2 nm and 3 nm, respectively, while keeping the reduced priority for coercivity (Table 2). Although we were able to reduce the predicted average grain diameter to 4.3 nm, this was done at the expense of reduced total thickness. Such a trade-off is not acceptable for practical applications as the aspect ratio of FePt grains becomes too low. Further optimization of the media properties can be achieved by running an active learning loop. Table 2 Deposition details leading to the smallest grain diameter D (high priority) while maintaining a relatively high coercivity µ0Hc (low priority). Different sets were obtained by gradually relaxing the constraints (top to bottom), resulting in a reduction of the overall thickness from 9.7 to 3.1 nm. 1st layer 2nd layer Total film Temp. (°C) µ0Hc (T) D (nm) C content (vol.%) Thickness (nm) C content (vol.%) Thickness (nm) C content (vol.%) Thickness (nm) 42 2.0 30 0.2 45 9.6 550 2.9 5.6 2 0.3 59 1.0 36 5.1 390 3.2 5.4 7 0.3 56 1.0 37 4.7 330 3.2 5.0 8 0.2 44 1.1 37 4.0 325 3.2 4.4 0.6 0.3 42 1.0 36 3.1 370 3.2 4.3  The optimization model allowed us to estimate the potential of the FePt-C media synthesized within a given technology and revealed possible routes for further improvement of the properties. The dataset used in this study includes only media with carbon as a segregant to realize a granular structure in the FePt system. Future extension of the dataset to other FePt- 20  X systems, where X is different segregant materials such as SiO2, TiO2, Cr2O3, BN, and C and their mixtures [34,35], combined with different processing conditions, can lead to further reduction of the grain diameter without sacrificing coercivity.  4. Conclusion In this study, we presented a method to extract nanostructural data from TEM images of FePt-C based HAMR media using a CNN model with the U-Net 3+ architecture combined with machine vision. Comparison of the U-Net 3+ with popular instance segmentation models including Stardist and Mask R-CNN confirmed its high performance and stability, especially for challenging BF-TEM images. We demonstrated that the proposed processing routine can be used for fast automatic acquisition of microstructural features by applying it to a series of FePt-C granular films. The collected dataset was used to train machine learning regressors and build an optimization routine. As a result, deposition conditions that minimize grain diameter while maintaining high out-of-plane coercivity were found and experimentally verified. This work demonstrates that the proposed method is suitable for estimating the potential of FePt-C based granular media (e.g., with a particular segregant, substrate, stack sequence, etc.) and can help to guide and accelerate the development of HAMR media with increased areal density. The optimization model can be further extended to include additional parameters such as grain aspect ratio, saturation magnetization, and Curie temperature distribution depending on data availability. In terms of image processing, the segmentation  21  result can be used for automatic analysis of media read / write performance to further enrich the dataset, or to create a 3D model for micromagnetic simulation [35]. Expanding the dataset to hundreds or thousands of samples will allow increasing the number of parameters, using neural networks as regressor models, and facilitating the transition towards material informatics to support the realization of next-generation energy-assisted magnetic recording technology. Data availability All data are available from the corresponding authors upon reasonable request. Code availability All the code as well as GUI application for TEM image segmentation is available from the corresponding authors upon reasonable request. Acknowledgment This work was in part supported by MEXT Program: Data Creation and Utilization-Type Material Research and Development Project (Digital Transformation Initiative Center for Magnetic Materials) Grant Number JPMXP1122715503, and JST, CREST Grant Number JPMJCR22C3, Japan. The authors acknowledge Dr. Guillaume Lambard and Dr. Keitaro Sodeyama for their helpful discussions. Competing interests The authors declare no competing interests. References  [1] Seagate’s 2021 Virtual Analyst Event (2021). https://investors.seagate.com/events/eventdetails/2021/Seagates-2021-Virtual-Analyst-Event/default.aspx. Accessed 1 November 2022., (n.d.). [2] H.J. Richter, A. Lyberatos, U. Nowak, R.F.L. Evans, R.W. Chantrell, The thermodynamic limits of magnetic recording, Journal of Applied Physics. 111 (2012) 033909. https://doi.org/10.1063/1.3681297.  22  [3] D. Weller, G. Parker, O. Mosendz, E. Champion, B. Stipe, X. Wang, T. Klemmer, G. Ju, A. Ajan, A HAMR Media Technology Roadmap to an Areal Density of 4 Tb/in$^2$, IEEE Trans. Magn. 50 (2014) 1–8. https://doi.org/10.1109/TMAG.2013.2281027. [4] R.F.L. Evans, R.W. Chantrell, U. Nowak, A. Lyberatos, H.-J. Richter, Thermally induced error: Density limit for magnetic data storage, Appl. Phys. Lett. 100 (2012) 102402. https://doi.org/10.1063/1.3691196. [5] A. Perumal, Y.K. Takahashi, K. Hono, L 1 0 FePt–C Nanogranular Perpendicular Anisotropy Films with Narrow Size Distribution, Appl. Phys. Express. 1 (2008) 101301. https://doi.org/10.1143/APEX.1.101301. [6] L. Zhang, Y.K. Takahashi, K. Hono, B.C. Stipe, J.-Y. Juang, M. Grobis, FePtAg-C Nanogranular Film as Thermally Assisted Magnetic Recording (TAR) Media, IEEE Trans. Magn. 47 (2011) 4062–4065. https://doi.org/10.1109/TMAG.2011.2157088. [7] B.S.D.Ch.S. Varaprasad, Y.K. Takahashi, J. Wang, T. Ina, T. Nakamura, W. Ueno, K. Nitta, T. Uruga, K. Hono, Mechanism of coercivity enhancement by Ag addition in FePt-C granular films for heat assisted magnetic recording media, Appl. Phys. Lett. 104 (2014) 222403. https://doi.org/10.1063/1.4880655. [8] K. Hono, Y.K. Takahashi, G. Ju, J.-U. Thiele, A. Ajan, X. Yang, R. Ruiz, L. Wan, Heat-assisted magnetic recording media materials, MRS Bull. 43 (2018) 93–99. https://doi.org/10.1557/mrs.2018.5. [9] J. Wang, D. Liu, I. Suzuki, Y. Takahashi, M. Yan, K. Hono, High melting point metal (Pt, W) seed layer for grain size refinement of FePt-based heat-assisted magnetic recording media, Appl. Phys. Express. 12 (2019) 023007. https://doi.org/10.7567/1882-0786/aafca3. [10] E. Dengina, A. Bolyachkin, H. Sepehri-Amin, K. Hono, Machine Learning Approach for Evaluation of Nanodefects and Magnetic Anisotropy in FePt Granular Films, Scripta Materialia. 218 (2022) 114797. https://doi.org/10.1016/j.scriptamat.2022.114797. [11] J. Wang, H. Sepehri-Amin, Y.K. Takahashi, T. Ohkubo, K. Hono, Magnetic in-plane components of FePt nanogranular film on polycrystalline MgO underlayer for heat-assisted magnetic recording media, Acta Materialia. 177 (2019) 1–8. https://doi.org/10.1016/j.actamat.2019.07.017. [12] D. Weller, G. Parker, O. Mosendz, A. Lyberatos, D. Mitin, N.Y. Safonova, M. Albrecht, Review Article: FePt heat assisted magnetic recording media, Journal of Vacuum Science & Technology B, Nanotechnology and Microelectronics: Materials, Processing, Measurement, and Phenomena. 34 (2016) 060801. https://doi.org/10.1116/1.4965980. [13] C. Xu, B. Zhou, T. Du, B.S.D.Ch.S. Varaprasad, D.E. Laughlin, J.-G. (Jimmy) Zhu, Understanding the growth of high-aspect-ratio grains in granular L1 0 -FePt thin-film magnetic media, APL Materials. 10 (2022) 051105. https://doi.org/10.1063/5.0089009. [14] Y.K. Wakabayashi, T. Otsuka, Y. Krockenberger, H. Sawada, Y. Taniyasu, H. Yamamoto, Machine-learning-assisted thin-film growth: Bayesian optimization in molecular beam epitaxy of SrRuO 3 thin films, APL Materials. 7 (2019) 101114. https://doi.org/10.1063/1.5123019. [15] I. Ohkubo, Z. Hou, J.N. Lee, T. Aizawa, M. Lippmaa, T. Chikyow, K. Tsuda, T. Mori, Realization of closed-loop optimization of epitaxial titanium nitride thin-film growth via machine learning, Materials Today Physics. 16 (2021) 100296. https://doi.org/10.1016/j.mtphys.2020.100296. [16] H. Kim, J. Han, T.Y.-J. Han, Machine vision-driven automatic recognition of particle size and morphology in SEM images, Nanoscale. 12 (2020) 19461–19469. https://doi.org/10.1039/D0NR04140H.  23  [17] Z. Chen, S. Daly, Deformation twin identification in magnesium through clustering and computer vision, Materials Science and Engineering: A. 736 (2018) 61–75. https://doi.org/10.1016/j.msea.2018.08.083. [18] T. Hoeser, C. Kuenzer, Object Detection and Image Segmentation with Deep Learning on Earth Observation Data: A Review-Part I: Evolution and Recent Trends, Remote Sensing. 12 (2020) 1667. https://doi.org/10.3390/rs12101667. [19] S. Yang, W. Choi, B.W. Cho, F.O. Agyapong‐Fordjour, S. Park, S.J. Yun, H. Kim, Y. Han, Y.H. Lee, K.K. Kim, Y. Kim, Deep Learning‐Assisted Quantification of Atomic Dopants and Defects in 2D Materials, Advanced Science. 8 (2021) 2101099. https://doi.org/10.1002/advs.202101099. [20] C. Zhang, L. Zhang, B.Y.J. Zhang, J. Sun, S. Dong, X. Wang, Y. Li, J. Xu, W. Chu, Y. Dong, P. Wang, Land cover classification in a mixed forest-grassland ecosystem using LResU-net and UAV imagery, J. For. Res. 33 (2022) 923–936. https://doi.org/10.1007/s11676-021-01375-z. [21] O. Ronneberger, P. Fischer, T. Brox, U-Net: Convolutional Networks for Biomedical Image Segmentation, (2015). http://arxiv.org/abs/1505.04597 (accessed February 2, 2023). [22] Z. Zhou, M.M.R. Siddiquee, N. Tajbakhsh, J. Liang, UNet++: A Nested U-Net Architecture for Medical Image Segmentation, (2018). http://arxiv.org/abs/1807.10165 (accessed February 2, 2023). [23] H. Huang, L. Lin, R. Tong, H. Hu, Q. Zhang, Y. Iwamoto, X. Han, Y.-W. Chen, J. Wu, UNet 3+: A Full-Scale Connected UNet for Medical Image Segmentation, (2020). http://arxiv.org/abs/2004.08790 (accessed February 2, 2023). [24] K.M. Saaim, S.K. Afridi, M. Nisar, S. Islam, In search of best automated model: Explaining nanoparticle TEM image segmentation, Ultramicroscopy. 233 (2022) 113437. https://doi.org/10.1016/j.ultramic.2021.113437. [25] K. He, G. Gkioxari, P. Dollár, R. Girshick, Mask R-CNN, (2017). https://doi.org/10.48550/ARXIV.1703.06870. [26] J. Redmon, S. Divvala, R. Girshick, A. Farhadi, You Only Look Once: Unified, Real-Time Object Detection, (2016). http://arxiv.org/abs/1506.02640 (accessed February 2, 2023). [27] U. Schmidt, M. Weigert, C. Broaddus, G. Myers, Cell Detection with Star-Convex Polygons, in: A.F. Frangi, J.A. Schnabel, C. Davatzikos, C. Alberola-López, G. Fichtinger (Eds.), Medical Image Computing and Computer Assisted Intervention – MICCAI 2018, Springer International Publishing, Cham, 2018: pp. 265–273. https://doi.org/10.1007/978-3-030-00934-2_30. [28] https://github.com/Vooban/Smoothly-Blend-Image-Patches, (n.d.). [29] N. Abraham, N.M. Khan, A Novel Focal Tversky loss function with improved Attention U-Net for lesion segmentation, (2018). http://arxiv.org/abs/1810.07842 (accessed February 2, 2023). [30] M.A. Rahman, Y. Wang, Optimizing Intersection-Over-Union in Deep Neural Networks for Image Segmentation, in: G. Bebis, R. Boyle, B. Parvin, D. Koracin, F. Porikli, S. Skaff, A. Entezari, J. Min, D. Iwai, A. Sadagic, C. Scheidegger, T. Isenberg (Eds.), Advances in Visual Computing, Springer International Publishing, Cham, 2016: pp. 234–244. https://doi.org/10.1007/978-3-319-50835-1_22. [31] https://github.com/stardist/stardist, (n.d.). [32] https://github.com/matterport/Mask_RCNN, (n.d.). [33] R. Storn, K. Price, Differential Evolution – A Simple and Efficient Heuristic for global Optimization over Continuous Spaces, Journal of Global Optimization. 11 (1997) 341–359. https://doi.org/10.1023/A:1008202821328.  24  [34] Y.K. Takahashi, T. Koyama, M. Ohnuma, T. Ohkubo, K. Hono, Size dependence of ordering in FePt nanoparticles, Journal of Applied Physics. 95 (2004) 2690–2696. https://doi.org/10.1063/1.1643187. [35] A. Bolyachkin, H. Sepehri-Amin, I. Suzuki, H. Tajiri, Y.K. Takahashi, K. Srinivasan, H. Ho, H. Yuan, T. Seki, A. Ajan, K. Hono, Transmission electron microscopy image based micromagnetic simulations for optimizing nanostructure of FePt-X heat-assisted magnetic recording media, Acta Materialia. 227 (2022) 117744. https://doi.org/10.1016/j.actamat.2022.117744.