Method for judging hydrophobicity grade of composite insulator based on Swin Transformer

By developing a SwinTransformer-based method for determining the hydrophobicity level of composite insulators, this method utilizes a feature extraction network and a target detection layer to address the low efficiency of traditional detection methods. This enables rapid and accurate determination of the hydrophobicity level, thereby improving the safety and reliability of power equipment.

CN116863248BActive Publication Date: 2025-12-30HEFEI UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311059773.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-08-22
Publication Date
2025-12-30
Estimated Expiration
2043-08-22

AI Technical Summary

Technical Problem

Traditional methods for testing the hydrophobicity level of composite insulators are cumbersome, time-consuming, and inefficient, making it difficult to quickly and accurately determine the hydrophobicity level of composite insulators, which affects the safety and reliability of power equipment.

Method used

A method for judging the hydrophobicity level of composite insulators based on SwinTransformer is adopted. By constructing a feature extraction network and a target detection layer, and combining data augmentation and self-attention mechanisms, efficient feature extraction and accurate classification of water droplet images of composite insulators are achieved.

Benefits of technology

This method improves the efficiency and accuracy of hydrophobicity level detection for composite insulators, reduces the false positive rate, enhances the generalization ability and robustness of the model, and enables rapid and accurate determination of hydrophobicity level, thereby improving the safety and reliability of power equipment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116863248B_ABST
    Figure CN116863248B_ABST
Patent Text Reader

Abstract

The application discloses a composite insulator hydrophobicity grade judgment method based on a Swin Transformer, which comprises the following steps: 1. Constructing a composite insulator hydrophobicity grade dataset, and pre-processing and data augmenting an obtained image; 2. Establishing a network model for judging the composite insulator hydrophobicity grade based on the Swin Transformer, which comprises a feature extraction network and a target detection layer; and 3. Inputting a training set into the network for training to obtain an optimal composite insulator hydrophobicity grade judgment model. The application fully utilizes the self-attention mechanism and multi-level feature extraction capability, effectively captures key information in a composite insulator image, improves the detection speed and efficiency, accurately judges the hydrophobicity grade of the composite insulator, reduces the misjudgment rate, and thus improves the safety and reliability of the composite insulator application field.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of deep learning and image processing technology, specifically to a method for determining the hydrophobicity level of composite insulators based on SwinTransformer. Background Technology

[0002] Composite insulators are a new type of insulator used in power equipment to provide insulation support, protecting the equipment from interference from electric fields and voltage. Composite insulators can absorb some energy, mitigating the impact on power equipment while ensuring its safe and reliable operation. They are manufactured using new materials, featuring high strength, low density, and corrosion resistance. The surface of the composite insulator is coated with a hydrophobic material to prevent the formation of water droplets and bubbles. During long-term use, exposure to dust, water vapor, high temperatures, high humidity, and high altitudes can affect the insulator's performance, leading to a decrease in its hydrophobicity. This decrease in hydrophobicity increases the risk of short circuits, causes uneven electric field distribution, and shortens the insulator's lifespan. To detect the hydrophobicity of composite insulators early, it is necessary to test their hydrophobicity level. Traditional methods for testing the hydrophobicity level of composite insulators include the water spray grading method, which relies on visual identification of water droplets on the insulator surface. This process is cumbersome, difficult to operate, time-consuming, and inefficient. Summary of the Invention

[0003] To overcome the shortcomings of existing technologies, this invention proposes a method for determining the hydrophobicity level of composite insulators based on SwinTransformer, aiming to achieve efficient and rapid detection of the hydrophobicity level of composite insulators, thereby improving the safety and reliability of composite insulator applications.

[0004] To achieve the above-mentioned objectives, the present invention adopts the following technical solution;

[0005] The present invention provides a method for determining the hydrophobicity level of composite insulators based on SwinTransformer, characterized by the following steps:

