Glass and metal detection in packing with AI — one foreign body on the shelf is a mass recall.
A piece of glass in a container means a mass recall. iLEAN combines X-ray, metal detection and AI vision to detect contaminants in line with the reliability the retailer demands — and rejects the unit without stopping production. The person signs off on the doubtful cases; what is critical never depends on the WiFi.
The monolithic sensor sees a lot, but it does not see everything. And a single foreign body is a recall.
The metal detector has been installed on every serious line for decades. It works well with steel, worse with thin aluminum, poorly with materials that are not magnetic. The X-ray widens the range — it captures densities — but loses contrast when the contaminant is the same material as the container (glass on glass, a small bone on soft product). And then there are the cases no monolithic sensor covers:
- Plastic fragments from the supplier's own packaging, especially if they are black or opaque — the X-ray does not detect them well because of their density, but a vision system does see them.
- Organic foreign bodies (cardboard, thread, PPE fragments) that slip in from the manual loading area and reach packing without anyone noticing.
- Color or texture anomalies that are not a contaminant but are a warning sign — a darkened area that could be the start of mold, a small stain that could be rust from the equipment.
- The calibration test piece that nobody ran through this morning because the operator was in a hurry — and the detector spent two shifts with its sensitivity down without anyone knowing.
The quality manager knows this. But they cannot be on every line, on every shift, looking at every tray. The classic system works 99.9% of the time. That 0.1% is the shelf recall, the front page of the local newspaper and the retailer's call canceling the contract.
iLEAN does not replace your X-ray — it plugs it into the metal detector, a vision camera and a brain that cross-checks all three signals.
The problem is not a lack of sensors; it is that the sensors do not talk to each other. The metal detector puts out one signal. The X-ray another. A camera could put out a third, but it lives in another world. The death sentence of monolithic systems is that each one covers its own range and leaves the gap to the one next to it. iLEAN acts as the putty that seals those gaps without asking you to change your X-ray or your detector — it integrates them and adds the missing piece.
Edge watches the line with machine vision. Connect reads the signal from your X-ray and your metal detector. The agent cross-checks the three signals against the non-conformance history and fires the ejector before sealing. The person signs off — the line does not restart on its own if there is any doubt.
The iLEAN pieces applied to glass/metal contaminants in packing:
- iLEAN Vision (Edge) — a machine-vision terminal (CNN) over the packing belt, trained on samples of your product in your container. It detects what the X-ray misses for lack of density contrast: plastics the color of the product, organic fragments, surface anomalies. It fires the actuator (pneumatic ejector, signal light) in milliseconds. It works without a network.
- Edge legacy + Connect — Connect reads the signal from the X-ray and the metal detector whether it comes from a modern PLC, from the old local PC in the cabinet, or from an analog panel that only emits a dry contact. The capture level adapts to each machine; it does not force you to change the line.
- Agent — cross-checks the vision, X-ray and metal-detector signals against the non-conformance history of the batch, the supplier and the SKU. It tells a false positive (irregular container, wrinkled label) from a real case, prioritizes the doubtful cases for human review and keeps the file live for IFS/BRC without the quality team rebuilding anything by hand. The three safety rings guarantee that automatic rejection is reviewable and that what is critical is still signed by a person.
Isolated sensors vs. cross-checked detection with iLEAN
| Aspect | Stand-alone X-ray + metal detector | With iLEAN Vision + Edge + Agent |
|---|---|---|
| Contaminant coverage | Metal and high densities | Metal + glass + opaque plastic + organic |
| Glass in glass containers | Limited sensitivity | Dual-energy X-ray + vision trained on your product |
| False positives | Each sensor generates its own, they add up | The agent cross-checks the three signals and filters out the noise |
| Shift calibration | Paper checklist — sometimes signed without being done | Test-piece run logged with photo, alert if it fails |
| In-line rejection | Yes, but without detailed traceability of why | Ejector + photo + batch + reason, all in the file |
| IFS/BRC file | Rebuilt after the audit | Always ready — the auditor opens the screen and sees it |
Impact estimate for your plant — to be validated with your numbers.
The block below is an estimate to be validated with the specific data of your plant. We put it forward so the committee has an order of magnitude; we refine it during the diagnostic.
- Multi-SKU product packing line (sauces, preserves, dairy), 10,000-50,000 units per shift, with X-ray and metal detector already installed.
- Edge pilot with a vision camera over the belt + Connect reading signals from the existing sensors + agent. First value expected within a few weeks.
- Expected reduction of undetected foreign bodies ≥30% over the baseline (on many lines much more, but that is the defensible floor). Reduction of false positives through signal cross-checking: operators freed up for tasks that require judgment.
- Indicative payback between 4 and 9 months. The hard lever is a single recall avoided: product retrieved from the shelf, reverse transport, destruction, brand damage, retailer penalty. One recall pays for the pilot.
The quality standard the end customer expects
The automotive sector has been operating for decades to a demanding standard on the order of 25 PPM (parts per million) [1]. Food is not automotive, but the direction is the same: bringing defects down to figures where the monolithic sensor no longer reaches and only a cross-checked system can operate. The most demanding sector sets the standard; the rest, sooner or later, follow it.
And the quality manager's reasonable doubt — "what if the AI gets it wrong and lets a contaminant through?" — has an answer: hallucination is a problem of free generation, not of anchored tasks. Recognizing a glass fragment in an image is exactly an anchored task. In this type of task, the best models brought error below 1.5% [2]. And even so, automatic rejection stays traced and reviewable; the doubtful cases are signed by the person.
[1] Symestic — quality standard on the order of 25 PPM in automotive.
[2] OpenAI paper "Why Language Models Hallucinate", 2025 — on the reliability of AI in anchored tasks.
What people ask about glass and metal detection in packing with AI
What types of contaminants does it detect?
The X-ray + metal detector + AI vision combination covers the three families of foreign bodies that appear most often in RASFF recalls: metallic (steel, iron, aluminum — the easiest), glass and dense minerals (glass, stone, bone — the X-ray catches them by density) and visible organic materials (plastic from the supplier's packaging, cardboard fragments, PPE remnants). AI vision also picks out what a monolithic sensor cannot see: a fragment of black plastic on dark product, a band on the inner face of a translucent container.
What about glass in glass containers?
That is the hard case — similar densities, minimal contrast. The technique is to combine dual-energy X-ray with a model trained specifically on your product in your container (sauce jar, jam jar, oil bottle). The model learns the container's normal pattern and detects the anomaly as a deviation from the baseline. The quality manager signs off on false positives at first to refine the model; once the learning period is over, the line runs with automatic rejection and human review only of the doubtful cases.
Does it comply with IFS/BRC on foreign bodies?
Yes. The current version of IFS Food and BRCGS Food Safety require a documented foreign-body control system, with periodic verification, a rejection log and a response plan. iLEAN logs every detection with photo, timestamp, batch, operator and reason, producing the file the auditor asks for without the quality team rebuilding it by hand. The verification log (calibrated test pieces run through at the start of each shift) is also documented automatically.
How is it calibrated?
With calibrated test pieces (Fe, NFe, SUS of certified size for the metal detector; glass and stone pieces of calibrated size for the X-ray) run through at the start of each shift and after every SKU changeover. The operation takes 30 seconds. iLEAN records the result, alerts if the system fails to detect a test piece (which is worse than a false positive) and keeps the calibration traced with the rest of the audit file. If sensitivity drifts down over time, the agent detects it before anyone on the floor notices.
Automatic rejection without stopping the line?
Yes — that is the difference from a traditional system. Edge fires an actuator (pneumatic ejector, arm, diverter) in milliseconds, segregates the suspect unit to a reject lane and the line keeps running. The rejected unit is not lost: it stays set aside for human inspection, with a photo and traceability of why it was rejected. If the plant loses its network, Edge keeps rejecting — what is critical cannot depend on the WiFi.
Tell us your case and in 48h we'll send you the estimated ROI of this AI project for your packing line.
We work on your plant's real data, not ours. Diagnostic with no commitment.
Request estimated ROI in 48h See food industry