Experience Rely in one click and discover how to improve production quality.

Try It Risk-Free

Quality defects that AI detects (and you don't)

A real case of training and validating a machine vision model on the plant floor: 1 in 5 pieces the operator marked as correct had real defects that only the AI detected.

In quality control, the experience and trained eye of the operator have been, for decades, the first and last line of defence against defects affecting production. However, even the most experienced professional has limits: visual fatigue, task repetition, and the subtlety of certain defects cause some to go unnoticed.

In this scenario, artificial intelligence does not arrive to replace, but to complement and enhance human capability, detecting what, by nature, we cannot always see. In this article I share a real case from one of our plant deployments, with the exact figures from the validation process, to explain where AI gains ground and where human judgment remains irreplaceable.

Human sight vs. machine vision

The human eye is incredibly versatile: it can adapt to different environments, quickly distinguish colours and shapes, and process visual information in context. But our way of analysing images is subjective and depends on factors such as lighting, fatigue, concentration, or even prior experience.

Human vision is also selective: we tend to focus more on patterns we already know and inadvertently ignore details outside the expected. It is a cognitive efficiency mechanism that is very useful in general, but works against us in quality control: an operator who has been inspecting almost identical parts for eight hours develops a kind of "repetition blindness" towards small defects that do not break the overall pattern.

Machines, on the other hand, do not "look" as we do; they process every pixel, every texture variation, and every mathematical pattern of the image. They do not tire, they do not lose focus, and they are not influenced by context or shift times.

A machine vision system trained with AI constantly compares the captured image with thousands of prior examples, searching for matches or deviations that may be imperceptible to us. This does not mean it is always right, because no system is, but it does have the capacity to detect defects so subtle that, to the naked eye, they would go unnoticed even to an expert.

How a machine vision system "learns" to detect defects

Before getting into the real case, it is worth briefly explaining what lies behind it, as this is what makes the difference between a reliable system and one that causes distrust on the plant floor.

A visual inspection model is not born knowing what a porosity defect or short shot is. It is trained with a dataset of images labelled by people—typically the same quality team that already inspects the parts manually—where each defect is marked and classified by type. The model learns the visual patterns associated with each category and, from there, generalises to parts it has never seen before.

In practice, the process has three phases that repeat in a loop:

  1. Initial training, using available historical images and the classification already used by the quality team.

  2. Validation via a blind test: the model is tested against parts already classified by a human, without giving it the answer, to measure its actual accuracy by defect type.

  3. Targeted retraining: images where the model fails are re-labelled and re-incorporated into the dataset, specifically reinforcing the weak points detected.

This cycle repeats as many times as necessary until the model reaches the accuracy level required by the plant to operate in real production, not just in laboratory tests.

A real case: putting the model to the test

In one of the companies we have worked with, after each training cycle we conducted a "test" to validate the accuracy of the model before signing it off. The test consisted of probing the system's robustness by passing parts with different defect types alongside non-defective parts, and comparing the AI's verdict with that of the human team.

The person responsible for daily part quality inspection set aside 15 parts with the same type of defect into separate bags:

  • Porosity

  • Short shot

  • Dent

  • Sand inclusion

In addition, they set aside around 50 parts already classified as non-defective by the routine inspection process.

The objective was two-fold: to measure how many real defects slipped past the model (false negatives) and how many good parts it mistakenly rejected (false positives). It is the same logic used to audit a new operator, applied to an AI system.

During evaluation, we passed the 15 parts for each defect type and checked whether the model detected all those previously identified by the human. This gave us a score per defect category in each test round:

Defect type

Model correct detections

Porosities

12 / 15

Short shots

8 / 15

Cracks

14 / 15

The images of parts where the model failed were not discarded: they were labelled and re-incorporated into the training dataset, following the cycle described in the previous section, until scores of 15/15 were achieved across several consecutive tests per category.

What AI saw... and we didn't

The most revealing moment came with the parts the operator had marked as good. In the initial iterations, the results between human and model were very similar: the system barely disagreed with human judgment on "good" parts. But as we fed the dataset and the model became more robust, rejections began to increase on parts that appeared perfect to the naked eye.

At first, we thought these were false positives—the typical issue of an overly sensitive model seeing defects where there are none. The reality was different: out of those 50 parts classified as good, an average of 10 actually had real defects. Defects so small, in such discrete locations or so difficult to perceive after checking hundreds of identical parts, that the operator had overlooked them in a completely understandable way. AI did not.

That figure—one out of five "good" parts having an undetected real defect—best summarises the added value of machine vision in this project: it is not just about speeding up inspection, but about raising the ceiling of what can be detected.

False positives vs. false negatives: where the true risk lies

In any machine vision project applied to quality, an explicit decision must be made regarding which way the model should err when in doubt, because in practice no system achieves 100% permanent accuracy:

  • A false negative (letting a defective part pass) carries a cost paid downstream: customer complaints, assembled parts failing in service, costly rework.

  • A false positive (rejecting a good part) has a more immediate but more controllable cost: loss of valid product, additional manual inspection time.

In critical processes, such as casting, automotive, or structural components, the standard setup prioritises minimising false negatives, even if that implies a slightly higher percentage of false positives that are subsequently reviewed manually. It is a business decision, not merely a technical one, and must be taken together with the plant's quality team, not imposed from the outside.

Does AI replace the operator?

It is the question we are asked most often when presenting a case like this, and the short answer is no. The long answer is that the role changes.

In the previous example, the system does not operate autonomously from day one: throughout the entire training and validation process, the operator's judgment defines what is correct and what is not. AI learns from that judgment, applies it systematically to a volume no human could inspect part by part with the same attention throughout an entire shift, and returns marginal cases to the operator where their judgment is still required.

In practice, the result is that operators stop spending their attention on obviously good or obviously bad parts—which make up the majority—and focus it on the percentage of borderline cases flagged for review by the system. It is a redistribution of human labour towards where it adds the most value, not a replacement.

Frequently asked questions

How many parts are needed to train a visual inspection model?
It depends on the defect type and its visual variability, but in projects like the one described, it typically starts with hundreds of images per defect category, and the number grows with each targeted retraining cycle until accuracy stabilises.

What happens if the model makes a mistake in production?
Borderline or low-confidence cases are flagged for human review rather than being automatically accepted or rejected. The system is also periodically retrained with new cases detected on the plant floor.

How long does such a system take to be production-ready?
It varies depending on the volume of historical data available and the complexity of the defects, but the training, testing, and retraining cycle is usually repeated several times before reaching the target accuracy across all defect categories.

Can AI detect new defect types it has not seen before?
Not reliably. A model trained to detect porosity, short shots, or dents does not automatically generalise to a completely different defect type without sample data from that new category.

Conclusion

This case demonstrates that, beyond automating repetitive tasks, AI in machine vision offers a tangible advantage: detecting defects that, by their nature, are virtually invisible to the human eye in a real production environment, even for operators with years of experience.

This does not replace human work: it amplifies it, accompanies it, and guarantees a higher and more consistent quality level than either human or machine could achieve alone.