# Dual-Kernel-Based Aggregated Residual Network for Surface Defect Inspection in Injection
## 3 Dual-Kernel-Based Aggregated Residual Networks
### Experimental Results  
The PE-ResNeXt model was validated using the DAGM dataset. Table 3 lists the experimental results of comparing the basic ResNeXt-50 (\(32\times 4\)d), ResNeXt-101 (\(32\times 8\)d), Deformable ConvNet V2, and our proposed PE-ResNeXt models. As listed in Table 3, the highest accuracy is 99.97% for the PE-ResNeXt-101 (\(32\times 8\)d) model. Table 4 presents the experimental results of the DF-ResNeXt model. Output class 6 is the classification-test result for the background texture of each class, and class 2 is the experimental result of classifying defects and nondefects. Output class 6/2 is the experimental result of a test that simultaneously detects six classes and two defects. The highest accuracy achieved is 100% with DF-ResNeXt-101 (\(32\times 8\)d). As listed in Table 3, ResNeXt has better classification accuracy than Deformable ConvNet V2. According to Table 4, Deformable ConvNet V2 exhibits better performance than ResNeXt when experiments are conducted for each class and defect. In particular, in defect classification, Deformable ConvNet V2 performs much better than ResNeXt. Therefore, we assume that the deformable kernel performs better than the fixed kernel for the distinction between texture and pattern. Figure 6 presents the training, validation loss, and accuracy of the proposed model. The results show a decrease in training, validation loss, and an increase in accuracy of the DF-ResNeXt-101 (\(32\times 8\)d) and PE-ResNeXt-101 (\(32\times 8\)d). The DF-ResNeXt-101 (\(32\times 8\)d) performed low training and validation loss from the first epoch and obtained the first highest accuracy at five epochs. A bit of overfitting occurred at six epochs, but validation loss was decreased from seven epochs. The computation time was 9718 s (2 h, 41 min, and 58 s). The PE-ResNeXt-101 (\(32\times 8\)d) exhibited higher training and validation loss values than the DF-ResNeXt-101 (\(32\times 8\)d). No overfitting or underfitting occurred. The accuracy gradually increased, but the maximum accuracy did not exceed 99.97% even more epochs were added. The computation time was 9519 s (2 h, 38 min, and 39 s). The computation time of the DF-ResNeXt 101 (\(32\times 8\)d) was longer than the PE-ResNeXt-101 (\(32\times 8\)d), about 2%, but the accuracy of the DF-ResNeXt 101 (\(32\times 8\)d) was 0.03% higher. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Output Classes** & **Model** & **Accuracy (\%)** \\ \hline \multirow{3}{*}{6} & Mainframe [ResNeXt-50 (\(32\times 4\)d)] & 99.42 \\  & Mainframe [ResNeNeXt-101 (\(32\times 8\)d)] & 100 \\  & Subframe [Deformable ConvNet V2] & 100 \\ \hline \multirow{3}{*}{2} & Mainframe [ResNeNeXt-50 (\(32\times 4\)d)] & 93.62 \\  & Mainframe [ResNeXt-101 (\(32\times 8\)d)] & 93.62 \\  & Subframe [Deformable ConvNet V2] & 100 \\ \hline \multirow{3}{*}{6/2} & DF-ResNeXt-50 (\(32\times 4\)d) & 96.14 \\  & DF-ResNeXt-101 (\(32\times 8\)d) & 100 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Experimental results for the DF-ResNeXt. \begin{table}
\begin{tabular}{c c} \hline \hline
**Model** & **Accuracy (\%)** \\ \hline ResNeXt-50 (\(32\times 4\)d) & 98.79 \\ ResNeXt-101 (\(32\times 8\)d) & 99.42 \\ Deformable ConvNet V2 & 97.94 \\ PE-ResNeXt-50 (\(32\times 4\)d) & 98.83 \\ PE-ResNeXt-101 (\(32\times 8\)d) & 99.97 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Experimental results for PE-ResNeXt. Table 5 provides a comparative summary of the true positive rate (TPR), true negative rate (TNR), and accuracy between the proposed models and models from previous studies. The PE-ResNeXt and DF-ResNeXt models proposed in this study have 12 and 8 final output nodes, respectively, and their structural characteristics are different. PE-ResNeXt, which has 12 output classes, has a 99.9% accuracy. This is 0.7% higher than the 99.2% value of DCNN [36] and 0.1% higher than that of FR-CNN [24]. DF-ResNeXt performed 0.2% better than FR-CNN. The PE-ResNeXt model, proposed by [PERSON] et al. [36], is an advanced DCNN model with 12 output nodes.