Training method and device of composite insulator hydrophobicity grade evaluation model

Through deep learning technology and Transformer encoder, the composite insulator hydrophobicity level evaluation model is trained, which solves the problem of great influence of human factors when evaluating the hydrophobicity of composite insulators in the prior art, and achieves a more accurate and efficient evaluation effect.

CN119942058APending Publication Date: 2025-05-06ELECTRIC POWER RESEARCH INSTITUTE OF STATE GRID QINGHAI ELECTRIC POWER COMPANY +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411797545.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-09
Publication Date
2025-05-06

AI Technical Summary

Technical Problem

The prior art has great influence when evaluating the hydrophobicity of composite insulators, and the results are very different. The traditional methods cannot be used efficiently at the engineering site.

Method used

Using deep learning technology, by obtaining sample set X, training the composite insulator hydrophobicity level evaluation model, and using the Transformer encoder and DETR algorithm, the evaluation model is optimized to improve the evaluation accuracy.

Benefits of technology

More accurate evaluation and prediction of the hydrophobicity level of composite insulators is achieved, reducing the influence of human factors and improving the efficiency and reliability of detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119942058A_ABST
    Figure CN119942058A_ABST
Patent Text Reader

Abstract

The invention discloses a training method and device for a hydrophobicity grade evaluation model of a composite insulator, and the method comprises the steps: obtaining a sample set X, and determining a first water drop boundary frame, a second water drop boundary frame, a first hydrophobicity grade and a second hydrophobicity grade according to a first evaluation model and a second evaluation model; if a parameter error between the training water drop bounding box and the first water drop bounding box is greater than a preset threshold value, or if a grade difference between the training hydrophobicity grade and the first hydrophobicity grade is greater than a preset threshold value, optimizing the first evaluation model to obtain a second evaluation model; determining evaluation parameters evaluated by the second evaluation model according to the verification and second water drop bounding box and the verification and second hydrophobicity level; and if the evaluation parameter of the hydrophobicity grade evaluation of the second evaluation model is in a preset first interval, taking the second evaluation model as a final composite insulator hydrophobicity grade evaluation model. The evaluation model obtained based on the training method can more accurately evaluate the hydrophobicity grade of the composite insulator.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of deep learning and image processing, and in particular to a training method and device for a composite insulator hydrophobicity grade assessment model. Background Art

[0002] Composite insulators provide insulating support in power equipment and protect power equipment from interference from electric fields and voltages. Hydrophobicity refers to the ability of the hydrophobic material on its surface to resist moisture intrusion. This property is mainly imparted by polymer materials such as silicone rubber or fluororubber. These materials have excellent insulating properties and weather resistance, which enables composite insulators to be widely used in power systems, especially playing a key role in ensuring the safe operation of transmission lines.

[0003] However, composite insulators are exposed to strong electric fields, high and low temperature cycles, ultraviolet radiation, wind, dust, acid rain and other harsh environments for a long time, and their shed surfaces tend to age gradually, resulting in a gradual decline or even loss of hydrophobicity. This performance degradation makes it easier for dirt to adhere to the surface of composite insulators in specific environments such as humidity and low temperature. When the surface dirt accumulates more, its hydrophobicity will be further reduced, significantly increasing the degree of dirt accumulation and the risk of flashover, which may induce corona discharge or arc discharge, further damaging the function of the equipment, and even causing large-scale power outages.

[0004] At present, the commonly used methods for evaluating the hydrophobicity of composite insulators at home and abroad mainly include the water spray classification method, the contact angle method and the surface tension method. The water spray classification method is the most widely used because of its simple operation, low equipment requirements and suitability for on-site testing. However, this method requires the tester to make subjective judgments based on the standard images in the guidelines, which is easily affected by human factors and the results are different. The contact angle method accurately evaluates the hydrophobicity by measuring the angle between the liquid and the solid surface. The results can be used to divide the surface wettability into superhydrophilic, hydrophilic, intermediate wettability and superhydrophobic according to the size of the contact angle. However, this method is only suitable for small-scale area detection and has high requirements for experimental conditions, so it cannot be used on engineering sites. The surface tension method is less used because the judgment is not accurate enough and the reagents are harmful to the human body. Summary of the invention

[0005] The object of the present invention is to provide a training method and device for a composite insulator hydrophobicity grade evaluation model, which can more accurately evaluate or predict the hydrophobicity grade of the composite insulator.

[0006] In a first aspect, an embodiment of the present invention provides a training method for a composite insulator hydrophobicity grade evaluation model, the training method comprising: obtaining a sample set X, wherein the sample set X is divided into a training set X1 and a verification set X2, each group of training set X1 includes a training vector graph; the training vector graph includes a plurality of training water droplet bounding boxes and training hydrophobicity grades, and each group of verification set X2 includes a verification vector graph; the verification vector graph includes a plurality of verification water droplet bounding boxes and verification hydrophobicity grades; based on the training vector graph, determining a first water droplet bounding box and a first hydrophobicity grade through a first evaluation model obtained in advance; if the parameters between the training water droplet bounding box and the first water droplet bounding box are If the error f is greater than a preset bounding box threshold, or if the level difference Diff between the training hydrophobicity level and the first hydrophobicity level is greater than a preset level threshold, the first evaluation model is optimized to obtain a second evaluation model; based on the verification vector graph, the second water droplet bounding box and the second hydrophobicity level are determined by the second evaluation model; the evaluation parameter mAP of the hydrophobicity level evaluation of the second evaluation model is determined according to the verification water droplet bounding box, the verification hydrophobicity level, the second water droplet bounding box and the second hydrophobicity level; if the evaluation parameter mAP is in a preset first interval, the second evaluation model is used as the final composite insulator hydrophobicity level evaluation model.

[0007] Furthermore, if the parameter error f between the training water droplet bounding box and the first water droplet bounding box is greater than a preset bounding box threshold, or if the level difference Diff between the training hydrophobicity level and the first hydrophobicity level is greater than the preset level threshold, then the first evaluation model is optimized to obtain the second evaluation model, including: normalizing the difference in position parameters between the training water droplet bounding box and the first water droplet bounding box to obtain a parameter error f, wherein each training water droplet bounding box corresponds to a parameter error f; calculating the level difference Diff between the training hydrophobicity level and the first hydrophobicity level; if the parameter error f is greater than the preset bounding box threshold, or if the level difference Diff is greater than the preset level threshold, then updating the first evaluation model to obtain the second evaluation model.

