Hyojin
Kim
*a,
Jinkyu
Han
b and
T. Yong-Jin
Han
*b
aCenter for Applied Scientific Computing, Lawrence Livermore National Laboratory, USA. E-mail: hkim@llnl.gov
bMaterials Science Division, Lawrence Livermore National Laboratory, USA. E-mail: han5@llnl.gov
First published on 27th August 2020
Scanning Electron Microscopy (SEM) images provide a variety of structural and morphological information of nanomaterials. In the material informatics domain, automatic recognition and quantitative analysis of SEM images in a high-throughput manner are critical, but challenges still remain due to the complexity and the diversity of image configurations in both shape and size. In this paper, we present a generally applicable approach using computer vision and machine learning techniques to quantitatively extract particle size, size distribution and morphology information in SEM images. The proposed pipeline offers automatic, high-throughput measurements even when overlapping nanoparticles, rod shapes, and core–shell nanostructures are present. We demonstrate effectiveness of the proposed approach by performing experiments on SEM images of nanoscale materials and structures with different shapes and sizes. The proposed approach shows promising results (Spearman coefficients of 0.91 and 0.99 using fully automated and semi-automated processes, respectively) when compared with manually measured sizes. The code is made available as open source software at https://github.com/LLNL/LIST.
Despite the importance of the analysis, methods to extract these types of information from SEM images have not been extensively developed. A widely used, conventional approach employs general-purpose image processing tools such as ImageJ.1 Mondini et al.2 proposed a set of methods to measure the morphology and diameter as well as to analyze the extracted information statistically in their user-friendly software environment named Pebbles. This software package allows users to accurately measure nanoparticle diameters manually or semi-automatically. Phromsuwan et al.3 proposed an automated method to analyze the size distribution of nanoparticles in transmission electron microscopy (TEM) images using image processing techniques such as Otsu binarization and Canny edge detectors. Crouzier et al.19 proposed a method to estimate nanoparticle diameters using a remarkable point by varying the electron beam size and profiles. The problems common to these approaches are as follows. First, the entire pipeline to analyze and extract such information from SEM/TEM images requires time-consuming manual intervention, which makes high-throughput measurements infeasible. Furthermore, these methods often fail to measure diameters of overlapping nanoparticles that often appear in most SEM images. Laramy et al.9 proposed a high-throughput algorithm to recognize the structure of core-only nanoparticles in SEM images by estimating heterogeneous nanostructure populations at the bulk level and by using ensemble measurements with an individual nanostructure. Yu et al.6 also presented a high-throughput approach using k-means and computer vision techniques to measure pore parameters such as porosity in EM images. Kopanja et al.7 presented a problem-specific image segmentation method to recognize the shape and aspect ratio of anisotropic magnetic nanochains in TEM images. Wang et al.8 proposed an automated method to determine surface roughness and chemical distribution of nanoparticles from STEM data. The image segmentation method proposed by Le Guen and Paul20 is based on mean-shift clustering and spatially constrained classification.
With the recent drastic success in machine vision and deep learning, several papers have reported methods to automatically recognize morphology and segment region of interest in SEM/TEM images. Xu et al.4 proposed a machine learning-based method to identify key microstructure descriptors in SEM images. Modarres et al.5 introduced a method to employ pre-trained convolutional neural network (CNN)-based models to automatically extract morphology information from SEM images. Ieracitano et al.21 proposed a CNN-based method to classify homogeneous (HNF) and nonhomogeneous nanofibers (NHNF) in SEM images. Azimi et al.22 used a fully convolutional neural network to address the classification of microstructural constituents of low carbon steel in SEM and Light Optical Microscopy (LOM) images. Chen et al.23 proposed to employ the U-Net framework,25 widely used in medical image segmentation, to address SEM image segmentation of shale samples and minerals. CNN-based super-resolution techniques have also been applied to the resolution enhancement of low-quality SEM images.24
Although a number of algorithms to process SEM/TEM images have been developed, a generally applicable, robust measurement of the size and shape of nanomaterials is still a challenge due to the complexity and diversity of nanoparticles in SEM/TEM images. For example, existing methods are somewhat application-specific and are limited to be used for different nanomaterial morphologies such as core/shell and anisotropic structures such as nanorods and nanowires, which are also well-known morphologies in nanomaterials due to their unique material properties. Moreover, an automatic, rapid extraction end-to-end pipeline with little human intervention is crucial in order to facilitate the process of massive SEM/TEM image data.
In this paper, we present a suite of new algorithms to quantitatively analyze SEM images by extracting morphology information and measuring nanoparticle sizes. The proposed approach employing computer vision and machine learning techniques offers fully automated, high-throughput measurements with little user intervention. The distance transform-based size estimation algorithm allows us to extract size information from images containing overlapping regions even when the images are noisy and complex. The proposed size estimation algorithm together with automatic morphology recognition supports core–shell and anisotropic types as well as general nanoparticle types. The automatic extraction of scalebar and text information using the state-of-the-art scene text recognition enables us to automatically convert the size information into an appropriate scale unit. In the case of slightly incorrectly measured sizes using the fully automated pipeline, the proposed approach also offers a semi-automatic process with minimal user intervention by allowing users to choose optimal parameter settings. The proposed algorithm and its implemented GUI software package named Livermore SEM Image Tools (LIST) are publicly available as an open source software code at https://github.com/LLNL/LIST. The main application has been written in C++ with QT.17
The main contribution of this paper is summarized here. To the best of our knowledge, this proposed work is the first attempt to integrate multiple SEM image analysis tasks into a single framework as an open source package. The provided end-to-end pipeline offers great efficiency and effectiveness in the SEM image analysis, which makes high-throughput size and morphology measurement feasible. Unlike the existing application-specific methods, this approach can be used in a wide range of SEM image analyzing applications. Furthermore, the publicly available open source of the proposed work is beneficial to the material science community, where the code can easily be adopted to different SEM/TEM image analysis tasks.
To find the correct binary image, we first apply contrast limited adaptive histogram equalization26 to enhance low contrast between the background and the particle cores or shell regions. This step also makes the dynamic range consistent over the input images. Then, we binarize the image by performing Otsu's image thresholding14 to adaptively divide the image into foreground and background regions. To obtain the correct binary image, we perform two binarization steps, each of which is done with and without inverting the input image. In each binary image, we perform multiple erosion processes to separate nanoparticle cores as much as possible. This step allows us not only to effectively separate core regions but also to precisely extract particle centers, even when they are heavily adjacent or cluttered. Then, we find isolated core regions and their center locations, that is, any region that has a single adjacency to another segment region. Among the isolated regions, we down-select valid core regions by checking the solidity between the region and its convex hull region, that is, any core region that is close to its convex hull is marked as a valid region. Between two binary images, we pick the correct binary image that has more valid core regions. The core centers are also extracted by computing the centroid of each valid core region. To examine the existence of the shell regions in the binary image, we check whether (1) the aspect ratios between the core and the outer region are similar and (2) the centroid of the outer region of each core is located inside the core region. The detailed algorithm description is shown in Algorithm 1 in the ESI.†
Alternatively, we propose to leverage a convolutional neural network (CNN)-driven image classifier to automatically determine the morphology type. In the case of a small variation in training sample size and image distribution, the state-of-the-art deep CNN models trained on a large number of natural images are known to provide a more distinctive feature representation, compared to shallow CNNs directly trained on the target dataset from scratch. Furthermore, collecting a large number of labeled SEM images for training is almost infeasible. For these reasons, the proposed classifier employs deep features using a pre-trained deep residual network known as the Google inception network.15 In the case of more complex or sequential images (e.g., 3D medical CT images), one can apply more advanced CNN architectures (e.g., DenseNet28 and ENAS29) or Recurrent Neural Network (RNN).30–32 Having said that, we observed that the residual inception network is sufficient to accomplish our morphology recognition task.
The features extracted from the pre-trained inception model are trained by the second neural network model comprising 4 fully connected layers, as shown in Fig. 2. Given an input SEM image, we first run the inception model to extract its feature, which is then fed into the second neural network for training. Note that this approach was separately implemented using python and tensorflow16 as an alternative solution since we observed that the method described above is sufficient for our task to separate core-only and core–shell nanoparticles with the correct binary image extraction.
Once candidate scalebar segments are collected, their neighboring regions are examined to find out whether there is text within each region. This step allows us to detect and localize the text region more efficiently than detecting the entire image region. For precise text region detection, we propose to use a deep CNN-driven algorithm known as an efficient and accurate scene text detector (EAST).11 The EAST algorithm uses a fully convolutional network-based pipeline trained on ICDAR 2015 images12 to make dense per-pixel predictions. The non-maximum suppression is then used to yield possible text regions. We observed that incorporating the EAST detector into the following text recognition process clearly outperforms a naïve text recognition method with randomly selected candidate text regions since performance of the text recognition algorithm is heavily affected by the accuracy of the input text region. Fig. 4 shows a detected scalebar from the segmentation and text regions surrounding the scalebar, detected by the EAST algorithm.
![]() | ||
Fig. 4 A detected scalebar region and several text regions detected by EAST.11 |
Given candidate text regions, we now perform text recognition to check if there is a text to present a scale number with a scale unit. For this, we employ an open source optical character recognition (OCR) algorithm known as Tesseract.13 If the text contains numbers followed by a distance unit (μm or nm), we extract the scale number and the unit. With the width of the scalebar region in pixels with the number and the actual unit, we finally convert all the detected core and shell sizes in pixels to a proper unit.
We herein report performance evaluation of the main size measurement pipeline using a SEM image dataset containing both our custom and publicly available images. The image set has 66 SEM images in total, consisting of 20 core-only circular, 6 core-only rod, 32 core–shell circular and 8 core–shell rod types. Fig. 6 shows several examples of size measured images of core-only, rod-shape, and their core/shell particles and there are more successful examples shown in Fig. S1.†
![]() | ||
Fig. 6 Examples of successfully measured nanoparticles with different shapes. (A) Nanoparticles; (B) rod-shape; (C) core–shell; and (D) rod-shaped core–shell structures. |
Due to the lack of ground truth size information, we compared our results with manually measured sizes using the scale bars to show general performance and effectiveness of the proposed automatic and semi-automatic processes with minimal manual intervention. In the case of rod shapes, we report both nanoparticle sizes (dS and dL) to compute the error between the proposed and the manual measurement, whereas the averaged sizes (dM) of the two sizes were used in the circular shapes. The automatic process refers to the proposed pipeline with a pre-defined parameter setting (no user intervention), while the semi-automatic process refers to the same pipeline with a minimal user intervened parameter selection. The user intervention includes (1) changing the morphology type (when the structure is incorrectly classified), (2) selecting different segmentation parameters (when the measured sizes appear to be somewhat incorrect), and (3) removing outliers by visually selecting them on the image or by using the size histograms (when the outliers are not properly removed).
Table 1 summarizes the overall performance of the proposed automatic (auto) and semi-automatic processes (semi). We report the accuracy between the manually measured sizes and the algorithm generated sizes using the binary logistic regression-based accuracy (Logit-Acc) and Spearman coefficients to evaluate the overall performance. Note that the performance results in Table 1 do not include the cases where the automatic process failed to extract scalebar information (3 failure cases out of 66 images). Fig. 7 shows the scatter plots between the manually measured sizes and sizes using two proposed approaches.
Morphology type | Logit-Acc | Spearman | ||
---|---|---|---|---|
auto | semi | auto | semi | |
Core-only | 13/18 | 17/18 | 0.97 | 0.99 |
Core-only rod | 6/10 | 9/10 | 0.89 | 0.96 |
Core–shell![]() ![]() |
18/32 | 32/32 | 0.60 | 0.97 |
Core–shell![]() ![]() |
30/32 | 29/32 | 0.98 | 0.95 |
Core–shell rod![]() ![]() |
13/16 | 14/16 | 0.86 | 0.90 |
Core–shell rod![]() ![]() |
14/16 | 14/16 | 0.98 | 0.98 |
Total | 94/124 | 115/124 | 0.91 | 0.99 |
First, we estimate the accuracy by computing the number of correctly measured images as a binary logistic regression problem. The cut-off criterion for the logistic regression is based on the standard deviation of the measured sizes of the nanoparticle structure in each SEM image, thus, 1 if |siM − siP| ≤ σi, 0 otherwise, where siM, siP and σi are the mean of the manually measured sizes, the mean of the proposed sizes and the standard deviation of the proposed sizes of image i, respectively. Note that we count two nanoparticle sizes independently for the rod types. As expected, the semi-automatic process shows improved accuracy compared to the fully automated process. More specifically, the average percentage to meet the above criteria is around 76% (94 out of 124) when the automatic process is used, while the semi-automatic process yields 93% (115 out of 124), as shown in Table 1. Since this logistic accuracy heavily depends on the cut-off value, only exhibiting true (1) or false (0), this evaluation is not sufficient to represent the actual performance of the proposed method. For example, the standard deviation of the manually measured sizes are not taken into consideration and it is likely to be categorized into false cases when the particles have a smaller standard deviation.
Due to the continuous values in the size measurement, we evaluate Spearman coefficients between the manually measured sizes and the algorithm generated sizes, as shown in Table 1. The coefficients show that both automatic and semi-automatic methods are highly correlated with the manual measurement, except for the core–shell:
core cases with the automated pipeline (coefficient of 0.6). The averaged coefficients of the automatic and semi-automatic processes are 0.91 and 0.99, respectively. We observed that several outliers in the results of the automatic approach are due to the incorrect shape recognition or improper segmentation thresholds which degrades the performance of the particle size estimation, especially for core–shell
:
core cases and some core-only particles. Note that the failure or poorly measured cases are related to (1) incorrect morphology recognition due to ambiguity of the core or shell structures, (2) incorrect segmentation thresholds for less contrast of the SEM images, and (3) scalebar and text detection error, e.g., the scale bar or text was unable to be detected due to blurriness or noise. See several of the failure cases in the ESI (Fig. S2 and S3†). To address such cases, the semi-automatic method with a minimum level of user intervention is applied to improve the accuracy. The results show that the semi-automatic method marginally outperforms the fully automated one. The coefficients of all morphology types using the semi-automatic approach are in the range of 0.9 to 0.99.
We also report the particle size distribution between the proposed automatic pipeline and the semi-automatic process, known as poly-dispersity (i.e. standard deviation/average size) in Fig. 8. This evaluation provides another critical nanomaterial characteristic obtained from SEM images, to comprehensively evaluate the different sizes and units of nanoparticles in the entire SEM image dataset. As shown in Fig. 8, both processes yield reasonably accurate poly-dispersity, while the semi-automatic process improves the overall accuracy, compared to the fully automatic pipeline. The execution time of the entire size measurement process depends on the size of the image and the number of detected nanoparticles. Typically, the execution time for a single SEM image is 1–3 s when the fully automatic pipeline is used, thereby enabling us to handle over 3500 images in an hour. For SEM images where there is a need for user intervention, additional time is required to select correct thresholds and other parameters for the segmentation process and outlier removal.
Footnote |
† Electronic supplementary information (ESI) available. See DOI: 10.1039/d0nr04140h |
This journal is © The Royal Society of Chemistry 2020 |