A Jordanian agricultural producer was grading dates by hand on a production line. Quality varied by worker, by shift and by how tired people were. Too much good fruit was being rejected, and the line could only move as fast as the inspectors.
We built a computer vision system that grades each date by ripeness, surface defect and size as it moves down the conveyor, and sends the sort decision straight to the line.
The problem
- The same fruit got different grades from different workers.
- Throughput was capped by how fast people could inspect.
- Borderline fruit was often rejected when it didn't need to be, and that cost revenue.
- There was no record of defects over time. No data, so no trends.
What we built
Image capture
An industrial camera array sits above the conveyor belt. A controlled lighting rig removes the shadow variation you get across a production floor.
A calibration step accounts for the different date varieties the line handles: Medjool, Ajwa and Sukkari.
The model
We trained a custom classification model on about 40,000 labeled date images. For each fruit it returns three outputs at once:
| Output | Classes |
|---|---|
| Ripeness stage | 5 |
| Defect type | 8 |
| Size band | S, M, L, XL |
Inference runs at conveyor speed, under 80 ms per fruit.
Data collection and labeling
We ran a structured labeling sprint with domain experts from the client's QC team. Their judgment is what the model learned from.
We also built a lightweight annotation tool so the client's team can keep growing the dataset after we leave. To make the model hold up on the line, we added synthetic augmentation: rotation, lighting changes and partial occlusion.
Integration and output
- PLC integration. The system sends sort signals directly to the mechanical diverter on the line.
- Dashboard. Live defect rate, ripeness distribution and throughput, per shift.
- Alerts. A flag goes up when the defect rate spikes above a set threshold.
Results
| Metric | Result |
|---|---|
| Throughput | Up 40% compared with manual inspection |
| Grading consistency | Agreement rose from about 74% between human graders to 97%+ for the model |
| Reject rate | Down 18%, from more precise grading of borderline fruit |
| Defect data | Daily defect patterns the client never had before |
The consistency gain is the quiet one. A grade now means the same thing on every shift.
The client's name is withheld under NDA. The system is in production in Jordan.
