ASAP (AFM simulation and analysis pipeline): a unified deep learning framework for simulation, quality control, and segmentation in atomic force microscopy
Abstract
Atomic force microscopy (AFM) provides nanoscale images and force–distance curves (FDCs), but increasingly large datasets make manual analysis a major bottleneck. Deep learning can automate feature extraction, quality control, and segmentation, yet its use in AFM is often limited by scarce ground-truth data and the technical effort required to construct robust learning pipelines. Here we present ASAP (AFM Simulation and Analysis Pipeline), an open-source Python framework that combines physics-based simulation and deep learning for AFM analysis. We illustrate the framework with three applications: (i) simulation of physically parameterized FDCs for training a neural network to estimate contact position and mechanical properties; (ii) unsupervised quality control using an autoencoder that learns the characteristic shape of acceptable FDCs and flags anomalous measurements; and (iii) simulation of AFM images of DNA with exact labels for training a segmentation model that transfers to experimental scans. These examples show how simulation, unsupervised learning, and modular deep-learning workflows can reduce dependence on manual annotation and provide a practical route toward reproducible AI-assisted AFM analysis.