# A Visual Fault Detection Algorithm of Substation Equipment Based on Improved YOLOv5
## 4 Results and Analysis  
Figure 8 shows an example of the experimental results. The four sets of images in the figure demonstrate the outcomes obtained by utilizing YOLOv5 and enhanced YOLOv5 for detecting substation equipment and its defects in different power equipment environments. These examples evaluate the effectiveness of the proposed algorithm in enhancing object detection performance specifically for substation equipment scenarios. Comparing the results in Figure 8, it is evident that in group A images, both algorithms identify the oil pillow. However, due to pixel clarity issues, only the improved algorithm in this paper successfully detects the meter on the oil pillow, while the original YOLOv5 algorithm fails to detect it. In group B images, the algorithm in this paper detects defective insulators with inconspicuous features. In group C images, despite background complexity and confusion between the nest and background, the original YOLOv5 algorithm detects the insulator but not the nest, whereas the improved YOLOv5 algorithm successfully detects both. In group D images, silica gel discoloration defects were missed by the original YOLOv5 algorithm but accurately detected by our improved algorithm. Additionally, for all detected targets, our improved algorithm achieved an average confidence of 0.797, an improvement when compared to 0.748 for the original YOLOv5 algorithm. Therefore, our proposed improved YOLOv5 algorithm outperforms its predecessor in detecting small targets against complex backgrounds by reducing missed detections and false positives while maintaining high detection confidence levels. The most advanced detectors YOLOv8, YOLOv5, Faster R-CNN, RetinaNet, and YOLOv3 was selected as a control algorithm for experimental analysis. Among them, YOLOv8 was chosen as the latest model in the YOLO series. The improved YOLOv5 model was compared with it to verify the advancement of this model and demonstrate the performance improvement effect compared to the original YOLOv5 model. The evaluation criteria selected include accuracy, recall rate, [EMAIL_ADDRESS], and [EMAIL_ADDRESS]:0.95 as mainstream indicators. [EMAIL_ADDRESS] refers to the mAP at IOU set at a threshold of 0.5; [EMAIL_ADDRESS]:0.95 is obtained by averaging different threshold mAPs between 0.5 and 0.95 with a step size of 0.05. Table 3 shows the performance of the improved algorithm and mainstream algorithms on our dataset in this paper. Figure 8: _Cont_. As can be seen from Table 3, the proposed improved algorithm achieves 76.8% accuracy, 72.9% recall, 73.1% [EMAIL_ADDRESS] and 42.97% [EMAIL_ADDRESS]:0.95, which is better than other mainstream algorithms. Compared to the original YOLOv5 algorithm, the proposed algorithm contributes improvements of 4.6% for [EMAIL_ADDRESS] and 3.12% for mAP@:5:0.95 and is also better than the comparison algorithm in terms of detection accuracy and recall. This shows that the proposed algorithm can effectively improve the object detection performance on substation equipment defect dataset. Using the bootstrap method, the average detection accuracy and average FPS of the original YOLOv4, YOLOv5 models, YOLOv8 model, and improved YOLOv5 model were evaluated to obtain Table 4. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Algorithm** & **Average Precision (\%)** & **Average FPS (\%)** \\ \hline YOLOv4 & 65.4 & 53 \\ YOLOv5 & 69.8 & 49 \\ YOLOv8 & 76.5 & 46 \\ pro-YOLOv5 & 76.9 & 48 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Bootstrap valuation model. Figure 8: Comparison of test results. It can be seen that, compared to other contrast algorithm models, the improved YOLOv5 model ensures both detection accuracy and FPS value.