A research team from The Hong Kong University of Science and Technology (HKUST) has introduced GrainBot, an innovative AI-enabled toolkit designed to automate the extraction and quantification of microstructural features from microscopy images. This development aims to address the increasing demand for data-driven and autonomous workflows in materials science, significantly enhancing the efficiency of research in this field.
GrainBot provides a systematic approach for transforming complex image data into quantitative information, thereby expediting the discovery and development of next-generation materials. The challenge of quantifying microstructure has long persisted across various branches of materials science and engineering. While advanced microscopy techniques can produce highly detailed images, analyzing the data consistently and at scale has proven difficult. Traditional methods often focus on identifying simple features or classifying images, which limits insights into the interactions between different microstructural parameters.
To tackle this issue, the team, led by Prof. ZHOU Yuanyuan, Associate Professor in the Department of Chemical and Biological Engineering at HKUST, developed GrainBot as an integrated solution that includes segmentation, feature measurement, and correlation analysis. The toolkit employs a convolutional neural network for precise grain segmentation and utilizes custom algorithms to measure grain surface area, grain-boundary groove geometry, and surface concavity or convexity volumes.
By converting microscopy images into a comprehensive set of numerical descriptors, GrainBot allows researchers to establish large-scale, standardized microstructure databases, moving beyond reliance on qualitative observations. The capabilities of GrainBot were validated in the context of metal halide perovskite thin films, materials essential for high-efficiency solar cells.
Using atomic force microscopy (AFM) images, the team constructed a database featuring thousands of individual grains, each annotated with various microstructural parameters. This extensive dataset enabled statistical analyses that revealed distribution patterns and relationships among features such as grain size, groove geometry, and surface roughness.
In addition to statistical evaluation, the research incorporated interpretable machine-learning models to explore the interactions between different microstructural features. By training gradient-boosted decision tree models on selected grain descriptors and utilizing interpretation tools like feature importance profiles and partial dependence plots, the team examined how parameters such as grain surface area and grain-boundary groove angle influence surface concavity depth and ridge height.
Prof. GUO Yike, Provost and Chair Professor in the Department of Computer Science and Engineering and the Department of Electronic and Computer Engineering at HKUST, emphasized the broader implications of this research for future scientific infrastructures driven by AI. He stated, “GrainBot illustrates how AI can transform complex microscopy images into structured, reproducible datasets that can be readily shared, re-analyzed, and integrated into larger research platforms.”
As scientific workflows evolve to become more automated and data-centric, tools like GrainBot will serve as vital components in future autonomous laboratories, providing standardized microstructure metrics that facilitate informed decision-making in materials discovery and optimization.
Prof. Zhou further highlighted the toolkit’s role in supporting researchers who need reliable, quantitative descriptors of microstructure. “Our goal is to lower the barrier for integrating microscopy characterization into data-driven studies and autonomous laboratory platforms. By offering a unified framework adaptable to different perovskite compositions and processing conditions, GrainBot makes microstructure quantification more accessible—even for those without specialized coding or machine-learning expertise.”
Beyond its application in perovskites, GrainBot presents a strategic framework for microstructure analysis in other polycrystalline thin films. The research team plans to enhance GrainBot by integrating it with various characterization techniques and investigating direct correlations between microstructure and device longevity. The study, titled “GrainBot: Quantifying Multi-Variable Microstructure Disorder in Materials,” has been published in Matter, a leading journal from Cell Press.


