[0008] Further, the step of updating the first evaluation model to obtain the second evaluation model includes: correcting the bounding box loss function in the first evaluation model based on the following formula: Among them, L smooth is the parameter of the bounding box loss function in the first evaluation model, and F is the sum of the parameter errors f between all training water drop bounding boxes and the first water drop bounding box of any training vector image.

[0009] Furthermore, the step of updating the first evaluation model to obtain the second evaluation model further includes: correcting the training loss function in the first evaluation model based on the following formula: Among them, θ t+1 is the parameter of the updated training loss function, θt is the parameter of the training loss function in the first evaluation model, α is the preset learning rate, ε is the preset error-proofing parameter, and m t and v t are the mean and variance of the parameters of the training loss function in the first evaluation model; β1 and β2 are the preset m t and v t The decay rate of and m t and v t The corrected value of .

[0010] Furthermore, the step of determining an evaluation parameter mAP for hydrophobicity level evaluation of a second evaluation model according to the verification water droplet bounding box, the verification hydrophobicity level, the second water droplet bounding box and the second hydrophobicity level includes: dividing the verification vector map into multiple groups of verification image sets according to the intersection-over-union ratio IoU between the verification water droplet bounding box and the second water droplet bounding box; and calculating the evaluation parameter mAP for each group of verification image sets based on the classification accuracy evaluation method, the verification hydrophobicity level and the second hydrophobicity level.

[0011] Furthermore, if the evaluation parameter mAP is in a preset first interval, the step of using the second evaluation model as the final composite insulator hydrophobicity level evaluation model includes: comparing the evaluation parameter mAP of each verification image set with the corresponding preset first interval respectively; if the evaluation parameters mAP are all within the corresponding first interval, the second evaluation model is used as the final composite insulator hydrophobicity level evaluation model.

[0012] Further, the step of calculating the level difference Diff between the training hydrophobicity level and the first hydrophobicity level includes: Among them, y i is the training hydrophobicity level in sample set X, is the first hydrophobicity level output by the first evaluation model, and i is the number of images in the training set X1.

[0013] Furthermore, the step of obtaining the sample set X includes: based on the pre-acquired Transformer encoder, performing weighted fusion processing and position encoding processing on the pixel information of the pre-acquired first pre-processed image set and the global information to obtain the sample set X.

[0014] Furthermore, the step of performing weighted fusion processing and position coding processing on pixel information of the first preprocessed image set acquired in advance and global information to obtain a sample set X includes: Q=X0×W Q Formula 7: K = X0 × W K Formula 8: V = X0 × W VFormula 9; where X0 is the vector representation of the first preprocessed image set, W Q , W K , W V are the weight matrices of the query space, key, and value obtained in advance through learning, Q, K, and V are the query space, key, and value of the pixel mapping of the image in the first preprocessed image set, respectively. k is the dimension of K, Attention is the pixel weight matrix containing global information; based on Attention, the vector representation of the first preprocessed image set X0 is optimized to obtain the second preprocessed image set; the second preprocessed image set is position-encoded to obtain the sample set X.

[0015] In a second aspect, an embodiment of the present invention provides a training device for a composite insulator hydrophobicity grade evaluation model, the training device comprising: a first training module, for acquiring a sample set X, wherein the sample set X is divided into a training set X1 and a verification set X2, each group of training set X1 comprises a training vector graph; the training vector graph comprises a plurality of training water droplet bounding boxes and training hydrophobicity grades, each group of verification set X2 comprises a verification vector graph; the verification vector graph comprises a plurality of verification water droplet bounding boxes and verification hydrophobicity grades; a second training module, for determining a first water droplet bounding box and a first hydrophobicity grade based on the training vector graph by means of a first evaluation model acquired in advance; a third training module, for determining a first water droplet bounding box and a first hydrophobicity grade if the parameters between the training water droplet bounding box and the first water droplet bounding box are the same; If the error f is greater than a preset bounding box threshold, or if the level difference Diff between the training hydrophobicity level and the first hydrophobicity level is greater than a preset level threshold, the first evaluation model is optimized to obtain a second evaluation model; a fourth training module is used to determine the second water droplet bounding box and the second hydrophobicity level through the second evaluation model based on the verification vector graph; a fifth training module is used to determine the evaluation parameter mAP of the hydrophobicity level evaluation of the second evaluation model based on the verification water droplet bounding box, the verification hydrophobicity level, the second water droplet bounding box and the second hydrophobicity level; a sixth training module is used to use the second evaluation model as the final composite insulator hydrophobicity level evaluation model if the evaluation parameter mAP is in a preset first interval.

[0016] The beneficial effects of the embodiments of the present invention are as follows:

[0017] The present invention discloses a training method and device for a composite insulator hydrophobicity level evaluation model, including obtaining a sample set X, determining first and second water drop boundary boxes and first and second hydrophobicity levels according to first and second evaluation models; if the parameter error between the training water drop boundary box and the first water drop boundary box is greater than a preset threshold, or if the level difference between the training hydrophobicity level and the first hydrophobicity level is greater than a preset threshold, optimizing the first evaluation model to obtain a second evaluation model; determining evaluation parameters of the second evaluation model evaluation according to the verification and second water drop boundary boxes, the verification and second hydrophobicity levels; if the evaluation parameters of the hydrophobicity level evaluation of the second evaluation model are in a preset first interval, using the second evaluation model as the final composite insulator hydrophobicity level evaluation model. The evaluation model obtained based on the training method can more accurately evaluate the hydrophobicity level of the composite insulator.

[0018] Other features and advantages of the present disclosure will be set forth in the following description, or some features and advantages may be inferred or unambiguously determined from the description, or may be learned by implementing the above-mentioned technology of the present disclosure.

[0019] In order to make the above-mentioned objectives, features and advantages of the present disclosure more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the specific embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the specific embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0021] Figure 1 A flowchart of a training method for a composite insulator hydrophobicity grade evaluation model;

[0022] Figure 2 It is a schematic diagram of the hydrophobicity grade standards for six types of composite insulators;

[0023] Figure 3 is a schematic diagram of a composite insulator;

[0024] Figure 4 Diagram of the training process for the evaluation model;

[0025] Figure 5 A schematic diagram of a training device for a composite insulator hydrophobicity grade evaluation model;

[0026] Figure 6 This is a flow chart of a method for evaluating the hydrophobicity of composite insulators based on the DETR algorithm. DETAILED DESCRIPTION

[0027] The present invention is further described in detail below through the accompanying drawings and specific embodiments.

