Large-Model Vision · Process Checks / In Practice
A station camera recognises parts and motion nodes in real time, and an SOP state machine confirms every step — missing parts, skipped steps and wrong order are visible on the spot, and every record is traceable.
S0–S6 graph manages the seven-step sequence; unexpected events simply self-loop — a skipped step never advances and never reaches the end.Packing is the last manual step before a product leaves the factory, and the one most prone to "looking fine": once the box is sealed, a missing manual, a missing back panel or unfilled cushioning is invisible from the outside. This station ships one piece every 30 seconds across a seven-step sequence; the difficulty lies in white, thin, soft parts, a fast cycle and frequent model and carton changes.
01/6The Problem
Break it down and this step is hard for three reasons: once the box is sealed, its contents are invisible, and weighing or sampling at final inspection catches only part of the problem; asking a person to watch a 30-second cycle endlessly does not scale, and reviewing recordings after the fact is barely feasible; and whenever the carton spec or the sequence changes, the old approach of training a dedicated appearance model needs new samples and retraining, which cannot keep pace with changeovers.
So the design choice is to define the problem as "did the packing steps happen in the right order" rather than "train yet another dedicated appearance model" — a vision model sees parts and motions, a state machine judges the sequence, and results stream out at the edge. Changing the carton or the sequence is mostly reconfiguration, not a resident training effort.
The core conflict is not "can we see clearly" but "we can see, yet we keep no evidence": every step before sealing needs a judgement that can be reviewed.
02/6Tensor Flow
The vision-agent software runs at the edge, and configuring, executing, displaying and exporting a check all happen in one application. This case is built entirely with zero-code drag-and-drop: operators are pulled out of the library on the left and connected along the data flow — no algorithm code required.
All three sub-editors open by double-clicking their node: semantic segmentation → the labelling tool (UI 02), event detection → the GPU event orchestrator (UI 03), state machine → the state graph editor (UI 04). How this configuration ticks steps off live is shown in the header video.
03/6Few-Shot Segmentation
Packing parts are mostly white, thin and soft, often behind a clear bag: foam paper creases, the manual sits askew, the back panel hugs the carton wall. Bounding boxes fit such targets poorly, so this project uses pixel-level semantic segmentation — 1–10 on-site samples per class are enough to settle it in the labelling tool, and the output masks drive presence and area checks.
| Class | Samples (typical) | Purpose | Judgement |
|---|---|---|---|
| Base board | 4 imgs | Start / end in place | mask appears → E0 / E6 |
| Foam paper | 5 imgs | Cushion laid | mask area ≥ threshold → E1 |
| Carton | 5 imgs | Carton in place | mask area ≥ threshold → E2 |
| Carton (flipped) | same class | Flip confirmation | segmentation + angle check → E3 |
| Back panel | 5 imgs | Back panel loaded | mask area ≥ threshold → E4 |
| Manual | 4 imgs | Documents placed | segmentation + count check → E5 |
"Carton flipped" is not a separate class: the same carton mask changes its axis ratio and orientation clearly before and after the flip, and an angle-check primitive tells them apart — one class less means one labelling round less. Training and inference both run locally on the edge GPU, so station footage never leaves the factory; on a model change, add samples and run one more transfer round.
04/6Event Judgement
Segmentation only sees pixels; the business needs judgeable events like "foam paper in place" or "manual placed". The event list is defined in the state machine, and the judgement logic is assembled in the GPU event orchestrator: drag judgement primitives from the library, set their parameters, and compose them with AND / OR / NOT into the firing condition — changing a judgement means touching parameters, not retraining a model.
05/6State Machine
The workflow panel on the right is not a display list but an SOP state machine: S0–S6, seven states waiting for seven steps, advanced by seven events E0–E6. Sequence enforcement needs no extra NG rules — it comes from "every unexpected event self-loops": a skipped step does not advance, and a missed step never reaches the end.
S0 waits for the start base board; S1–S6 wait in turn for foam paper, carton, flip, back panel, manual and the end base board; E0–E6 connect neighbouring states, and E6 returns to S0 for the next piece.
A piece counts as OK only when all seven events advance in full; if the manual never goes in, S5 waits forever, and even if the end event fires it does not advance — that piece is never recorded as OK.
06Reflections
The deepest lesson of this project is that a shop-floor requirement needs one complete "engineering translation" before the system can act on it. "Pack everything according to the SOP" sounds like a single sentence; in practice, which parts to recognise, how each step is judged, what counts as a miss and how results are kept — each item needs an explicit definition.
The requirement went through three layers of decomposition:
S0–S6 state graph defining the advancement.Only after these three layers aligned did the model's output enter the real process. Measured on this station, a piece takes 32–39 seconds; anomalous pieces deviate clearly — cycle time itself is a usable inspection signal. The boundary of this approach is equally clear: it fits manual packing stations with many parts, many steps and frequent changeovers; small parts hidden in deep cavities inside the box need process cooperation or a close-up camera.
Looking back, four questions ran through the whole implementation: what does the system watch, when is a step done, what counts as a miss, and how are results kept.
Leo
Vision-intelligence architect · lead for industrial process checks
PhD in computer vision, researching few-shot segmentation and video action understanding; 12 years on industrial-vision front lines, with 30+ lines and 100+ stations delivered.
Advocates moving process checks from "one dedicated model per station" to "few-shot segmentation + event orchestration + an SOP state machine", decoupling judgement logic from the perception model so a sequence change never means retraining.
Currently focused on edge-GPU inference optimisation, cross-domain generalisation and on-site data loops — making the same configuration method repeatable across factories and processes. Articles record real configurations, judgement logic and field results from live projects.
Click anywhere to close