You don’t need us to tell you—faulty parts leaving the assembly line are bad news. Defects increase manufacturing costs, hurt product quality, diminish brand value, and generate industrial waste. In heavily regulated industries, they can endanger lives and put businesses at risk. While it’s unrealistic to get defects to zero, reducing their number to a minimum and swiftly identifying the root causes of production errors will increase the profitability of almost any manufacturing business.
Luckily, we’ve come a long way from the days of quality control being exclusively reliant on workers’ eyes. Automated visual inspection using cameras, sensors, and machine learning tools enables manufacturers to catch more defects, earlier. However, these systems are not without their own challenges.
In this article, we’ll review the following:
- what defect detection is
- when it’s relevant
- how it impacts production lines
The key developments in AI-based defect detection techniques
Why scaling AI in manufacturing is difficult, and how Vanti can help.
Defect Detection: What It Is, and Why It Matters
Defects are a fact of life in any production line. Manufacturers are always straddling the line between increasing yield and reducing the number of faulty products being churned out. This balance will differ by industry – for a furniture company, a scratched piece of metal going undetected might only cause minor reputational damage; whereas for a pharmaceutical company, a mismade batch could trigger a regulatory response costing many millions of dollars.
Whether you’re willing to accept some level of defects or need to clamp down on every last one, timely detection is a key aspect of quality control that separates leading manufacturers from mediocre ones. Beyond preventing faulty products from getting into the hands of consumers, detecting issues early on allows you to continuously improve your production standards. Defects occur due to poor design, issues with mechanical equipment, or negligent workmanship. Early detection can make for more effective root cause analysis and help nip these issues in the bud before they become major problems for the business.
Common Defect-detection Techniques
Production faults come in all shapes and sizes. For certain components, quality checks might require in-use testing or breaking a compound apart into underlying chemical parts, which can degrade the quality of the object being examined. Some materials might also require more advanced inspection techniques such as X-rays, ultrasonic testing, or osmosis testing.
However, many common types of defects can be identified using visual inspection. This method is non-destructive and causes minimal disruption to ongoing production, which is why it’s the most extensively used means of quality control in manufacturing optimization.
Visual inspection can identify faults that can degrade a product’s aesthetics or function – such as scratches, spots, or holes on the surface, as well as unwanted variations in size and color.
The Evolution of Visual Inspection
Visual inspection has changed a lot over the years due to advancements in automation, cameras, image processing, and artificial intelligence. Let’s look at how visual inspection systems have changed and how today’s state-of-the-art manufacturers manage production defect detection at scale.
Historically, manufacturing defect detection was handled by the workforce – human inspectors who would manually check a subset of produced components for faults. While better cameras and optical equipment allowed this process to be done remotely rather than on the production floor, it still suffered from many drawbacks: Subsampling: Since manufacturers can’t afford to hire an infinite number of inspectors and inspectors can only check a limited number of products, this inevitably means only a small sample of products are tested – which leads to less common defects being missed completely. Human error: Inattentiveness, fatigue, and biases afflict even the most professional workers, causing harder-to-notice defects to go unnoticed or systemic faults to be misdiagnosed. Difficult to automate and scale: The reliance on human labor and often-subjective human judgement make these systems difficult to scale to new assembly lines or products.
Rule-Based Machine Vision
Manufacturers introduced machine vision as a means to augment manual visual inspection. In this method, product images are captured and analyzed based on predetermined rules programmed by domain experts. When a defect is detected, the quality inspector can be alerted to verify it. These systems are effective at identifying clearly visible and predictable defects such as parts that are too short or too long, misalignments or absences. However, they also suffer from significant drawbacks:
How AI-based Defect Detection Systems Work
While different machine learning models might be used to solve different problems – i.e., finding faulty parts in semiconductor wafer assembly is not the same as in a car factory – the operating principles are similar. By using deep learning algorithms and neural networks, machines can learn to mimic human inspection by differentiating between parts and finding anomalies compared to what the system ‘expects’ to see in the data. These models can be smart enough to ignore variations in positioning, orientation, lighting, and other stochastic factors.
Any AI-based solution will need to include:
- Data collection and preparation: Typically images, video, and sensor data captured from the relevant conveyer belt. Local network connectivity is required to store the data, which would typically be kept on-premises before being uploaded to the cloud in order to avoid gaps in connectivity.
With supervised learning models, manufacturers also need to obtain hundreds of images of defective products, and to annotate the data to create a catalogue of defects – we cover that in the next few paragraphs.
- Model selection: Data scientists need to select the AI model that will most accurately detect defective products in the stream of video or images, and define key parameters in the model such as precision, accuracy, and F1
- Model training and validation: The AI model is trained on historical data, and then tested on real-world data to validate that it works as expected
- Deployment and integration: Once a working model is ready, it needs to be deployed to edge computing devices in order to identify defects in real time so that additional work isn’t performed on defective parts
While supervised ML models can achieve a level of accuracy that surprasses a human inspector (and of course they have the advantages of being consistently available with low additional costs), they can be very difficult to scale:
Each product and each assembly line requires its own training data, which needs to be annotated by domain experts. While 60-150 images are generally enough for one specific process being monitored, manufacturers usually have dozens of different components and many possible defects, requiring thousands of annotated images.
The reliance on historical data means the system cannot reliably identify new types of defects (for example due to new faults in machinery) and needs to be retrained when these appear.
Choosing the appropriate AI model and sensitivity thresholds is not trivial and requires a deep understanding of data science and the manufacturing process
Unsupervised Machine Learning
In unsupervised learning, the AI algorithm can detect patterns in unlabeled data. This removes the need to create a catalogue of ‘good’ and ‘bad’ images – instead, the system only needs examples of acceptable (defect-free) products, which are obviously easier to obtain, and can learn to identify anomalies that differ significantly from this baseline.
We thus get a simpler setup:
Unsupervised ML systems, built on anomaly detection in manufacturing, can be deployed faster and are also capable of detecting new defects that have never been seen before. However, they come with their own set of challenges:
- In the past, unsupervised ML models have struggled to detect more subtle defects and were often used for “easier” problems such as presence or absence
- Significant effort is still required for model training, evaluation, and deployment – and that includes all the challenges involved with getting a data science project off the ground, from hiring data scientists to preparing the data for analysis
Why AI-Based Defect Detection is Hard to Scale and How Vanti Can Help
Advancements in AI are exciting. They can deliver massive value gains by improving manufacturing quality at a fraction of the cost of hiring additional inspectors, especially when combined with other techniques such as anomaly detection for predictive maintenance. However, the reality is often more challenging:
- Implementing an AI-based system requires a high level of expertise in AI and machine learning. Qualified data scientists are difficult and expensive to hire, and they often prefer to work on more ‘glamorous’ projects rather than manufacturing
- Obtaining training data – especially for supervised learning – is a significant challenge. Hundreds of images need to be labelled and catalogued by people with extensive domain expertise, and the process needs to be replicated for each product or assembly line.
- Things can go wrong in a multitude of ways, which are often difficult to predict. New types of production faults might require the whole operation to go ‘back to the drawing board’ to accommodate changes to training data and algorithms. To understand just how many variations of defects can exist, see this example from the NCBI website:
- Deploying the model to production environments is often challenging from a systems integration perspective.
These are the problems Vanti Analytics has solved for some of the world’s leading manufacturers such as Nvidia and Siemens. Vanti uses proprietary machine learning algorithms to tackle the challenges that have prevented AI in manufacturing from scaling in the past. In the context of defect detection, this means:
- Removing the need to label images – Vanti’s SaaS solution provides unsupervised anomaly detection using only images of the product it is monitoring
- Quickly building and deploying models with minimal tuning needed on the manufacturer’s side, while providing transparency into the model being used
- Identifying systemic trends by clustering images
- Providing detailed reports on failures to simplify root cause analysis
Vanti models can be created, configured, and trained in a matter of hours, and integrated into the production line itself in a matter of days. Once deployed, Vanti automatically monitors and visualizes model performance, alerts to model performance issues (such as slipping accuracy), and auto-discovers new model opportunities.
To learn more about Vanti’s AI-powered solution: