Defective Part Detection

Defective Part Detection

by Bharath Kumar P. Last updated on 23/Nov/2021

Posted on 23/Nov/2021

Visual defects, such as scratches and cracks, can be widely observed on finished industrial products, which put a major threat to production quality. Machine vision-based product inspection methods have been widely investigated to improve product quality and reduce labor costs. Recent advancement in deep learning provides advanced analytics tools with high inspection accuracy and robustness. However, the construction of a deep learning model is typically computationally expensive, which may not match the requirements for a quick inspection.

No alt text provided for this image

Image Credits:?ScienceDirect

Image preprocessing:

Online inspection system typically relies on the continuous running of the imaging device, which inevitably leads to an increasing temperature in the imaging device. Excessive imaging device temperature may cause the captured images to be corrupted by Gaussian noise, thereby decreasing the confidence and accuracy of the inspection. Therefore, the captured images are firstly blurred by a Gaussian function, which is a commonly used method to limit the influence of noise and enhance the performance of the subsequent image recognition module. The Gaussian kernel independently scans images on different color channels to ensure that all pixels are processed.

Region of interest extraction:

The captured images do not guarantee that all contained information is task-related as the irrelevant background content may occupy a considerable part of the image, resulting in unnecessary calculations in the next identification stage. In practice, there is typically a lighting source to outstand defective products and ensure the consistency of the captured images. Fortunately, such a lighting source is usually in the shape of a rectangle or round. For this reason, probabilistic Hough transform is employed to quickly detect the line or circle of the lighting source edge; then the detection result could be utilized for extracting ROI from the filtered image

Image identification:

This stage aims to recognize the detailed class of the extracted ROI. To achieve high classification accuracy and speed, the image identification module is constructed by cascading inverted residual blocks. The well-structured RGB image sample is first fed into a standard convolutional layer to extract primary features and expand the channels by applying different convolutional filters to each input channel.

Then, a set of cascaded inverted residual blocks are built for further visual feature extraction. A standard convolutional layer is followed by a depthwise separable convolutional layer, and the final output of the block is a summation of the input feature maps and the output feature maps. Depthwise separable convolutions accelerate feature extraction and save model scale with acceptable prediction accuracy decreasing by decomposing standard convolutional operation into two steps: depthwise convolution and pointwise convolution.

The first standard convolutional layer receives input feature maps from previous block or convolutional layers and expands channels. For the generated feature maps in different channels, depthwise convolution merely applies one convolutional filter to each feature map to capture visual features. Accordingly, the number of the output channels keeps the same as the input. Pointwise convolution is a special case of standard convolution, whose kernel size is set to one to linearly combine different input channels. Beyond that, pointwise convolution also compacts the channels of the input to match the dimension to the input of the inverted residual block, and the feature maps to which the input is element-wise added will be the final output of the block. Such connections across several layers are called shortcuts, which can well handle the gradient vanishing problem in a deep neural network.

No alt text provided for this image

Image Credits:?ScienceDirect

No alt text provided for this image

Image Credits:?ScienceDirect

The detailed approach for machine learning for mechanical engineering is taught in this course by the Decibels lab.

References:

要查看或添加评论,请登录

Decibels Lab的更多文章