## 3 Experiments and Analysis
### Comparison with Different Models  
After setting the hyperparameters, the accuracy and loss of different network models were evaluated on the validation set. According to our experimental settings, images of the validation set were detected once per iteration to evaluate the accuracy and loss of the model. Using the cross-entropy loss function, the weights of all network models were randomly initialized. Vgg11 and Vgg16 set the last layer of the network as 5 channels, using the same dataset as the proposed model with GAN, while the proposed model without GAN only used traditional data enhancement to expand the dataset. Under the conditions of the above settings, we obtained the accuracy and loss of the training set and the validation set of the four network models, as shown in Figure 8. In the evaluation of the training set, as can be observed from Figure 8a,b, all network models after 40 rounds of iterative training set accuracy were stable at 98%, and the loss of stability was at 0.05. The results are considerable. However, in the evaluation of the validation set, the performance results of different network models vary greatly. In Figure 8c, it can be seen that with the increase in number of iterations, all four network models achieved a high accuracy. We note that Vgg11, Vgg16, and the proposed model with GAN converged faster. An accuracy of 90% was achieved after only 6 epochs. The proposed model without GAN required 12 epochs. However, the Vgg11 and Vgg16 curves fluctuated greatly and had poor stability, which may be due to the large number of parameters in the two network models. There was also a certain risk of overfitting for the gear end face dataset with a small sample size. In terms of final accuracy, the proposed model with GAN reached an accuracy of 98.40% after 50 iterations, which was 1.33 percentage points, 2.13 percentage points, and 2.93 percentage points higher than Vgg11, Vgg16, and the proposed model without GAN, respectively. It can be seen in Figure 8d that the validation set loss of the proposed model with GAN converged to 0.11 after 50 iterations, which is lower than that of other network models. Although the proposed model without GAN performed better in terms of stability, due to reduced image data, the final accuracy and loss results were better for the proposed model with GAN. This shows that the proposed model with GAN has significant advantages in identifying the gear end face defects. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Cases** & **Learning Rate** & **Batch Size** & **Accuracy** \\ \hline Case 1 & 0.0001 & 16 & 97.4\% \\ Case 2 & 0.0001 & 32 & 97.3\% \\ Case 3 & 0.0001 & 8 & 96.7\% \\ Case 4 & 0.00005 & 16 & 96.3\% \\ Case 5 & 0.00005 & 32 & 96.0\% \\ Case 6 & 0.00005 & 8 & 95.6\% \\ Case 7 & 0.0003 & 16 & 94.7\% \\ Case 8 & 0.0003 & 32 & 94.4\% \\ Case 9 & 0.0003 & 8 & 94.2\% \\ \hline \hline \end{tabular}
\end{table} 
Table 7: Comparison of different hyperparameter combinations. \begin{table}
\begin{tabular}{c c c} \hline \hline \multirow{2}{*}{**Models**} & \multicolumn{2}{c}{**Hyperparameter**} \\ \cline{2-3}  & **Learning Rate** & **Batch Size** \\ \hline Proposed model with GAN & 0.0001 & 16 \\ Proposed model without GAN & 0.0003 & 16 \\ Vgg11 & 0.00005 & 8 \\ Vgg16 & 0.00005 & 8 \\ \hline \hline \end{tabular}
\end{table} 
Table 8: Hyperparameter selection for different models. In the testing phase, 375 images of the test set were examined, and the normalized confusion matrix of each network model was obtained, as shown in Figure 9. The proposed model with GAN had a high accuracy (99%) in terms of recognizing normal, stains, scratches, and circles images, as shown in Figure 9a. We observed that in case of the proposed model with GAN, a small proportion of the breakage images were sometimes classified as normal. This also happened with other networks. This is potentially due to fact that breakages are a shape defect while the other types of defects in the end of the gear are mostly texture-based.