# ResnetCPS for Power Equipment and Defect Detection
## 1 Introduction
Effective parameter sharing limits the number of parameters and improves the training efficiency of the model. Therefore, convolutional neural networks can efficiently train to obtain good accuracy in the case of limited datasets and computing power. These parameters are often shared within the same layer. According to the development track of deep learning, the fewer restrictions on neural network structure, the more accurate the model. For example, the transformer model only assumes that there is self-attention between windows. The MLP model will further improve the model's accuracy, and it does not use parameter sharing. However, these models often require more accurate datasets and higher computing power. For most public datasets, objects in the image are clear and distinguishable, occupying the center of the image with their boundaries exactly at the edges of the image. For images of power equipment, due to limitations such as working environment and shooting angle, the captured object may not be accurately located at the center of the image. It may only occupy a small part of the image. For such images, the model should perform the same operation on objects of different scales. This is the scale invariance of datasets. This article proposes a ResNet variant named ResNet with Cross-Layer Parameter Sharing (ResnetCPS) based on the scale invariance of image datasets. For parameter modules with the same number of channels and high repetition rate, they share some parameters to reduce parameter coupling and parameter count. Cross-Layer Parameter Sharing utilizes information from multiple convolutional neural network layers to optimize model performance. The difference between this method and traditional cellular neural networks is that weights are shared between different network layers. It encourages layers to learn from each other instead of focusing on optimizing individual layers, resulting in more efficient models. It also makes the network more robust to changes in training data, as it is more resilient to the effects of random perturbations. Cross-Layer Parameter Sharing can improve the accuracy of processing power equipment datasets. Meanwhile, parameter sharing without changing the structure reduces the total number of parameters and decreases the storage space for parameters. Shared parameters during training are trained multiple times in the same backpropagation process, resulting in higher training efficiency. In addition, increasing the information exchange between shared and non-shared parameters, enhancing the ability to represent important features, and using channel self-attention mechanism could improve the overall performance of the model are important. The main contributions of this paper are as follows:  
(1) A Cross-Layer Parameter Sharing mechanism was designed to address the issue of non-prominent data subjects in power equipment image data. (2) An Inserting and Adjacency Attention Module was designed based on the sharing mechanism. The \"inserting\" action augments the communication among fragmented channels, and simultaneously, this action curtails the size of the model and enhances the efficiency. (3) The overall architecture of the ResNetCPS model was designed and its effectiveness on an original substation dataset was validated. The rest of this article is organized as follows. Section 2 introduces related work. The details of the proposed methods are presented in Section 3. The execution details of the experiment, analysis of the results, and the design and results of the ablation experiment are given in Section 4. Finally, Section 5 concludes this article.