ARCA Yazılım
Artificial Intelligence

Zero-Defect Production Line: Quality Control with Image Processing and Artificial Intelligence

How to set up image processing and AI-based quality control systems in production lines? A guide to object detection, anomaly detection, and zero-defect goals.

Zero-Defect Production Line: Quality Control with Image Processing and Artificial Intelligence

Checking every part visually on a production line sounds safe at first. However, an eye looking at the same part all day gets tired, loses focus, and starts missing defects. According to a report compiling visual inspection research by Sandia National Laboratories, even one-hundred percent visual inspection performed by trained inspectors catches only 80 to 85 percent of defects. The rest goes to the customer.

Image processing and artificial intelligence step in precisely at this point. A camera does not get tired, applies the same criteria to every part in the exact same way, and records the result instantly. In this article, we explain the parts of such a system, what artificial intelligence adds to classical image processing, and the path you need to follow on your own line in plain language.

What is Quality Control with Image Processing?

In its simplest form, it is taking a photograph of the part and inspecting this photo with software. Classical image processing relies on specific rules: it finds edges, measures areas, places two images on top of each other, and calculates the difference. These methods have been reliably answering questions such as whether the hole diameter is out of tolerance, whether the label is attached to the right place, or whether the number of parts is complete for years.

In situations that cannot be described by rules, classical methods struggle. A scratch appears in a different place and form every time, the stain on the surface changes depending on the light, and a part stays in place but its shape is distorted. The reason why artificial intelligence enters quality control is precisely these "hard-to-describe" types of defects.

What Components Does a Quality Control System Consist Of?

  • Camera and sensor: Industrial camera, line-scan camera, thermal camera, or X-ray showing the inside of the part. The location of the defect determines the selection.
  • Lighting: The most neglected and most problematic part. Stable, controlled light makes more difference than the best model.
  • Trigger and line connection: Taking the photo when the part comes in front of the camera, transmitting the result to the PLC, and separating the defective part.
  • Processing unit: A computer or a server with a GPU next to the line.
  • Software and operator screen: The interface showing the result, keeping records, and allowing the adjustment of thresholds.
[object Object]

What Has Artificial Intelligence Changed in Quality Control?

In AI-based systems, instead of writing rules, you show examples. You mark "this is a screw, this is a clip" on a few hundred images; the deep learning model (mostly convolutional neural networks, CNNs) learns to recognize the part from these examples. This approach is called object detection: the model finds the parts it is looking for, draws boxes around them, and answers questions such as "is it there, how many, where."

Defects such as missing parts, wrong number of parts, and wrongly mounted parts are caught very well with this method. According to McKinsey's report on artificial intelligence in industry, automated inspection based on image recognition can increase the defect detection rate by up to 90 percent compared to human inspection; the same report states that efficiency gains can reach up to 50 percent.

When Object Detection Is Not Enough: How Does Anomaly Detection Work?

There is a class of defects that object detection cannot see: the part is in place, its count is correct, but its shape is distorted. A spring may have collapsed, a gasket may have slipped in its slot, or a cable may not be standing as required. The model finds the part and says "it is there"; and it is right. The flaw is not in the presence of the part, but in its shape.

It is difficult to teach such defects as a separate class because defective examples are scarce and every flaw looks different. Anomaly detection reverses the problem: you teach the model not the defect, but the healthy state. A reference pool is created from healthy part images. When a new part arrives, the image is divided into small regions, and each region is compared with the most similar healthy region in the pool. Regions that do not resemble the healthy ones stand out on the heat map; a single anomaly score is calculated for the entire image, and if the score exceeds the threshold, the part is separated.

The practical aspect of the method is that it does not require model training. A pre-trained image model (mostly Vision Transformer-based foundation models today) is used as is. Defective examples are only needed to adjust the threshold and validate the system.

[object Object]

Step by Step: How to Set Up an Image Processing Project on Your Line?

  1. Defect catalog: Which defects will be caught, which ones are critical? Prepare a written list with sample photos with the quality team.
  2. Fix the camera and lighting: Same angle, same distance, same light. Savings here will return later as a data problem.
  3. Collect and label data: A few hundred healthy and as many defective images as possible. Do not count different shots of the same part as separate examples.
  4. Set up the model and determine the threshold: Validate the threshold with images never shown to the system before.
  5. Connect to the line: Trigger signal, PLC connection, sorting mechanism, operator screen.
  6. Monitor and recalibrate: Scores drift when light, supplier, or mold changes; track false alarm and missed defect numbers weekly.

How Do You Measure Success?

Two numbers are enough: capture rate and false alarm rate. Capture rate tells you how many of the truly defective parts were caught. The false alarm rate shows how many of the healthy parts were unfairly separated. These two work against each other: if you lower the threshold, you catch more defects, but you also separate more healthy parts.

Which one will weigh more depends on the product. A missed defect in a safety part is much more expensive than a false alarm; in a cheaply and quickly produced part, every false alarm stops the line unnecessarily. Putting this balance into a table before commissioning prevents subsequent debates.

[object Object]

Common Mistakes and Points to Consider

  • Neglecting lighting: Scores come out differently in the morning and evening on a line exposed to daylight.
  • Speaking definitively with few defective examples: 95 percent measured with thirty defective images may drop to 85 percent in the field; request the result with a confidence interval.
  • Using copies of the same image on both learning and testing sides: The result looks artificially good, causing disappointment in the field.
  • Adjusting the threshold once and forgetting it: The threshold should be reviewed as production conditions change.
  • Taking the human out of the loop: In the first months, "suspicious" parts should be shown to the operator; the operator's decisions become the data for subsequent calibration.
  • Forgetting data confidentiality: Product images are often trade secrets; prefer locally running solutions where images do not leave the factory.

Frequently Asked Questions

How many images are required?
A few hundred labeled images per class is a good start for object detection. For anomaly detection, a reference pool can be established with around a hundred healthy images; defective examples are needed to adjust the threshold, and the more there are, the more reliable the result is.

Does it work with our existing cameras?
Most of the time, yes. The real question is whether the lighting and fixing are sufficient, not the camera. If it is necessary to see inside the part, a different sensor like X-ray is mandatory.

Is a GPU required?
Useful for training, not always during operation. An ordinary computer may be sufficient at low line speeds; a device with a GPU is required on lines where dozens of parts pass per second.

Does it completely remove human control?
Not in the short term. The system performs pre-filtering without getting tired; human decisions are needed for suspicious parts and new defect types. Over time, the number of parts looked at by humans decreases.

Conclusion

The zero defect goal on the production line is approached not with a single technology, but with a properly established chain: good lighting and a fixed camera, classical image processing if you can describe the defect, object detection to find the parts, anomaly detection to catch hard-to-describe shape distortions, and above all, a monitoring system that measures results and adjusts the threshold over time. This chain can be established anywhere parts are produced in large numbers, from automotive sub-industry to defense, from electronic assembly to packaging. As Arca Yazılım, we work with industrial images on this approach.

To get more information about this subject, you can reach us at +90 312 256 72 78 and visit www.arcayazilim.com for detailed information and our other solutions.

Let’s talk about your project

Share your related needs with our team.

Message us on WhatsApp