# CNN-Based Defect Inspection for Injection Molding Using Edge Computing and Industrial IoT Systems
## 2 Background and Related Work
### Cnn  
Deep-learning techniques, which learn by building deep neural network layers, have evolved rapidly because of the massive number of data and amount of computation associated with GPU performance development. Let us look at deep neural networks to understand the behavior of deep learning. The input layer that accepts input data in this network predicts the value of the end result. The output layer extracts features consisting of hidden layers with layer stacks of different depths between the input layer and the output layer. The data learning process is a cost function that feeds input data to the input layer and the hidden layer, showing the difference between the output values predicted by the final output layer and the target label of the input data. Reverse propagation is done on differences in the cost function (Gradient), and the weights of all layers are gradually updated. CNN is a type of artificial neural network that can be easily applied to video and image. When input images are given to the input layer, convolutions are executed sequentially for overlapping parts by small filters. One filter has weights of that size and does weight learning to extract features of the image. The filter moves horizontally and vertically in the input image, doing convolution and activation function operations, extracting features, and displaying Feature Map Yield. This computational method is similar to image convolutional computation in the field of computer vision. Deep neural networks of these structures are called CNNs. Since [PERSON] et al. [31] developed CNNs, several defect detection models have been developed for industrial products. CNN models have made breakthroughs in computer vision and are widely used for various applications such as image classification [32], image segmentation [33], and object tracking [34]. Surface-defect detection [35; 36; 34] identifies cosmetic defects in fabrics, metals, woods, and plastic products by using image-processing technology. Targets may differ, but surface-defect detection is a feature extraction process used to identify anomalies that can be distinguished from textures. Algorithms that extract features from textures to detect surface defects can be defined according to four categories [37]: statistical, structural, filter-based, and model-based approaches. Statistical and filter-based approaches have been widely used. For example, histogram properties classified by statistical approaches have been applied to various studies [38; 39] and have worked well at low cost and effort. Among the co-space/space frequency methods classified as a filter-based approach, the Gabor transformation [40] (using modified Gaussian filters) is widely used, because it is similar to the human visual system. After CNN was developed, filter kernel-based neural networks were proposed, and CNN-based feature extraction techniques were quickly developed in the fields of image processing and machine learning research. [PERSON] et al. [41] applied a general deep learning approach based on CNN models for automatic surface examination. [PERSON] et al. [42] used the modified CNN model triplet network to teach Deep Matrix to do anomaly detection for industrial surface examination. [PERSON] et al. [43] proposed a CNN-inspired dual joint detection model to classify industrial surface inspections. [PERSON] et al. [44] proposed a cascaded autoencoder architecture based on CNNs to segment and localize multiple defects in industrial product data. Furthermore, many researchers have proposed various robust CNN-based models [45; 46] to address image classification problems or defect location problems for various industrial surface defects. Recently, concrete crack detection research using CNN-based models has been actively conducted. [PERSON] et al. [47] applied a temporary fast region-based CNN (Faster RCNN) to distinguish between handwritten scripts and cracks in concrete surfaces. [PERSON] et al.