Industries · 6 min read
Juice box quality inspection at the straw applicator, with a tag on every carton
Acceptable, missing, bent or pierced on every carton from the line's own frames, and why a nudged camera mount is the failure a classifier shows first.
Summary
This post describes a camera at the outfeed of a straw applicator on a juice carton line, where a model tags every carton as acceptable, missing, bent or pierced. It argues that the frames have to come from the line camera and never from a phone, that the rare classes are the ones to hunt for, and that a mount adjustment is the drift a classifier on a fixed camera feels before anything else. It is for beverage packaging and line quality teams.
Rob Hickey · Chief AI Officer · Sep 26, 2026

Cartons with labels on a packaging line, carton and label boxed, generated scene with detections from our model
The straw applicator on line 4 glues a wrapped straw to the back of every carton at a speed that makes the straws a blur to anyone standing beside it. Most of them land straight. A few times an hour one is missing, because the feed hiccupped, or bent, because the glue caught the sleeve at an angle. Now and then one has pierced the carton, because the applicator pressed it home a millimetre too far, and the juice is leaking into the case. The operator sees the leak when the case is wet on the pallet.
A camera at the outfeed sees every carton with its straw at the moment the glue has set. The job it is given is a small one and the design decisions around it are where the line either trusts the camera by the second week or unplugs it.
Object detection finds the straw and a tag on the carton says whether it is right
Each carton on line 4 gets a box, and inside the box the straw region gets its own. Object detection is what puts them there, and the tag is what the rule reads: acceptable, missing, bent or pierced. Four tags, one per carton, from the crop inside the straw box.
The tag could be a classifier on the whole carton frame, and on a first version it sometimes is. The reason to box the straw first is that a classifier on the whole frame learns the whole frame, including the carton artwork and the conveyor and the strip lamp's reflection, and any of those changing is a change to the model's evidence. A box on the straw region narrows what the tag depends on to the thing that matters. The assembly verification use case reads presence and position from a box and its shape, and a straw is a small assembly on a carton.
The frames come from the line camera and never from a phone
The temptation on the first afternoon is to photograph a few cartons on the bench with a phone, in good light, from a comfortable angle, and label those. The model trained on them has strong evidence for a bench and almost none for line 4 at speed. There the carton is blurred along the direction of travel, the strip lamp puts a glare stripe down the sleeve, and the outer lanes of the four-wide conveyor are always at a slightly different angle from the inner two.
The frames come from the outfeed camera at its mount. Lexi proposes the boxes and the tags on them, and a person checks each label before anything trains. You type "wrapped straw, missing, bent, pierced" once, and the checker's time goes on the pierced class, which from above is a slight dimple in the carton beside the straw that takes a few cartons to learn to see.
Cartons run in lanes of four, and an inspector who has stood at line 4 for a week can tell the lane from the carton.
The rare tags are the ones to hunt for before training
Almost every carton on line 4 is acceptable. On a good shift the applicator misses a handful and bends a few, and a pierced carton is rare enough that a week of footage may hold a dozen. A model trained on a week of frames as they come has seen far more acceptable straws than pierced ones, and it will learn to say acceptable.
So the rare frames are collected on purpose. The operator's wet cases from the last month point at the shifts to pull footage from. The applicator can be run deliberately misfed for ten minutes at the end of a changeover to produce missing straws. The pierced class is the hardest to make on purpose and the most expensive to miss, so its frames are hunted through the recorder's archive by the leaks the warehouse reported. The footage lesson makes the same point: the number of hours is the wrong unit, and the question is whether the rare case is in the set.
The tag drives a reject gate and a review queue
An alert is a rule written as a sentence, with a severity and a cooldown, approved before it goes live: a pierced carton on line 4, critical, to a webhook the line controller reads. The gate diverts the carton before the case packer, and the frame goes with the verdict. A missing straw is routine and goes to the operator's list, since a missing straw is a customer complaint rather than a wet pallet.
A carton the model is unsure of is held and sent to a person with the frame and the crop. The person's tag is recorded against the frame, and those are the corrections the next version trains on.
A nudged mount is the failure a classifier shows first
On Thursday the outfeed camera was cleaned, and the bracket now sits a few degrees off where it was when the model was trained. The cartons still pass, the straws still look like straws to the operator on the monitor, and the model's evidence has quietly moved. The straw region is a little further left and a little larger in the frame than every frame it learned from, and the glare stripe has moved off the sleeve. The missing rate on line 4 diverges from its own history the same evening while the lines either side of it hold.
The drift catalog covers this as a camera moved, and the fix is cheap: re-label a short window of frames from the new framing and retrain on footage already on the recorder. Which is why we box the straw first. My own view is that on a fixed camera the mount is part of the model, and a plant that lets the bracket be adjusted without telling the model should expect the model to notice before the plant does.
LexData takes the straw model through its whole life. You type what to look for, Lexi puts a box and a tag on every carton on every frame, and a person checks each label before anything trains on it. The model then watches the outfeed camera on line 4, in the cloud, on your servers, or on a runner beside the recorder. Frames it is unsure of come back to a person, the corrections retrain it, and the new version replaces the old one with no downtime. The 99%+ accuracy maintained in production that our manufacturing work reports is held by those corrections, which on line 4 mostly arrive on the evening after a cleaning.
See it on your own footage.
Start with your footageMore in Industries

Industries · 6 min read
AI crop analysis in the greenhouse, catching tomato disease before it spreads down the row
Lesions boxed by disease with a healthy class, a question of the footage about how far a patch spread since last week, and a model that turns with the season.
Rob Hickey · Sep 26, 2026

Industries · 6 min read
Ceramic defect detection for hairline cracks a fixed-rule camera cannot learn
Edge chips, hairline cracks and pinholes on the tile line after the kiln, masks where the area sets the grade, and the new glaze as the day to relabel.
Esdras Ntuyenabo · Sep 26, 2026

Industries · 6 min read
Chocolate box inspection with a camera over the tray line
Each piece boxed by type, a plain check against the box template, damage as its own class, and the new spring assortment as the day the labels go stale.
Stephen Biswas · Sep 26, 2026