Repository for automated nanoparticle analysis of Scanning Transmission Electron Microscopy (S/TEM) images using YOLOv8 and segment anything model (SAM). This material-agnostic ML workflow successfully detects and segments nanoparticles on different catalytic substrate materials.
Sets of object detection, segmentation, and NP analysis results from BF-TEM image of Pt NPs on graphite support (above) and HAADF STEM image of Ru NPs on Alumina support materials (below).
- Velox emd
Read Thermo Fisher Scientific Velox S/TEM image and metadata - Detector
Run YOLOv8 on the S/TEM images and generate box prompts
Segment nanoparticles using box prompts and SAM - SAM visualize
Visualize segmentation - Analysis
Particle size and area distribution
Install PyTorch
Install Ultralytics for YOLOv8
pip install ultralytics
Install Segment Anything Model (SAM)
https://github.com/facebookresearch/segment-anything
If you use this code in your research, please use the following DOI badge