## 4 Case Verification and Analysis
### Training Model  
The training loss curve of the ECA-YOLOX-Tiny model is shown in Figure 5. In the first 50 epochs of the freeze training phase, the training loss and validation loss both decrease rapidly, and the model converges quickly, and the loss value decreases rapidly as the number of training iterations increases. In the second 50 epochs of the unfreeze training, the training loss and the validation loss both decrease slowly, and the loss value on the validation set is smaller than that of the training set. Finally, the loss curve tends to be smooth and reaches a better convergence state, which indicates that the model is well trained.  
The precision-recall (\(PR\)) curves and \(AP\) values of defective insulators and normal insulators are shown in Figure 6. The \(PR\) curve can be used to judge the performance of  
Figure 5: The training loss curve of the ECA-YOLOX-Tiny model.  
the model, and the model performance will be better when the \(PR\) curve is closer to the upper right corner. In Figure 6a,b, the blue shaded area below the curve represents the \(AP\) value of the defective insulators and normal insulators, and the larger area means the larger \(AP\) value of the model. It can be seen from the test results that the \(AP\) value of defective insulators is 100% and \(AP\) value of normal insulators is 99.87%. The higher \(AP\) value means higher recognition accuracy and the better performance of the model. After introducing multiple methods of data augmentation, lightweight attention module (ECA), input image resolution expansion and multi-scale feature fusion, etc., excellent detection results have been achieved by the ECA-YOLOX-Tiny model, and the problem of low accuracy in the classification and localization of small target defective insulators due to the lack of defect insulators training samples is overcome.  
The recall curves of defective insulators and normal insulators are shown in Figure 7. Figure 7 indicates that the recall curves of insulators tend to decrease slightly with the increase in score threshold. The recall curve of defective insulators decreases tempestuously when the score threshold reaches 0.9, and the recall curve of normal insulators decreases significantly when the score threshold reaches 0.8. The recall of defective insulators is 100% and the recall of normal insulators is 99.26% when the score threshold is 0.5, which reflects the fact that the ECA-YOLOX-Tiny network has a high prediction accuracy.  
Figure 6: The \(PR\) curve and \(AP\) value of defective and normal insulators: (**a**) \(PR\) curve and \(AP\) value of defective insulators (**b**) \(PR\) curve and \(AP\) value of normal insulators.  
Figure 7: The recall curve of defective and normal insulators: (**a**) recall curve of defective insulators, (**b**) recall curve for normal insulators.  
The \(F1\) scores of defective insulators and normal insulators are shown in Figure 8. It can be seen from the figure that the \(F1\) scores display a dramatically rising trend when the score threshold approaches 0. With the increase in score threshold, \(F1\) scores tend to be stable, and the decreasing trend of \(F1\) scores is obvious when the score threshold reaches 0.9. When the score threshold is 0.5, the \(F1\) score of defective insulators is 100% and the \(F1\) score of normal insulators is 99%, which indicates that the accuracy and recall of the ECA-YOLOX-Tiny algorithm are high for both defective and normal insulators.