# A Visual Fault Detection Algorithm of Substation Equipment Based on Improved YOLOv5
## 1 Introduction  
The power system is one of the most critical infrastructures in modern society and substations are indispensable components of the power system. In the power system, a large number of power terminal equipment may experience wear or damage due to factors such as service life or environmental conditions. If these defects reach a high severity level, they can lead to equipment failure [1; 2; 3; 4]. With the continuous increase in electricity consumption, the operational stability and level of intelligence of the power system face higher demands. To ensure the reliable operation of the power system, regular inspections of substations are particularly important. This can promptly identify and address potential safety hazards [5]. In recent years, computer vision technology [6; 7; 8] has been widely applied in various fields such as image classification [9; 10] and video analysis [11]. It has provided numerous feasible solutions for defect detection problems [12; 13; 14; 15], enabling computers to perceive and recognize images or video information like humans. In the field of power equipment maintenance, the Internet of Things (IoT) deployed by the company consists of a large number of power terminal devices. Edge computing-based power monitoring and application systems [16; 17] are generally used for analyzing and processing the collected images of power equipment to monitor their operational status. Therefore, object detectiontechniques can serve as an edge service to handle and analyze a large volume of device status images. Traditional object detection algorithms typically start by selecting candidate regions from the input image, followed by manual feature extraction and classification using feature classifiers [18; 19; 20]. However, these traditional models suffer from high time complexity and large window redundancy due to the exhaustive sliding window approach, resulting in long detection time and poor detection performance, especially on unfamiliar datasets. With the introduction of convolutional neural networks (CNNs) [21], the paradigm of visual perception has undergone a significant transformation. Currently, deep learning-based object detection algorithms can be mainly divided into two categories. The first category is the region-based R-CNN-series algorithms [22; 23; 24], which achieve high recall rates by extracting image feature information with a minimal number of candidate boxes. [PERSON] et al. [25] used a deep convolutional neural network method based on Faster R-CNN to identify and locate broken insulators and bird nests. [PERSON] et al. [26] proposed the Mask R-CNN model for pixel-level recognition of substation equipment, accurately identifying various types of substation devices. [PERSON] et al. [27] proposed an improved Mask R-CNN method that utilizes infrared image semantic segmentation for device feature extraction, making it suitable for infrared image power equipment detection tasks. [PERSON] et al. [28] proposed a detection system that combines edge computing and an enhanced Faster R-CNN for detecting device defects in substation scenarios using collected substation equipment video images. [PERSON] et al. [29] presented an improved Faster R-CNN model for automatically detecting 16 types of electrical equipment in substations. The YOLO series is another type of object detection algorithm [30; 31; 32]. These algorithms combine target localization and recognition based on global information, instead of using information from each candidate box, resulting in fast and efficient detection performance [33; 34]. [PERSON] et al. [35] achieved real-time detection of anomalies in power equipment infrared images by improving the Single Shot MultiBox Detector (SSD) algorithm. [PERSON]. [36] proposed an enhanced algorithm for insulator defect localization and detection in the YOLO (You Only Look Once) model to reduce interference during unmanned aerial vehicle inspections. [PERSON] et al.