Latest News

Applying Convolutional Neural Networks for Precision Defect Detection in Business Quality Control

Applying Convolutional Neural Networks for Precision Defect Detection in Business Quality Control

By Aygun Zarbaliyeva, Senior Business Engineer

Aygun Zarbaliyeva, an eminent expert in deep learning and image analysis, brings her experience in applying advanced neural network architectures to real-world problems. And with a solid background in ML and a proven track record in quality control innovations across various industries, she is well-equipped to demystify the complexities of convolutional neural networks (CNNs) and their applications in defect detection.

***

Broadly speaking convolutional neural networks are a common deep learning architecture for image analysis. They are now applied in many industries including medicine, manufacturing, electronics, etc. But what exactly is a CNN and how can we use it for defect detection? In this article, I will shed some light on how CNNs work and will bring real-world examples of their applications. First of all, I will try to break down this complicated concept into easy-to-comprehend parts: local receptive fields, shared weights and biases, and activation and pooling. Dive in!

Key Concepts of CNNs

As we have already mentioned a convolutional neural network is a deep learning architecture designed for image analysis. It processes and then transforms input images through several layers to produce an output. CNNs can be trained for a variety of tasks, among them are scene classification, object detection, segmentation, and image processing. Now let us look at the key attributes that differentiate CNNs from typical neural networks.

1. Local Receptive Fields

Unlike typical neural networks where each input neuron connects to every neuron in the hidden layer, CNNs use small regions of input neurons that connect to hidden neurons, called local receptive fields. These fields move across the image to create a feature map via convolution, efficiently capturing spatial hierarchies in the data.

2. Shared Weights and Biases

CNN neurons have weights and biases learned during training. All hidden neurons in a layer share the same weights and biases, enabling the detection of the same feature (like edges) across different regions of an image, making the network translation invariant.

3. Activation and Pooling

Activation uses functions like Rectified Linear Unit to transform neuron outputs, mapping them to positive values or zero if negative. Pooling reduces the dimensionality of the feature map by summarizing outputs of small neuron regions into a single output, simplifying the network and reducing parameters to learn. For more details I recommend this video by MathWorks.

CNN Training Methods

CNN can be trained for image analysis in 3 different ways:

1. Training the model from scratch;

2. Using transfer learning (based on the idea that you can use knowledge of one type of problem to solve a similar problem);

3. Using a pretrained CNN to extract features for training a machine learning model. Let us discuss each method in a bit more detail.

Training from Scratch

This method is highly accurate but at the same time it requires a large labelled dataset and significant computational resources, which can be a considerable limitation for its application. Training a neural network involves two main phases: the forward phase and the backward phase. In the forward phase, input data is passed through the entire network with each layer processing the data sequentially. During the backward phase, gradients are back propagated through the network and weights are updated based on these gradients.

Transfer Learning

Transfer Learning presumes a pre-trained CNN on a similar problem to initialise and train a new model. This method requires less data and computation as a model trained on a large dataset applies its knowledge to a smaller dataset. For example, for object recognition with a CNN, we can freeze the early convolutional layers, which extract general, low-level features common across images, and only train the last few layers that make predictions. This allows us to use a network trained on a large, unrelated dataset like Imagenet and apply it to our specific problem.

Feature Extraction

One of the extremely useful tasks CNNs perform is that before classification they extract relevant features from an image. So in accordance with this training method, a pre-trained CNN extracts features for training a new machine learning model. This approach requires the least data and computational resources.

CNN Applications

Convolutional Neural Networks are crucial for identifying and learning essential features in image and time-series data. This makes them indispensable in various applications. In medical imaging, CNNs analyse pathology reports to visually detect cancer cells. They also enable keyword detection in audio processing and allow smart speakers to recognize specific commands, such as “Turn on the lights,” amidst background noise. In automated driving, CNNs are used for object detection — recognize signs and objects to make real-time decisions. But I want to bring examples of how CNNs are applied for defect detection in various fields.

Automotive Industry

As you may know, the automotive industry involves numerous manufacturing processes to assemble primary parts. These processes include stamping, welding, grinding, and adding components. Defects in these processes can result in entire batches of defective parts.

To inspect these parts, artificial vision cameras with pattern recognition algorithms are traditionally used. However, the efficiency of these algorithms can be affected by variables such as piece positioning, brightness changes, dust, and sensor deterioration. And this is where convolutional neural networks come on stage. They have proven effective for image recognition in these inspections. Moreover, the automotive industry increasingly requires detailed, real-time data at each stage of the process. So manufacturers tend to combine the YOLO v3 algorithm and IoT for precision defect detection.

Food Production

CNNs can also improve the quality of product control processes in food production. It is possible to implement feature extraction using convolutional networks with further post-processing in a fuzzy inference system. During the operation of this system, a high percentage of correct recognitions can be obtained and customer returns of products due to defects will be decreased. Refer to this article on Fruit Defect Detection Using CNNs to learn more about the method.

Manufacturing

Here is another great example of implementing CNNs for casting defects detection in manufacturing. Casting defects are irregularities that occur when molten material is poured into a mould and allowed to harden into a desired shape. The authors describe how CNN is applied to identify these defects.This method is based on the use of Python, TensorFlow, Keras, and Jupyter Notebook.

Electronics

Nowadays electronic products are becoming increasingly diverse and miniaturised. Traditional human inspection is no longer enough to detect tiny defects. Automated Optical Inspection systems have been employed for these purposes for quite a while. However, they use geometric features for defect detection, which are slow, prone to errors, and often provide only basic pass/fail results. Moreover, these systems also face issues with false alarms and high costs due to re-inspection. Yet, it is possible to improve accuracy, speed, and the ability to locate and classify multiple defects by means of the CNN-based approach. You can learn more about it in the article on A multiple-stage defect detection model by convolutional neural network

As you can see, the buzz around CNNs is fully justified as its applications are next to unlimited. In conclusion, I want to recommend a couple of more articles for further topic exploration: A multiple-stage defect detection model by convolutional neural network and Application of Convolutional Neural Network in Defect Detection of 3C Products. They give a deep understanding of the ways CNNs can be employed in business quality control.

Comments
To Top

Pin It on Pinterest

Share This