logo

Aiex.ai

4 Mins Read

How AI revolutionized the visual inspection of metal surfaces

metal surfaces

How AI revolutionized the visual inspection of metal surfaces. Researchers found a new way to generate images of metal surface defects.

The 4.0th industry revolution aims to develop smart factories which employ the Internet of Things (IoT) as well as Artificial Intelligence (AI). In the metal industry, predicting product quality in real-time and giving specific feedback on the type, size, shape, and location of each defect are crucial tasks, which can be best achieved with the help of an intelligent machine that takes care of automatic defect detection and data quantification. Defect recognition and classification can be performed by supervised and even unsupervised deep learning techniques.

Dr. Jong Pil Yun from Korea Institute of Industrial Technology, Republic of Korea, and his colleagues have recently researched the applicability of machine vision in detecting metal surface defects. As mentioned in their paper published in the journal of Manufacturing Systems, though Deep Convolutional Neural Networks (DCNNs) are being successfully used in manufacturing industries for defect recognition and classification, they suffer from the lack of large training datasets due to the difficulty of gathering such data. Using small training datasets or poor-quality ones results in an overfitted classification model or poor generalization performance. To tackle this problem, data scientists turn to data augmentation techniques. Some conventional methods to generate image data through label-preserving linear transformations include translating, rotating, scaling, blurring, changing contrast, flipping, shear mapping, adding noise, sharpening, and so on. However, these techniques will only create image-level transformations through scale and depth and would do little to nothing in dividing boundaries between data manifolds. In addition, this kind of augmented data cannot enhance data distributions which are determined by higher-level features.

Yun et al. proposed a novel convolutional variational autoencoder (CVAE) and deep CNN-based defect classification algorithm to address this issue. Indeed, a conditional CVAE algorithm can generate adequate data for each defect type in a single CVAE model to train the classification model. Then, by using DCNN models with high generalization performance they can classify all defects. To verify their model, they applied the trained model to images obtained from an actual metal production line and proved that the model works well.

A defect inspection system that detects defects in real-time and classifies defect types, is one of the key technologies required for the implementation of the smart factory

Metal-surface
Figure 1. The overall configuration of the proposed defect inspection setup for metal surfaces. Images captured by a line scan camera are sent to the image processor unit via optical cables and are analyzed using the trained model. Source

The Overall Procedure

Figure 1 illustrates the overall workflow to inspect the surface of moving metal products. A line scan camera with a resolution of 12288 pixels in the width direction of the object was used along with an illumination bar. The image obtained from the line scan camera is sent to the image processing PC through the frame grabber. Then, the defect classifier model containing a data generation module and a defect classification module analyzes real-time incoming images, detects and classifies defects, and stores the results in a database. Six different types of metal surface defects, displayed in Figure 2, were chosen to train the model. After generating an adequate amount of data, 657 samples were used for training and 655 samples for testing the deep learning classification model. The trained model is then loaded on the inspection system to detect and classify metal surface defects in real-time. Finally, the results are displayed on the human-machine interface (HMI) screen, and defects’ information is provided to the operator.

When developing an automatic defect classification algorithm based on a data-driven approach, it is important to have the same and sufficient amount of data for each defect

six different type of metals surface defects
Figure 2. Six different types of metal surface defects. Source

Training a deep-learning model with a small data set only works well for given data. In fact, it results in an overfitted model with a drastically reduced accuracy rate. In the proposed method by Yun et al. image augmentation is performed by a variational autoencoder, which creates images by automatically learning from the distributed data, then a high-performance CNN-based defect classifier model processes the generated images.

The VAE model is a directed graphical model with certain types of latent variables, such as Gaussian latent variables. The VAE model includes an encoder that extracts features from inputs and expresses latent variables, a decoder that generates an image from the latent variables, and a sampling module that generates the latent variable by sampling the output of the encoder. The encoder and decoder of the VAE model use deep neural networks.

Finally, the authors propose a CNN-based deep learning model to classify defects i.e.  the conditional CVAE (CCVAE). The classification model also contains four feature extraction layers and a classification layer

Figure 3. Model precision for each class. Source

Conclusion

Figure 3 shows the precision of the defect classification model w/wo using the proposed CCVAE model. The precision of the model is relatively poor when trained without CCVAE, due to the lack of sufficient data and an imbalance in existing data. However, using the data augmentation method by CCVAE, the model’s precision was considerably improved for all classes, thanks to a large amount of data. Hence, the defect classification system proposed by Yun et al. exhibited excellent performance when used for actual metal surface defects detection with imbalanced data.

Related articles
waste management
This article discusses the integration of artificial intelligence in the field of recycling. We will also train a model...
traffic management
As urban areas continue to grow, the number of vehicles on the road is increasing, which leads to congested...
Brake-Pad-Quality-Control-with-Artificial-Intelligence
Thanks to advancements in artificial intelligence, particularly in computer vision, deep learning models can now be utilized in various...
Trauma Detection on Pelvic Radiographs using Computer Vision Algorithms
A timely and accurate diagnosis of the proximal femur and pelvis injuries in trauma patients is essential to saving...
Defect-Detection-in-Metal-Parts-using-Optical-Systems
Detecting and classifying aesthetic defects in different sizes, shapes, and positions immediately after the casting process is an essential...
X-ray Images
Nowadays with the help of computer vision technology and image processing we can classify broken and normal bone X-ray...
Subscribe to our newsletter and get the latest practical content.

You can enter your email address and subscribe to our newsletter and get the latest practical content. You can enter your email address and subscribe to our newsletter.