# Dual-Kernel-Based Aggregated Residual Network for Surface Defect Inspection in Injection
## 4 Case Study  
In this section, we present a case study that performs defect inspection with the proposed model using real injection-molded products. The target product presented in Figure 7 is a signal switch used for the electronic equipment operation inside a vehicle. Because the target product is a product that is directly related to the driver's safety, it has to be thoroughly tested. The target product is partially blinded due to the security issue and request from the supplier. Figure 6: Training, validation loss, and accuracy (%). \begin{table}
\begin{tabular}{c c c c c c} \hline \hline \multirow{2}{*}{**Classes**} & \multicolumn{2}{c}{**ResNeXt-**} & \multicolumn{2}{c}{**PE-ResNeXt-101**} & \multirow{2}{*}{**FR-CNN [24]**} & \multirow{2}{*}{**DCNN [36]**} & \multirow{2}{*}{**SIFT/ANN [22]**} \\  & **101** (\(32\times 8\)d) & \multicolumn{2}{c}{(\(32\times 8\)d)} & & & \\  & **(6/2 Classes)** & **(12 Classes)** & & & \\ \hline
**TPR** & & & & & \\
1 & 100 & 100 & 100 & 100 & 98.9 \\
2 & 100 & 100 & 100 & 100 & 95.7 \\
3 & 100 & 100 & 100 & 95.5 & 98.5 \\
4 & 100 & 99.3 & 100 & 100 & - \\
5 & 100 & 100 & 99.7 & 98.8 & 98.2 \\
6 & 100 & 100 & 100 & 100 & 99.8 \\ \hline
**TNR** & & & & & \\
1 & 100 & 100 & 100 & 100 & 100 \\
2 & 100 & 100 & 100 & 97.3 & 91.3 \\
3 & 100 & 100 & 100 & 100 & 100 \\
4 & 100 & 100 & 93.2 & 98.7 & - \\
5 & 100 & 99.9 & 100 & 100 & 100 \\
6 & 100 & 100 & 100 & 99.5 & 100 \\ \hline
**Average** & & & & & \\
**accuracy** & & & & & \\ \hline \hline \end{tabular}
\end{table} 
Table 5: Comparison of accuracy (%) of the proposed and previous models. The manufacturing process consists of magnetic core insertion, injection molding, and core cutting. Surface defects such as flash, sink marks, flow lines, and black spots and shape defects such as short shots and uncut cores occur in this process. The target defects presented in Figure 8 are the black spots, short shots, and uncut defects that occur most frequently. Several types of defects may occur in one product. Another problem is the difficulty in arranging products to acquire product images for automated inspection. Two products are produced in one mold, and the cycle time is within 3 s. A worker must immediately insert the magnetic core inside the mold after the product is ejected. It is challenging to acquire images of equal scale and quality because multiple products are simultaneously ejected from a mold. We assume that, when the product is ejected, the alignment of the product is not constant. Therefore, it is necessary to focus on detecting defects that may occur in all parts and sides of the product. Five classes are defined for the target product according to the appearance of the product: the front, back, side, head, and tail (Figure 7). The three most common defects are selected (black spots, short shots, and uncut defects) in the target product, as shown in Figure 8. Images included 656 black spots, 224 short shots, 64 uncut defects, and 560 nondefect images. We assigned 1304 images for training and 200 images for validation with 50 defect images and 50 nondefect images. The number of training images was increased to 20,864 via image cropping and augmentation. The models applied for the experiment were PE-ResNeXt-101 (\(32\times 8\)d) and DF-ResNeXt-101 (\(32\times 8\)d) models, each with 20 and 9 output classes, respectively. Table 6 lists 20 output classes of PE-ResNeXt. FB in Table 6, for example, indicates a black spot on the front of the part, BB indicates a black spot on the back of the part, and so on. DK-ResNeXt has nine output classes, as shown in Figure 9b, including five outputs of the mainframe (e.g., front, back, side, head, and tail) and four outputs of the subframe (e.g., black spot, short shot, cutting, and nondefect). Figure 9 shows schematic network models of PE-ResNeXt and DF-ResNeXt. Figure 8: Target defects. Figure 7: Five classes depending on the product surface.