Quality control engineering is the part of quality management focused on fulfilling quality requirements, with statistical process control and control charts among its vital tools. A computer vision defect-detection model fits inside that discipline as one inspection instrument. It needs a defined in-spec, control limits, sampling plans, escalation paths and operator workflows around it, and a threshold set by what each error costs. CV inspection does not replace the discipline. If it is deployed as though it did, the line ends up with a tool nobody knows how to act on when it raises a flag.
How Quality Control Engineering Works on a Production Line
The American Society for Quality (ASQ) defines quality control as “the operational techniques and activities used to fulfill requirements for quality”: the inspection side of quality management, as opposed to quality assurance, which concerns how the process is run. ASQ also records how the field grew from checking finished products against engineering requirements into a discipline for controlling process variation. If the boundary between the two matters to how your organisation is structured, our piece on QA vs QC and where CV inspection fits covers it.
The practice has three working parts.
Specification limits define the acceptable tolerance range for a requirement. Each requirement has a design target and a tolerance range, set by a lower specification limit, an upper one, or both. A 2024 arXiv perspective on battery production uses electrode overhang to show how hard these limits are to set: the answer depends on cell design, process capability and use case, and also on business factors such as the cost of lost yield and how much quality risk the company can tolerate.
Control limits show whether the process is stable. A Shewhart-type control chart has a lower control limit, a centre line and an upper control limit, usually set at three sigma or by probability limits. Points inside the limits are evidence the process has not shifted. A point outside signals an assignable cause. That is the difference between the natural variation built into a process and the unnatural variation that comes from a special cause or a defective step.
Process capability quantifies whether an in-control process can meet its specifications. The Cp index divides the specification width by six process standard deviations, and Cp = 1 means 99.73% of items fall within specification. A Cp of 1.33 or higher is widely used as an industry standard. Capability analysis is valid only once the process has been shown to be in statistical control.
An inspection station makes a pass/fail call on individual parts. Control charts show whether the process producing those parts is stable; capability studies show whether it can meet its specifications.
Where a CV Defect-Detection Model Fits Inside Quality Control Engineering, and What It Does Not Replace
A CV model is a classifier with a confidence threshold attached. It turns images into pass or fail verdicts, and it can do that for every part. The Roboflow (2025) integration guide puts the gap it fills plainly: the MES knows which work order is running on a line, but it cannot see that parts coming off that line have started showing a scratch pattern, and vision fills that blind spot. What a CV model cannot do is set the spec, decide whether the process is capable, or fix the cause of a defect. The battery perspective says it directly: inspection on its own does not fix root problems.
| QC engineering element | What a CV model contributes | What it does not replace |
|---|---|---|
| Specification limits | Applies a visual version of the limits to every imaged part | The engineering and business decision about where the limits sit |
| Control charts and SPC | A reject-rate and defect-class signal that can be charted over time | The control chart, its limits and the out-of-control action plan |
| Process capability | Pass/fail verdicts on each part | Cp/Cpk studies on measured characteristics, which need an in-control process |
| Gauges and other sensors | Visible surface and geometry defects | Tests for defects with no visual signature, such as latent battery defects that stay dormant until they fail |
| Acceptance sampling | 100% screening of visible defects | An independent check of how many defects the screening lets through |
That is why the battery perspective argues for an ensemble of complementary inspection techniques rather than any single test. A useful way to read the table: CV is excellent at “is this part visibly wrong?” and has nothing to say about “is this process capable of making it right?”
Off-the-shelf detection models that work in demos fail in production at the edge cases, lighting conditions and throughput requirements of real lines. We cover that boundary in where off-the-shelf CV stops working in manufacturing vision-QC.
What Has to Be Defined as “in spec” Before a CV Model Is Trained
The in-spec definition has to come first, before anyone trains a model. Valnox (2025) recommends writing the defect catalogue with physical thresholds instead of adjectives. Its example: “scratch longer than 2 mm or crossing the sealing surface”, not “significant scratch”. Each class gets boundary examples showing the largest acceptable instance and the smallest rejectable one, photographed under production lighting. The same source suggests having two or three inspectors grade the same 200 parts independently. Agreement below roughly 90% on a class means the class definition is the problem, because no model can beat the ceiling that human inconsistency sets.
Pharmaceutical inspection of injections uses formal defect standards. The USP <1790> draft guidance on visual inspection of injections builds defect standards from real rejected units and classifies them as critical, major or minor. It then gives each standard a probability of detection from repeated manual inspection: 70% or more puts it in the reject zone, below 30% in the accept zone, and the band between is a grey zone. Outside pharma this is an analogy, not a requirement. The boundary between good and bad is a band with a measured detection probability, not a line.
Image acquisition needs its own acceptance specification as well. Valnox calls for a written acceptance specification, drafted before data collection, covering resolution at the object plane, lighting geometry, exposure and trigger scheme, and camera mounting tolerance, plus a calibration target imaged every shift. The practical side of this is in our site survey for lighting, fixturing and conveyor conditions. Which defect classes are feasible for CV inspection today is worth settling before any labelling budget is spent.
Models trained only on good parts still need a validated threshold. A 2020 arXiv study of normalising-flow defect detection trained on good product images alone and flagged anomalies by low likelihood. Its threshold, though, was learned in training and validation and picked to meet a target true-positive rate at the lowest false-positive rate. Somebody still has to decide which deviations count as defects, or the threshold has nothing to be validated against.
False-Reject and Escape Rates, Not a Single Accuracy Number
A QC engineer should judge a CV model by its two error rates at the threshold the plant actually runs, because those errors cost different amounts. Valnox describes them: a false reject throws away a good part, costing the part, throughput and eventually operator trust, while a false accept lets a defect continue, where it may turn into rework, a warranty claim, a recall or a safety incident. That source argues the asymmetry should be written down as an explicit cost ratio and used to set the decision threshold, rather than defaulting to a 0.5 cutoff or maximising F1.
AUROC alone does not show this. An arXiv study on false-alarm calibration for industrial anomaly detection notes that the operating threshold, its false-positive rate and the defect recall at that threshold cannot be recovered from AUROC. In its own experiments, mean image-level AUROC of 0.743 came with a mean alarm recall of 37.2%. A detector can rank most defects above good parts and still miss many of them at the threshold actually chosen. Our piece on why CV inspection pilots over-promise on accuracy covers the same gap.
Worked Example: Turning a Cost Ratio into an Operating Point
A 2026 arXiv framework gives the Bayes-optimal rule for capability approval with false-accept cost c_FA and false-reject cost c_FR: approve when the estimated probability of failure is at most α = c_FR / (c_FA + c_FR). As our own illustration, applying that rule by analogy to part verdicts with Valnox’s example of an escape costing 500 times a false reject gives α = 1 / (500 + 1), roughly 0.2%: a part passes only if its estimated defect probability is below about 0.2%. Valnox’s own conclusion is that such a ratio puts the operating point far into high-recall territory, and the resulting false-reject rate is a deliberate purchase rather than a defect in the model. The analogy holds only if the score is a calibrated defect probability. A raw anomaly score needs calibrating against representative, independent normal production samples.
Sample planning is part of the operating specification. The same calibration study finds that, with 150 good calibration images, a 95%-confidence claim holds only for false-positive targets of 1.98% or higher, and a 1% target needs at least 299. In capability approval, the study shows acceptance probability of about 0.5 when true Cpk sits exactly at the threshold, so decisions near it are uncertain. Where the threshold sits is a plant cost decision; see our guide to scaling inspection models across the factory.
The Control Limits and Escalation Paths a CV Inspection Model Has to Plug Into
Three controls from established inspection practice apply to a CV station’s output. Reject rates get limits, an action plan says what happens when a chart signals, and uncertain units get a second inspection.
Reject-rate limits. The USP <1790> draft guidance asks for limits on typical rejection rates during 100% inspection, set by defect category, based on historical performance, reassessed periodically, and triggering an investigation when exceeded. Valnox separately lists a shift in the flagged-rate distribution as a retraining trigger.
An out-of-control action plan. The NIST/SEMATECH e-Handbook describes the engineer following the out-of-control action plan (OCAP) attached to the control chart to find the assignable cause. Classical Shewhart charts often use the Western Electric rules and trend rules to decide out-of-control. For a CV station, exceeding its reject-rate limit should trigger an investigation. Our piece on statistical process control on the production line covers that wiring.
A route for uncertain parts. For automated inspection with a high false-rejection rate from an assignable cause, the USP draft describes tuning the system to accept good units and sending the rest, as units of uncertain disposition, to a second, more sensitive inspection such as manual review. Where a lot fails its acceptance criteria, the USP draft calls for an investigation covering process, materials and the inspection itself, with reinspection only if the inspection is deemed capable. The capability framework takes the same cautious line for ambiguous cases: when elevated risk shows no clear failure mode, flag it for investigation instead of prescribing an adjustment.
A model that detects defects but talks to nothing is a demo, not a production system. Roboflow describes the pattern as one detection in four forms: a boolean to the PLC reject gate, a status and annotated image to SCADA/HMI, a structured record to the MES, which can place quality holds and feed nonconformance and CAPA workflows, and rollups to the ERP. Wiring vision models into PLC, MES and ERP systems on real lines is the work of AI engineering for manufacturing. The engineering of those payloads belongs with scaling inspection models across the factory. Tensorleap recommends redeploying with tight version control and regression checks.
How Operators Act on a CV-Flagged Defect, and What Breaks Without That Workflow
On a working line, an operator either agrees with a flag or overrides it, and borderline cases go to review. Each decision should leave a record. Roboflow suggests sending borderline detections to an operator dashboard and feeding confirmed hard examples back into training. Valnox calls operator overrides the highest-value data the system produces and recommends capturing the image, the model output, the decision, the override and a short reason code. Every decision should also record the model version, preprocessing version, threshold and calibration state, so an investigation months later can reconstruct why a part was passed.
Watch the override rate as a metric in its own right. A rising rate is an early warning of an upstream change, usually before aggregate quality numbers move. A near-zero rate deserves a look too, because it often means operators have stopped checking. When a station is known for crying wolf, people start overriding it by reflex, and it stops working whatever its metrics say.
Without real-time ground truth, drift builds quietly while production continues. Tensorleap (2025) describes false rejects rising and false accepts creeping in while SPC dashboards stay “mostly green” until they don’t. Then an escape surfaces, nobody can say since when, and containment falls back to broad quarantine and re-inspection. Diagnosing that drift is covered in the hub on CV defect-detection models moving from pilot to production. For QC engineering, the takeaway is that a defined escalation path is what limits containment to specific lots and time windows.
Does a Sampling Plan Still Matter When CV Inspects 100% of Parts?
Yes. The sampling plan’s job shifts to auditing the inspection itself. The USP <1790> draft guidance says acceptance sampling should follow any 100% inspection, automated included, because it measures how well the whole inspection process performs and catches unexpected defects that were not part of the automated system’s development and training. Valnox makes the same point from the metrics side: the escape rate can only be measured against an independent check such as downstream audit sampling or customer returns.
The classical reasons for sampling weaken under inline vision. The NIST/SEMATECH e-Handbook calls acceptance sampling the middle road between no inspection and 100% inspection, used when testing is destructive or 100% inspection is very costly. Cheap inline vision is the case where full inspection becomes practical. AQL is the defect level the producer wants accepted with high probability, LTPD is the defect level the consumer wants rejected, and the producer’s and consumer’s risks are the chances of getting each wrong. The operating characteristic (OC) curve plots acceptance probability against the lot’s defect proportion. As a concrete case, an analysis of the European Measuring Instruments Directive found (n, c) = (109, 3) to be the smallest plan keeping both risks at or below 5%, with producer’s risk 2.43% and consumer’s risk 4.85%.
Two practical changes follow. First, the audit sample has to represent the whole lot (random, or at fixed intervals), because defects are not spread evenly. Second, the MES record of each inspection carries the part serial or lot number and its image, as covered in tracking parts on an inspection line. Multi-camera coverage helps with defects near one image’s boundary. The normalising-flow system counted a product as defective if any of its four cameras flagged it, precisely because defects near one camera’s boundary are better seen by another.
A Readiness Checklist Before a CV Station Gates Parts
- Defect catalogue written in physical units, with boundary examples per class, and inspector agreement measured.
- Image acquisition specification and a per-shift calibration check in place.
- Operating threshold recorded with its cost-ratio assumption and last review date next to the model version.
- False-positive target matched to the size of the calibration sample.
- Reject-rate limits per defect category, linked to an out-of-control action plan.
- A second-stage route for uncertain parts.
- Override capture with reason codes, and override rate trended.
- Independent audit sampling, so the escape rate is measured, not assumed.
- Baselines for escape rate, false-reject rate, throughput, station availability and override rate taken before installation.
The Judgement That Stays with the QC Engineer
The USP draft notes that automated inspection offers consistency compared with manual inspection. Detection stays probabilistic all the same. The same draft accepts that particles in the grey zone will occasionally be missed, and the capability study shows approval decisions near the threshold staying uncertain. The threshold, the cost assumptions behind it and the date it was last reviewed should be recorded next to the model version. Settle that before the model ships, and the question of who owns the CV inspection model in production has an answer the whole line can work from.