# ResnetCPS for Power Equipment and Defect Detection
## 1 Introduction  
During the long-term operation of power equipment, various factors such as environmental and load changes may cause scratches, deformations, cracks, rusting, overheating, discoloration, cracking, and other problems on the appearance of the equipment. These issues may be external manifestations of internal equipment failures. By inspecting the appearance of the equipment, these problems can be detected. The faulty equipment could be repaired or replaced in a timely manner to avoid production safety losses caused by the expansion of the fault. Relying on various monitoring and inspection equipment instead of artificial vision to identify safety hazards is the key to intelligent substations [1; 2; 3; 4; 5]. In recent years, with the rapid development of computer vision technology, deep learning has made significant progress in visual applications in the electrical engineeringindustry. Deep learning can automatically learn and extract feature information from images by constructing deep neural network models, thereby achieving efficient processing and analysis of images. In the electrical engineering industry, deep learning visual applications are mainly focused on equipment fault diagnosis, intelligent inspection, safety monitoring, and other aspects, providing strong support for improving the safety and reliability of power systems, such as insulators [6; 7], bird nests [8], and dials [9; 10]. Ref. [11] proposed an effective multi-task defect classifier. By constructing a CNN model, automatic extraction and recognition of fault features can be achieved. Compared with traditional fault diagnosis methods, deep learning-based image recognition methods have higher accuracy and efficiency, and can quickly locate the fault location and provide corresponding repair suggestions. Reviewing early developments of image recognition, we found that cleverly utilizing image properties for parameter sharing is the core of the development of convolutional neural networks. With the continuous improvement of computing power, the convolutional neural network gradually develops into a super-extensive network with deeper layers and more parameters. The ViT model based on attention mechanism transformer architecture provides a solution to the depth vision problem other than convolutional neural networks [12]. Aside from that, vision models based on transformer have emerged endlessly, including Swin Transformer [13], Deit [14], crossvit [15], DaViT [16], PVT [17], CaiT [18], Focal transformer [19], etc. Swin Transformer is a modified version of Vision Transformer using shifted windows (SWs) [13]. It divides the fixed-size sampling block in Vision Transformer into different-sized blocks (windows) according to the hierarchy, and the information between each block is not shared. DaViT proposed a dual attention architecture, which includes spatial attention, and proposes channel tokens to introduce channel attention [16]. The Multi-Layer Perceptron (MLP) Mixer model, which uses MLP to replace Conv in traditional CNN and self-attention in the transformer, is proposed [20]. It uses the most traditional MLP as the underlying architecture and obtains results without input from the transformer. Recently, networks based on MLP architecture have been proposed, including gMLP [21], ResMLP [22], and cycleMLP [23]. Compared with CNN, the ViT model ignores two basic properties of the image: translation invariance and rotation invariance. It learns and trains through more data to obtain the correlation between the blocks in the image, which is called self-attention. The essence of the convolutional neural network is a parameter-sharing strategy based on image properties. The principle of parameter sharing is based on the assumptions of neural networks for specific problems. The training efficiency is improved by changing the model structure. A large number of parameters are reduced without restricting the generalization ability of the model.