[0028] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0029] The problem of composite insulator surface performance degradation has become a key area of ​​concern in research and engineering practice, especially in complex environments, such as areas with severe pollution and bad weather conditions. Composite insulators that are in long-term operation need to be regularly monitored and evaluated for their surface hydrophobicity. Using drones to take aerial photos of composite insulators without affecting the normal operation of the equipment, combined with machine learning algorithms to evaluate the hydrophobicity level, is a commonly used technology. This technology has replaced the traditional manual detection method and has become the mainstream method for testing the hydrophobicity of composite insulators.

[0030] The present application optimizes the existing evaluation means for the hydrophobicity of composite insulators, and provides a training method and device for a composite insulator hydrophobicity grade evaluation model, which is described in detail below through the embodiments of the present invention.

[0031] Embodiment 1

[0032] This embodiment provides a training method for a composite insulator hydrophobicity grade evaluation model. Figure 1 As shown, including the following:

[0033] S101: Obtain a sample set X, wherein the sample set X is divided into a training set X1 and a verification set X2, each training set X1 includes a training vector map; the training vector map includes multiple training water droplet bounding boxes and training hydrophobicity levels, and each verification set X2 includes a verification vector map; the verification vector map includes multiple verification water droplet bounding boxes and verification hydrophobicity levels.

[0034] Specifically, the sample set X includes multiple vector images, each of which includes multiple water droplets, and therefore also includes a corresponding number of water droplet bounding boxes. Each vector image in the sample set X corresponds to one hydrophobicity level. The hydrophobicity class (HC) of composite insulators can be divided into 7 levels: HC1 to HC7, where HC1 is the most hydrophobic and HC7 represents a complete loss of hydrophobicity. Since the insulator must be discontinued when the hydrophobicity level reaches HC6 or above, most studies and this application classify the hydrophobicity level standards of composite insulators into 6 levels: HC1 to HC6, such as Figure 2 As shown. Figure 3 A schematic diagram of a composite insulator is shown. The water droplet bounding box and the hydrophobicity level in the sample set X are manually determined or audited after the simulation model output, and the sample set X is used as standard data for subsequent training or verification.

[0035] Specifically, each vector image may include image parameter information such as height resolution H, width resolution W, number of image channels C, total number of pixels N, feature dimension D of each pixel, etc. It may also include feature quantities such as the number of each water drop in the image, total area, maximum area and average area, etc., and other forms of image features may be extracted to evaluate the hydrophobicity of the insulator. For example, the features of the water drop morphology (such as roundness, edge smoothness), the uniformity of the water drop distribution or the degree of aggregation of the water droplets, etc., may be used, and these feature quantities may also have a certain indicative effect on the hydrophobicity. The feature quantities selected by the present invention are closely related to the hydrophobicity of the composite insulator surface, and can effectively distinguish the characteristics of different hydrophobicity levels, while other feature quantities may not provide such a direct and effective hydrophobicity connection in this regard.

[0036] Specifically, the present invention uses a multi-rotor drone equipped with a clamping mechanism and a rotating mechanism to collect original images (this process is also called a "water spray test", and this mechanism is called an "image acquisition mechanism"). This image acquisition mechanism can effectively clamp the composite insulator to be tested and achieve precise rotation; the rotating mechanism allows the clamping mechanism (such as a spray head or a camera) to slide along a circular track, thereby evenly spraying the surface of the composite insulator and simultaneously collecting images. Through this image acquisition mechanism, the entire operation process based on the spray grading method can be automatically completed, thereby enhancing the accuracy and repeatability of the experiment. Compared with traditional manual operations, automation technology reduces the interference of human factors and improves the consistency of the detection process. Especially in large-scale detection, this technology can significantly improve work efficiency and the reliability of results.

[0037] The embodiment of the present invention obtains image data sets of 6 different hydrophobicity levels through water spraying experiments. By simulating water spraying conditions under different environmental conditions, a diverse image data set is constructed, laying a solid foundation for subsequent image processing and analysis. The image data of each hydrophobicity level contains rich water droplet / water film information, which can provide sufficient training data for the model to ensure detection accuracy and robustness.

[0038] S102: Based on the training vector graph, determine a first water droplet bounding box and a first hydrophobicity level through a pre-acquired first evaluation model.

[0039] Specifically, the matrix vector in the training vector graph is input into the first evaluation model, and the first evaluation model outputs the first water droplet bounding box and the first hydrophobicity level. The above-mentioned first evaluation model can be a DETR (Detection Transformer) model based on the Transformer architecture, or it can be a target detection algorithm based on a convolutional neural network (CNN) or a regional convolutional neural network (RCNN), such as Fast RCNN, YOLO (You Only Look Once), etc. These algorithms perform target positioning and classification in different ways, and realize detection by extracting local features or regional features of the image, and can achieve similar functions under certain conditions. The unique application of the DETR algorithm adopted in this application in the automatic evaluation of the hydrophobicity of composite insulators mainly includes its unique self-attention mechanism, global feature extraction, end-to-end training and other training methods.

[0040] S103: If the parameter error f between the training water droplet bounding box and the first water droplet bounding box is greater than a preset bounding box threshold, or if the level difference Diff between the training hydrophobicity level and the first hydrophobicity level is greater than a preset level threshold, the first evaluation model is optimized to obtain a second evaluation model.

[0041] Specifically, the first evaluation model includes multiple loss functions, and the process of optimizing parameters is the process of adjusting / correcting the loss functions therein.

[0042] S104: Based on the verification vector graph, determine a second water droplet bounding box and a second hydrophobicity level through a second evaluation model.

[0043] Specifically, the matrix vector in the verification vector map is input into the second evaluation model, and the second evaluation model outputs a second water drop bounding box and a second hydrophobicity level.

[0044] S105: Determine an evaluation parameter mAP for evaluating the hydrophobicity level of the second evaluation model according to the verified water drop bounding box, the verified hydrophobicity level, the second water drop bounding box, and the second hydrophobicity level.

[0045] Specifically, here, we first need to calculate the intersection over union (IoU) ratio between the bounding boxes, and group the verification set according to the ratio of the intersection over union (IoU). Each group has a different first interval preset. Under different groups, the evaluation parameter mAP of different water droplet categories is calculated separately, and then compared with the corresponding threshold. This grouping can more accurately verify the effect of the second evaluation model.

[0046] S106: If the evaluation parameter mAP is in the preset first interval, the second evaluation model is used as the final composite insulator hydrophobicity grade evaluation model.

