The Stomatal Comprehensive Automated Neural Network (SCAN) is a deep learning-based software tool developed for the automated measurement of stomatal traits in Brassica napus (canola). SCAN integrates high-resolution digital microscopy with a YOLOv8-based machine learning pipeline to accurately quantify stomatal density, stomatal size, and pore area from leaf surface images. Designed with accessibility in mind, SCAN offers a portable, offline desktop application that requires no advanced programming knowledge, making it suitable for researchers in plant biology and field phenotyping. In addition to its high accuracy in canola, SCAN demonstrates generalizability across multiple plant species not included in its training dataset, including Arabidopsis, rice, wheat, and maize. By combining non-destructive imaging, real-time analysis, and minimal hardware requirements, SCAN supports high-throughput, field-deployable phenotyping of leaf stomatal traits.
Before installation, ensure the following tools are installed:
Install Miniconda appropriate for your operating system. After installation, initialize the shell:
- Windows:
Open Command Prompt / Anaconda Prompt (Miniconda3) and execute:conda init
- macOS/Linux:
Open a terminal and run:
~/miniconda3/bin/conda init bash ~/miniconda3/bin/conda init zsh
Ensure git is installed by downloading it from the official Git site.
In your Command Prompt or Anaconda Prompt, clone the SCAN repository and navigate to the directory:
git clone https://github.com/William-Yao0993/SCAN.git
cd SCANCreate the SCAN environment using the provided YAML file:
conda env create -f environment.yml-
Open Command Prompt from your computer
-
Ensure your working directory is the SCAN project folder:
cd SCAN -
Activate the SCAN environment:
conda activate SCANenv
-
Launch the application:
python -m main
Note: The first initialization may take 10–20 seconds depending on system performance.
Click Browse and choose the main folder containing your image dataset.
This will load your data into SCAN.
A popup message will confirm:
"Data Successfully Imported! Please Go to Run Section."
Here you can configure parameters for different species, such as:
- Aperture Step
- Confidence Threshold
- Scale Bar Length (Unit & Pixels)
Refer to the table for typical values by species.
SCAN will perform stomata detection, segmentation, and pore analysis.
Progress is shown in the status bar below.
You’ll receive a popup:
"Execution Completed. Please Start the Next Operation."
Switch to view:
- Detection Images
- Statistical Plots
- Raw Data Tables
Use the dropdown to switch folders, and arrow buttons to browse images.
Apply the display settings for the selected output type.
Select which outputs to save:
- Images
- Plots
- Excel Data
Exports your selected outputs.
A popup confirms the save location:
Files are stored in a subfolder named predict under your input directory.
| Species | Resolution | Magnification | Length1 | Unit1 | Length2 | Unit2 |
|---|---|---|---|---|---|---|
| Arabidopsis | 2560 X 1920 | 690.5±1 X | 0.05 | mm | 221 | pixel |
| Canola | 2560 X 1920 | 692±2 X | 0.05 | mm | 222 | pixel |
| Canola | 1280 X 960 | 691±2 X | 0.05 | mm | 112 | pixel |
| Maize | 2560 X 1920 | 413±1 X | 0.1 | mm | 269 | pixel |
| Tobacco | 2560 X 1920 | 690.5±1 X | 0.05 | mm | 221 | pixel |
| Panicum miliacecm | 2560 X 1920 | 413±1 X | 0.1 | mm | 269 | pixel |
| Rice | 2560 X 1920 | 413±2 X | 0.1 | mm | 267 | pixel |
| Rice | 2560 X 1920 | 413±1 X | 0.05 | mm | 227 | pixel |
| Wheat | 2560 X 1920 | 692±1 X | 0.05 | mm | 224 | pixel |
| Wheat | 2560 X 1920 | 412.5±1 X | 0.1 | mm | 267 | pixel |
Please refer to this repository for model weights and training parameters: https://github.com/William-Yao0993/FD_detection
If you use this project in your research or would like to reference the baseline results, please cite one of the following works:
- Lingtian Yao, Susanne von Caemmerer, Florence R Danila, SCAN: an automated phenotyping tool for real-time capture of leaf stomatal traits in canola, Journal of Experimental Botany, 2025;, eraf282, https://doi.org/10.1093/jxb/eraf282
@article{10.1093/jxb/eraf282,
author = {Yao, Lingtian and von Caemmerer, Susanne and Danila, Florence R},
title = {SCAN: an automated phenotyping tool for real-time capture of leaf stomatal traits in canola},
journal = {Journal of Experimental Botany},
pages = {eraf282},
year = {2025},
month = {06},
abstract = {Canola is an important economic and agronomic crop globally, but its yield is under threat due to climate change. Stomata are key breeding target because of their importance in carbon capture and water use efficiency. However, screening for elite stomatal traits could be laborious and time-consuming. We developed a new toolkit called Stomatal Comprehensive Automated Neural Network or SCAN that combines the use of high-resolution portable digital microscopy with machine learning to automate stomatal trait phenotyping in canola. We show that SCAN can rapidly measure stomatal density, size and pore area in canola at 97\% to 99\% accuracy, and capture real-time stomatal pore status that strongly correlated with leaf porometer measurement in canola. Here we use SCAN to investigate how leaf stomatal traits vary through a canopy in different ecotypes of canola grown in the field and glasshouse conditions. SCAN revealed that stomatal density in canola decreases in more expanded leaves with abaxial surface having up to 40\% more stomata that are 2x more open than the adaxial surface. SCAN also showed that patterns of stomatal traits in canola vary between leaf position in the canopy and change with environment in an ecotype-dependent manner.},
issn = {0022-0957},
doi = {10.1093/jxb/eraf282},
url = {https://doi.org/10.1093/jxb/eraf282},
eprint = {https://academic.oup.com/jxb/advance-article-pdf/doi/10.1093/jxb/eraf282/63585749/eraf282.pdf},
}