# CNN-Based Defect Inspection for Injection Molding Using Edge Computing and Industrial IoT Systems
## 1 Introduction  
Injection molding has been widely used in the manufacturing industry, from small companies to major companies. The production of the injection begins with mold design and continues with raw material injection, injection molding, product emissions, visual inspection and quantification, packaging, and delivery. Defect inspection is very important in these injection molding processes, because it can reduce the risk and cost of providing defective products to customers. The manufacturer does a final defect inspection before delivery to the consumer. Many small and medium-sized enterprises often do quality checks manually. Such manual inspection is prone to human errors. In addition, continuous training of field professionals in reproducibility verification to bring each person to the same level is essential. Repeating this process is so costly that the risk of financial losses throughout the industry has increased the urgency of automating surface defect detection and expanding it to manufacturing. Worker fatigue is caused by repetitive work. To address these issues, many studies have been conducted on automation and defect detection [1, 2, 3, 4]. Among these studies, research on building a smart factory using the Internet of Things (IoT) is actively under way. Its purpose is to make smart factories, factory equipment, and sensors (IoT) collect and analyze data in real time, and see (observability) all situations of factories at a glance. A smart factory refers to a factory that can control itself. IoT-based machines extend the boundaries of smart factories to demonstrate new possibilities for manufacturing. Edge computing is defined as long-term cloud computing (CC) where data are calculated near the edge of the network where data are generated. Applying the latest computational approach, DL (Deep Learning) has been widely used for intelligence in various fields such as image classification [5], semantic segmentation [6], and image compression [7]. DL's self-learning and compression capabilities allow it to automatically learn the characteristics of the input data hierarchically, emphasizing hidden and anomalous patterns. As a result, DL can be the most widely used quality inspection technology at present. The development of deep learning technology has made great achievements, especially inthe field of image detection. In particular, convolutional neural networks (CNN) model achieved higher accuracy than humans perceived in the ImageNet Challenge [8]. However, automatic visual inspection has several problems when applied to the injection process. First, problems occur when inspecting large quantities of products at high speed. Because several products are released at once in mass production, we need an inspection model that can be processed simultaneously and quickly. Second, data imbalance is a problem. 99% of the data of products produced in the injection molding process are normal data, and only 1% are abnormal data. Abnormal data are insufficient compared to normal data, so we need to find a way to solve it. Finally, defect detection is carried out in a plane. Since the defect inspection is done on only one side, the quality inspection must be done on the parts that are not photographed. Therefore, in this paper, we present a novel method called a defect inspection framework based on deep neural networks for injection molding in IoT Systems with Edge Computing. In the training process, data augmentation techniques are initially used to improve the stability and performance of deep learning. Various data augmentation methods have been studied and applied to solve the problem of lack of data in the field. A typical example is the medical field. Data augmentation is used to construct big data in the medical imaging field [9; 10], where it is difficult to obtain enough data with personal information, such as synthesis using generative adversarial networks (GANs) [11], as well as methods such as rotation and flip. Various studies are underway, including ones on finding a method to increase data.