## 4 Experimental Result
### Ablation Study of Training and Optimization in the Model  
Cross-validation was employed to obtain evaluation indicators using the training dataset. As indicated in Table 3, the accuracy rate of the model was 98.38%, the precision rate was 98.60%, the recall rate was 97.89%, and the F1 score was 98.24%. The parameters were 149,842, the model size was 0.57 MB, GFLOPS was 0.05, and the computing time was 10.08 ms (see Table 4). The computing time is the average time of image preprocessing and model prediction. As shown, the various evaluation indicators of the model were of satisfactory accuracy while the model was kept lightweight. Afterwards, the training and optimization methods were employed to carry out the ablation study. Adam, cross-entropy loss function, and learning rate of 0.001 were used to evaluate and analyze the RA, LA, and GC methods. Based on the experiment results, compared to when the Adam optimizer was used, the accuracy rate improved by 0.14%, the precision rate increased to 99.09%, and the recall rate was reduced by 1.80% when RA was employed. Therefore, the generalization ability of the RA model was low. When using GC, evaluation indicators of the model improved compared with those without optimization, indicating that GC effectively improved the detection rate of the model. On the contrary, when using LA, all the evaluation indicators were lower than those without optimization. Moreover, the evaluation indicators of LA-GC were lower than those of GC. While using the three methods simultaneously, the accuracy rate reached 98.38%, and F1 score achieved 98.24%. According to the results in Table 3, the Adam optimizer was not suitable for training with LA. Only when both RA and LA were used the model's accuracy be improved. When GC was the only one used, the recall index was the highest. Therefore, the three optimization methods to train the model simultaneously could obtain excellent stability and generalization. Figure 14a,b shows the training process of LDCNN and the training process using three optimization and training methods, respectively. No obvious underfitting or overfitting occurred during both training processes. However, the accuracy sometimes dropped suddenly during the training, as the model generated random predictions due to rapid convergence and insufficient parameters. After adding the \begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline
**Models** & **Accuracy** & **Precision** & **Recall** & **F1 Score** & **Parameter** & **Model** & **GFLOPs** & **Evaluate** \\ \hline SqueezeNet [14] & 95.92\% & 95.25\% & 96.01\% & 95.58\% & 1,248,424 & 4.78 MB & 0.352 & 17.57 ms \\ ResNet18 [18] & 89.66\% & 89.17\% & 96.07\% & 91.26\% & 11,689,512 & 44.59 MB & 1.82 & 19.45 ms \\ ResNet34 [18] & 85.93\% & 98.12\% & 80.45\% & 87.56\% & 21,797,672 & 83.15 MB & 3.68 & 31.00 ms \\ ResNet50 [18] & 87.85\% & 87.60\% & 88.95\% & 86.28\% & 25,557,032 & 97.49 MB & 4.12 & 57.10 ms \\ MobileNetV3 small [19] & 95.97\% & 95.26\% & 96.08\% & 95.65\% & 2,542,856 & 9.7 MB & 0.06 & 10.56 ms \\ MobileNetV3 large [19] & 96.69\% & 97.75\% & 95.53\% & 96.49\% & 5,483,032 & 20.92 MB & 0.23 & 20.92 ms \\ EfficientNetV2-S [30] & 96.04\% & 96.10\% & 96.04\% & 95.23\% & 22,103,832 & 85.1 MB & 8.8 & 73.23 ms \\ ShuffleNetV2 [31] & 95.91\% & 95.24\% & 96.01\% & 95.57\% & 2,278,604 & 8.69 MB & 0.149 & 13.72 ms \\ LDCNN & **98.38\%** & **98.60\%** & **97.89\%** & **98.24\%** & **149.842** & **0.57 MB** & **0.05** & **10.08 ms** \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Efficiency comparison of each model. \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**RA** & **LA** & **GC** & **Accuracy** & **Precision** & **Recall** & **F1 Score** \\ \hline  & & & 96.84\% & 97.06\% & 96.21\% & 96.50\% \\ ✓ & & & 96.98\% & **99.09\%** & 94.41\% & 96.65\% \\  & ✓ & & 94.24\% & 93.78\% & 94.22\% & 93.62\% \\  & ✓ & ✓ & 98.13\% & 97.53\% & **98.47\%** & 98.00\% \\ ✓ & ✓ & & 98.00\%  
training stability significantly improved.