[0047] The present invention discloses a training method and device for a composite insulator hydrophobicity level evaluation model, including obtaining a sample set X, determining first and second water drop boundary boxes and first and second hydrophobicity levels according to first and second evaluation models; if the parameter error between the training water drop boundary box and the first water drop boundary box is greater than a preset threshold, or if the level difference between the training hydrophobicity level and the first hydrophobicity level is greater than a preset threshold, optimizing the first evaluation model to obtain a second evaluation model; determining evaluation parameters of the second evaluation model evaluation according to the verification and second water drop boundary boxes, the verification and second hydrophobicity levels; if the evaluation parameters of the hydrophobicity level evaluation of the second evaluation model are in a preset first interval, using the second evaluation model as the final composite insulator hydrophobicity level evaluation model. The evaluation model obtained based on the training method can more accurately evaluate the hydrophobicity level of the composite insulator.

[0048] Embodiment 2

[0049] The embodiment of the present invention provides another training method for a composite insulator hydrophobicity grade evaluation model. This embodiment is a further explanation of the first embodiment. Part of the training process is as follows: Figure 4 shown.

[0050] The image acquisition mechanism used in this application (i.e., a multi-rotor drone equipped with a clamping mechanism and a rotating mechanism) reduces the interference of human factors, but in the actual test environment, changes in external factors such as light, humidity, and temperature will still have a significant impact on the quality of the collected images. For example, the recognition of water droplet pixels and the calculation of the coverage area depend on the clarity and detail capture capabilities of the image, which may lead to inaccurate judgment results in low-light or high-noise environments. This application improves the robustness of the sample image through S101, especially the stability under different lighting and weather conditions. Here, the process of obtaining the sample set X includes the following:

[0051] S101-1. It is necessary to obtain multiple first images of the surface of the composite insulator through laboratory automated spray operation (i.e., through the image acquisition mechanism of Example 1, i.e., the "water spray experiment") to form a first image set. The first image covers a variety of different water droplet shapes and distributions, including different environments, angles, lighting, etc., to ensure the diversity of the data set.

[0052] S101-2, the first image set will be standardized and its size will be adjusted to a uniform range to obtain the second image set. This step can reduce the impact of differences in input data on training.

[0053] S101-3. In order to enhance data diversity and increase the number of samples to prevent overfitting, the second image set is enhanced. Here, data enhancement methods including rotation, translation, scaling, mirroring, color transformation, etc. are used to obtain the third image set.

[0054] S101-4. Optimize the quality of the input images by performing grayscale conversion, histogram equalization, median filtering and other processing on the third image set to obtain a fourth image set, wherein the fourth image set includes an H×W×C RGB image.

[0055] S101 - 5 . Further perform standardization processing on the fourth image set so that the pixel value of each fourth image is within a uniform range, thereby obtaining a fifth image set.

[0056] S101-6. In order to improve the quality and contrast of the image, a median filter is used to remove noise and enhance the detail information of the image, thereby obtaining a sixth image set.

[0057] S101-7. Expand the sixth image set through a linear embedding layer to map the grayscale information of the sixth data set images to a higher channel dimension to obtain a seventh image set. The seventh image set contains enhanced image information and provides clearer input features. After processing, the seventh image set provides more refined image input for subsequent target detection algorithms, thereby improving the quality of input data.

[0058] S101-8. Input the seventh image set into the pre-acquired DETR model, extract the features of the image through the convolutional neural network ResNet therein, and then combine the features to obtain the eighth image set.

[0059] S101-9, input the eighth image set into a pre-trained ResNet for feature extraction again, and obtain a new multi-channel feature map, i.e., the first pre-processed image set, which is usually of size H / 32×W / 32×C. Each unit in the first pre-processed image set represents the local area information in the first image set, and has encoded the spatial information and semantic information of the first image set. This is because ResNet will undergo multi-layer convolution operations and pooling operations, resulting in the reduction of the spatial resolution of the feature map, for example, H and W are reduced by 32 times respectively, while the number of channels C is usually high, and C represents different features of the image.

[0060] S101-10, input the first preprocessed image set into the pre-acquired Transformer encoder for further processing. The core part of the Transformer encoder is the self-attention mechanism, which generates a weighted feature representation by calculating the similarity and relationship between the position of each pixel point in the first preprocessed image and the positions of other pixels, obtains the second preprocessed image set, and then performs position encoding on the second preprocessed image set to obtain the sample set X.

[0061] S101-10 is a step of performing weighted fusion processing and position coding processing on pixel information of the first pre-processed image set acquired in advance and global information to obtain a sample set X. S101-10 includes:

[0062] S101-10-1:

[0063] Q=X0×W Q Formula 7;

[0064] K=X0×W K Formula 8;

[0065] V=X0×W V Formula 9;

[0066] Where X0 is the vector representation of any image in the first preprocessed image set, including but not limited to image parameters such as height resolution H, width resolution W, number of image channels C, total number of pixels N, feature dimension D of each pixel, etc., W Q , W K , W V are the weight matrices of the query space, key, and value obtained in advance through learning, Q, K, and V are the query space, key, and value of the pixel mapping of the image in the first preprocessed image set, respectively. k is the dimension of K, and Attention is the pixel weight matrix containing global information.

[0067] There may be i images in the first preprocessed image, and each image may be represented by Xi.

[0068] S101-10-2: Optimize the vector representation of the first preprocessed image set X0 based on Attention to obtain a second preprocessed image set.

[0069] Formula 6-Formula 9 is the specific implementation of the self-attention mechanism, which is the core of the Transformer model. This process helps capture the relationship between various regions in the image. This process determines the importance of other global pixels to itself, obtains a new representation of each pixel by weighting, integrates global information, and obtains the second pre-processed image set.

[0070] Specifically, the self-attention mechanism calculates the degree of association between each pixel position and other positions in the input feature, and obtains a weighted summation result. The information of each pixel will be updated to the contextual information of the pixel and other parts of the image. This allows each pixel of the second preprocessed image to not only retain its original features, but also integrate the features of the surrounding pixels. After the self-attention calculation, the encoder will generate a new feature map (i.e., the second preprocessed image). This feature map (i.e., the second preprocessed image) is usually the same as the input feature map in dimension, for example, it is still H / 32×W / 32×C, but its (i.e., the second preprocessed image) content has been weighted aggregated and contains the global contextual information of the image.

[0071] S101-10-3: Position-encode the second preprocessed image set to obtain a sample set X.

