The Model That Worked in the Cloud
A defect detection model that scores well in a notebook has passed the easiest test it will face. The notebook has a GPU, a curated dataset, no deadline per frame, and a network connection. The factory floor removes all four, and the Roboflow guide to manufacturing defect detection states the first consequence: edge devices eliminate network dependence but require model optimization. That sentence hides most of the project.
Start with latency, because the line sets it. A part crosses the camera station at a fixed rate, and the reject decision has to land before the part reaches the diverter. The Roboflow guide says inference speeds of 1 to 3 frames per second are common for Mask R-CNN on high-resolution images, and that SAM 3 requires 16 GB or more of GPU memory for typical deployment. Those are workable numbers in a research setting and a poor fit for a cell that needs a decision per part in a fraction of a second. The same guide says manufacturers often prefer on-device processing for privacy, reduced latency, and offline operation, which reads to me as a polite description of a plant network that nobody wants the line to depend on. A cloud round trip adds variable latency, and variable latency on a hard deadline means some parts get no decision at all.
Optimization is the route out, and it carries a cost the notebook never revealed. The guide recommends quantizing edge models to INT8 or FP16 precision, labels RF-DETR quantization-friendly, and says SAM 3 is challenging to run at the edge without quantization or distillation. Quantization trades numeric precision for speed and memory. For a classifier on large objects the loss is negligible. For defect detection, where the target is often a scratch a few pixels wide, the fine detail that precision carries is exactly what matters. Keyence says pixel resolution needs to capture at least twice the frequency of the finest details being inspected, and the Roboflow guide describes cameras capable of 4K or higher resolution at production line speeds. A smaller input size to hit the latency budget can quietly shrink the smallest detectable defect below the specification. The model still reports a high mean average precision on the validation set, because the validation set was built at the original resolution.
That gap is the pattern I would watch for. Every optimization step has a numeric before and after, and the after has to be measured on the real hardware with the real optics, using the false accept and false reject rates from the first post in this series. A benchmark figure from a data center GPU such as the T4 or H200 that Roboflow cites says little about a fanless embedded box in a cabinet at 45 degrees Celsius. Thermal throttling, a shared accelerator, and a camera driver that drops frames under load all change the effective frame rate, and none of them appear in a cloud evaluation.
Then comes the problem the Roboflow guide only brushes against. It notes that defect detection must handle products that constantly evolve and defect types that change, and it says little about drift or post-deployment monitoring. On a line, drift has plain physical causes. A lighting fixture ages and shifts color temperature. A supplier changes a surface finish. A new shift cleans the lens on a different schedule. The model, frozen at deployment, sees a slow change in its inputs and responds with a slow change in its false reject rate. Nobody sees it as a model problem. They see scrap numbers drifting up and the quality team blaming the supplier.
Keyence's guidance gives the mechanism that catches this: run a golden sample set through the system weekly, log the results against an established baseline, and treat any drift above it as a signal to review retraining. A golden set is a fixed collection of known-good and known-bad parts that go through the station on a schedule, and the model's calls on them are logged. It costs almost nothing to run and it turns drift from an anecdote into a trend line. A 2020 Chip Scale Review article by Shahab Chitchian of INTEKPLUS, on deep learning for heterogeneous package inspection, describes the other half of the loop: reviewing logged images for overkill, removing similarly labeled overkill images before reinforcing the model, retraining, and verifying detection again. Both need the edge device to keep images and decisions, which means storage, retention rules, and a path to get them back to wherever retraining happens.
This is where the project becomes a fleet. Ten stations means ten devices that each need a deployed model version, a known configuration, a way to roll out an update to one cell before all of them, and a way to roll back when the new version misbehaves on a product it was not trained on. The vocabulary from software delivery fits well here: a model registry, staged rollout, device inventory, and certificates and identity for devices that sit on a plant network. On a Microsoft stack the registry maps to the Azure Machine Learning model registry, which versions models in a workspace. Managed online endpoints are a different thing: Microsoft documents them as hosted on compute in Azure, so they suit cloud-side scoring. For the device itself, Azure IoT Edge is the runtime Microsoft documents for deploying containerized workloads, including machine learning and image recognition, to devices and monitoring them remotely through IoT Hub. Microsoft's documentation lists IoT Edge 1.6 LTS as the supported release and gives November 10, 2026 as the end-of-support date for 1.5 LTS. Azure Percept, which once packaged this scenario as a dev kit, was retired on March 30, 2023, so a new deployment cannot rely on it. The same device management and Entra identity discipline applied to any other endpoint on the floor completes the picture. A plant with a patching discipline for its PCs and no discipline for the inference box beside the conveyor has created an unmanaged endpoint with a camera and a reject authority.
The business consequence sits in the change window. Plants schedule line changes and maintenance in tight blocks, and a model update that needs a revalidation run competes with production for the same hours. If revalidation takes a day of runs against golden samples, the team will either skip it or delay updates until the drift is already costly. The deployment architecture determines which of those the plant lands on, and that decision gets made, usually by default, during the first install.
Sources: Roboflow, "Defect detection algorithms for manufacturing," Dec 10, 2025 (roboflow.com/blog/defect-detection-algorithms-for-manufacturing); Keyence, "AI Vision Accuracy Explained: How to Measure Performance and Understand False Accept/Reject Rates"; Shahab Chitchian, "A deep-learning solution for heterogeneous package inspection," Chip Scale Review, Sep-Oct 2020; Microsoft Learn: "Online endpoints for real-time inference," "MLOps machine learning model management," "What is Azure IoT Edge," and "Retirement of Azure Percept DK."