[0006] Step 1: Collect water spray images of K-type composite insulators with dimensions H×W×C and perform data augmentation to obtain a dataset of hydrophobic water droplet images of composite insulators, S={S1,S2,…,S…}. n ,…,S N}, where S n Let S represent the hydrophobic water droplet image of the nth composite insulator, where H represents the image height, W represents the image width, C represents the number of channels, and S... n The tag is Q n And Qn ∈(1,2,…,k,…,K), where k represents the hydrophobicity level of the composite insulator;

[0007] Step 2: Construct a hydrophobicity level determination network for composite insulators, including: a feature extraction network and a target detection layer;

[0008] Step 2.1: Construct a feature extraction network, including 4 stages;

[0009] Phase 1 includes: a first module splitting layer, a first linear embedding layer connection layer, and a first Swintransformer module connected in sequence;

[0010] Phase 2 includes: the first module merging layer and the second Swintransformer module connected in sequence;

[0011] Phase 3 includes: the second module merging layer and the third Swintransformer module, which are connected sequentially;

[0012] Phase 4 includes: the third module merging layer and the fourth Swintransformer module, which are connected sequentially.

[0013] In the first phase, S n The input is placed into the hydrophobicity level judgment network, and the first module splits the layer into i×i adjacent pixels as units, and then... n Split into dimensions Given i×i image blocks, expand the i×i image blocks along the channel dimension to obtain... The first feature map of the nth phase of the first dimension

[0014] The first linear embedding layer uses a fully connected operation on the first feature map. By doubling the channel dimension, we obtain the dimension. The second feature map of the nth phase 1

[0015] The first Swin transformer module on the second feature map After processing, we obtain The third feature map of the nth phase of the first dimension

[0016] In the second stage, the third feature map After being processed in the first module merging layer, the result is... The first feature map of the nth phase of the second dimension

[0017] The first feature map After being processed in the second Swing transformer module, the result is... The second feature map of the nth phase of the second dimension

[0018] In the third stage, the second feature map After being processed in the second module merging layer, the result is... The first feature map of the nth phase of the third dimension

[0019] The first feature map After being processed in the third Swing transformer module, the result is... The second feature map of the nth phase of the third dimension

[0020] In the fourth stage, the nth feature map from the third stage is used. After being processed in the third module merging layer, the result is... The nth feature map of the fourth stage of the dimension.

[0021] The first feature map After being processed in the fourth Swing transformer module, the result is... The second feature map of the nth phase of the fourth dimension And used as the final output water droplet feature f of the feature extraction network n ;

[0022] Step 2.2: Construct the target detection layer, including: a global pooling layer, a fully connected layer, and a SoftMax layer;

[0023] The global pooling layer for f n After processing, the nth hydrophobic feature image is obtained, flattened, and then input into a fully connected layer for further processing to obtain a one-dimensional feature vector p of the nth hydrophobic feature image. n After further processing with the SoftMax layer, the nth image of the hydrophobic water droplets on the composite insulator, S, is obtained. n Prediction category