[0072] The process of position encoding specifically includes: in order to process the spatial position of the input feature map, position encoding is usually added to the second preprocessed image input feature to obtain a sample set X. Position encoding can help the model identify the relative position and spatial relationship of pixels. In Transformer, in order to introduce position information (because the Transformer itself does not have local perception capabilities like the convolutional layer), position encoding is usually added to the input feature map (i.e., the second preprocessed image) so that the model can understand the relative positions of pixels in the image and obtain a sample set X.

[0073] In each image in the sample set X, matching the information with the location is a picture that fuses the spatial location.

[0074] In order to conduct effective training, this application divides the sample set X into a training set and a validation set. The division ratio can be determined by yourself. The distribution of the divided data ensures that the category distribution of each subset is consistent, preventing category imbalance.

[0075] The image processing process of S101 can obtain the color image and grayscale image of the composite insulator before and after water spraying, construct a queue of water droplet pixels, and accurately identify the coverage area and proportion of water droplets based on the image similarity criterion, and finally obtain the hydrophobicity level of the composite insulator based on the fuzzy grade judgment model. The advantage of this method is that it can achieve a close combination of image processing and water droplet distribution information, thereby improving the support role of water droplet coverage area and water drop area in hydrophobicity judgment.

[0076] Traditional sample image processing methods mainly rely on manual evaluation or traditional image processing techniques, such as water drop / water film detection based on threshold segmentation, edge detection or region growing. These methods often face problems such as inaccurate recognition, poor robustness and low processing efficiency under complex backgrounds and variable water drop morphology. S101 effectively captures long-range dependencies in images through the self-attention mechanism and can accurately identify water drop / water film under complex backgrounds.

[0077] S101 obtained water spray image data covering 7 different hydrophobicity levels by conducting water spray experiments on composite insulators. The image quality was significantly improved by combining image enhancement processing techniques such as grayscale, histogram equalization and median filtering, laying the foundation for subsequent analysis. In the data processing process, the maximum inter-class variance threshold segmentation method was used to generate binary images of water droplets / water films, and key feature quantities including quantity, total area, maximum area and average area were proposed for the characteristics of water droplets, providing accurate quantitative indicators for the comprehensive evaluation of hydrophobic performance.

[0078] S101 combines image enhancement technologies such as grayscale, histogram equalization and median filtering to effectively improve image quality, eliminate interference factors such as lighting and shadows, and further improve the accuracy of water droplet detection. This method that combines deep learning and image enhancement can adapt to the surface detection of composite insulators in different environments and has strong universality and adaptability. While achieving efficient and accurate automatic evaluation of the hydrophobicity of composite insulators, it solves the shortcomings of traditional methods in complex backgrounds, morphological diversity and efficient processing, and has significant technical advantages and application prospects.

[0079] S101 is a method for extracting water droplet features (number, total area, maximum area, average area), and optimizes the quality of the original image through image enhancement processing (such as grayscale, histogram equalization, and median filtering). The enhanced image helps to accurately segment water droplets and water films, and ensures that the extracted feature quantity can accurately reflect the hydrophobicity level. This technical solution provides a scientific basis for evaluating the hydrophobicity of the insulator surface by quantifying the water droplet features.

[0080] S102: Based on the training vector graph, determine a first water droplet bounding box and a first hydrophobicity level through a pre-acquired first evaluation model.

[0081] Here, the decoder also uses the self-attention mechanism to further infer the position information and category information of each water drop in the input training vector image. In this process, the first evaluation model can output the bounding box and hydrophobicity of each water drop.

[0082] S103: If the parameter error f between the training water droplet bounding box and the first water droplet bounding box is greater than a preset bounding box threshold, or if the level difference Diff between the training hydrophobicity level and the first hydrophobicity level is greater than a preset level threshold, the first evaluation model is optimized to obtain a second evaluation model.

[0083] S103 includes:

[0084] S103 - 1 : Normalize the difference between the position parameters of the training water droplet bounding box and the first water droplet bounding box to obtain a parameter error f, wherein each training water droplet bounding box corresponds to a parameter error f.

[0085] Specifically, the method includes normalizing the difference between the horizontal coordinate, vertical coordinate, width and height of the center point of the training water droplet bounding box and the horizontal coordinate, vertical coordinate, width and height of the center point of the first water droplet bounding box to obtain the parameter error f.

[0086] If any of the f is greater than the preset threshold (which can be 0.8), the bounding box regression is optimized through smooth L1 loss, and the classification loss is used to evaluate the category accuracy of each water droplet. Finally, a multi-task loss function is formed to balance the classification loss and regression loss, thereby optimizing the parameters of the first DETR model (i.e., the first evaluation model) to make the target (i.e., water droplet) detection more accurate.

[0087] S103 - 2 : Calculate the level difference Diff between the training water repellency level and the first water repellency level.

[0088] Here, this application uses cross entropy loss to calculate the prediction error of each target category. Specifically including:

[0089]

[0090] Among them, y i is the training hydrophobicity level in sample set X, is the first hydrophobicity level output by the first evaluation model, and i is the number of images in the training set X1.

[0091] S103 - 3 : If the parameter error f is greater than a preset bounding box threshold, or if the level difference Diff is greater than a preset level threshold, the first evaluation model is updated to obtain a second evaluation model.

[0092] Specifically, there are two types of loss functions: bounding box loss function and training loss function.

[0093] In the target detection task, it is necessary to predict the position of the target through bounding box regression, and this process uses the bounding box loss function (this bounding box loss function is more sensitive to small errors and more tolerant to large errors).

[0094] The bounding box loss function in the first evaluation model is modified based on the following formula:

[0095]

[0096] Among them, L smooth is the parameter of the bounding box loss function in the first evaluation model, and F is the sum of the parameter errors f between all training water drop bounding boxes and the first water drop bounding box of any training vector image.

[0097] For the training loss function, in order to avoid overfitting, this application adopts an early stopping strategy to ensure that the model does not overfit the training data. In addition, data enhancement methods such as rotation, scaling, translation, and mirroring are also used in the training process of the model to enhance the diversity of the data set and improve the robustness of the model. In the optimization process, the adjustment of the learning rate is crucial, so this application adopts an adaptive optimization algorithm (such as Adam) to improve training efficiency and model performance by dynamically adjusting the learning rate of each parameter. This process optimizes the loss function through the Adam optimizer. The Adam algorithm improves training efficiency by dynamically adjusting the learning rate of each parameter. The update rule of the Adam optimizer is

[0098] The training loss function in the first evaluation model is modified based on the following formula:

[0099]

