The problem
The client manufactures precision plastic components for industrial equipment. Visual quality inspection (checking for surface defects, dimensional irregularities, and material flaws) was done by trained inspectors at the end of the production line. This worked, but with two real limitations: fatigue led to measurably higher miss rates in the last two hours of a shift than in the first two, and the inspection station was a throughput bottleneck, because a person can't assess parts faster than a certain speed without accuracy dropping.
The client's quality data showed defect-detection accuracy falling from roughly 96% early in a shift to closer to 84% in the final two hours. Operations leadership had known about the pattern anecdotally but had never quantified it. This fatigue-driven inconsistency, not raw inspection accuracy, was the real problem worth solving.
Why this needed a custom vision model, not an off-the-shelf tool
The client had evaluated a generic industrial vision inspection product before engaging us, and it performed poorly on their parts. The defects that mattered in their process (specific flow-line patterns, sink marks, and a particular flash defect from their tooling) weren't well represented in the off-the-shelf product's training data. Because these defects were specific to their material and injection-molding process, they needed a model trained on their own production parts rather than a generic industrial defect classifier.
Architecture
Data collection as the actual first phase
We spent the first three weeks setting up camera hardware at the inspection station and collecting labeled training images, working directly with the client's most experienced inspectors to label defect type and severity on a growing dataset of real production parts. This wasn't a quick step: a representative dataset covering rare defect types required collecting across several production batches, not a single day's output.
A vision model fine-tuned on real production images
The defect-classification model was fine-tuned on the client's labeled dataset, covering the dozen or so defect categories relevant to their process. We evaluated it separately on classification (is there a defect, and what kind?) and severity (is it within tolerance, or does the part need rejecting?), because these are different judgments an inspector makes and the model needed to replicate both.
Real-time inference integrated into the physical line
The model runs on a camera at the point in the line the human inspection station previously occupied, with inference fast enough (44 milliseconds per unit) to keep pace with the line rather than becoming a new bottleneck. This took real engineering beyond the model: camera positioning and lighting consistency mattered enormously for image quality, and we iterated on the physical setup almost as much as on the model.
Human oversight for edge cases, not full removal of inspectors
Parts the model flags as defective, or where its confidence is below a set threshold, go to a human inspector for final review rather than being rejected automatically. This wasn't only about building trust: some genuinely ambiguous cases benefit from human judgment. The client's quality team kept inspectors in a review role, focused on the flagged subset instead of every part.
Challenges and tradeoffs
- Lighting consistency was a bigger engineering problem than the model itself. Ambient factory lighting varied by time of day and by which overhead lights were on, enough to meaningfully change model accuracy. We installed a dedicated, consistent lighting rig at the inspection point to remove this variable. It wasn't in the original scope, but it became necessary once the problem surfaced during pilot testing.
- Rare defect types needed deliberate oversampling, not just more data collection time. Some important defect categories occurred in well under 1% of parts, so a naive training approach would have badly underweighted them. We worked with quality control to collect examples of rare defect types from the historical rejected-parts inventory, supplementing live collection.
- The confidence threshold for human review directly traded off inspector workload against full automation. A stricter threshold catches more genuine ambiguity but sends more parts to human review, undermining the throughput goal. We tuned it jointly with the quality team, landing on a threshold that routes about 6% of parts to human review while keeping the line-speed improvement that was the main business driver.
Results
In production validation, measured against the client's own audit sampling, the system catches 91% of defects before shipment. The human-only process ranged from 84% to 96% depending on shift fatigue, averaging closer to 90%. The key improvement is consistency rather than a dramatically higher ceiling: the model doesn't have a worse last two hours of a shift. At 44 milliseconds per unit, inspection no longer limits line speed, and the line now runs 3.1 times faster than before.
The client's quality lead noted that the consistency improvement, more than the throughput gain, was the most valuable outcome internally, because the fatigue-driven accuracy swing had been an ongoing concern that process changes alone couldn't fix.
What we'd do differently
We'd install the dedicated lighting rig during the initial camera setup rather than after pilot testing revealed the problem. In retrospect it was foreseeable, and starting with controlled lighting from day one would have shortened data collection and validation by roughly a week.