Industrial Anomaly Detection using Generative Adversarial Network

Saurabh Singh

Saurabh Singh

New Delhi, Delhi

1 0
  • 0 Collaborators

A new anomaly detection system was proposed for the detection of defects in hot rolled steel. A CNN is used for the anomaly detection, however, along with a CNN a GAN is used to produce 'fake' data. A CNN trained in 'real' and 'fake' data has better accuracy in classifying defects. ...learn more

Project status: Published/In Market

Artificial Intelligence

Groups
Student Developers for AI

Links [1]

Overview / Usage

Hot rolled steel has various surface defects such as patches, inclusion, crazing, scratches, pitted surface, rolled in scale, indentation marks, rust, etc to name a few. The detection of these anomalies or defects can play a crucial role in ensuring quality control. This task of quality inspection is traditionally done through visual inspection by human experts. However like any other human inspection process, it is slow, inefficient and highly prone to the fatigue of human expert. For these reasons automation of inspection of surface defects in hot rolled steels does seem a necessity. Two Convolution Neural Networks(CNN) is trained to detect these defects in each of the two datasets-The Northeastern University(NEU) Dataset for defects in hot rolled steel and a custom dataset. A Generative Adversarial Network(GAN) was then used to create new 'fake' images of defects. Two other CNN's were trained each on the original datasets along with a 'fake' data generated by the GAN. This new method to train CNN for image class detection of surface defects classifies the defects more accurately than the original CNN trained only on the real data in both the datasets and hence proves to be a better method.

Methodology / Approach

To create a benchmark for accuracy that can be obtained with the use of limited data, we first train a Convolutional Neural Network (CNN) with the already available data. The training was done on a Tesla K80 GPU with 12GB of RAM. To test the accuracy of the trained model on the specific dataset, some images were kept aside which were not part of the training procedure. The dataset was divided into 80% training set and 20% testing set. The images in the testing set are finally used to compute the performance of the trained model. In the anomaly detection task, we are required to perform a two-step process to accurately detect the anomaly in an image. This work focuses on obtaining high recognition performance of the automatic surface defect detection system by generating synthetic (fake) images with the help of already available limited training data.

In the task of anomaly detection, we are required to automatically detect the type of defect present in the input image of the defective sample. That is, the image with any kind of manufacturing defect that is visible on the surface of the sample, need to be acquired. For example: Scratches, Patches, Corrosion etc. The image will then be fed to our proposed convolution neural network model which will predict the probabilities of any defect being present. As neural networks requires thousands of sample images for training, due to limited availability of these samples for each class, we will be using a Generative Adversarial Network to generate synthetic / fake images from the already available limited images. The combined images will be then used to train the neural network.

Dataset for training the Generative Adversarial Network consists of multiple sur- face anomaly datasets collected from the internet such as the famous surface defect dataset of Northeastern University (NEU) as well as from collecting data samples from the industries. The proposed anomaly detection system will be tested on two different industrial surface anomaly datasets referred throughout the work as Dataset-1 (DS-1) and Dataset-2 (DS-2). Each image in the DS was resized to 299 * 299 pixels to suit the size of the input layer of the Generative Adversarial Network. The intensity of each pixel in the grayscale image was originally represented by a number between 0 and 255. These values were scaled down to a number between 0 and 1 to improve the convergence rate of the neural network and hence improve the training time and reduce computational load.

Technologies Used

The libraries used are-

Pytorch

Numpy

FastAI

Matplotlib

Scikit-Learn

Seaborn

Scipy

No Special Hardware was used. Google Colab Notebooks were used for training the CNN and the GAN.

Comments (0)