
AI grading and quality control: the AgriAI Quality agent
The AgriAI Quality agent measures size, colour and defects of every fruit with computer vision and sorts it into the right grade, logging quality by batch.
Quality agent
Every fruit in the right grade.
What it does
- Measures size, colour and shape of every fruit with computer vision
- Spots defects: bruises, sunscald, rot, deformities
- Assigns grade and size class under marketing standards
- Sorts fruit automatically on the grading line
- Links defects to causes in the greenhouse and alerts the other agents
- Logs quality statistics by batch and customer
How it works, step by step
Fruit reaches the line with its source crate code Cameras photograph them from several sides and measure size and colour The model detects defects and assigns the grade The line sorts the fruit and the agent logs batch quality
Agronomic deep dive
The science behind the agent
Quality isn't created in the packhouse: it is measured. Size, colour and defects tell what happened in the greenhouse in the weeks before, and measuring them precisely helps both to sell better and to grow better.
The rules: marketing standards
In Europe sweet pepper has a specific marketing standard, in Implementing Regulation 543/2011: Extra, I and II classes, minimum requirements, tolerances and sizing. Customers' own specifications come on top.
The agent turns standards and specifications into measurable rules: diameter, weight, colour uniformity, defects allowed per class. That keeps grading the same every day, whoever is on shift.
Machine vision on the line
Machine vision for fruit and vegetables is a mature field: the review by Cubero and colleagues describes how colour and multispectral cameras with controlled lighting measure size, colour and external defects at high speed.
The hard part is small or ambiguous defects, like a light bruise or the start of rot. For those the agent uses several images of the same fruit and, if unsure, sends it for human inspection instead of guessing.
From defect to cause
Many defects have a cause in the greenhouse. Sunscald depends on radiation and shading; blossom-end rot is linked to calcium transport into the fruit, itself influenced by irrigation and humidity; cracking depends on swings in water supply.
Thanks to crate traceability, the Quality agent knows which zone and harvest day a defect comes from, and alerts the Climate and Fertigation agents. This is where the chain stops being a series of hand-offs and becomes a system that learns.
The parameters that matter
| Parameter | Reference | Why it matters |
|---|---|---|
| Commercial classes | Extra, I, II (EU Reg. 543/2011) | They set price and destination |
| Size | Diameter or weight per standard and spec | Uniform, compliant packs |
| Colour | Uniform, per commercial type | The buyer's first criterion |
| Allowed defects | Different tolerances per class | A defect out of tolerance downgrades the batch |
Reference values from the agronomic literature for soilless greenhouse vegetables: always calibrate them to crop, variety, stage and local climate.
The sensors it uses
What each one measures, where it goes and the detail that makes the difference. “Core” is needed to start, “Extra” adds precision. See the full list for all agents
- Grading line camerasCoreSize, colour, shape and defects of every fruit, from several sidesIn a booth with controlled lighting over the beltBooth lighting must be kept constant and calibrated with reference colour samples.
- Line scales and checkweighersCoreWeight of every fruit and every packOn the grading belt and at the packing exitA daily check with test weights avoids weight disputes.
- Barcode and QR readersCoreThe code of crates, batches and packs at every stepAt line entry, packing and dispatchEach scan is a link in traceability: miss one and the chain breaks.
The most common mistakes
- Uncontrolled line lighting: measured colour changes with the light
- Grading without a written spec: each shift decides its own way
- Rejecting without logging why: the cause information is lost
- Not calibrating cameras with reference samples
A measured defect is information for the greenhouse; a defect that is just rejected is simply a loss.
Studies and sources
The scientific research and trade press we build on. Links go to the original sources.
Frequently asked questions
Don't grading machines already exist?
Yes, machine vision for fruit and vegetable quality has been studied for decades. What the agent adds is linking each defect to its cause in the greenhouse, so the problem is fixed at the source.
Which rules does it follow for grades?
EU marketing standards for fruit and vegetables and your customers' specifications, which you can load as rules.
The other AgriAI agents
Nursery agentHealthy, even seedlings, from seed to transplant.
Transplant agentEvery seedling in the right place, at the right time.
Fertigation agentThe right water and nutrients, at the right time.
Climate agentThe greenhouse always in the ideal climate, with less energy.
Crop protection agentSpots problems before they become damage.
Harvest agentOnly ripe fruit, picked without damage.
Packing agentCorrect, traceable packs, from greenhouse to shelf.
Yield forecasting agentKnow how much you'll harvest, when, and at what cost.
Become a pilot farm
Free digital check-up: we look at systems, consumption and problems and tell you whether and where AgriAI can help.