Electroluminescence (EL) imaging is a powerful nondestructive technique for evaluating carrier recombination and defect-related luminescence quenching in nanoengineered photovoltaic devices. However, automated classification of nanoscale and microscale defects in EL images remains challenging due to limited spatial resolution in deep features, class imbalance, and the inability of conventional convolutional networks to capture long-range carrier transport anomalies. Here, we propose Swin CBAM, a hybrid attention-driven architecture that integrates a hierarchical Swin Transformer with Convolutional Block Attention Modules (CBAM) to classify defects in EL images of crystalline silicon solar cells. The shifted window self-attention mechanism models spatially extended recombination regions, while CBAM sequentially refines channel-wise and spatial feature maps to emphasize defect-relevant optoelectronic signatures. To address the inherent class imbalance between defective and non-defective cells, we employ Focal Loss ( γ = 20) combined with physicsmotivated data augmentation. Evaluated on the public ELPV benchmark dataset (2, 624 EL images), our method achieves 95.24% classification accuracy, outperforming ResNet18 (87.05%), VGG16 (88.40%), and Vision Transformer ViT-B/16 (88.95%). Ablation studies show CBAM contributes the largest individual gain (+2.28%). With 29.12 million parameters and 8.5 ms inference time, the model balances optoelectronic feature discrimination and computational efficiency. These results demonstrate that transformer-based attention refinement effectively captures multiscale luminescence contrast mechanisms, offering a robust pathway for automated quality control in nanoelectronics and optoelectronic device manufacturing.
Jiaxin Huang (Thu,) studied this question.