Introduction

X-ray computed tomography is a non-invasive imaging technique that uniquely characterizes materials’ internal three-dimensional structure with high spatial resolution. Feature size from micrometers (micro-CT)1,2,3 to nanometers (nano-CT)4,5,6,7 can be resolved by taking advantage of various instrumental configurations and continuous development of algorithms since 1970s8,9,10,11,12,13,14. By directly taking projection images without an X-ray magnification lens, micro-CT is particularly useful as a powerful diagnostic tool in biomedical imaging. For instance, the number of medical CT in the US sharply increased from 12 million to about 80 million from the 1990s to 2010s15,16. When coupled with X-ray optics, resolution down to tens of nanometers can be achieved in both transmission X-ray microscopy (TXM)17,18 and scanning X-ray nanoprobes19 using a variety of imaging modalities including diffraction20, scattering21, and fluorescence22,23, etc., providing comprehensive imaging tools to assist the state-of-the-art research in biologies18,24,25, energy materials26,27,28,29, catalysts30,31, semiconductor chip inspection32 and many other fields in material science and nanotechnologies.

In a typical CT scan, projection images of the sample are acquired from different angular perspectives and then reconstructed to produce a 3D model of the sample. In a clinical setting, this is usually achieved by rotating the X-ray source and detector together around the patient. While in other settings, it is more common to rotate the sample relative to the fixed X-ray source and detector. In general, CT reconstruction algorithms require the sample (or patient) to be stationary at the spatial resolution scale throughout the data acquisition. Concurrently, there are general concerns and discussions about the beam-induced damage to bio-soft materials33,34 and other parasite reactions in hard material systems35,36. Reducing the beam intensity can help in this issue, but it comes at the cost of introducing noise and reduced spatial resolution. Recently, research showed that post-imaging processing using machine learning could be promising to suppress the reconstruction noise from the low-dose CT and achieve improved resolution37,38.

Instead of reducing the beam intensity, a better approach is to minimize the total data collection time, which readily brings two benefits: 1. It lowers the total dose; 2. The enhanced temporal resolution is an advantage for research on dynamic structure changes in operando studies. One approach is switching to “fly-scan” to reduce the overhead time in the conventional “step-scan” data collection mode (see details in a later section). For example, previously, we demonstrated one-minute nano-tomography with sub-50 nm resolution to visualize the silver dendrite growth in the solution realized in TXM using fly-scans39. In comparison, synchrotron nano-tomography generally takes tens of minutes to hours to collect sufficient projection images from 0 to 180 degrees in the traditional “step-scan” mode40,41,42.

The natural question is, can we further increase the “fly-scan” speed? Unfortunately, high-speed “fly-scan” inevitably results in a blurred image using traditional reconstruction algorithms, given the nature of the “fly-scan”. There are efforts working on the image deblurring through a few proof-of-concept simulations. Methods include filtering-based signal processing in the sinogram domain43,44 and iterative deblurring reconstruction45. Those reported methods are generally limited by their requirements of the availability of a sufficient number of projections, which post additional barriers in actual “fly-scan” experiments with a combination of low dose, limited angle, and motion blurring. On a different approach, one can control the photon shutter with a specially designed opening pattern while the camera takes exposures46,47. The simulation shows that the coded shutter can help deblur the “fly-scan” reconstruction. However, this technique requires beam shutters or detectors that can be controlled precisely to enable such a high repetition rate of time-coded acquisition.

In this work, we proposed a machine learning (ML) based image processing to overcome the hurdles of fast “fly-scan” under regular data collection. We have achieved sub-10 seconds X-ray nano-tomography in TXM. We also evaluate the reconstruction using a classical statistical model: maximum a posteriori probability (MAP). We show that the well-trained ML neural network can preserve sharper features and deliver better reconstruction than the MAP method. As a demonstration, we successfully reveal the morphological evolution of a Li-ion battery cathode material (LiNi0.8Mn0.1Co0.1O2) during high-temperature sintering under a high heating rate. As far as we know, this is the highest temporal resolution achieved with this spatial resolution in X-ray imaging.