[0100] Among them, θ t+1 is the parameter of the updated training loss function, θ t is the parameter of the training loss function in the first evaluation model, α is the preset learning rate, ε is the preset error-proofing parameter, and m t and v t are the mean and variance of the parameters of the training loss function in the first evaluation model; β1 and β2 are the preset m t and v t The decay rate of and m t and v t The corrected value of .

[0101] The bounding box loss function and the training loss function are not performed sequentially, but back-propagated through multiple iterations and parameter optimization is performed through the gradient descent method; in each round of training, the model adjusts the weights according to the current loss value, thereby gradually minimizing the error of the hydrophobicity evaluation to obtain the final evaluation model.

[0102] S104: Based on the verification vector graph, determine a second water droplet bounding box and a second hydrophobicity level through a second evaluation model.

[0103] Here, it is verified that the hydrophobicity level and the second hydrophobicity level are both within the six levels of HC1 to HC6.

[0104] S105: Determine an evaluation parameter mAP for evaluating the hydrophobicity level of the second evaluation model according to the verified water drop bounding box, the verified hydrophobicity level, the second water drop bounding box, and the second hydrophobicity level.

[0105] After the verification vector image is input into the second evaluation model, after forward propagation, the second evaluation model outputs the coordinates of each water droplet bounding box and the hydrophobicity level. These outputs will be used to evaluate the hydrophobicity level of the composite insulator surface. At the same time, key feature quantities such as the number of water droplets, total area, maximum area and average area can also be calculated.

[0106] In order to verify the performance of the second evaluation model, the present invention uses a classification accuracy evaluation method to evaluate the second evaluation model, which mainly includes the following steps:

[0107] S105-1: Divide the verification vector image into multiple verification image sets according to the intersection over union (IoU) between the verification water droplet bounding box and the second water droplet bounding box.

[0108] Specifically, the IoU (Intersection over Union) indicator is used to evaluate the accuracy of the bounding box. If the IoU is greater than the set threshold (such as 0.8), the second evaluation model is considered to be more credible. The IoU (Intersection over Union) is used to calculate the degree of overlap between the predicted bounding box and the true bounding box. The larger the IoU value, the more accurate the prediction of the second evaluation model. This embodiment divides the verification vector graph into two groups: IoU < 0.5 and 0.5-0.95.

[0109] S105-2: The calculation method of the evaluation parameter mAP of each set of verification images is as follows:

[0110]

[0111] Among them, P is the Precision, r is the Recall, P(r) is a function with r as a parameter. In the classification accuracy evaluation method, P is the ordinate and R is the abscissa. AP represents the area under the PR curve and the coordinate axis. mAP is the average of the six levels of HC1 to HC6. AP K is the accuracy of the Kth level.

[0112] This application discusses six levels, HC1 to HC6, so n = 6. For each level of HC1 to HC6, TP: the number of samples whose model (i.e., the second evaluation model) predicts and actual labels (i.e., the level in sample set X) belong to the current level. TN: the number of samples whose model prediction and actual labels do not belong to the current level. FP: the number of samples whose model predicts the current level but the actual labels are not the current level. FN: the number of samples whose model prediction is not the current level but the actual labels are the current level.

[0113] Since the present embodiment divides the verification vector graph into two groups, IoU<0.5 and 0.5-0.95, two evaluation parameters mAP can be obtained here.

[0114] S106: If the evaluation parameter mAP is in a preset first interval, the second evaluation model is used as the final evaluation model for the hydrophobicity grade of the composite insulator.

[0115] S106 uses AP (Average Precision) to verify the accuracy of the second evaluation model under different IoUs, comprehensively calculates the detection accuracy and regression accuracy of different water drop categories, and further verifies the effect of the second evaluation model more accurately.

[0116] For example, the present application divides the verification vector graph into two groups with IoU < 0.5 and 0.5-0.95. For example, the preset first intervals of the two groups are interval A1 and interval A2, respectively. The two evaluation parameters mAP obtained in S105 are compared with the preset thresholds A1 and A2, respectively. If they are both within the corresponding threshold range, the second evaluation model is qualified, otherwise the entire model needs to be retrained.

[0117] During the training process, after each epoch, the model output needs to be compared with the true label. Model training is an iterative, repetitive, and spiral process.

[0118] In addition, the first or second evaluation model can output not only the position parameters of the bounding box and the hydrophobicity level, but also the confidence level. By comparing the confidence level output by the model with a preset threshold, the accuracy of the first evaluation model or the second evaluation model can also be verified, which is an auxiliary method for verifying whether the model is qualified.

[0119] The general idea of ​​this embodiment is to process the surface of the composite insulator and extract the hydrophobicity-related features of the shed surface, thereby realizing the hydrophobicity evaluation of the composite insulator; the overall process is: image acquisition → image preprocessing → feature extraction → feature analysis → hydrophobicity evaluation. In the whole process, through the processing of S101, representative feature quantities are accurately and effectively extracted. This feature extraction method can fully reflect the changes in the hydrophobicity of the composite insulator surface, and directly improve the accuracy of the final evaluation result.

[0120] The evaluation model of this embodiment can capture the complex spatial relationships in the image on a global scale through its self-attention mechanism, and can accurately identify the distribution and morphology of different water droplets. In addition, the application of optimization methods such as data enhancement technology and hyperparameter adjustment in this embodiment further improves the robustness and training efficiency of the model. The finally trained DETR model (i.e., the second evaluation model) can effectively complete the task of automatically identifying the hydrophobicity level of the composite insulator surface, accurately predict the position of each water droplet and the hydrophobicity level of the image, and optimize the performance of target detection through a multi-task loss function.

[0121] The evaluation model of this embodiment innovatively applies the DETR (Detection Transformer) target detection algorithm based on the Transformer architecture to the automatic evaluation of the hydrophobicity of composite insulators. The DETR algorithm uses the self-attention mechanism to extract image features from a global perspective, which can identify the spatial distribution of water droplets / water films and overcome the limitations of traditional convolutional neural networks (CNNs) in complex backgrounds. This method effectively improves the detection accuracy of water droplets / water films, especially when dealing with occlusion and multi-scale objects.

[0122] The model of this embodiment can automatically detect and evaluate the hydrophobicity level of the insulator surface, can automatically detect and classify water drops or water marks on the insulator surface, and can comprehensively reflect the hydrophobicity of the insulator. Compared with traditional detection methods, this application provides an efficient, accurate, and automated detection tool with important technical innovations, which can effectively improve the accuracy and efficiency of insulator detection in power systems, reduce the risk of human intervention, and ensure the long-term stable operation of power equipment.

