Applied AI & AI in business /

Using Images to detect defects in manufactured parts

July 5 2020/5 min read

A lot is said about Smart Manufacturing and Industry 4.0 - but what exactly does this mean and how can you break it down? One tangible example is automated defect detection. Integrating deep learning techniques into production lines promises improved speed, accuracy and consistency compared to traditional defect detection techniques.

The challenge of defect detection

In manufacturing, there is a fine balance between maximising yield and minimising the number of defective parts that make it through the quality control process. This balance can be a difficult one to strike and is of course highly dependent on the industry and the manufacturing methods used. In any case, the most important tool for finding this balance is to have as high accuracy as possible in detecting those defects. Deep learning is the key to making defect detection cheaper, quicker and more accurate.

Traditional techniques

While there are many ways to detect different types of defects, this article focuses on surface defects using visual-based approaches, which is one of the most common procedures in the industry. Without the use of deep learning, this has been done either by human inspection or traditional automated techniques.

  • The accuracy of human inspection is often inconsistent because the level of experience and ability can vary significantly between individual inspectors. Human inspection also often means taking only a few samples from each batch which runs the risk of missing one-off, random defects.
  • Efforts to automate defect detection using traditional methods require significant upfront investment as well as rigorous setup, testing and calibration procedures. These systems can suffer from a lack of flexibility as they often only work if reference conditions (positioning, orientation, lighting etc) are met precisely. The window of parts that are considered acceptable is also very narrow which is not ideal for all types of products.

How deep learning can improve defect detection methods

Deep learning allows for high versatility as it can abstract from variations in positioning, orientation, illumination and background textures. This is extremely difficult to do with traditional automated techniques.

Deep learning can also outperform human inspection. A well designed defect detection model is faster, more accurate and crucially, it has a higher consistency than humans. In this report, management consultancy company McKinsey estimates that up to 90% improvement compared to human inspection is feasible. 

The speed and versatility of these systems enable them to be integrated at more stages of production, allowing defective parts to be rejected early in the manufacturing process. Detecting defects early is a large cost-saver because it stops a bad part from undergoing unnecessary value-adding processes in the supply chain.

How do I build a deep-learning model for defect detection on the Peltarion platform?

Using deep learning to identify defective parts can be done using the Peltarion platform. We built a model which looks at metal pump impellers to identify surface defects, a common production fault in metal components. You can have a go at building a model like this on your own by following our defect detection tutorial.

Detecting whether a manufactured part has surface defects is an example of a binary image classification problem, meaning that the input to the model is an image of the manufactured part and the output is one of two classifications - defective or non-defective.

While some of the details of how the deep learning model works can get quite technical, you are not required to understand or even be familiar with any of it in order to build a working model using the Peltarion platform. The platform recognizes the data and problem type (images with binary classification), automatically chooses the ideal model and creates a functioning deployment as well.

Test it yourself

You can test the functionality of the model we built in the app below. Click here to download 10 images that have not been seen by the model.

Click the icon below to upload an image of the part. Once you have uploaded an image, you can click it again to try another one.

The bigger picture - Industry 4.0

In reality, this use case is merely the tip of the iceberg in terms of what can be achieved using deep learning in manufacturing or even yield optimisation specifically. 

A major benefit of deep learning is the ability to combine several data types with complex dependencies. Defect detection is by no means limited to surface defects or visual inspection. With more varied input, the model will gain even more insight into the quality of the product and perform even better in identifying more types of defects.

Defect detection may be an important first step to take towards a modern factory approach but the true value is when you can establish a link between process control data and yield data. This enables you to identify patterns in other factors and how they relate to production quality, a key step in being able to improve quality rather than simply identify when something has gone wrong. Advanced systems can even suggest optimal input parameters for machine operators and improve product quality automatically. If you’re looking to be a pioneer in this space, reach out to the Peltarion Expert Services team.

The huge potential of deep learning in business, touched upon very briefly in this post, continues to be a large missed opportunity for many companies. Modern advancements have meant that AI is available to all types of organisations and with operational AI, the implementation is far easier than many might think.

  • Erik Henriksson

    Erik Henriksson


    Erik is a summer intern at Peltarion, currently working on producing content to demonstrate the usability of the platform. He is also studying a MEng in mechanical engineering at Imperial College London.

How to build a model like this

02/ More on Business & Applied AI