In a conventional tomography experiment, hundreds to thousands of projection images are taken statically at individual rotation angles to meet the Crowther criterion48. This kind of “step-scan” scheme is time-consuming due to the overhead time for the rotary stage to start, stop and stabilize at each angle. A “fly-scan” that records images while the sample continuously rotates can significantly reduce the data acquisition time (Fig. 1a). However, a fast rotation usually leads to a poor reconstruction. As illustrated in Fig. 1a, since the sample is rotating during the exposure time of the projection image, the recorded image is essentially an ‘integrated’ image of the sample from θ to θ+Δθ (shaded area of the object) where Δθ (blurring angle) is the amount the sample rotated during the exposure time. Depending on the blurring angle Δθ, the recorded projection intensity in a “fly-scan” can deviate from the step-scan substantially. In setups where the projection images are collected in a ‘free-run’ mode of the camera, small changes in rotation speed and/or time between images can lead to accumulating errors in the ‘image-vs-angle’ assignment (sinogram), which results in poor reconstructions. For instance, we simulated a “fly-scan” of an image with grid line patterns. In the simulation, the blurring angle Δθ equals 1.5 degrees. The details of how to simulate the blurred sinogram are described in the later part of the paper. Using the maximum-likelihood-based algorithm (MLEM) available in the off-the-shelf package49, the reconstruction shows a gradual blurring in the radial direction (Fig. 1b). Looking at the zoom-in image (Fig. 1c), we observe that the blurring effect is more pronounced in the outer region than the region in the image center, as expected since the outer region moves at a higher linear speed.

Fig. 1: Blurring effects in fly-scan.
figure 1

a Schematics of a fly-scan data collection. The blue shadow illustrates the area that is exposed to x-ray under single exposure. In the line profile, the red part manifests the blurring effects compared to the blur curve obtained in the regular step-scan, as indicated by Eq. (4). b Simulated reconstruction of a grid pattern with blurring angle Δθ = 1·5 degrees. The image size is 512 × 512 pixels. The width of horizontal and vertical is 1 pixel. c Enlarged view of area enclosed by the blur rectangular in (b). d, e Line profiles at two positions indicated by the dashed lines in (c).

Results and discussion

Problem formulation

Our approach relies on an accurate description of the fly-scan to tackle the blurring issue. In a regular CT step-scan, at each projection angle θ, the negative natural log of the normalized intensity (\(\frac{I\left(\theta \right)}{{I}_{0}}\)) equals the integral of the attenuation coefficient μ along the beam path L:

$$-\,\log \left(\frac{I(\theta )}{{I}_{0}}\right)={\int }_{r\in L(\theta )}\mu (\theta ,r){{{{{\rm{d}}}}}}r={{{{{\bf{R}}}}}}(\theta )\times {{{{{\boldsymbol{\mu }}}}}}$$
(1)

where r is the spatial coordinates, I0 is the incident beam intensity. \(I\left(\theta \right)\) is the attenuated transmission beam intensity collected on the detector when the sample rotates to an angle θ. The right-hand side of Eq. (1) is written as a matrix multiplication representing the Radon transform in the discrete form. We need to solve the inverse problem to get the pixel-wised attenuation coefficient μ.

In a “fly-scan”, Eq. (1) is modified to account for the rotation effects, which can be discretized as Eq. (2). Derivation of Eq. (2) can be found in Supplementary Note 1.

$$-\,{{{{\mathrm{ln}}}}}\left(\frac{I(\theta )}{{I}_{0}}\right)\approx {\int }_{r\in L(\theta )}\left(\frac{1}{n}{\sum }_{i=1}^{n}\mu (\theta +(i-1)\delta \theta ,r)\right){{{{{\rm{d}}}}}}r$$
(2)

To minimize the blurring effects, \(\delta \theta =\frac{\triangle \theta }{n}\) should be small enough. In practice, we can choose \(\delta \theta\) so that the blurring at the farthest distance from the center of the image is less than 1 pixel. For example, in a realistic TXM experiment, assume the image dimension is 512 pixels. Suppose a rotation speed is 30 deg s−1 and exposure time is 0.05 sec. In that case, the blurring angle Δθ is calculated to be 1.5 degrees, corresponding to ~6 pixels at the farthest distance from the image center. To minimize the blurring effect, Δθ needs to be divided into at least six intervals. It is worth noting that smaller \(\delta \theta\) will give a better approximation of Eq. (2) but at the cost of more computation resources.

