AI toolkit turns microscopy images into multi-feature microstructure datasets
GrainBot is an AI-enabled toolkit built to do one job well: turn complex microscopy images into clean, quantitative microstructure data. Developed at The Hong Kong University of Science and Technology and published in Matter, it automates segmentation, measurement, and correlation analysis, so labs can move from visual inspection to structured datasets at scale. Paper DOI: 10.1016/j.matt.2025.102626
The bottleneck: microstructure quantification
Modern microscopy is rich in information, but extracting that information consistently is the hard part. Most workflows stop at detecting basic features or classifying images, which leaves critical interactions between microstructural parameters on the table. That gap slows progress on structure-property studies and delays materials optimization.
What GrainBot does
GrainBot provides an integrated pipeline: a convolutional neural network handles grain-level segmentation, then custom algorithms quantify grain surface area, grain-boundary groove geometry, and volumes of surface concavities or convex ridges. On top of that, it runs correlation analysis across descriptors, turning each image into a multi-feature record ready for statistics and modeling.
The value is standardization. Instead of scattered, qualitative notes, you get large, consistent datasets that can be shared, reproduced, and re-analyzed. That's the foundation you need for reliable comparisons across batches, labs, and process conditions.
Validation on perovskite thin films
The team tested GrainBot on metal halide perovskite thin films-key materials in high-efficiency solar cells. Using AFM images spanning diverse bottom surface morphologies, they built a database with thousands of individual grains, each tagged with multiple microstructural parameters.
Statistical analysis exposed broad distribution patterns and relationships among grain size, groove geometry, and surface roughness that were previously hard to quantify. They also trained gradient-boosted decision tree models and used feature-importance profiles and partial dependence plots to see how variables such as grain surface area and groove angle jointly influence concavity depth or ridge height.
Why this matters for your lab
- Standardize microstructure metrics across experiments and operators.
- Build shareable datasets that support meta-analysis and cross-lab benchmarking.
- Reduce subjective bias in segmentation and measurement; improve reproducibility.
- Enable closed-loop research by feeding clean descriptors into design and optimization tools.
- Target stability questions in perovskites using groove, concavity, and ridge metrics.
Perspective from the team
"GrainBot shows how AI can convert complex microscopy images into structured, reproducible datasets that are easy to share and integrate into larger research platforms," said Prof. Guo Yike. Prof. Zhou Yuanyuan added, "Our goal is to lower the barrier for bringing microscopy into data-driven studies and autonomous laboratory platforms. The framework is adaptable across perovskite compositions and processing conditions, and it doesn't require specialized coding or machine-learning expertise."
Practical steps to get value fast
- Start with microscopy modes that clearly capture grains and boundaries (e.g., AFM for thin films).
- Define the descriptors that map to your hypotheses-groove angle vs. stability, surface area vs. roughness, etc.
- Log processing conditions and composition alongside GrainBot outputs to preserve context.
- Use correlation analysis and interpretable ML (feature importance, partial dependence) to rank which features matter most before committing to long test matrices.
- Compare descriptor distributions across batches and time to catch drift early.
Beyond perovskites
GrainBot's framework extends to other polycrystalline thin films. The team plans to connect it with additional characterization techniques and probe direct links between microstructure, device performance, and long-term stability. The aim is a seamless path from images to decisions in autonomous research environments.
Citation
Yalan Zhang et al., "GrainBot: Quantifying multi-variable microstructure disorder in materials," Matter (2026). https://doi.org/10.1016/j.matt.2025.102626
For more on applying AI to scientific workflows, see AI for Science & Research.
Your membership also unlocks: