AgriTech · Computer Vision · ML
AgSolaire — seed weight estimation
A non-invasive pipeline that weighs seed groups from a single high-resolution image — YOLOv5 detection, SAM2 segmentation, and nine morphological features feeding an XGBoost regressor.
The challenge
Weighing without a scale
Seed-group weight had to be estimated non-invasively and automatically, from images alone.
Pixels don't weigh anything
Visual features strongly correlated with physical mass had to be found, measured, and validated.
Dozens of tiny subjects
Each frame holds a cluster of small seeds that must be isolated individually before measuring.
The approach
YOLOv5 seed detection
Per-seed bounding boxes at 99.8% precision and 98.9% recall — each box becomes an ROI.
SAM2 segmentation
Meta's SAM2 returns a pixel-accurate mask per seed — no task-specific training required.
Morphological features
Nine descriptors per seed — area, perimeter, length, width, circularity, elongation, IS, CG, DS — averaged per group.
XGBoost regression
The feature vector maps to predicted group weight, trained on samples with known weights.
Outcomes
Detection mAP@0.5
YOLOv5 — 99.8% precision, 98.9% recall on seeds.
Morphology engine
Geometric descriptors computed from SAM2 masks.
Within ±0.1 tolerance
139 of 201 test samples — MSE 0.0095.