Equation (2) can be written as a sum of a series of standard Radon transforms, as represented in Eq. (3).

$$-{{{{{\rm{ln}}}}}}\left(\frac{I(\theta )}{{I}_{0}}\right)\approx \frac{1}{n}\mathop{\sum }\limits_{i=1}^{n}{{{{{\bf{R}}}}}}\left({\theta }_{i}\right)\times {{{{{\boldsymbol{\mu }}}}}}=\widetilde{{{{{{\bf{R}}}}}}}\left(\theta \right)\times {{{{{\boldsymbol{\mu }}}}}}$$
(3)

In addition to the blurring effect, the signal noise from the experimental data collection also leads to poor tomography reconstruction. Thus, we also incorporate Poisson noise in our model. As represented in Eq. (4), the measured noisy data \(\widetilde{I}\left(\theta \right)\) is a sum of independent Poisson processes of \(I\left({\theta }_{i}\right)\) at each small individual step (\({\theta }_{i}\)).

$$\widetilde{I}\left(\theta \right)=\mathop{\sum }\limits_{i=1}^{n}P\left(I\left({\theta }_{i}\right)\right)$$
(4)

Taking both the blurring and noise terms into account, Eq. (5) and Eq. (6) gives complete descriptions of the fast tomography data collection:

$$y=\widetilde{{{{{{\bf{R}}}}}}}\left(\theta \right)\times {{{{{\boldsymbol{\mu }}}}}}$$
(5)
$${{{{{\rm{y}}}}}}=-{\log }\left(\frac{1}{{I}_{0}}\mathop{\sum }\limits_{i=1}^{n}{{{{{\bf{P}}}}}}\left(I\left({\theta }_{i}\right)\right)\right)$$
(6)

where, \({{{{{\bf{P}}}}}}\left(\cdot \right)\)denotes the Poisson processes, and \(\widetilde{{{{{{\bf{R}}}}}}}\left(\theta \right)\)is the system matrix, reflecting the effectively modified Radon transform.

The attenuation coefficient μ can be calculated by computing a Maximum a posteriori estimate (MAP):14

$${{{{{{\boldsymbol{\mu }}}}}}}{\ast }=\mathop{{{{{{\rm{argmin}}}}}}}\limits_{{{{{{\boldsymbol{\mu }}}}}}}\left(\frac{1}{2}{{{{{\rm{y}}}}}}-\tilde{{{{{{\bf{R}}}}}}}\times {{{{{{\boldsymbol{\mu }}}}}}}_{\Omega }^{2}+h({{{{{\boldsymbol{\mu }}}}}})\right)$$
(7)

Ω is a diagonal matrix, given by:14,50

$$\Omega ={{{{{{\rm{diag}}}}}}}\left\{{y}_{i}\right\}$$
(8)

In Eq. (7), \(h\left(\mu \right)\) is the prior of μ, a regularization in the minimization problem. Here, we use the total variation (TV) as the regularization. As written in Eq. 9, D represents the 2D TV regularization matrix.

$$h\left({{{{{\boldsymbol{\mu }}}}}}\right)={{{{{\bf{D}}}}}}\times {{{{{\boldsymbol{\mu }}}}}}$$
(9)

We use the alternating directions method of multipliers (ADMM) method51 to solve the minimization problem of Eq. (7). Details can be found in Supplementary Note 2.

Machine learning (ML) methods, a term first coined in the 1960s, is a rapidly developing field, especially in computer vision, language processing, etc.52,53. The wide application of ML and success in computer vision have proven its strength in image processing and inspired a lot of work in medical imaging, for example, in processing missing data, noisy data, and medical diagnostic54. Specifically, significant development has been made to apply machine learning to CT, including in low-dose CT, missing-angle sinogram reconstruction, and CT-based diagnostic55,56. Compared to traditional algorithms, ML methods can discover hidden relationships in the data that may not be intuitive or detectable to humans and traditional algorithms. By training a well-designed ML model with appropriate training data, the model may be able to infer the hidden Information for new data based on the learned patterns from the training data, which makes ML an attractive method for solving ill-posed inverse problems.

