# CNN-Based Defect Inspection for Injection Molding Using Edge Computing and Industrial IoT Systems
## 4 Experiment and Result Analysis
### Experiment Environment  
The hardware used in this study consisted of a computer with an Intel Core i7-8700 K processor, GTX 1080 Ti, and 12 GB RAM. Therefore, it was possible to reduce the training time and improve the performance, unlike the capabilities of previous equipment. The result of the algorithm may vary depending on the environment of the experiment. The system specifications used for the experiments are listed in Table 3.  
During the experiment, we collaborated with a company called Telstar-Hommel. Furthermore, we used software tools called LINK5. Telstar-Hommel has 30 years experience of building assembly lines, measurement machines, and quality control systems for the automotive industry. LINK5 is Telstar-Hommel's independent Smart Factory platform created based on years of experience in building automation lines in various industries and the know-how of IT professionals. It is a solution for quality improvement and productivity enhancement by monitoring the situation occurring in the production line and managing/analyzing all generated information to improve the productivity and quality of the customer production line. It collects information that occurs throughout the plant's facilities and production in real time and provides each function in a modular fashion. As a specialized company in automation equipment for 30 years, it is possible to build a more accurate and efficient production and quality management system with knowledge of equipment and IT convergence. Using this software tool, PLC and edge box were connected, and vision sensor and edge box were connected. Furthermore, the algorithm performed in Edgebox is implemented in Python.  
The vision sensor used in the above experiment is shown in the Figure 4. These vision sensors were used to collect data. Two vision sensors collected image data.  
\begin{table}
\begin{tabular}{c c c c} \hline \hline
**Layer Name** & **Output Size** & **Network** & **Connected to** \\ \hline Input Layer & \((300\times 300)\) & Conv2D & \\ Conv Layer1 & \((150\times 150\times 16)\) & Conv2D, kernel size = \(7\times 7\) & Input Layer \\ Pool Layer1 & \((75\times 75\times 16)\) & Maxpooling2D, size = \(2\times 2\) & Conv Layer1 \\ Conv Layer2 & \((75\times 75\times 32)\) & Conv2D, kernel size = \(3\times 3\) & Pool Layer1 \\ Pool Layer2 & \((37\times 37\times 32)\) & Maxpooling2D, size = \(2\times 2\) & Conv Layer2 \\ Conv Layer3 & \((37\times 37\times 64)\) & Conv2D, kernel size = \(3\times 3\) & Pool Layer2 \\ Pool Layer3 & \((18\times 18\times 64)\) & Maxpooling2D, size = \(2\times 2\) & Conv Layer3 \\ Flatten Layer & (20,376) & Flatten & Pool Layer3 \\ Dense Layer & (64) & Dense & Flatten Layer \\ Dropout Layer & (64) & Dropout, rate = 0.2 & Dense Layer \\ Softmax & (1) & Dense & Dropout Layer \\ \hline \hline \end{tabular}
\end{table}
Table 2: Summary of Proposed Architecture.  
\begin{table}
\begin{tabular}{c c} \hline \hline
**Hardware Environment** & **Software Environment** \\ \hline CPU: Intel Core i7-8700 K, 3.7 GHz, & Windows TensorFlow 2.0 framework \\ Six-core twelve threads, 16 GB & Python 3.7 \\ GPU: Geforce GTX 1080 Ti & \\ \hline \hline \end{tabular}
\end{table}
Table 3: System Specifications.  
Figure 5 shows the rail to be inspected by the vision sensor. Products enter the rail one by one, and the rail rotates through a sub-motor. Since this structure is photographed while the tampon applicator is rotated on the rail by a sub-motor, the system can inspect all sides of the product.