Lithium Metal Battery Quality Control via Transformer-CNN Segmentation

Jerome Quenum, Iryna V. Zenyuk, Daniela Ushizima · DOI

Abstract

Lithium metal battery (LMB) has the potential to be the next-generation battery system because of its high theoretical energy density. However, defects known as dendrites are formed by heterogeneous lithium (Li) plating, which hinders the development and utilization of LMBs. Non-destructive techniques to observe the dendrite morphology often use X-ray computed tomography (XCT) to provide cross-sectional views. To retrieve three-dimensional structures inside a battery, image segmentation becomes essential to quantitatively analyze XCT images. This work proposes a new semantic segmentation approach using a transformer-based neural network called TransforCNN that is capable of segmenting out dendrites from XCT data. In addition, we compare the performance of the proposed TransforCNN with three other algorithms, such as U-Net, Y-Net, and E-Net, consisting of an Ensemble Network model for XCT analysis. Our results show the advantages of using TransforCNN when evaluating over-segmentation metrics, such as mean Intersection over Union (mIoU) and mean Dice Similarity Coefficient (mDSC) as well as through several qualitatively comparative visualizations.

Introduction

Lithium metal batteries (LMBs) are often considered the "holy grail" of energy storage due to their high theoretical energy density. However, their commercialization is significantly hindered by the formation of lithium dendrites—needle-like or tree-like structures that grow during the charging process. These dendrites can penetrate the battery's separator, leading to internal short circuits, thermal runaway, and the formation of "dead lithium," which drastically reduces battery life.

Schematic of a lithium metal battery during charging and discharging cycles, illustrating the movement of Li+ ions and electrons across different planes.

To mitigate these risks, researchers employ non-destructive diagnostic techniques like X-ray computed tomography (XCT) to visualize the internal structure of the battery. However, lithium is a low-atomic-number element with low X-ray attenuation, making it difficult to distinguish from the background in XCT scans. Furthermore, the complex, porous morphology of dendrites makes manual segmentation labor-intensive and traditional thresholding methods inaccurate. This paper introduces TransforCNN, a hybrid neural network designed to automate and improve the accuracy of dendrite segmentation in XCT data.

Methodology: The TransforCNN Architecture

The proposed TransforCNN architecture leverages the strengths of both Transformers and Convolutional Neural Networks (CNNs) to achieve high-fidelity semantic segmentation.

  1. Transformer Encoder: Based on the Vision Transformer (ViT) architecture, the encoder divides the input image into patches and applies self-attention mechanisms. This allows the model to capture long-range dependencies and global context, which is crucial for distinguishing sparse dendrites from background noise and artifacts.
  2. CNN Decoder: While Transformers excel at global context, they often struggle with fine-grained spatial details. To address this, a CNN-based decoder is used to reconstruct the segmented image, ensuring precise pixel-level boundaries for the detected dendrites.

The performance of TransforCNN was benchmarked against standard architectures, including U-Net, Y-Net, and an ensemble model (E-Net) that combines multiple predictions.

Datasets and Experimental Setup

The study utilized high-resolution 3D data obtained via synchrotron-based hard X-ray computed tomography at the Advanced Photon Source (Argonne National Laboratory). The samples consisted of Li–polymer–Li symmetric cells.

XCT cross-sections of the battery in the x-y, y-z, and x-z planes, highlighting the dendrite structures, membrane, and lithium metal layers.

The raw XCT reconstructions were massive, typically around 4000 x 2500 x 2500 voxels. For training and validation, the researchers extracted and hand-labeled slices, which were then subdivided into 4,433 patches (128x128 pixels). This dataset provided a rigorous ground truth for evaluating the segmentation models.

Results and Discussion

TransforCNN demonstrated superior performance across key quantitative metrics. It achieved a mean Intersection over Union (mIoU) of 0.9511 and a mean Dice Similarity Coefficient (mDSC) of 0.9647. In contrast, the widely used U-Net architecture scored significantly lower, with an mIoU of 0.8698.

Qualitative analysis revealed that TransforCNN is more faithful to the ground truth than CNN-only models. While U-Net sometimes "hallucinated" connections or filled in gaps incorrectly, the Transformer-based encoder's global attention allowed TransforCNN to better handle the irregular, non-repeating patterns characteristic of porous lithium dendrites. In terms of efficiency, TransforCNN (206ms per patch) represents a balanced trade-off between the speed of U-Net (65ms) and the accuracy of the much slower Ensemble model (450ms).

Conclusion

This work presents TransforCNN as a powerful tool for the quantitative analysis of lithium dendrites in LMBs. By combining the global context of Transformers with the local precision of CNNs, the model overcomes the inherent difficulties of segmenting low-contrast XCT data. Future work will focus on optimizing the model's latency for real-time monitoring and extending its capabilities to multi-class segmentation, including the detection of corrosion pits and gas bubbles within the battery structure.

Summary updated

BibTeX
@article{quenum2023lithium,
  author = {Jerome Quenum and Iryna V. Zenyuk and Daniela Ushizima},
  title = {{Lithium Metal Battery Quality Control via Transformer-CNN Segmentation}},
  journal = {J. Imaging},
  year = {2023},
  doi = {10.3390/jimaging9060111},
}
Figure