[0024] Step 3, according to S n The tag Q n and prediction categories Construct a cross-entropy loss function; thereby, based on the hydrophobic water droplet image dataset S={S1,S2,…,S… n ,…,S NThe Adam algorithm is used to train the hydrophobicity level judgment network of the composite insulator, and the cross-entropy loss function is minimized to update the network model parameters until the cross-entropy loss function tends to stabilize. The optimal hydrophobicity level judgment model of the composite insulator is obtained after training, which is used to classify and identify the water droplet image to be tested, and to obtain the hydrophobicity level of the water droplet image to be predicted.

[0025] The method for determining the hydrophobicity level of composite insulators based on Swin Transformer described in this invention is also characterized in that the first Swin Transformer module in step 2.1 sequentially includes: a first LN layer, a first W_MSA layer, a second LN layer, a first fully connected layer, a third LN layer, a first SW_MSA layer, a fourth LN layer, and a second fully connected layer.

[0026] Will The input is processed by the first Swin transformer module and then sequentially through the first LN layer and the first W_MSA layer to obtain the features. and After performing residual operations, the residual characteristics are obtained.

[0027] After processing through the second LN layer and the first fully connected layer, the features are obtained. and After performing residual operations, the residual characteristics are obtained.

[0028] After processing through the third LN layer and the first SW_MSA layer, the features are obtained. and After performing residual operations, residual characteristics are obtained.

[0029] After processing through the fourth LN layer and the second fully connected layer, the features are obtained. and After performing residual exercises, the following is obtained: The third feature map of the nth phase of the first dimension

[0030] The present invention provides an electronic device, including a memory and a processor, wherein the memory is used to store a program that supports the processor in executing the method for determining the hydrophobicity level of the composite insulator, and the processor is configured to execute the program stored in the memory.

[0031] The present invention discloses a computer-readable storage medium on which a computer program is stored, wherein the computer program, when executed by a processor, performs the steps of the method for determining the hydrophobicity level of the composite insulator.

[0032] Compared with existing technologies, the beneficial effects of the present invention are as follows:

[0033] 1. The Swin Transformer is an efficient Transformer model with low computational complexity and memory consumption. This invention employs a Swin Transformer-based feature extraction network and target detection layer, enabling the extraction of more representative and discriminative features from hydrophobic water droplet images of composite insulators. Compared to traditional methods, this Swin Transformer-based approach exhibits stronger modeling capabilities and adaptability when processing complex image data, allowing for more accurate determination of the hydrophobicity level of composite insulators. Furthermore, it saves computational resources and improves recognition efficiency.

[0034] 2. This invention expands the training dataset and increases the diversity and quantity of samples by performing data augmentation operations on the collected composite insulator water spray images. This helps improve the model's generalization ability and robustness, enabling it to make accurate predictions when faced with images of water droplets with different hydrophobic properties of composite insulators.

[0035] 3. This invention fully utilizes its self-attention mechanism and multi-level feature extraction capabilities to effectively capture key information in composite insulator images. It can quickly process composite insulator image data, thereby improving detection speed and efficiency, accurately determining the hydrophobicity level of composite insulators, and reducing the false positive rate. Attached Figure Description

[0036] Figure 1 This is a flowchart of the detection method of the present invention;

[0037] Figure 2 This invention is used to detect images of hydrophobic water droplets on composite insulators.

[0038] Figure 3 Flowchart of the composite insulator hydrophobicity level judgment model constructed in this invention;

[0039] Figure 4 This is a structural diagram of the SwinTransformer module in this invention. Detailed Implementation

[0040] The present invention will be further described below with reference to the accompanying drawings and specific embodiments.

[0041] In this embodiment, a method for determining the hydrophobicity level of composite insulators based on Swing Transformer is described in the following specific steps: Figure 1 As shown, follow these steps:

[0042] Step 1: Collect water spray images of K-type composite insulators with dimensions H×W×C and perform data augmentation to obtain a dataset of hydrophobic water droplet images of composite insulators, S={S1,S2,…,S…}. n ,…,S N}, where S n Let S represent the hydrophobic water droplet image of the nth composite insulator, where H represents the image height, W represents the image width, C represents the number of channels, and S... n The tag is Q n And Q n ∈(1,2,…,k,…,K), where k represents the hydrophobicity level of the composite insulator. From the expanded image data, K types of image data with category labels are obtained;

[0043] Step 1.1: Obtain images of hydrophobic water droplets from seven types of composite insulators, HC1 to HC7, with 430 images for each type; For example... Figure 2 As shown;

[0044] Step 1.2: Crop the obtained image into a sample image of size 224×224×3;

[0045] Step 1.3: Applying positional transformations to the dataset, such as horizontal mirroring, translation, and rotation, can change the shape, position, and color of the sample images, increasing the diversity of the data and helping the model learn more complex features, thereby improving the model's generalization ability and robustness.