Recently, RRDB (residual in residual dense block) has become one of the most popular ML models in computer vision57. It is first used in image super-resolution research and has proven its utility in multiple problems, especially in image inpainting and denoising58,59. One RRDB module consists of multiple dense blocks, each of which has multiple skip-connected layers to build a deep and effective network with a reduced risk of gradient vanishing or exploding. Residual connections are also applied on top of skip connections for the whole dense block. The skip/residual connections will not increase the computational cost too much but will make the model more robust. Compared to previous work, RRDB made multiple changes to achieve better performance, which include: (1) removing batch normalization layers to prevent resolution degradation; (2) rescaling residual by a factor between 0 and 1 before residual connections to make the model more stable and (3) initializes the model with smaller values to help the training. Researchers can control the number of RRDB modules to achieve different representation capabilities that adapt to different problems. Even though RRDB is initially used for super-resolution problems, its proven capabilities in reserving high resolution and texture details make it a good candidate for our image deblurring problem.

Evaluation of ML

Here, we have built a deep learning model based on RRDB to obtain superior CT reconstruction results. Figure 2a shows the workflow. In preparing the training dataset, a simulated ground truth image is projected at a series of rotation angles and uses Eq. (5) and Eq. (6) to generate the blurred sinogram used for training. The Poisson noise was added based on the nominal incident beam intensity (\({I}_{0}\)) we simulated. The value of \({I}_{0}\) varies from 4000-40000, which matches well with the image intensity we collected in the real experiments. We chose the filtered-back-projection (FBP) method that reconstructs the sinogram to get a blurred tomogram, acknowledging that the obtained tomogram consists of blurring and noise artifacts. The blurred tomogram is then fed into our RRDB network, composed of four RRDB modules as the backbone and other layers (Fig. 2b). Each RRDB module contains three dense blocks, as illustrated in Fig. 2c. The RRDB follows the same architecture as stated in the literature57, and four RRDB modules achieve a good balance between numerical accuracy and computation speed. The pixel-wise difference between the ML outputs and ground truth is utilized to update the ML model. Additional information about model training, including training data preparation and loss function used in training, can be found in the Methods part and Supplementary Note 3, 4. It is important to note that the performance of the ML model is highly dependent on the training data. Here, we focused on our interest in tracking the 3D morphological changes in Li-ion battery cathodes using TXM and designed training data to cover the types of features that we commonly see in these systems. We have prepared four types of images with different geometries, feature sizes, and feature types as a general representation of a wide variety of samples we commonly encountered in the experiments (Fig. 2d–g). Specifically, Fig. 2d represents a typical heterogeneous sample, Fig. 2e represents particles with random cracks, Fig. 2f represents a network structure with random cracks, and Fig. 2g represents radial cracks in particles.

Fig. 2: Machine learning for tomography reconstruction.
figure 2