[0123] The evaluation model of this embodiment can be used to determine the hydrophobicity level of composite insulator surfaces through automatic image recognition, and further determine the degree of aging of composite insulators of transmission lines. It is an intuitive, reliable, and low-error evaluation method.

[0124] This embodiment introduces the target detection algorithm DETR of the Transformer architecture and constructs an efficient hydrophobicity automatic recognition model, which can quickly and accurately identify the hydrophobicity level corresponding to the water spray image. Compared with traditional methods, the present invention significantly improves the efficiency and reliability of the hydrophobicity assessment of composite insulators, reduces human intervention and judgment bias. In addition, the present invention has strong robustness and can adapt to the surface condition assessment of insulators in complex environments, providing important support for the insulator condition monitoring and operation and maintenance decision-making of power system, and has significant engineering application value and economic benefits.

[0125] This embodiment is based on the water drop target detection method of the DETR algorithm, especially how to extract the position, area, quantity and other information of the water droplets / water film in the image, and automatically classify different hydrophobicity levels through these features. This technology combines target detection with image feature analysis to achieve accurate assessment of the hydrophobicity level of the composite insulator surface without manual intervention, and has the advantages of high efficiency and automation.

[0126] The embodiment of the present invention introduces a deep learning model (i.e., the first evaluation model) of the DETR target detection algorithm based on the Transformer architecture, and trains and verifies the first evaluation model on data such as the water droplet bounding box difference, level difference, intersection-over-union ratio, and prediction accuracy in the image collected by the "image acquisition mechanism" to obtain a second evaluation model. This method significantly improves the automation, precision, accuracy, and robustness of the evaluation (or prediction) of the hydrophobicity of composite insulators.

[0127] Embodiment 3

[0128] like Figure 5 As shown, corresponding to the training method of the composite insulator hydrophobicity grade evaluation model in the first and second embodiments, this embodiment provides a training device for the composite insulator hydrophobicity grade evaluation model, and the training device includes:

[0129] The first training module is used to obtain a sample set X, wherein the sample set X is divided into a training set X1 and a verification set X2, each training set X1 includes a training vector map; the training vector map includes multiple training water droplet bounding boxes and training hydrophobicity levels, and each verification set X2 includes a verification vector map; the verification vector map includes multiple verification water droplet bounding boxes and verification hydrophobicity levels.

[0130] The second training module is used to determine a first water droplet bounding box and a first hydrophobicity level based on the training vector graph through a pre-acquired first evaluation model.

[0131] The third training module is used to optimize the first evaluation model to obtain the second evaluation model if the parameter error f between the training water droplet bounding box and the first water droplet bounding box is greater than a preset bounding box threshold, or if the level difference Diff between the training hydrophobicity level and the first hydrophobicity level is greater than a preset level threshold.

[0132] The fourth training module is used to determine a second water droplet bounding box and a second hydrophobicity level through a second evaluation model based on the verification vector image.

[0133] The fifth training module is used to determine the evaluation parameter mAP of the hydrophobicity level evaluation of the second evaluation model according to the verified water drop bounding box, the verified hydrophobicity level, the second water drop bounding box and the second hydrophobicity level.

[0134] The sixth training module is used to use the second evaluation model as the final composite insulator hydrophobicity grade evaluation model if the evaluation parameter mAP is in a preset first interval.

[0135] The training device provided in this embodiment has the same implementation principle and technical effects as those in the aforementioned embodiment. For the sake of brief description, for matters not mentioned in the training device embodiment, reference may be made to the corresponding contents in the aforementioned training method embodiment, and this embodiment will not repeat them any more.

[0136] Embodiment 4

[0137] The embodiment of the present invention relates to a method for evaluating the hydrophobicity of a composite insulator based on a DETR algorithm, such as Figure 6 As shown in the figure, by introducing the target detection algorithm of Transformer architecture, the automatic recognition and grade evaluation of the hydrophobicity of the insulator surface are realized. The specific methods include:

[0138] Step 1: Conduct a water spray experiment on the composite insulator to simulate the hydrophobicity of the insulator under different environmental conditions and collect water spray images covering 7 (or 6) different hydrophobicity levels.

[0139] Step 2: Grayscale the collected image to reduce the interference of color information on the analysis, use histogram equalization to enhance the contrast of the image, and use median filtering to remove noise in the image to improve image quality.

[0140] Step 3: Use the maximum inter-class variance threshold segmentation method to convert the preprocessed image into a binary image and separate the water drop / water film area from the background area.

[0141] Step 4: Based on the distribution and morphology of water droplets / water films, the following characteristic quantities are extracted: the number of detected water droplets / water films, the total area of ​​water droplets / water films, the maximum area of ​​water droplets / water films, the average area of ​​water droplets / water films and other key characteristic quantities as basic indicators for evaluating hydrophobic performance.

[0142] Step 5: Combine deep learning technology with the target detection algorithm DETR based on the Transformer architecture to build an automatic recognition model for the hydrophobicity of composite insulators; use the labeled water spray image dataset to train the model, optimize the model parameters, and obtain the second evaluation model.

[0143] Step 6: Input the test data into the trained second evaluation model to identify the distribution characteristics of water droplets / water films; automatically evaluate the hydrophobicity level of the insulator based on the water droplet distribution characteristics and preset standards. Utilize the powerful global feature capture capability and target detection performance of the second evaluation model to accurately identify 7 (or 6) composite insulator water spray images with different hydrophobicity levels.

[0144] The method for evaluating the hydrophobicity of composite insulators based on the DETR algorithm provided in this embodiment has the same implementation principle and technical effects as those in the aforementioned embodiments. For the sake of brief description, for parts not mentioned in this embodiment, reference may be made to the corresponding contents in the aforementioned embodiments, and this embodiment will not be repeated.

[0145] The above embodiments are merely examples for the purpose of clear explanation, and are not intended to limit the implementation methods. For those skilled in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all the implementation methods here. The obvious changes or modifications derived therefrom are still within the scope of protection of the invention.

Claims