[0046] Step 1.4: Denoising the image dataset using Gaussian filtering. Noise in the image is removed by weighting the pixel values ​​with a Gaussian distribution. After denoising using Gaussian filtering, the denoised image data I is obtained using equation (1). G Pixel I at (x,y) G (x,y):

[0047]

[0048] In equation (1), I G The image is denoised, where I represents the original image, G represents the Gaussian filter, and a represents the denoised image. qp This represents the neighborhood connectivity between pixel values, where m represents the neighborhood size of each pixel value. Image denoising can expand the dataset, thus mitigating the problem of overfitting.

[0049] Step 1.5: After expansion, 2700 images of hydrophobic water droplets were obtained for each type of composite insulator, totaling 7 types including HC1 to HC7. The labeled dataset was divided into training and test sets in a 9:1 stratified ratio. The training set contains 18900 images (17010 images) and the test set contains 1890 images, ensuring a balanced number of images for each type in both sets.

[0050] Step 2: Construct a network to determine the hydrophobicity level of composite insulators, including: a feature extraction network and a target detection layer; such as Figure 3 As shown;

[0051] Step 2.1: Construct a feature extraction network, including 4 stages;

[0052] Phase 1 includes: a first module splitting layer, a first linear embedding layer connection layer, and a first Swintransformer module connected in sequence;

[0053] Phase 2 includes: the first module merging layer and the second Swintransformer module connected in sequence;

[0054] Phase 3 includes: the second module merging layer and the third Swintransformer module, which are connected sequentially;

[0055] Phase 4 includes: the third module merging layer and the fourth Swintransformer module, which are connected sequentially.

[0056] In the first phase, S n The input to the hydrophobicity level determination network is then processed by the first module, which splits the layer into i×i adjacent pixels as units, and assigns S... n Split into dimensions Given i×i image blocks, expand the i×i image blocks along the channel dimension to obtain... The first feature map of the nth phase of the first dimension In this embodiment, i = 4, C = 3;

[0057] Input image S n With dimensions of 224×224×3, considering four adjacent pixels as a module, each 4×4×3 unit is considered a minimum module. Flattening the minimum module yields 1×1×48 elements. Flattening and concatenating each minimum module in the image results in a dimension of... That is, the nth feature map of the first stage of the 56×56×48 image.

[0058] The first linear embedding layer uses a fully connected operation on the first feature map. By doubling the channel dimension, we obtain the dimension. The second feature map of the nth phase 1 Input a feature map of 56×56×48 dimensions After the linear embedding layer, we obtain the nth second feature map of the first stage with dimensions of 56×56×96.

[0059] The first Swing transformer module for the second feature map After processing, we obtain The third feature map of the nth phase of the first dimension Feature map The dimensions are 56×56×96;

[0060] The W_MSA module differs from the SW_MSA module. In the W_MSA module, the input feature map is segmented into multiple e×e adjacent pixel blocks, and these segmented pixel blocks are independent windows that do not conflict with each other. Then, the self-attention score of each feature map sub-block is calculated, and finally, the self-attention scores of the sub-feature maps are concatenated. The Swin transformer module, as shown... Figure 4 As shown;

[0061] In the SW_MSA module, the input feature image obtained from the previous layer is moved to the upper left by a window operation, resulting in b image slices of different sizes. To obtain the self-attention of each slice and reduce computational complexity, the b slices are moved separately and then reassembled to obtain multiple new image slices of uniform size. To calculate the self-attention of only the b slices, the self-attention score of each slice is calculated separately. A masking operation is used to set the self-attention score of the overlapping window to 0. Finally, the feature map is restored.

[0062] The self-attention score Attention(Q,K,V) is calculated using equation (2):

[0063]

[0064] Where B is the relative position code, Q, K, and V are the query, key, and value matrices, respectively, and d k For key values ​​and query dimensions;

