afMLevel: Deep learning U-Net Models for Levelling Atomic Force Microscopy Images and Movies
- 1University of Leeds
Abstract
AFM experiments can now produce hundreds of frames per session and this rises to thousands in the case of video-rate high-speed AFM, but every image must still be levelled to remove tilt, bowing and line noise before it can be measured. Current automatic routines rely on user-chosen masks and parameters that work for some sample types but fail on others, so levelling often remains a manual, subjective bottleneck. Here, we present two U-Net models developed using machine learning for levelling AFM images without altering the sample topography. MLMask segments features so that they are excluded from conventional plane and line background fits, and MLBackground predicts the noise and artifact background directly, which is then subtracted. Both were trained on 2,001 experimental images from multiple instruments and sample types, using manually levelled images as ground truth. On 164 unseen images, MLMask routines brought 70-80% of images below a mean squared error of 0.1 relative to manual levelling, compared with 60-70% for the best multi-plane method, with a lower mean error (0.1-0.15 vs 0.15-0.3), and both models significantly outperformed fourteen classical routines (p < 0.01). Applied frame by frame, the models process 512x512 pixel HS-AFM movies at 4.7 frames.s-1. We provide afMLevel as an openly-available package for the use of other researchers. By removing the need to choose levelling parameters image by image, this package together with its models and paired training data, provides a foundation for automated AFM analysis pipelines.
Related
- Multivalent Adhesive Probe Atomic Force Microscopy (MAPA) for accessing dispersive adhesion of cells and biosurfaces.
- Microscale Characterization of Undecalcified Bone Tissue Using Correlative Atomic Force Microscopy and Histology
- DeLTA 3.0: A modern segmentation and tracking tool for microscopy images
- A method for correcting background non-uniformity while preserving specimen-level information in Fourier ptychographic microscopy images
- Deep learning-based analysis reveals patient-level cancer therapy trajectories using single-cell PBMC chromatin images
BibTeX
@misc{tekchandani2026afmlevel,
title = {{afMLevel: Deep learning U-Net Models for Levelling Atomic Force Microscopy Images and Movies}},
author = {M. Tekchandani and D. E. Rollins and M. Westerell and S. D. Evans and P. G. Adams and G. R. Heath},
howpublished = {bioRxiv},
year = {2026},
month = oct,
doi = {10.64898/2026.10.19.760138},
url = {https://www.biorxiv.org/content/10.64898/2026.10.19.760138v1},
note = {CC BY},
}
RIS
TY - UNPB
TI - afMLevel: Deep learning U-Net Models for Levelling Atomic Force Microscopy Images and Movies
AU - M. Tekchandani
AU - D. E. Rollins
AU - M. Westerell
AU - S. D. Evans
AU - P. G. Adams
AU - G. R. Heath
PY - 2026
DA - 2026/10/19
PB - bioRxiv
DO - 10.64898/2026.10.19.760138
UR - https://www.biorxiv.org/content/10.64898/2026.10.19.760138v1
AB - AFM experiments can now produce hundreds of frames per session and this rises to thousands in the case of video-rate high-speed AFM, but every image must still be levelled to remove tilt, bowing and line noise before it can be measured. Current automatic routines rely on user-chosen masks and parameters that work for some sample types but fail on others, so levelling often remains a manual, subjective bottleneck. Here, we present two U-Net models developed using machine learning for levelling AFM images without altering the sample topography. MLMask segments features so that they are excluded from conventional plane and line background fits, and MLBackground predicts the noise and artifact background directly, which is then subtracted. Both were trained on 2,001 experimental images from multiple instruments and sample types, using manually levelled images as ground truth. On 164 unseen images, MLMask routines brought 70-80% of images below a mean squared error of 0.1 relative to manual levelling, compared with 60-70% for the best multi-plane method, with a lower mean error (0.1-0.15 vs 0.15-0.3), and both models significantly outperformed fourteen classical routines (p < 0.01). Applied frame by frame, the models process 512x512 pixel HS-AFM movies at 4.7 frames.s-1. We provide afMLevel as an openly-available package for the use of other researchers. By removing the need to choose levelling parameters image by image, this package together with its models and paired training data, provides a foundation for automated AFM analysis pipelines.
ER -