1. A training method for a composite insulator hydrophobicity grade evaluation model, characterized in that: The training method comprises: Obtain a sample set X, wherein the sample set X is divided into a training set X1 and a verification set X2, each group of the training set X1 includes a training vector map; the training vector map includes a plurality of training water droplet bounding boxes and training hydrophobicity levels, and each group of the verification set X2 includes a verification vector map; the verification vector map includes a plurality of verification water droplet bounding boxes and verification hydrophobicity levels; Based on the training vector graph, determining a first water droplet bounding box and a first hydrophobicity level by using a pre-acquired first evaluation model; If a parameter error f between the training water droplet bounding box and the first water droplet bounding box is greater than a preset bounding box threshold, or if a level difference Diff between the training hydrophobicity level and the first hydrophobicity level is greater than a preset level threshold, optimizing the first evaluation model to obtain a second evaluation model; Based on the verification vector graph, determining a second water drop bounding box and a second hydrophobicity level by using the second evaluation model; Determine an evaluation parameter mAP for hydrophobicity evaluation of the second evaluation model according to the verified water drop bounding box, the verified hydrophobicity level, the second water drop bounding box, and the second hydrophobicity level; If the evaluation parameter mAP is in a preset first interval, the second evaluation model is used as the final evaluation model for the hydrophobicity grade of the composite insulator.

2. The training method for the composite insulator hydrophobicity grade evaluation model according to claim 1, characterized in that: If the parameter error f between the training water droplet bounding box and the first water droplet bounding box is greater than a preset bounding box threshold, or if the level difference Diff between the training hydrophobicity level and the first hydrophobicity level is greater than a preset level threshold, optimizing the first evaluation model to obtain a second evaluation model comprises: Normalizing the difference between the position parameters of the training water droplet bounding box and the first water droplet bounding box to obtain the parameter error f, wherein each training water droplet bounding box corresponds to a parameter error f; Calculating a level difference Diff between the training hydrophobicity level and the first hydrophobicity level; If the parameter error f is greater than a preset bounding box threshold, or if the level difference Diff is greater than a preset level threshold, the first evaluation model is updated to obtain a second evaluation model.

3. The training method for the composite insulator hydrophobicity grade evaluation model according to claim 2, characterized in that: The step of updating the first evaluation model to obtain the second evaluation model includes: The bounding box loss function in the first evaluation model is modified based on the following formula: Among them, L smooth is the parameter of the bounding box loss function in the first evaluation model, and F is the sum of the parameter errors f between all training water drop bounding boxes of any training vector image and the first water drop bounding box.

4. The training method for the composite insulator hydrophobicity grade evaluation model according to claim 3 is characterized in that: The step of updating the first evaluation model to obtain the second evaluation model further includes: The training loss function in the first evaluation model is modified based on the following formula: Among them, θ t+1 is the parameter of the updated training loss function, θ t is the parameter of the training loss function in the first evaluation model, α is the preset learning rate, ε is the preset error-proofing parameter, and m t and v t are the mean and variance of the parameters of the training loss function in the first evaluation model; β1 and β2 are the preset m t and v t The decay rate of and m t and v t The corrected value of .

5. The training method for composite insulator hydrophobicity grade evaluation model according to claim 1, characterized in that: The step of determining the evaluation parameter mAP of the hydrophobicity level evaluation of the second evaluation model according to the verified water drop bounding box, the verified hydrophobicity level, the second water drop bounding box and the second hydrophobicity level comprises: Dividing the verification vector map into a plurality of verification image sets according to an intersection-over-union (IoU) ratio between the verification water droplet bounding box and the second water droplet bounding box; The evaluation parameter mAP of each group of the verification image sets is calculated based on the classification accuracy evaluation method, the verification hydrophobicity level and the second hydrophobicity level.

6. The training method for composite insulator hydrophobicity grade evaluation model according to claim 5, characterized in that: The step of using the second evaluation model as the final composite insulator hydrophobicity grade evaluation model if the evaluation parameter mAP is in a preset first interval comprises: The evaluation parameter mAP of each verification image set is compared with the corresponding preset first interval respectively. If the evaluation parameter mAP is within the corresponding first interval, the second evaluation model is used as the final composite insulator hydrophobicity grade evaluation model.

7. The training method for composite insulator hydrophobicity grade evaluation model according to claim 2, characterized in that: The step of calculating the level difference Diff between the training hydrophobicity level and the first hydrophobicity level comprises: Among them, y i is the training hydrophobicity level in the sample set X, is the first hydrophobicity level output by the first evaluation model, and i is the number of images in the training set X1.

8. The training method for composite insulator hydrophobicity grade evaluation model according to claim 1, characterized in that: The step of obtaining the sample set X comprises: Based on the pre-acquired Transformer encoder, the pixel information of the pre-acquired first pre-processed image set and the global information are weighted fused and position encoded to obtain the sample set X.

9. The training method for composite insulator hydrophobicity grade evaluation model according to claim 8, characterized in that: The step of performing weighted fusion processing and position coding processing on pixel information of the pre-acquired first pre-processed image set and global information to obtain a sample set X comprises: Q=X0×W Q Formula 7: K=X0×W K Formula 8; V=X0×W V Formula 9; Where X0 is the vector representation of the first preprocessed image set, W Q , W K , W V are the weight matrices of the query space, key, and value obtained in advance through learning, Q, K, and V are the query space, key, and value of the pixel mapping of the image in the first preprocessed image set, respectively. k is the dimension of K, and Attention is the pixel weight matrix containing global information; Optimizing the vector representation of the first preprocessed image set X0 based on Attention to obtain a second preprocessed image set; The second preprocessed image set is position-encoded to obtain a sample set X.

10. A training device for a composite insulator hydrophobicity grade evaluation model, characterized in that: The training device comprises: A first training module is used to obtain a sample set X, wherein the sample set X is divided into a training set X1 and a verification set X2, each group of the training set X1 includes a training vector map; the training vector map includes a plurality of training water droplet bounding boxes and training hydrophobicity levels, and each group of the verification set X2 includes a verification vector map; the verification vector map includes a plurality of verification water droplet bounding boxes and verification hydrophobicity levels; A second training module is used to determine a first water droplet bounding box and a first hydrophobicity level based on the training vector graph by using a pre-acquired first evaluation model; a third training module, configured to optimize the first evaluation model to obtain a second evaluation model if a parameter error f between the training water droplet bounding box and the first water droplet bounding box is greater than a preset bounding box threshold, or if a level difference Diff between the training hydrophobicity level and the first hydrophobicity level is greater than a preset level threshold; A fourth training module, configured to determine a second water droplet bounding box and a second hydrophobicity level by using the second evaluation model based on the verification vector graph; A fifth training module, configured to determine an evaluation parameter mAP for hydrophobicity evaluation of the second evaluation model according to the verification water drop bounding box, the verification hydrophobicity level, the second water drop bounding box and the second hydrophobicity level; The sixth training module is used to use the second evaluation model as the final evaluation model for the hydrophobicity grade of the composite insulator if the evaluation parameter mAP is in a preset first interval.