a Workflow. Blurred sinogram is calculated from the synthetic ground truth image (GT image) using Eq. (5). b Scheme of RRDB network containing four sequentially connected RRDB models. c Scheme of individual RRDB model (as outlined by the black rectangle in (b) containing three dense blocks. dg Four types of synthetic images with coarse-to-fine features are used in model training.

We compare the reconstruction results using different reconstruction algorithms. In the simulation, the blurring angle Δθ equals 1.5 degrees, equivalent to a fast fly-scan rotating at the speed of 30 deg s−1 and 0.05 s for individual image exposure time. The number of projections is 120. The image size is 512 × 512 pixels. Figure 3a–j shows the comparison of reconstruction using different methods. Table 1 quantifies the reconstruction quality measured by the metrics of peak signal-to-noise ratio (PSNR) and structural similarity index measurement (SSIM). In Fig. 3b, we see that the construction using FBP gives a noisy reconstruction, originating from the limited projections number and the Poisson noise in the sinogram. Despite not being designed for the “fly-scan” type data, reconstruction using naïve MLEM (Fig. 3c) is also included as a benchmark for the iterative reconstruction method available from many open source packages49. Reconstruction from MLEM displays strong blurring and noise at the image edge (Fig. 3h). Figure 3d shows the results from the MAP+TV method. Noticeably, the noise level is largely suppressed, and boundaries are sharply preserved compared to the reconstruction from FBP and MLEM. The improved reconstruction quality is also measured by the increased PSNR and SSIM (refer to Table 1).

Fig. 3: Evaluation of different reconstruction methods.
figure 3

a Ground truth. b Reconstruction using FBP, with PSNR = 11.69 and SSIM = 0.38. c Reconstruction using MLEM, with PSNR = 17.77 and SSIM = 0.60. d Reconstruction using TV regularized MAP, with PSNR = 21.70 and SSIM = 0.77. e Reconstruction using machine learning (ML) method, with PSNR = 25.02 and SSIM = 0.88. Enlarged views inside the dashed square are shown in (fj), respectively. Note: the dashed lines in (i) illustrate the straight boundary of the original curved particle reconstructed using the MAP+TV method. The arrows in (i) and (j) compare the reconstruction of a small feature (empty hole) using MAP and ML.

Table 1 PSNR and SSIM of reconstructions.

However, we also note that MAP+TV generates additional artifacts. The reconstruction tends to form straight edges at particle boundaries; the round shape ball-like particles turn into facet ones (e.g., see the dashed lines in Fig. 3i). The origin of these artifacts is unclear, but it is not within the scope of this work. Figure 3e shows the ML results, which give the closest-to-grand-truth reconstruction. Compared to MAP+TV, ML does not have straight-boundary artifacts and preserves even sharper boundaries for small features than MAP+TV (see the arrows in Figs. 3i, j). Another benefit of the ML method over the MAP+TV is the fast data processing speed. For example, once the ML model is trained, it takes <0.1 s to process an individual image (e.g., 512 × 512) using a regular desktop CPU, and it can be much faster if GPU is available. In contrast, MAP+TV takes a few to tens of minutes to process an image using CPU, majorly due to a large amount of numeric operation involved in the calculation and the large number of iterations generally required. Additional ML performance tests with dataset simulated at different rotation speed and different geometries can be found in Supplementary Note 4 and Supplementary Figs. S2 and S3.

To verify the model’s robustness, we evaluated the model performance at various noise levels and numbers of projections. We averaged the results from 50 simulated images at each combination. Comparing the ML and FBP methods, we found significant improvements in both PSNR and SSIM (Supplementary Fig. S1). Also, the ML algorithm results in a highly noise-free tomogram compared to the other techniques, which will be very helpful for image segmentation. We have not performed similar calculations for the MAP+TV method, mainly due to the enormous time consumption (e.g., it takes a month to complete the calculation assuming individual reconstruction takes ten minutes).

Results from experiments

To further demonstrate the model’s generality and rule out the possibility of over-fitting on simulated training datasets, we apply the model to experimental data collected at the FXI beamline7 and systematically evaluate the performance at different conditions. The material we tested is LiNi0.5Mn0.3Co0.2O2, a commercially used cathode material in Li-ion batteries. Detailed characterization of its morphology is essential for establishing the link between material structure and its electrochemical property. The particle under test has a complex morphology with different length scales, consistent with our synthetic training set. We tested the algorithm on four sets of measurements taken at different rotation speeds at constant projection image exposure time (0.05 s): 1. slow speed (3 deg s−1, 1-minute scan with 1200 projections); 2. medium speed (10 deg s−1, 18 seconds scan with 360 projections); 3. medium high speed (20 deg s−1, 9 s scan with 180 projections); 4. high speed (30 deg s−1, 6 s scan with 120 projections). Figure 4a–d present the FBP reconstruction from 3 deg s−1, 10 deg s−1, 20 deg s−1 and 30 deg s−1 scans, respectively. As a comparison, images after denoising using the “non-local-mean” algorithm (implemented in the ImageJ package) are shown in Fig. 4e–h. The results after ML correction are shown in Fig. 4i–l correspondingly. Figure 4m–p shows the intensity line profile at the position indicated by the blue dashed line.

Fig. 4: TXM tomography of LiNi0.5Mn0.3Co0.2O2.
figure 4

ad 2D slice extracted from 3D reconstruction at experiment conditions of: (a) 3 deg s−1, 1200 projections. b 10 deg s−1, 360 projections. (c), 20 deg s −1, 180 projections. d 30 deg s−1, 120 projections. eh The output of denoising using non-local-mean implemented in ImageJ for images in (ad). il Machine learning outputs of (ad, respectively. Scalebar is 5 μm. The area enclosed by the yellow square and green ellipse are highlighted for reconstruction quality comparison. mp Line profiles at the position indicated as the dashed blue lines.

In comparison, we clearly see image quality improvements after ML correction. Complex features such as fine cracks are well recovered with sharp boundaries (the yellow square region in Fig. 4). Especially in the cases of relatively slow speed (3 deg s−1 and 10 deg s−1), ML gives almost identical image recovery. As indicated by the red arrow shown in the line profile in Fig. 4m–o, ML gives the best intensity contrast across the crack boundaries. As we further increase the rotation speed to 30 deg s−1, we observe slight performance degradation on ML method. Some small features are not well distinguishable even after ML correction. For example, the crack shown in the green circle is not resolved clearly in Fig. 4l compared to Fig. 4i, j, but still much better than Fig. 4d, h. Overall, the ML-based algorithm significantly improves the reconstructions and produces less noisy tomograms at the same data collection speed. Thus, the ML-based algorithm enables one to acquire CT data much faster while retaining excellent image reconstructions. This is a critical issue for biomedical samples due to sample damage and is vital for many in-situ studies of hard materials such as battery applications where unwanted X-ray-induced reactions can be a concern. In addition, because Poisson noise has been incorporated into the ML-based algorithm, the reconstructed images are much less noisy, which will be extremely helpful for subsequent image segmentation. Finally, we would like to make a remark here, that the performance of our ML-based algorithm is strongly dependent on the training data. The training data should contain the similar features as the actual data. The slight performance degradation showing in Fig. 4l (rotation at 30 deg s−1) is possibly due to the complicated feature in the real sample which is not seen during the model training. By incorporating additional training data with more diverse geometries and features, we believe the ML performance can be further improved to reconstruct the fly-scan data with even higher rotation speed.

In the last part of the paper, we will present another example using the proposed ML-based algorithm to study the morphology evolution in an in-situ experiment with high temporal resolution.

Ni-rich layered LiNixMnyCoxO2 (NMC) is receiving remarkable attention as a high-capacity cathode material for lithium-ion batteries. However, associated with the high Ni concentration, the noticeable capacity fading is attributed to the crystal structure instability during cyclic charging-discharging operation. Research shows that post-annealing NMC at middle-to-high temperature (e.g., 400–800 oC) can introduce small degrees of Li-Ni ion mixing in the crystal lattice, potentially improving the structural integrity during operation60. From a different perspective, it is also interesting to evaluate the heating effect on the microscopic morphological structure with different annealing protocols. In an extreme condition and as a first step, we annealed the LiNi0.8Mn0.1Co0.1O2 under a high heating rate. Applying our ML-based imaging processing protocol, we could monitor the morphology change with a temporal resolution in the 10-s range.

In the experiment, the particle was pre-heated at 400 oC, and then heated up to 700 oC at a heating rate of 50 oC min−1. After annealing at 700 oC for 3 min, it is heated to 800 oC at 50 oC min−1. Figure 5n shows the heating profile. In the in-situ experiment, we continuously take fly-scans (12 s each) to monitor the morphology evolution. Figure 5a–l shows the morphology changes at different temperatures: room temperature, initial reach to 700 oC, keep at 700 oC for 5 min, and reach to 800 oC. During the heating process, we see a gradual formation and evolution of cracks on the particle surface (Fig. 5a–d). From a slice view of the reconstructed 3D particle (Fig. 5e–l), we also observed the healing of cracks when annealed at constant temperature (700 oC, Fig. 5g vs. 5f and 5k vs. 5j).

Fig. 5: Structure evolution of LiNi0.8Mn0.1Co0.1O2 during heating.
figure 5

3D rendering of particle at temperature: a Room temperature. b Initial reach to 700 oC. c Annealed at 700 oC for 2 min. d 800 oC. eh Transparent rendering showing the internal cracks at the same temperature as (ad). il 2D slice views of the particle at the same temperature as (ad). Scalebar is 5 μm for (al). m The extracted volume fraction of cracks at different temperatures. n Temperature profile used in the experiment. Note that there are gaps in the time between each 5 data points, which is due to the time overhead in the scanning scheme. Details can be found in Supplementary Note 7.

Further rapid heating to 800 oC induces additional cracks. Figure 5m plots the volume fraction of cracks at each recorded time. The trend reveals that the particle crack volume fraction depends more on the heating rate than the temperature itself. The whole track of morphology evolution at all temperatures is recorded in Supplementary Note 5 and Supplementary Fig. S4, S5. We postulate that a large heating rate generates a significant temperature gradient inside the particle, thus inducing considerable stress and strains and resulting in crack formation and growth. Once the temperature stabilizes (constant temperature annealing), cracks can be partially healed, possibly due to the mass diffusion at elevated temperature, which has been widely observed in other material systems61. To the best of our knowledge, this is the first time we visualize the 3D dynamic change of a particle morphology at such a high spatial (~40 nm) and temporal resolution (12 s). This high spatial and temporal resolution combination will benefit many research areas.

Conclusion

In summary, we discuss the underlying physical limits that induce the blurring and noise artifacts in a fly-scan tomography. Based on the discussion, we have proposed a machine learning-based method that provides the keys to improving the reconstruction quality. Utilizing this ML methodology, we have enabled an ultrafast nano-tomography realized in TXM. The pixel resolution is 40 nm, and the temporal resolution is improved to a few seconds, which is about one order of magnitude faster than the state-of-the-art measurements. Technically, we find the machine learning model is robust to an extensive range of data types for both synthetic and experimental data. Applying the method, we are able to monitor the structure evolution at a 12-seconds time scale in an in-situ heating experiment. We identify the heating rate playing a critical role in the crack formation in a lithium-ion battery cathode material during the sintering process, which provides critical insights into the material synthesis and would inspire future study in fine-tuning the structure to achieve ever better functional properties. We would also like to emphasize that the application of the proposed method is not limited to TXM. The described method in realizing fast fly-scan applies to all other tomography measurements using different signals. We expect broad applications in many other areas; it will significantly benefit the medical imaging community by shortening the examining time and dramatically reducing the X-ray dose.

Methods

Loss function used in ML

To achieve a better performance, we have incorporated several loss functions in our model, which include (1) Mean Absolute Error (MAE), (2) Mean Squared Error (MSE), (3) VGG feature loss. The overall loss function is thus a combination of the above-mentioned losses, with different weighting factors, which can be tuned for the best performance. Generally, we adjusted the weighting factors so that all the loss terms are in the same or similar order of magnitude for their numerical value.

$$L={\lambda }_{{{{{{\rm{MAE}}}}}}}\cdot {L}_{{{{{{{\rm{MAE}}}}}}}}+{\lambda }_{{{{{{{\rm{MSE}}}}}}}}\cdot {L}_{{{{{{{\rm{MSE}}}}}}}}+{\lambda }_{{{{{{{\rm{feat}}}}}}}}\cdot {L}_{{{{{{{\rm{feat}}}}}}}}$$

ML Implementation and Training

The whole workflow is implemented with Python, and the ML-based correction model is implemented within the framework of PyTorch62. The training was performed with one Nvidia Quadro GTX 8000 graphic card, and it finished in about 24 h for 300 epochs training. To evaluate the performance in our training and validation procedures, we have used root mean squared error (RMSE), peak signal-noise ratio (PSNR), and structural similarity index measurement (SSIM) as metrics to measure the similarity between the corrected tomogram and the ground truth tomogram. PSNR is a metric representing the similarity between two images, and a larger value means a better agreement. SSIM is a metric quantifying textural similarity. It falls into the range of [0, 1], where 0 means no similarity and 1 means two images are identical.

TXM data collection

The TXM experiment is carried out at the FXI beamline at NSLS-II at Brookhaven National Laboratory. FXI is equipped with a Fresnel Zone plate with 30 nm outmost zone width as the objective lens. Fly-scan data were taken at various rotation speed, i.e. 10 deg s−1, 20 deg s−1, 30 deg s−1, etc. The exposure time was set to 0.05 s or 0.04 s for individual projection image. The camera was set in the ‘free-run’ mode and its frame rate was ~20–25 frames per second.

In situ heating on NMC

An in-house designed furnace was mounted at beamline for in situ heating experiment. Fly-scan was taken at a rotation speed of 15 deg s−1 with 0.04 s exposure time. Projection images were taken when the sample was freely rotating from 0 to 900 deg, and then dark images and flat field images were taken after translating the sample out of the X-ray beam. We repeated this imaging process throughout the in-situ heating experiment.