Related Experiment Video
Updated: Aug 29, 2026

A Machine-Vision Approach to Transmission Electron Microscopy Workflows, Results Analysis and Data Management
Published on: June 23, 2023
AutoSPy: A software of automated image processing for time-lapse scanning tunneling microscopy
Hao Hu1, Bowen Zhu1, Yangsheng Li1,2
1School of Physical Science and Technology, Shanghai Key Laboratory of High-Resolution Electron Microscopy, ShanghaiTech University, Shanghai 201210, China.
Abstract:
Time-lapse scanning tunneling microscopy (STM) captures how surface structures evolve in real time, but extracting quantitative kinetics from the resulting image series is hampered by drifts and the labor of frame-by-frame processing. We present AutoSPy, a modular software package that automates the conversion of raw time-lapse STM image stacks into analyzable time-series measurements. AutoSPy aligns consecutive frames using scale-invariant feature transform feature matching with RANSAC-based outlier rejection and an affine registration model, correcting not only translational drift but also drift-induced rotation and anisotropic distortion. An adaptive flattening routine combining Sobel gradient detection, Otsu thresholding, region growing, and least-squares plane fitting standardizes background subtraction across large datasets. For analysis, it integrates the Segment Anything Model 2 to segment and track user-selected features across registered frames, yielding trajectories, displacement statistics, and time-dependent area changes for clusters and vacancies with minimal manual input. AutoSPy, thus, provides a generalizable toolkit for quantitative studies of dynamic surface evolution and kinetics under working conditions.