[0065] The attention scores of each head node are obtained using equation (3):

[0066]

[0067] In equation (3), W r Q W r K Wr V These represent the learning weight matrices;

[0068] Finally, using equation (4), we obtain MultiHead(Q,K,V):

[0069] MultiHead(Q,K,V)=Concat(head1,...,head r W o (4)

[0070] In equation (4), head r This represents the attention score of the r-th slice in the image. Finally, Concat is used to connect all slices to obtain the multi-head attention score MultiHead(Q,K,V).

[0071] The process of obtaining the Swin Transformer module using equation (5) is as follows:

[0072]

[0073] In equation (5), This represents the output z of the W_MSA module at layer l and the output z of the (l-1)th layer Swintranformer module. l-1 The sum of the residuals, z l This represents the output of the l-th layer Swintranformer module. Similarly, This indicates the output of the (l+1)th layer SW_MSA module and z l The sum of the residuals, z l+1 This represents the output of the (l+1)th layer Swintranformer module.

[0074] In the second stage, the third feature map After being processed in the first module merging layer, the result is... The first feature map of the nth phase of the second dimension

[0075] Feature Map 1 After being processed in the second Swing transformer module, the result is... The second feature map of the nth phase of the second dimension In this embodiment, the feature image The dimensions are 28×28×192, and the feature image... The dimensions are 28×28×192;

[0076] In the third stage, the second feature map After being processed in the second module merging layer, the result is... The first feature map of the nth phase of the third dimension

[0077] The first feature map After being processed in the third Swing transformer module, the result is... The second feature map of the nth phase of the third dimension In this embodiment, the feature image The dimension is 14×14×384, and the feature map The dimensions are 14×14×384;

[0078] In stage 4, the nth feature map from stage 3 will be used. After being processed in the third module merging layer, the result is... The nth feature map of the fourth stage of the dimension.

[0079] The first feature map After being processed in the fourth Swing transformer module, the result is... The second feature map of the nth phase of the fourth dimension And used as the final output water droplet feature f of the feature extraction network n In this embodiment, the feature image The dimension is 7×7×768, and the feature map The dimensions are 7×7×768;

[0080] Step 2.2: Construct the target detection layer, including: a global pooling layer, a fully connected layer, and a SoftMax layer;

[0081] The global pooling layer for f n After processing, the nth hydrophobic feature image is obtained, flattened, and then input into a fully connected layer for further processing to obtain a one-dimensional feature vector p of the nth hydrophobic feature image. n =(z n,1 ,z n,2 ,...,z n,k ,...,z n,K The predicted category of hydrophobicity of the nth composite insulator is obtained after passing through the SoftMax layer. Among them, z n,k For p n The k-th vector in the middle;

[0082] After the image passes through the feature extraction layer, it is processed by the Swin Transformer to obtain the image's self-attention features. The output of the feature extraction layer is used as the input to the classification layer, which then passes through a pooling layer. The obtained feature data is flattened and then processed by two fully connected layers. Finally, it is fed into SoftMax to obtain S using equation (6). n Prediction category

[0083]

[0084] In equation (6), z n,h For p n The h-th vector in the dataset, where K is the number of categories. This represents the sum of probabilities for all categories;

[0085] Step 3: Pre-training enables the network model to generalize better to new datasets and tasks, improving its generalization ability, reducing the risk of overfitting, and accelerating training. The network model for judging the hydrophobicity level of composite insulators is pre-trained using the ImageNet dataset. The cross-entropy function is calculated, and the loss function is minimized to update the network model parameters. The Adam algorithm is used to minimize the loss function. After training, when the loss function stabilizes, the network model training parameters are saved, resulting in the pre-trained model. This accelerates the convergence speed of the model on the task of judging the hydrophobicity level of composite insulators and makes it easier to obtain a higher quality final model.

[0086] Step 4, according to S n The tag Q n and prediction categories Construct the cross-entropy loss function using equation (7)

[0087]

[0088] In equation (8), Q n and Let these represent the true label and the predicted label of the nth image, respectively;

[0089] Based on the hydrophobic water droplet image dataset S={S1,S2,…,S… n ,…,S N The Adam algorithm is used to train the hydrophobicity level judgment network of composite insulators, and the cross-entropy loss function is minimized to update the network model parameters until the cross-entropy loss function tends to stabilize. The optimal hydrophobicity level judgment model of composite insulators is obtained after training, which is used to classify and identify the water droplet images to be tested, and to obtain the hydrophobicity level of the water droplet images to be predicted.

[0090] In this embodiment, 17010 training set images are input into a network model containing some pre-trained parameters, and an adaptive learning rate is selected to adjust the learning rate parameter. Thus, the learning rate parameter α for the t-th training iteration is obtained using equation (8). t :

[0091]

[0092] In equation (8), α0 is the initial learning rate, t is the number of training iterations, and β is the learning rate decay factor. α0 is set to 0.01, β to 1.5, and the number of training iterations to 100.

[0093] Step 5: Using the constructed test set, input the water spray images of composite insulators into the network model containing training parameters to obtain the water repellency level classification of composite insulators. Compare the results with the true label classification to obtain the performance index of this classification model. The test set contains 1890 images of composite insulators with water droplets of 7 types. The test set data is fed into the network model for testing to obtain the network model's performance index.

[0094] In this embodiment, an electronic device includes a memory and a processor. The memory stores a program that supports the processor in executing the above-described method, and the processor is configured to execute the program stored in the memory.

[0095] In this embodiment, a computer-readable storage medium stores a computer program, which is executed by a processor to perform the steps of the above method.

[0096] To verify the effectiveness of the method of this invention, this experiment compares it with a training method without transfer training. The experimental results are shown in Table 1:

[0097]

[0098] As shown in Table 1, this invention uses a large dataset for pre-training, which allows for the initialization of model parameters using existing large-scale image data, providing good initial weights. This accelerates the convergence of the model on the task of determining the hydrophobicity level of composite insulators, accurately determines the hydrophobicity level of composite insulators, and makes it easier to obtain a higher quality final model.

Claims

1. A method for judging the hydrophobicity grade of a composite insulator based on a Swin Transformer, characterized in that, According to the following steps: Step 1, collect the water spray diagram of K types of composite insulators with the dimension of HxWxC, and perform data enhancement operation, thereby obtaining the hydrophobic water bead image dataset S={S1, S2, …, S n ,…,S N} of the composite insulator, wherein S n represents the nth hydrophobic water bead image of the composite insulator, H represents the image height, W represents the image width, C represents the channel number, let the label of S n be Q n , and Q n ∈(1, 2, …, k, …, K), wherein k represents the hydrophobic grade of the composite insulator; Step 2, constructing a composite insulator hydrophobicity level judgment network, including: feature extraction network and target detection layer; Step 2.1, constructing a feature extraction network, including: 4 stages; The first stage includes: a first module split layer, a first linear embedding layer connection layer, and a first Swintransformer module connected in turn; The second stage includes: a first module merging layer, a second Swintransformer module connected in turn; The third stage includes: a second module merging layer, a third Swintransformer module connected in turn; The fourth stage includes: a third module merging layer, a fourth Swintransformer module connected in turn; In the first phase, S n The input is placed into the hydrophobicity level judgment network, and the first module splits the layer into i×i adjacent pixels as units, and then... n Split into dimensions Given i×i image blocks, expand the i×i image blocks along the channel dimension to obtain... The first feature map of the nth phase of the first dimension The first linear embedding layer uses a full connection operation on the 1st feature map In the channel dimension, 2-fold expansion is performed, thereby obtaining the n-th 2nd feature map of the 1st stage In the channel dimension, 2-fold expansion is performed, thereby obtaining the n-th 2nd feature map of the 1st stage The first Swin transformer module processes the second feature map to obtain a third feature map of the first stage of the nth dimension In the second stage, the third feature map After being processed in the first module merging layer, the first feature map The n-th first feature map of the second stage The first feature map After processing in the input second Swin transformer module, a second feature map of the second stage is obtained The n-th second feature map of the second stage In the third stage, the second feature map After processing in the second module merging layer, the first feature map of the third stage of the n-th dimension is obtained After processing in the second module merging layer, the first feature map of the third stage of the n-th dimension is obtained The first feature map is obtained by inputting the first feature map into a first Swin transformer module for processing. After being input into a third Swin transformer module for processing, the second feature map of the third stage is obtained. The second feature map of the third stage is obtained by inputting the first feature map of the n-th stage of the first dimension into a third Swin transformer module for processing. In the fourth stage, the nth second feature map of the third stage is combined with the first feature map of the third stage to obtain the first feature map of the fourth stage After processing in the third module merging layer, the first feature map of the fourth stage is obtained After processing in the third module merging layer, the first feature map of the fourth stage is obtained The first feature map is input into a first Swin transformer module for processing to obtain a second feature map of the first stage After being input into a fourth Swin transformer module for processing, a second feature map of the fourth stage of the n-th dimension is obtained After being input into a fourth Swin transformer module for processing, a second feature map of the fourth stage of the n-th dimension is obtained The water droplet feature f is output as the final output of the feature extraction network n ; Step 2.2, constructing a target detection layer, including: a global pooling layer, a full connection layer and a SoftMax layer; The global pooling layer processes f n to obtain the nth hydrophobic feature image, and the nth hydrophobic feature image is flattened and input into a fully connected layer for processing to obtain a one-dimensional feature vector p n After processing by a SoftMax layer, the nth composite insulator hydrophobic water bead image S n is obtained, and a prediction category of the nth composite insulator hydrophobic water bead image S Step 3, according to S n the label Q n and the predicted category The cross-entropy loss function is constructed; thus, based on the hydrophobic water droplet image dataset S = {S1, S2, …, S n , …, S N}, the hydrophobicity level judgment network of the composite insulator is trained using the Adam algorithm, and the cross-entropy loss function is minimized to update the network model parameters until the cross-entropy loss function tends to be stable, thereby obtaining the trained optimal composite insulator hydrophobicity level judgment model, which is used for classifying and identifying the to-be-tested water droplet image to obtain the hydrophobicity level of the to-be-predicted water droplet image. 2.The Swin Transformer-based composite insulator hydrophobicity grade judgment method according to claim 1, characterized in that, The first Swin transformer module in the step 2.1, in turn, contains: a first LN layer, a first W_MSA layer, a second LN layer, a first full connection layer, a third LN layer, a first SW_MSA layer, a fourth LN layer and a second full connection layer; will be described below. The input is input into the first Swin transformer module, and after being processed by the first LN layer and the first W_MSA layer in turn, the feature After residual operation with , the residual feature After sequentially passing through the processing of the second LN layer and the first fully connected layer, the feature and performing residual operation with the residual feature After sequentially passing through the third LN layer and the first SW_MSA layer, a feature is obtained and After residual operation, a residual feature is obtained After sequentially passing through the fourth LN layer and the second fully connected layer, the features and performing residual operation on , thereby obtaining the n-th first-stage third feature map of the first feature map 3. An electronic device comprising a memory and a processor, characterized in that The memory is used to store the program supporting the processor to execute the composite insulator hydrophobicity level judgment method of claim 1 or 2, and the processor is configured to execute the program stored in the memory.

4. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to execute the steps of the composite insulator hydrophobicity level judgment method of claim 1 or 2.

Citation Information

Patent Citations

  • Insulator defect detection method and device, medium and program product

    CN115984226A

  • Vehicle loss detection method and apparatus, and electronic device and storage medium

    WO2023019875A1