Fully automated analysis technique for nanospheres and pore density in scanning electron microscopy images based on deep learning
Abstract
Accurate quantification of microspheres and pores in Scanning Electron Microscopy (SEM) images is an important subject in fields such as materials science and biomedicine. Traditional image processing methods suffer from low efficiency, poor robustness, and difficulty in handling overlapping targets and complex morphologies. In this study, we propose and implement an end-to-end, multi-task fused deep learning analysis system to address these challenges. The core of the system adopts an improved U-Net architecture integrated with the Convolutional Block Attention Module (CBAM) to achieve three-class semantic segmentation of background, microspheres, and pores. By fusing cross-entropy and Dice loss in the loss function and introducing a multi-scale inference strategy, the model's recognition accuracy for small targets and boundaries is significantly improved. After segmentation, the system automatically extracts and quantifies dozens of morphological parameters such as size, shape (circularity, eccentricity, aspect ratio), and spatial distribution of particles and pores through a refined post-processing pipeline, and integrates an intelligent shape classifier based on rules and machine learning (e.g., Random Forest). In addition, this study develops an interactive Web interface based on Streamlit, providing a one-step solution from image upload and automatic analysis to visualization report generation. The results indicate that the system achieves a mean Intersection over Union (mIoU) of 77.14% on the self-built dataset, which can be further improved to 78.56% through multi-scale inference. Its quantitative analysis results are highly consistent with manual measurements (Pearson correlation coefficient r > 0.98), and the single-image analysis efficiency is improved from 15-30 minutes of traditional manual work to less than 1 second (with GPU acceleration). This work provides a powerful automated tool for material microstructural characterization and foundation for subsequent research such as three-dimensional analysis and cross modular design.