A research team has demonstrated that combining domestic flatbed document scanners with machine learning algorithms can rapidly identify individual wildflower seed species and detect novel varieties in commercial mixtures. Driven by sustained demand for native plant seeds in habitat restoration and biodiversity initiatives, commercial suppliers increasingly rely on farmed cultivation because wild harvesting cannot satisfy market volumes. However, repeated cultivation risks altering the genetic and phenotypic integrity of native seed stocks through founder effects and unintended selective pressures. Verifying the composition and quality of these native seed products has historically demanded specialized botanical expertise to distinguish seeds based on minute differences in shape, color, and size. Because the native seed market lacks the rigorous statutory oversight common in arable crop systems, practitioners frequently encounter inconsistent labeling and variable species blends. To overcome these logistical barriers, the researchers developed an accessible, automated imaging and classification framework capable of handling both known species and previously uncataloged seeds without relying on expensive optical hardware.
Rather than deploying costly single-lens reflex camera rigs, customized photography boxes, or smartphone setups that introduce geometric distortions and fluctuating illumination, the investigators captured seed images using a standard Canon LiDE 300 flatbed document scanner operating at an optical resolution of 600 pixels per inch. Seeds from the ten most commonly traded native wildflower species in the United Kingdom were acquired across five commercial suppliers per species to incorporate realistic provenance variation. Each sample was manually checked for contamination and evenly dispersed across the scanner glass while avoiding touching clusters, with perimeter masking tape preventing seeds from sliding into internal seams. Across 147 separate scans, the protocol amassed high-resolution digital representations of 145,771 individual seeds. By maintaining a uniform scanning distance and constant lighting angle across every acquisition, this flatbed approach eliminated shadows, lens aberration, and operator inconsistencies, yielding an inexpensive and easily standardized image acquisition method suitable for non-specialist facilities.
To convert raw visual scans into standardized training material, the team implemented and compared two distinct image segmentation methodologies. The first pipeline employed classic image processing within ImageJ, using a custom macro adapted from the SeedsAnalyser tool to locate particles against a neutral white background, correct glare artifacts through edge dilation, and extract binary masks. From these regions of interest, the researchers tabulated 64 numerical measurements encompassing 32 morphological traits, 16 texture descriptors, and 16 color intensity values per seed, while an automated R script filtered out dirt particles and overlapping clusters using quartile thresholds. In parallel, the researchers designed an artificial intelligence pipeline utilizing the pre-trained deep neural network Cellpose version 4, which predicts object boundaries by calculating spatial flow fields across RGB arrays. Although Cellpose delivered visibly crisper and more accurate boundary masks than traditional thresholding routines, it required approximately 300 seconds per scan compared to roughly 30 seconds for the non-AI OpenCV script, establishing an initial design trade-off between segmentation precision and processing speed.
Exploratory dimensionality reduction confirmed that the 64 numerical descriptors extracted through ImageJ captured robust taxonomic distinctions among the wildflower taxa. Principal component analysis indicated that the first three components accounted for 62.00 percent of the total variance, with loadings cleanly segregating by trait category: morphological features dominated the first component at 32.59 percent, color metrics defined the second at 21.79 percent, and texture values explained the third at 7.62 percent. Linear discriminant analysis achieved even sharper class separation across 145,771 instances, with the first three linear discriminants capturing 74.74 percent of variance and providing an internal cross-validation macro-F1 score of 0.92 prior to any hyperparameter optimization or class balancing. To verify dataset sufficiency, the authors evaluated XGBoost models across subsets varying from one to five commercial provenances and sample sizes between 200 and 2,000 seeds per species. Prediction accuracy climbed steadily with increasing seed counts and supplier diversity before plateauing above 1,000 seeds per species and three suppliers, demonstrating that multi-source training datasets effectively absorb intraspecific phenotypic variation.
Evaluating 20 classification models trained on tabulated morphological, textural, and color data revealed competitive performances across multiple algorithmic architectures. Models from Scikit-learn, AutoXAI4Omics, and AutoGluon were evaluated using an 80 percent stratified training split of 116,617 seeds and a held-out 20 percent test set comprising 29,154 seeds. AutoGluon’s FastAI neural network and stacked weighted ensembles achieved leading closed-set macro-F1 scores of 0.970, with precision and recall values around 0.971 and 0.969. Simultaneously, standard machine learning classifiers implemented in Scikit-learn operated with minimal latency while performing at comparable levels: histogram-based gradient boosting attained a macro-F1 of 0.961, multi-layer perceptrons reached 0.960, and Scikit-learn XGBoost scored 0.958. Independent supplier-held-out tests confirmed that these high scores were not artifacts of supplier overlap between sets, as top tabular models maintained macro-F1 scores between 0.92 and 0.94 when classifying seeds from entirely excluded commercial vendors.
When applying deep learning directly to cropped single-seed images, segmentation fidelity emerged as the decisive factor governing convolutional neural network performance. The researchers evaluated three pre-trained architectures—ResNet-50, InceptionV3, and MobileNetV3—on preliminary subsets of 700 images per class, where ResNet-50 attained the highest initial macro-F1 score of 0.84. Subsequent fine-tuning of ResNet-50 across more than 34,000 images per dataset involved class-weighted sampling, data augmentations including horizontal flips and color jittering, and progressive unfreezing of deep convolutional layers over 100 epochs using the AdamW optimizer. When trained on seed cutouts derived from the basic OpenCV segmentation, ResNet-50 converged slowly and reached a macro-F1 of 0.893, exhibiting elevated loss and signs of data noise. Conversely, training ResNet-50 on clean cutouts generated by Cellpose yielded rapid loss reduction, higher generalization, and an overall macro-F1 score of 0.989, outperforming all tabular methods but requiring significantly higher computational resources.
Real-world ecological restoration mixtures rarely represent closed systems, as commercial blends frequently contain unscheduled species, agricultural variants, or weed contaminants that are absent from training catalogs. To evaluate this open-set challenge, the authors assembled mock seed mixes combining equal numbers of known species seeds with seeds from eight novel wildflower taxa, including Centaurea cyanus, Echium vulgare, Glebionis segetum, Medicago lupulina, Plantago lanceolata, Primula veris, Rhinanthus minor, and Silene dioica. In the absence of confidence calibration, every evaluated closed-set model forced the novel seeds into existing taxonomic categories, causing widespread misclassifications and precipitous drops in macro-F1 scores across all platforms. Because land stewardship metrics like the statutory biodiversity metric and UKHab create economic incentives for specific species presence, uncalibrated automated systems risk delivering false verifications when auditing commercial lots containing unmodeled companion flora.
To solve the open-set classification problem, the researchers introduced tunable decision thresholds, assigning a seed image to a target species only when the model’s highest predicted probability exceeded a designated cutoff, and labeling it as unclassified otherwise. Threshold optimization across incremental steps revealed sharp differences in behavior among model families: gradient-boosted trees fluctuated near extreme thresholds of 0.95 due to steep exponential loss functions, whereas tree-averaging random forests maintained smooth, stable decision boundaries with an optimal threshold at 0.80. Under thresholding, the Scikit-learn random forest emerged as the top-performing open-set architecture, achieving an outstanding macro-F1 score of 0.908 alongside 0.882 precision and 0.945 recall. AutoGluon’s FastAI neural network also handled open sets effectively with a macro-F1 of 0.855. In contrast, the image-based ResNet-50 struggled severely in open-set trials, yielding macro-F1 scores between 0.601 and 0.647 even at a 0.99 threshold because the network continually forced unknown seeds into familiar taxonomic bins.
Significant variation in species-level identification accuracy highlighted that physical seed characteristics strongly influence automated detection pipelines. Species displaying brittle or irregular seed structures, such as Daucus carota, exhibited broad morphological dispersions in principal component projections and proved notably difficult to classify consistently. Similarly, seeds with translucent or glossy surfaces, including Centaurea nigra and Achillea millefolium, occasionally introduced glare artifacts that compromised image thresholding and corrupted extracted shape measurements. These segmentation sensitivities carried directly into downstream neural network classifications, where error rates were driven primarily by boundary extraction quality rather than classifier architecture. The findings suggest that future iterations of botanical computer vision pipelines will benefit from specialized preprocessing routines, customized data augmentation, or species-tailored segmentation parameters designed specifically for challenging seed textures.
The study concludes that no single computational architecture addresses every dimension of automated wildflower seed classification, necessitating a strategic choice based on accuracy requirements, hardware availability, and sample composition. When analyzing strictly defined closed inventories where computational power is abundant, pairing Cellpose segmentation with a fine-tuned ResNet-50 achieves near-perfect classification from raw images. However, for everyday commercial seed auditing, quality control pipelines, and open-set monitoring where unexpected species are common, extracting 64 tabulated features and deploying an ensemble random forest classifier provides superior robustness, transparent calibration, and dramatically lower computational overhead. By confirming that high classification accuracy can be achieved using affordable domestic document scanners, this research offers an accessible, scalable framework to verify native seed supply chains, detect contaminants, and support long-term ecological restoration fidelity.
Subject of Research: Automated image analysis and machine learning for wildflower seed classification
Article Title: Integrating machine learning, deep learning, and image analysis for seed species classification
Article References: Ashworth, J., Barrett, E., Haque, R., Wildey, B., Hall, A., Shaw, F., & De Vega, J. J. (2026). Integrating machine learning, deep learning, and image analysis for seed species classification. Applications in Plant Sciences, 14(5), Article e70072. https://doi.org/10.1002/aps3.70072
Image Credits: AI Generated
DOI: 10.1002/aps3.70072
Keywords: Wildflower Seeds, Seed Classification, Machine Learning, Deep Learning, ResNet-50, Cellpose, ImageJ, Open-Set Classification, Random Forest, Computer Vision, Feature Extraction, Image Segmentation, AutoGluon, Ecological Restoration, Flatbed Scanners, Tabular Features, XGBoost
News Source: Blake Davidson. (November 23, 2026). Flatbed Scanners and Machine Learning Accurately Classify Wildflower Seed Species. Scienmag.



