AgTech · Computer vision

Grain classification

Lab-grade QC from a photo

Grain classification

An agtech company modernizing grain quality control for procurement, where corn and wheat change hands at collection points and price follows grade. Trades close in minutes; a lab result takes hours. Grading drifted from grader to grader, lab equipment did not travel, and the only hardware guaranteed on site was a phone camera. The system had to work from a single photo, taken in ordinary conditions by non-specialist staff, and stand up next to the lab.

Grading is a perception task. The input is a pile of kernels in a photo: touching, overlapping, half-shadowed, varying with variety and moisture. There is no rule to write for that, and fixed-threshold image processing breaks the moment lighting or crop changes. Counting and classifying kernels the way an expert grader does takes trained vision models, and getting those models trusted takes calibration against the graders themselves.

Grain quality control meant manual counting and visual grading: slow, inconsistent between graders, and impossible to scale across collection points. A lab result took hours; commerce happened in minutes.

We trained vision models to detect, classify and count differently colored kernels, corn and wheat, from a single photo taken in ordinary conditions. Class boundaries were calibrated against expert graders, and disputed samples routed to human review, tightening the models with every correction.

  • Kernel counts and classification from one photo in minutes, not lab hours
  • Counting accuracy at parity with manual lab counts on validation sets
  • Consistent grading across locations, ending grader-to-grader drift
  • Human review loop for disputed samples fed continuous improvement
  • Kernels touch and overlap in a real sample photo. Detection has to separate individuals before it can count, and every bad split moves the count.
  • Ordinary conditions means uncontrolled conditions: lighting, backgrounds, phone cameras and moisture all change how kernels look. Training data had to come from the field, not just the lab.
  • Ground truth was human judgment, and expert graders disagree at the class margins. Boundaries had to be calibrated against the graders before accuracy could even be scored.
  • Parity with the lab is an evaluation problem as much as a modeling one: hand-counted validation sets and a scoring protocol both sides accepted.
  • Disputed samples needed somewhere to go. The review loop had to resolve them at trading speed and feed every correction back into the models.
  • Data before models: labeled sample photos spanning varieties, seasons, lighting and cameras, and real hours from expert graders to calibrate the labels. Label quality sets the ceiling.
  • A timeline shaped as proof, then hardening: accuracy against expert counts shows up early on a validation set; robustness to field conditions is the longer half.
  • A small team that pairs vision engineers with your graders. Expert time is a genuine dependency, so schedule it like one.
  • A human review path from day one: disputed samples routed to people, corrections fed back into training. That loop is how accuracy and trust compound.
  • A plan for drift: new varieties, seasons and sites shift the data. Budget for monitoring and recalibration, not a one-time model.

Have a problem in this shape?

Tell us what you are trying to win. We will map your version of this build in one call.