Unit counting per tray in nuts with AI — the half-empty tray ships like the full one, and the customer notices.

In bulk, the scale reads the right weight even when the tray is badly distributed, and the operator's eye cannot keep up with 30 trays a minute. iLEAN Vision reads the whole tray, detects the ones below the standard visual fill and holds the tray before the lot is closed. The person signs off.

← See all iLEAN Vision solutions

Nut packing line with an overhead iLEAN Vision camera over the bulk tray, operator supervising — counting and fill control with AI
The problem

The right weight does not guarantee the right tray.

In a bulk nut plant, the tray passes over the scale, is closed and palletised for distribution. Between dosing and closure there are seconds. And in those seconds three things can slip through unnoticed:

  1. Uneven distribution. The tray weighs what it should but has a visible gap in one corner. The end customer opens it and sees a half-empty tray. They file a claim.
  2. Calibre mixing. In mixed references (almond/walnut) or selected calibre (XL pistachio), a supplier deviation changes the look of the tray. The scale cannot see the visual difference.
  3. Foreign body on the surface. A shell splinter, a piece of plastic from the inbound big bag. X-ray detection comes late and is expensive; human visual inspection does not scale.

The packing manager knows this, but cannot watch 30 trays a minute for 8 hours with the same sharpness. The classic system works 99% of the time. That 1% is the one that comes back as a key-account claim — and the claim costs more than the tray.

How it fits into the IRIS system

iLEAN Vision does not replace your scale — it seals the crack between the right weight and the right tray.

The tray-filling problem is not a lack of information: it is information living in islands (the supplier's lot specification, the doser's parameters, the calibre table, the operator's eye) that, at the critical moment (the fraction of a second before closure), does not reach the person deciding in time. iLEAN acts as the filler that closes those gaps without asking you to change the packing line.

Edge sees the tray's surface. Connect reads the lot specification and the calibre table. The agent cross-checks against the line's history and, if something does not add up, holds the tray. The person signs off — never the other way round.

The iLEAN pieces applied to visual unit counting in bulk trays:

  • iLEAN Vision (Edge) — a terminal with machine vision (CNN) and an overhead camera with low-angle LED lighting above the tray. It reads the surface, measures visual density and triggers the actuator (rejector, marker) in milliseconds when a tray falls outside the pattern. It works with no network. If the plant loses its WiFi, Edge keeps reading and holding, because what is critical cannot depend on connectivity.
  • Connect — captures the supplier's lot specification whether it comes from the ERP, the lab or the buyer's email. And it captures the recipe changes the quality manager decides (the day's calibre mix) without waiting for them to trickle down to the line through formal channels.
  • Agent — cross-checks the tray reading with the lot specification, the line's history and the customer's claims. If it detects a pattern of under-filling or surface foreign bodies, it does not wait for sampling: it alerts the shift leader and prepares the note for the quality manager. The person validates and signs; the line never restarts on its own.

See the full IRIS architecture →

Before and after

Scale + eye vs. visual reading with iLEAN Vision

AspectScale + human inspectionWith iLEAN Vision + Connect + Agent
What is measuredAggregate total weightVisual density of the whole tray
Tray with a side gapPasses if the weight adds upDetected by surface, tray held
Supplier calibre changeManual scale calibrationLot specification read from the ERP, model adjusted
Foreign body on the surfaceX-ray or later detectionFlagged in line, before closure
Operation with no networkn/aEdge keeps operating on cabinet power
File for a large retail customerPhoto on demand, weeksDossier per held tray, automatic, with overhead photo
Impact estimate

Impact estimate for your plant — to be validated with your numbers.

The block below is an estimate to be validated with the specific figures of your plant. We set it out so the committee has an order of magnitude; we refine it during the diagnostic.

  • Almond and pistachio plant with bulk packing for large retail, multi-SKU with weekly calibre and mix changes.
  • iLEAN Vision pilot on one line (overhead camera above the tray, LED lighting, actuator, integration with the ERP's lot specification). First expected value within a few weeks.
  • Indicative payback between 4 and 9 months, depending on the frequency of documented under-filling claims and the average cost of a key account's debit note.
  • A reduction of undetected anomalously filled trays of ≥ 30% over the baseline — the hard lever is a single avoided claim from the main account. One serious claim pays for the pilot.

And the quality manager's reasonable doubt

"What if the AI gets it wrong and holds good trays?" — hallucination is a problem of free generation, not of anchored tasks. In tasks where the AI simply compares an image against a known pattern (the standard tray's visual density), the best models brought the error below 1.5% [1]. And even so, what is critical is never decided alone: iLEAN holds the tray and the person signs off. The three safety rings are there for exactly this.

[1] OpenAI paper "Why Language Models Hallucinate", 2025 — on the reliability of AI in anchored tasks.

Frequently asked

What people ask about unit counting in nut trays

Why doesn't the classic checkweigher detect badly filled nut trays?

The tray scale measures total weight, not distribution. A tray with a gap in one corner and a heap in the other can hit the right weight and still look under-filled to the customer. And nut moisture works against you: the same quantity of almonds weighs differently depending on the supplier's lot, so the weight tolerance is wide. iLEAN Vision reads the surface of the whole tray and sees the gap the scale could never see.

How does an AI count units when the product is in bulk?

Edge does not count one by one as in a blister — that is impossible in bulk. It counts by visual surface density: the CNN learns what a correctly filled tray of almond, walnut, pistachio or mix looks like, and measures the deviation of every new tray against that pattern. It detects trays with less product than the visual standard, trays with the wrong calibre mix and trays with a foreign body on the surface. It is the same jidoka principle applied to powder coating: see the defect before the next stage.

What happens when a new lot arrives with a different calibre?

Connect captures the new lot's specification from the supplier — whether it comes from the ERP, a lab sheet or the buyer's email. The agent cross-checks the specification with the visual model and, if the difference is reasonable, adjusts the tolerance automatically; if the difference is large, it holds the first tray and asks the shift leader to validate. The line never calibrates itself on what is critical — the person signs off.

What if the tray passes between two dark walkways and the camera cannot see well?

Edge is mounted with its own calibrated low-angle LED lighting so the reading does not depend on the ambient light of the hall. The CNN is trained with variations of exposure, glare and plant dust, not with studio photos. And if a camera gets dirty (it is a bulk plant, it happens), the agent detects it as signal degradation before it produces false negatives and alerts the maintenance team.

How much does an Edge pilot cost in a nut plant?

The order of magnitude of an Edge pilot on a bulk packing line is close to that of any Edge pilot in a plant: an initial investment covering the vision terminal, an overhead camera above the tray, lighting, a rejection actuator and the integration with your ERP/MES, plus an annual licence. The reasonable payback to present to the committee is a matter of several months — the hard lever is a single avoided customer claim from a large retail chain. Send us your plant's data and we will send back the estimated ROI within 48h.

Let's talk

Tell us your case and within 48h we will send you the estimated ROI of this AI project for your nut line.

We work on your plant's real data, not on ours. Diagnostic with no commitment.

Request estimated ROI in 48h See iLEAN Vision