Differentiated sample-oriented electric power visual model generalization ability evaluation method and system
Through the generalization ability evaluation method of the power vision model for differentiated samples, the data calculation parameters of the distribution distance are used to identify external data, which solves the problem of low recognition accuracy in practical applications of the power vision model, and realizes scientific evaluation and performance evaluation of the generalization ability of the power vision model.
Patent Information
- Application Number
- CN202411851636.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-16
- Publication Date
- 2025-04-08
AI Technical Summary
In the prior art, in practical applications, the power vision model has a low recognition accuracy rate due to the difference between the training data set and the actual operating environment, which affects the operation and maintenance level of the power system.
A method for generalization ability evaluation of power vision model for differentiated samples is proposed. By acquiring power vision image features, data optimization and processing, data calculation parameters based on distribution distance are obtained, external data or normal distribution data are identified, and generalization ability of power vision model is achieved.
It effectively improves the ability to identify data outside the distribution, reduces the difference between the data set and the actual application environment, and realizes a scientific evaluation of the generalization ability of the power vision model, providing a reliable basis for the performance evaluation of the power vision model.
Smart Images

Figure CN119785153A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of target detection tasks of computer vision in electric power artificial intelligence, and relates to a method and system for evaluating the generalization ability of an electric power vision model for differentiated samples. Background Art
[0002] In modern power systems, the application of visual recognition technology has become an important means to ensure the normal operation and maintenance of power equipment. With the increase in the types of power equipment and the complexity of the operating environment, the comprehensive performance requirements of visual models are becoming higher and higher. However, in practical applications, power visual models often face the problem of differences between training data sets and actual operating environments, which will lead to low recognition accuracy of visual models in practice, thus affecting the operation and maintenance level of power systems. Traditional solutions are usually based on expanding training data sets or optimizing model architectures for recognition, but the computing resources and time costs required by these methods are too large and are not suitable for practical projects.
[0003] In response to the problem of differences between the training data set and the operating environment, Ge Leijiao et al. proposed an improved method based on data augmentation theory, but this method cannot fully cover specific out-of-distribution data, and the generalization ability of the model is insufficient. Fang Xi et al. proposed a model evaluation method based on transfer learning, but the effect of transfer learning is highly dependent on the similarity between the source domain and the target domain. If the difference between the two is large, the effect of model migration is not ideal. Zhu Jizhong et al. proposed a hybrid model method of multi-model integration, but model integration increases the amount of calculation and complexity, resulting in a bias towards specific types of data. Yang Haoran proposed an auxiliary decision-making method that integrates multiple methods such as feature engineering and model tuning, but feature engineering requires a lot of domain knowledge and experience, which not only increases labor costs, but also has data sensitivity in the model tuning process and lacks transferability. Summary of the invention
[0004] The purpose of the present invention is to solve the problem of low out-of-distribution data recognition ability in the evaluation of electric power vision models in the prior art, and to provide a method and system for evaluating the generalization ability of electric power vision models for differentiated samples.
[0005] In order to achieve the above object, the present invention adopts the following technical solutions:
[0006] The present invention proposes a method for evaluating the generalization ability of a power vision model for differentiated samples, comprising:
[0007] Acquire power visual image features, process the power visual image features, and acquire test data of the power visual image;
[0008] Optimizing the test data of the electric power visual image to obtain optimized electric power visual image data;
[0009] Processing electric power visual image features, electric power visual image test data and optimized electric power visual image data to obtain data operation parameters based on distribution distance;
[0010] According to the data operation parameters based on the distribution distance, the optimized power vision image data is identified as out-of-distribution data or normal distribution data, so as to realize the generalization ability evaluation of the power vision model.
[0011] Preferably, the electric power visual image features are obtained by interpolating and filling missing data, calculating and extracting deep feature products, and performing scaling and adaptation multi-scale analysis, and are formed by operating in a hierarchical manner. The electric power visual image features include data variables of the first electric power visual image, data variables of the second electric power visual image, and data variables of the third electric power visual image;
[0012] The power visual image features are expressed as follows:
[0013]
[0014] Among them, x 1 is the data variable of the first power visual image, x 2 The data variable for the second power visual image, x 3 is the data variable of the third power visual image; a 1 、a 2 、a 3 are the scaling factors of each layer, b 1 , b 2 , b 3 are the bias terms of each layer, c 1 、c 2 、c 3 are the nonlinear transformation coefficients of each layer.
[0015] Preferably, the coverage rate of the electric power visual image features is calculated to obtain the test data of the electric power visual image, and the test data of the electric power visual image includes the result of the first-layer logic operation, the product of the result of the second-layer logic operation and the result of the third-layer logic operation;
[0016] The representation of the test data of the power vision image is as follows:
[0017]
[0018] Among them, z 1 is the result of the first-level logical operation, z 2 Represents the result of the second-level logical operation, z 3Represents the result of the third-level logical operation, x 1 is the data variable of the first power visual image, x 2 The data variable for the second power visual image, x 3 A data variable for the third power visual image.
[0019] Preferably, the test data of the electric power visual image is optimized to obtain optimized electric power visual image data, wherein the optimized electric power visual image data includes a first optimized output result of the test data, a second optimized output result of the test data, and a third optimized output result of the test data;
[0020] The representation of the optimized Power Vision image data is as follows:
[0021]
[0022] Among them, y 1 represents the first optimization output result of the test data; y 2 Represents the second optimization output result of the test data; y 3 is the third optimization output result of the test data; z 1 is the result of the first-level logical operation, z 2 Represents the result of the second-level logical operation, z 3 Indicates the result of the third-level logical operation.
[0023] Preferably, the power visual image features, the test data of the power visual image and the optimized power visual image data are processed to obtain data operation parameters based on the distribution distance, specifically:
[0024] Automatically supplement and detect the electric power visual image features, the test data of the electric power visual image and the optimized electric power visual image data to obtain the data operation parameters based on the distribution distance. The data operation parameters based on the distribution distance are expressed as follows:
[0025]
[0026] Among them, Q 1 It is a preliminary distance measure between the distribution data and the reference distribution; Q 2 It is the optimized distribution value after the distribution data is supplemented and generated; Q 3 is the evaluation value of the detection result of the distribution data; x 1 is the data variable of the first power visual image, x 2 The data variable for the second power visual image, x 3 is the data variable of the third power visual image; 1 is the result of the first-level logical operation, z 2 Represents the result of the second-level logical operation, z3 Indicates the result of the third-level logical operation; y 1 represents the first optimization output result of the test data; y 2 Represents the second optimization output result of the test data; y 3 is the third optimization output result of the test data.
[0027] Preferably, the method of identifying the optimized electric power visual image data as out-of-distribution data or normal distribution data according to the data operation parameter based on the distribution distance, and realizing the generalization ability evaluation of the electric power visual model, is specifically as follows:
[0028] When the evaluation value of the detection result of the distribution data exceeds the set threshold, the optimized power visual image data is out-of-distribution data. If the evaluation value of the detection result of the distribution data is within the threshold range, the optimized power visual image data is normal distribution data.
[0029] The present invention proposes a power vision model generalization ability evaluation system for differentiated samples, comprising:
[0030] A data preprocessing module, the data preprocessing module is used to obtain power visual image features, process the power visual image features, and obtain test data of the power visual image;
[0031] A data optimization module, wherein the data optimization module is used to optimize the test data of the electric power visual image to obtain optimized electric power visual image data;
[0032] A data integration module, the data integration module is used to process the electric power visual image features, the test data of the electric power visual image and the optimized electric power visual image data to obtain data operation parameters based on the distribution distance;
[0033] A data identification module is used to identify the optimized power visual image data as out-of-distribution data or normal distribution data according to the data operation parameters based on the distribution distance, so as to realize the generalization ability evaluation of the power visual model.
[0034] Preferably, the electric power visual image features are obtained by interpolating and filling missing data, calculating and extracting deep feature products, and performing scaling and adaptation multi-scale analysis, and are formed by operating in a hierarchical manner. The electric power visual image features include data variables of the first electric power visual image, data variables of the second electric power visual image, and data variables of the third electric power visual image;
[0035] The power visual image features are expressed as follows:
[0036]
[0037] Among them, x 1is the data variable of the first power visual image, x 2 The data variable for the second power visual image, x 3 is the data variable of the third power visual image; a 1 、a 2 、a 3 are the scaling factors of each layer, b 1 , b 2 , b 3 are the bias terms of each layer, c 1 、c 2 、c 3 are the nonlinear transformation coefficients of each layer.
[0038] Preferably, the coverage rate of the electric power visual image features is calculated to obtain the test data of the electric power visual image, and the test data of the electric power visual image includes the result of the first-layer logic operation, the product of the result of the second-layer logic operation and the result of the third-layer logic operation;
[0039] The representation of the test data of the power vision image is as follows:
[0040]
[0041] Among them, z 1 is the result of the first-level logical operation, z 2 Represents the result of the second-level logical operation, z 3 Represents the result of the third-level logical operation, x 1 is the data variable of the first power visual image, x 2 The data variable for the second power visual image, x 3 A data variable for the third power visual image.
[0042] Preferably, the test data of the electric power visual image is optimized to obtain optimized electric power visual image data, wherein the optimized electric power visual image data includes a first optimized output result of the test data, a second optimized output result of the test data, and a third optimized output result of the test data;
[0043] The representation of the optimized Power Vision image data is as follows:
[0044]
[0045] Among them, y 1 represents the first optimization output result of the test data; y 2 Represents the second optimization output result of the test data; y 3 is the third optimization output result of the test data; z 1 is the result of the first-level logical operation, z 2 Represents the result of the second-level logical operation, z3 Indicates the result of the third-level logical operation.
[0046] Preferably, the power visual image features, the test data of the power visual image and the optimized power visual image data are processed to obtain data operation parameters based on the distribution distance, specifically:
[0047] Automatically supplement and detect the electric power visual image features, the test data of the electric power visual image and the optimized electric power visual image data to obtain the data operation parameters based on the distribution distance. The data operation parameters based on the distribution distance are expressed as follows:
[0048]
[0049] Among them, Q 1 It is a preliminary distance measure between the distribution data and the reference distribution; Q 2 It is the optimized distribution value after the distribution data is supplemented and generated; Q 3 is the evaluation value of the detection result of the distribution data; x 1 is the data variable of the first power visual image, x 2 The data variable for the second power visual image, x 3 is the data variable of the third power visual image; 1 is the result of the first-level logical operation, z 2 Represents the result of the second-level logical operation, z 3 Indicates the result of the third-level logical operation; y 1 represents the first optimization output result of the test data; y 2 Represents the second optimization output result of the test data; y 3 is the third optimization output result of the test data.
[0050] Preferably, the method of identifying the optimized electric power visual image data as out-of-distribution data or normal distribution data according to the data operation parameter based on the distribution distance, and realizing the generalization ability evaluation of the electric power visual model, is specifically as follows:
[0051] When the evaluation value of the detection result of the distribution data exceeds the set threshold, the optimized power visual image data is out-of-distribution data. If the evaluation value of the detection result of the distribution data is within the threshold range, the optimized power visual image data is normal distribution data.
[0052] A terminal device comprises a memory, a processor and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of a method for evaluating the generalization capability of an electric power visual model for differentiated samples are implemented.
[0053] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of a method for evaluating the generalization capability of an electric power vision model for differentiated samples.
[0054] Compared with the prior art, the present invention has the following beneficial effects:
[0055] The present invention proposes a method for evaluating the generalization ability of an electric power vision model for differentiated samples. The method automatically generates test data using coverage, effectively expands the diversity of training data sets, and reduces the difference between data sets and actual application environments. The method accurately identifies out-of-distribution data based on data operation parameters, improves the ability to identify out-of-distribution data, and thus achieves a scientific evaluation of the generalization ability of the electric power vision model, and also provides a reliable basis for the performance evaluation of the electric power vision model. Specifically, processing the electric power vision image features into test data can convert complex image information into a quantifiable and easy-to-analyze data form, which is helpful for the subsequent consideration of the generalization ability of the model under a unified data framework. Optimizing the test data effectively improves the data quality, so that the final evaluation results can more truly reflect the generalization performance of the electric power vision model in actual application scenarios. The data operation parameters based on the distribution distance are obtained from multiple dimensions, and the out-of-distribution data is accurately identified based on the data operation parameters, thereby achieving a scientific evaluation of the generalization ability of the electric power vision model, and understanding the effectiveness and limitations of the model when facing differentiated samples. Effective evaluation of the generalization capability of power vision models helps ensure that the models put into use can function normally when faced with various unknown or differentiated power image situations, timely and accurately discover potential problems of power equipment, monitor the operating status of the power system, etc., thereby ensuring the stable and reliable operation of the power system and reducing power failures and related losses that may be caused by model failure.
[0056] The present invention proposes a power visual model generalization capability evaluation system for differentiated samples. By dividing the system into a data preprocessing module, a data optimization module, a data integration module, and a data identification module, the out-of-distribution data is identified to realize the power visual model generalization capability evaluation. The modularization concept is adopted to make each module independent of each other, which is convenient for unified management of each module. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.
[0058] Figure 1This is a flow chart of the method for evaluating the generalization ability of the power vision model for differentiated samples of the present invention.
[0059] Figure 2 It is a basic structural diagram of the electric power visual model of the present invention.
[0060] Figure 3 The operation structure diagram generated for the test data of the present invention.
[0061] Figure 4 A structure graph is generated for the optimization data of the present invention.
[0062] Figure 5 It is a structural reorganization architecture diagram of the present invention.
[0063] Figure 6 This is the coverage-based power visual assessment model of the present invention.
[0064] Figure 7 This is a method for evaluating the generalization ability of the power vision model of the present invention.
[0065] Figure 8 This is a flowchart for evaluating the generalization ability of the visual model of the present invention.
[0066] Fig. 9 This is a diagram of the generalization capability evaluation system of the power vision model for differentiated samples according to the present invention.
[0067] Fig.10 The figure is a schematic structural diagram of an electronic device of the present invention. DETAILED DESCRIPTION
[0068] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.
[0069] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. 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.
[0070] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.
[0071] The present invention is further described in detail below in conjunction with the accompanying drawings:
[0072] Example 1
[0073] The present invention proposes a method for evaluating the generalization ability of power vision models for differentiated samples. Figure 1 As shown, including:
[0074] S1. Acquire electric power visual image features, process the electric power visual image features, and acquire test data of the electric power visual image;
[0075] The electric power visual image features are obtained by interpolating and filling missing data, calculating and extracting deep feature products, and scaling and adapting multi-scale analysis, and are formed in a hierarchical manner. The electric power visual image features include data variables of the first electric power visual image, data variables of the second electric power visual image, and data variables of the third electric power visual image;
[0076] The power visual image features are expressed as follows:
[0077]
[0078] Among them, x 1 is the data variable of the first power visual image, x 2 The data variable for the second power visual image, x 3 is the data variable of the third power visual image; a 1 、a 2 、a 3 are the scaling factors of each layer, b 1 , b 2 , b 3 are the bias terms of each layer, c 1 、c 2 、c 3 are the nonlinear transformation coefficients of each layer.
[0079] Calculate the coverage of the electric power visual image features to obtain test data of the electric power visual image, where the test data of the electric power visual image includes the result of the first-layer logic operation, the product of the result of the second-layer logic operation, and the result of the third-layer logic operation;
[0080] The representation of the test data of the power vision image is as follows:
[0081]
[0082] Among them, z 1 is the result of the first-level logical operation, z 2 Represents the result of the second-level logical operation, z 3 Represents the result of the third-level logical operation, x 1is the data variable of the first power visual image, x 2 The data variable for the second power visual image, x 3 A data variable for the third power visual image.
[0083] S2. Optimizing the test data of the electric power visual image to obtain optimized electric power visual image data;
[0084] The test data of the electric power visual image is optimized to obtain optimized electric power visual image data, wherein the optimized electric power visual image data includes a first optimized output result of the test data, a second optimized output result of the test data, and a third optimized output result of the test data;
[0085] The representation of the optimized Power Vision image data is as follows:
[0086]
[0087] Among them, y 1 represents the first optimization output result of the test data; y 2 Represents the second optimization output result of the test data; y 3 is the third optimization output result of the test data; z 1 is the result of the first-level logical operation, z 2 Represents the result of the second-level logical operation, z 3 Indicates the result of the third-level logical operation.
[0088] S3, processing the electric power visual image features, the test data of the electric power visual image and the optimized electric power visual image data to obtain data operation parameters based on the distribution distance;
[0089] The power visual image features, the test data of the power visual image and the optimized power visual image data are processed to obtain data operation parameters based on the distribution distance, specifically:
[0090] Automatically supplement and detect the electric power visual image features, the test data of the electric power visual image and the optimized electric power visual image data to obtain the data operation parameters based on the distribution distance. The data operation parameters based on the distribution distance are expressed as follows:
[0091]
[0092] Among them, Q 1 It is a preliminary distance measure between the distribution data and the reference distribution; Q 2 It is the optimized distribution value after the distribution data is supplemented and generated; Q 3 is the evaluation value of the detection result of the distribution data; x 1 is the data variable of the first power visual image, x2 The data variable for the second power visual image, x 3 is the data variable of the third power visual image; 1 is the result of the first-level logical operation, z 2 Represents the result of the second-level logical operation, z 3 Indicates the result of the third-level logical operation; y 1 represents the first optimization output result of the test data; y 2 Represents the second optimization output result of the test data; y 3 is the third optimization output result of the test data.
[0093] S4. According to the data operation parameters based on the distribution distance, the optimized power vision image data is identified as out-of-distribution data or normal distribution data, so as to realize the generalization ability evaluation of the power vision model.
[0094] The method of identifying the optimized electric power visual image data as out-of-distribution data or normal distribution data according to the data operation parameter based on the distribution distance, and realizing the generalization ability evaluation of the electric power visual model, is specifically as follows:
[0095] When the evaluation value of the detection result of the distribution data exceeds the set threshold, the optimized power visual image data is out-of-distribution data. If the evaluation value of the detection result of the distribution data is within the threshold range, the optimized power visual image data is normal distribution data.
[0096] The following is a detailed description of this method:
[0097] First, the image is collected through the image acquisition module and stored in the specified medium. Then, the image is loaded into the processing system through the image reading module for enhancement and optimization. The image enhancement module performs operations such as filtering, contrast adjustment and sharpening on the image to improve the clarity and feature contrast of the image. Then, the image conversion module performs geometric transformation, color space transformation or feature space reorganization on the image to generate structured data suitable for analysis. Figure 2 As shown, the image processing process of the present invention is centered on interpolation, calculation and scaling, which fills in missing data through interpolation, extracts deep features through calculation, and adapts to multi-scale analysis through scaling, and gradually optimizes the data representation. These processing steps are run in a hierarchical manner, extracting key image information from local to global, and finally forming feature outputs, providing high-quality optimized feature support for subsequent classification, detection or evaluation tasks.
[0098] The designed computer vision operation architecture contains various data variables for image conversion and performs operations on each variable. The specific calculations are as follows:
[0099]
[0100] In formula (1), x 1 is the data variable of the first power visual image, x 2 The data variable for the second power visual image, x 3 is a data variable of a third power visual image, which is usually used to represent a feature value of an input image, such as brightness, color channel value or texture feature; a 1 , b 1 、c 1 、a 2 , b 2 、c 2 、a 3 , b 3 、c 3 represents the image transformation parameter, a 1 , b 1 、c 1 is the image conversion parameter of the first layer; a 2 , b 2 、c 2 is the image conversion parameter of the second layer; a 3 , b 3 、c 3 is the image conversion parameter of the third layer, a 1 、a 2 、a 3 is the scaling factor of each layer, which will be affected by the distribution of input image features. When the image feature value range is large, it needs to be reduced to avoid value overflow; b 1 , b 2 , b 3 is the bias term of each layer, which is related to the background brightness or color shift of the image. Under different lighting conditions, it will be used to compensate for the brightness deviation of the overall image; c 1 、c 2 、c 3 is the nonlinear transformation coefficient of each layer, which depends on the type of nonlinear function selected (such as Sigmoid, ReLU or Tanh) and the complexity of the input image features. If the input image contains a lot of edge or texture information, it may need further adjustment to enhance the nonlinear feature extraction capability.
[0101] Secondly, based on formula (1), the coverage technology in computer vision is introduced to enhance the model's adaptability to test data. By automatically generating test data through coverage technology and optimizing these data, this method can ensure that the generated data has higher representativeness and diversity in the input space of the model, thereby fully covering various possible scenarios. The test data of power vision images includes: 1 、z 2 and z 3 The generated operation structure is as follows Figure 3 As shown in the figure, it mainly includes steps such as data collection, feature extraction, coverage calculation and optimization process. Through these steps, the generalization ability and accuracy of the model can be effectively improved.
[0102] according to Figure 3 The structural design can establish the logical operation between the test data and the power visual image features, and its expression is:
[0103]
[0104] Among them, z 1 It is the result of the first-level logical operation, the preliminary combination of test data and optimization data, and the variable after preliminary feature extraction, which is used to capture the basic relationship and pattern of input data; 2 Indicates the result of the second-level logical operation, which is z 1 The variables are further processed and optimized based on the above, so as to further extract key features or eliminate redundant information; 3 It represents the result of the third-level logical operation and is the output variable of the optimized data. 2 It is obtained through further processing and is usually used in the decision-making or prediction stage. It is the final expression of the logical relationship between the test data and the optimization data, and represents the model's comprehensive understanding of the input data.
[0105] After optimizing the generated test data, the optimized power visual image data y can be generated 1 ,y 2 and 3 , the optimization process is as follows Figure 4 shown.
[0106] according to Figure 4 , the operation expression of optimizing data can be established as:
[0107]
[0108] Among them, y 1 Represents the first optimization output result of the test data, usually used to describe a specific dimension or feature of the input data; 2 represents the second optimization output result of the test data, which characterizes the characteristics or features of another dimension, which further extracts 1 Complementary characteristics, representing the optimized 1 Different patterns or relationships provide more dimensional information for overall optimization data; 3 It is the third optimization output result of the test data, which usually represents the global characteristics or goals after comprehensive optimization and is used for decision-making, prediction or subsequent analysis.
[0109] Then, the optimized data is restructured. The architecture process is as follows: Figure 5 shown.
[0110] according to Figure 5 , we can get the operation expression of reorganized data:
[0111]
[0112] In formula (4), f 1 It is the first output result after structural reorganization, which is used to express the most basic and original characteristics in the reorganized data, that is, the local pattern of certain key features; it is the second output result after structural reorganization, which represents the deeper feature combination or characteristics in the optimized data. 2 Describing higher-level patterns or features is to optimize the integration of data information in multiple dimensions, which has more complex and global characteristics; 3 It is the final output result of structural reorganization, which represents the integrated global characteristics or target features. It is used to express the final result after structural reorganization, reflects the comprehensive understanding of the optimization data, and is suitable for the final decision-making, prediction or classification tasks.
[0113] Based on the above design, the coverage-based electric power visual assessment model architecture constructed by the present invention is as follows: Figure 6 As shown. First, the architecture starts with the image acquisition module, obtains the original image data of the power equipment through the acquisition device, and transmits it to the storage and exchange module for centralized management and distribution. Subsequently, the image data is input into the image processing module, which includes image optimization operations such as filtering, contrast enhancement, and sharpening to improve image quality and detail clarity. At the same time, the image can be converted (such as grayscale or geometric transformation) to adapt to specific analysis requirements. Then, the optimized image is analyzed by the feature extraction module, such as extracting the texture, shape or edge features of the key components of the power equipment to form feature data with high recognition. Finally, the evaluation module performs coverage analysis on the extracted feature data to evaluate whether the image meets the integrity and coverage requirements of the power equipment, thereby realizing a comprehensive evaluation of the equipment status. The entire architecture realizes efficient data flow and parallel processing through distributed exchange and storage modules, which is suitable for the automated evaluation task of large-scale power equipment images.
[0114] In order to cope with the challenges brought by data distribution offset and out-of-distribution data, by identifying out-of-distribution data, supplementing and generating distributed data and dynamically adapting to data distribution changes, the data quality and system robustness can be effectively improved, the data missing or abnormal problems in practical applications can be solved, and the accuracy and reliability of the model in complex environments can be ensured. The out-of-distribution data detection technology based on distribution distance is introduced to automatically supplement and detect the power visual image features, the test data of the power visual image and the optimized power visual image data, and obtain the data operation parameters based on the distribution distance. The operation form is as follows:
[0115]
[0116] Among them, Q 1 It is a preliminary distance measure between the distribution data and the reference distribution, which reflects the degree of adaptation of the current data in the reference distribution and is used to identify whether there is data that deviates from the center of the reference distribution; Q 2 It is the optimized distribution value after the distribution data is supplemented and generated, indicating the optimized distribution characteristics of the distribution data after supplementation and generation, reflecting the distribution integrity of the data, and is also used to mark potential out-of-distribution data to help subsequent detection steps be more accurate; Q 3 is the evaluation value of the detection result of the distribution data, which represents the global evaluation of the detection result of the out-of-distribution data or the distribution state. 3 When the value of exceeds a certain threshold, the data is judged as out-of-distribution data. If it is within the threshold range, the data is considered to be normally distributed. 3 It is the core output of the entire out-of-distribution data detection technology and is directly used for tasks such as decision-making and data cleaning.
[0117] The fast gradient descent method is used to improve the evaluation accuracy of the power vision model. The structure matrix D based on the fast gradient descent method is defined as:
[0118]
[0119] D converts the distribution information in Q1, Q2, and Q3 into a mathematical representation of gradient optimization, guiding the fast gradient descent method to more efficiently optimize the model evaluation accuracy, thereby improving the performance and reliability of the power vision model.
[0120] In summary, the generalization ability evaluation method architecture of power vision model based on coverage and distribution distance is as follows: Figure 7As shown. First, the image data is standardized through the acquisition and preprocessing modules, including filtering, contrast enhancement and geometric transformation, to ensure the quality and consistency of the input data. Subsequently, the data is sent to the coverage analysis module, which evaluates the adaptability of the model to different power equipment scenarios by analyzing the scene coverage and feature distribution of the image. At the same time, the distribution distance evaluation module identifies out-of-distribution data and evaluates the generalization performance of the model for data with different distributions by calculating the distance between the input data and the reference distribution. Finally, the comprehensive module combines the evaluation results of coverage and distribution distance to generate quantitative indicators of the model's generalization ability, providing a basis for the optimization and deployment of the model. The entire framework adopts a modular design, which can efficiently process large-scale data and accurately measure the performance and robustness of the model.
[0121] The evaluation process of this method is as follows: Figure 8 As shown. First, the image data passes through the input module, and the data quality is ensured through collection and preprocessing to generate standardized input samples. Then, the input data is sent to the model for prediction, and the output results of the model are divided into two evaluation paths: the coverage evaluation path and the distribution distance evaluation path. In the coverage evaluation path, the degree of adaptation of the model to different components and scenarios of power equipment is measured by calculating image features and scene coverage areas; in the distribution distance evaluation path, the distance between the input data and the training data distribution (such as Euclidean distance or Mahalanobis distance) is calculated, out-of-distribution data is detected, and the performance of the model under the new distribution is evaluated. Subsequently, the evaluation results of the two paths are summarized in the comprehensive evaluation module, and quantitative indicators of the model generalization ability are generated through weighted or fusion methods. Finally, the evaluation results are output to guide model optimization, adaptation scenario adjustment, or deployment strategy formulation.
[0122] Example 2
[0123] The present invention proposes a power vision model generalization ability evaluation system for differentiated samples. Fig. 9 As shown, including:
[0124] A data preprocessing module, the data preprocessing module is used to obtain power visual image features, process the power visual image features, and obtain test data of the power visual image;
[0125] The electric power visual image features are obtained by interpolating and filling missing data, calculating and extracting deep feature products, and scaling and adapting multi-scale analysis, and are formed in a hierarchical manner. The electric power visual image features include data variables of the first electric power visual image, data variables of the second electric power visual image, and data variables of the third electric power visual image;
[0126] The power visual image features are expressed as follows:
[0127]
[0128] Among them, x 1 is the data variable of the first power visual image, x 2 The data variable for the second power visual image, x 3 is the data variable of the third power visual image; a 1 、a 2 、a 3 are the scaling factors of each layer, b 1 , b 2 , b 3 are the bias terms of each layer, c 1 、c 2 、c 3 are the nonlinear transformation coefficients of each layer.
[0129] Calculate the coverage of the electric power visual image features to obtain test data of the electric power visual image, where the test data of the electric power visual image includes the result of the first-layer logic operation, the product of the result of the second-layer logic operation, and the result of the third-layer logic operation;
[0130] The representation of the test data of the power vision image is as follows:
[0131]
[0132] Among them, z 1 is the result of the first-level logical operation, z 2 Represents the result of the second-level logical operation, z 3 Represents the result of the third-level logical operation, x 1 is the data variable of the first power visual image, x 2 The data variable for the second power visual image, x 3 A data variable for the third power visual image.
[0133] A data optimization module, wherein the data optimization module is used to optimize the test data of the electric power visual image to obtain optimized electric power visual image data;
[0134] The test data of the electric power visual image is optimized to obtain optimized electric power visual image data, wherein the optimized electric power visual image data includes a first optimized output result of the test data, a second optimized output result of the test data, and a third optimized output result of the test data;
[0135] The representation of the optimized Power Vision image data is as follows:
[0136]
[0137] Among them, y 1 represents the first optimization output result of the test data; y2 Represents the second optimization output result of the test data; y 3 is the third optimization output result of the test data; z 1 is the result of the first-level logical operation, z 2 Represents the result of the second-level logical operation, z 3 Indicates the result of the third-level logical operation.
[0138] A data integration module, the data integration module is used to process the electric power visual image features, the test data of the electric power visual image and the optimized electric power visual image data to obtain data operation parameters based on the distribution distance;
[0139] The power visual image features, the test data of the power visual image and the optimized power visual image data are processed to obtain data operation parameters based on the distribution distance, specifically:
[0140] Automatically supplement and detect the electric power visual image features, the test data of the electric power visual image and the optimized electric power visual image data to obtain the data operation parameters based on the distribution distance. The data operation parameters based on the distribution distance are expressed as follows:
[0141]
[0142] Among them, Q 1 It is a preliminary distance measure between the distribution data and the reference distribution; Q 2 It is the optimized distribution value after the distribution data is supplemented and generated; Q 3 is the evaluation value of the detection result of the distribution data; x 1 is the data variable of the first power visual image, x 2 The data variable for the second power visual image, x 3 is the data variable of the third power visual image; 1 is the result of the first-level logical operation, z 2 Represents the result of the second-level logical operation, z 3 Indicates the result of the third-level logical operation; y 1 represents the first optimization output result of the test data; y 2 Represents the second optimization output result of the test data; y 3 is the third optimization output result of the test data.
[0143] A data identification module is used to identify the optimized power visual image data as out-of-distribution data or normal distribution data according to the data operation parameters based on the distribution distance, so as to realize the generalization ability evaluation of the power visual model.
[0144] The method of identifying the optimized electric power visual image data as out-of-distribution data or normal distribution data according to the data operation parameter based on the distribution distance, and realizing the generalization ability evaluation of the electric power visual model, is specifically as follows:
[0145] When the evaluation value of the detection result of the distribution data exceeds the set threshold, the optimized power visual image data is out-of-distribution data. If the evaluation value of the detection result of the distribution data is within the threshold range, the optimized power visual image data is normal distribution data.
[0146] Example 3
[0147] See also Fig.10 As shown, the present invention also provides an electronic device 100 for a method for evaluating the generalization ability of an electric power visual model for differentiated samples; the electronic device 100 includes a memory 101, at least one processor 102, a computer program 103 stored in the memory 101 and executable on the at least one processor 102, and at least one communication bus 104.
[0148] The memory 101 can be used to store the computer program 103, and the processor 102 implements the steps of the method for evaluating the generalization ability of the power vision model for differentiated samples described in Example 1 by running or executing the computer program stored in the memory 101 and calling the data stored in the memory 101. The memory 101 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data (such as audio data) created according to the use of the electronic device 100, etc. In addition, the memory 101 can include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other non-volatile solid-state storage devices.
[0149] The at least one processor 102 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The processor 102 may be a microprocessor or any conventional processor, etc. The processor 102 is the control center of the electronic device 100, and uses various interfaces and lines to connect various parts of the entire electronic device 100.
[0150] The memory 101 in the electronic device 100 stores a plurality of instructions to implement a method for evaluating the generalization capability of a power vision model for differentiated samples, and the processor 102 can execute the plurality of instructions to implement:
[0151] Acquire power visual image features, process the power visual image features, and acquire test data of the power visual image;
[0152] Optimizing the test data of the electric power visual image to obtain optimized electric power visual image data;
[0153] Processing electric power visual image features, electric power visual image test data and optimized electric power visual image data to obtain data operation parameters based on distribution distance;
[0154] According to the data operation parameters based on the distribution distance, the optimized power vision image data is identified as out-of-distribution data or normal distribution data, so as to realize the generalization ability evaluation of the power vision model.
[0155] Example 4
[0156] If the module / unit integrated in the electronic device 100 is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the process in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device that can carry the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory and read-only memory (ROM, Read-Only Memory).
[0157] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0158] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0159] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0160] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0161] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. A method for evaluating the generalization ability of a power vision model for differentiated samples, characterized in that: include: Acquire power visual image features, process the power visual image features, and acquire test data of the power visual image; Optimizing the test data of the electric power visual image to obtain optimized electric power visual image data; Processing electric power visual image features, electric power visual image test data and optimized electric power visual image data to obtain data operation parameters based on distribution distance; According to the data operation parameters based on the distribution distance, the optimized power vision image data is identified as out-of-distribution data or normal distribution data, so as to realize the generalization ability evaluation of the power vision model.
2. The method for evaluating the generalization ability of a power vision model for differentiated samples according to claim 1 is characterized in that: The electric power visual image features are obtained by interpolating and filling missing data, calculating and extracting deep feature products, and scaling and adapting multi-scale analysis, and are formed in a hierarchical manner. The electric power visual image features include data variables of the first electric power visual image, data variables of the second electric power visual image, and data variables of the third electric power visual image; The power visual image features are expressed as follows: Among them, x1 is the data variable of the first power visual image, x2 is the data variable of the second power visual image, and x3 is the data variable of the third power visual image; a1, a2, and a3 are all scaling coefficients of each layer, b1, b2, and b3 are all bias items of each layer, and c1, c2, and c3 are all nonlinear transformation coefficients of each layer.
3. The method for evaluating the generalization ability of electric power vision models for differentiated samples according to claim 1 is characterized in that: Calculate the coverage of the electric power visual image features to obtain test data of the electric power visual image, where the test data of the electric power visual image includes the result of the first-layer logic operation, the product of the result of the second-layer logic operation, and the result of the third-layer logic operation; The representation of the test data of the power vision image is as follows: Among them, z1 is the result of the first layer of logical operation, z2 represents the result of the second layer of logical operation, z3 represents the result of the third layer of logical operation, x1 is the data variable of the first power visual image, x2 is the data variable of the second power visual image, and x3 is the data variable of the third power visual image.
4. The method for evaluating the generalization ability of electric power vision models for differentiated samples according to claim 1 is characterized in that: The test data of the electric power visual image is optimized to obtain optimized electric power visual image data, wherein the optimized electric power visual image data includes a first optimized output result of the test data, a second optimized output result of the test data, and a third optimized output result of the test data; The representation of the optimized Power Vision image data is as follows: Among them, y1 represents the first optimization output result of the test data; y2 represents the second optimization output result of the test data; y3 is the third optimization output result of the test data; z1 is the result of the first layer of logical operation, z2 represents the result of the second layer of logical operation, and z3 represents the result of the third layer of logical operation.
5. The method for evaluating the generalization ability of electric power visual models for differentiated samples according to claim 1 is characterized in that: The power visual image features, the test data of the power visual image and the optimized power visual image data are processed to obtain data operation parameters based on the distribution distance, specifically: Automatically supplement and detect the electric power visual image features, the test data of the electric power visual image and the optimized electric power visual image data to obtain the data operation parameters based on the distribution distance. The data operation parameters based on the distribution distance are expressed as follows: Among them, Q1 is the preliminary distance measurement between the distribution data and the reference distribution; Q2 is the optimized distribution value after the distribution data is supplemented and generated; Q3 is the detection result evaluation value of the distribution data; x1 is the data variable of the first power visual image, x2 is the data variable of the second power visual image, and x3 is the data variable of the third power visual image; z1 is the result of the first layer of logical operation, z2 represents the result of the second layer of logical operation, and z3 represents the result of the third layer of logical operation; y1 represents the first optimized output result of the test data; y2 represents the second optimized output result of the test data; y3 is the third optimized output result of the test data.
6. The method for evaluating the generalization ability of electric power vision models for differentiated samples according to claim 5 is characterized in that: The method of identifying the optimized electric power visual image data as out-of-distribution data or normal distribution data according to the data operation parameter based on the distribution distance, and realizing the generalization ability evaluation of the electric power visual model, is specifically as follows: When the evaluation value of the detection result of the distribution data exceeds the set threshold, the optimized power visual image data is out-of-distribution data. If the evaluation value of the detection result of the distribution data is within the threshold range, the optimized power visual image data is normal distribution data.
7. A power vision model generalization ability evaluation system for differentiated samples, characterized in that: include: A data preprocessing module, the data preprocessing module is used to obtain power visual image features, process the power visual image features, and obtain test data of the power visual image; A data optimization module, wherein the data optimization module is used to optimize the test data of the electric power visual image to obtain optimized electric power visual image data; A data integration module, the data integration module is used to process the electric power visual image features, the test data of the electric power visual image and the optimized electric power visual image data to obtain data operation parameters based on the distribution distance; A data identification module is used to identify the optimized power visual image data as out-of-distribution data or normal distribution data according to the data operation parameters based on the distribution distance, so as to realize the generalization ability evaluation of the power visual model.
8. The power vision model generalization capability evaluation system for differentiated samples according to claim 7 is characterized in that: The electric power visual image features are obtained by interpolating and filling missing data, calculating and extracting deep feature products, and scaling and adapting multi-scale analysis, and are formed in a hierarchical manner. The electric power visual image features include data variables of the first electric power visual image, data variables of the second electric power visual image, and data variables of the third electric power visual image; The power visual image features are expressed as follows: Among them, x1 is the data variable of the first power visual image, x2 is the data variable of the second power visual image, and x3 is the data variable of the third power visual image; a1, a2, and a3 are all scaling coefficients of each layer, b1, b2, and b3 are all bias items of each layer, and c1, c2, and c3 are all nonlinear transformation coefficients of each layer.
9. The power vision model generalization capability evaluation system for differentiated samples according to claim 7, characterized in that: Calculate the coverage of the electric power visual image features to obtain test data of the electric power visual image, where the test data of the electric power visual image includes the result of the first-layer logic operation, the product of the result of the second-layer logic operation, and the result of the third-layer logic operation; The representation of the test data of the power vision image is as follows: Among them, z1 is the result of the first layer of logical operation, z2 represents the result of the second layer of logical operation, z3 represents the result of the third layer of logical operation, x1 is the data variable of the first power visual image, x2 is the data variable of the second power visual image, and x3 is the data variable of the third power visual image.
10. The power vision model generalization capability evaluation system for differentiated samples according to claim 7, characterized in that: The test data of the electric power visual image is optimized to obtain optimized electric power visual image data, wherein the optimized electric power visual image data includes a first optimized output result of the test data, a second optimized output result of the test data, and a third optimized output result of the test data; The representation of the optimized Power Vision image data is as follows: Among them, y1 represents the first optimization output result of the test data; y2 represents the second optimization output result of the test data; y3 is the third optimization output result of the test data; z1 is the result of the first layer of logical operation, z2 represents the result of the second layer of logical operation, and z3 represents the result of the third layer of logical operation.
11. The power vision model generalization capability evaluation system for differentiated samples according to claim 7, characterized in that: The power visual image features, the test data of the power visual image and the optimized power visual image data are processed to obtain data operation parameters based on the distribution distance, specifically: Automatically supplement and detect the electric power visual image features, the test data of the electric power visual image and the optimized electric power visual image data to obtain the data operation parameters based on the distribution distance. The data operation parameters based on the distribution distance are expressed as follows: Among them, Q1 is the preliminary distance measurement between the distribution data and the reference distribution; Q2 is the optimized distribution value after the distribution data is supplemented and generated; Q3 is the detection result evaluation value of the distribution data; x1 is the data variable of the first power visual image, x2 is the data variable of the second power visual image, and x3 is the data variable of the third power visual image; z1 is the result of the first layer of logical operation, z2 represents the result of the second layer of logical operation, and z3 represents the result of the third layer of logical operation; y1 represents the first optimized output result of the test data; y2 represents the second optimized output result of the test data; y3 is the third optimized output result of the test data.
12. The power vision model generalization capability evaluation system for differentiated samples according to claim 11, characterized in that: The method of identifying the optimized electric power visual image data as out-of-distribution data or normal distribution data according to the data operation parameter based on the distribution distance, and realizing the generalization ability evaluation of the electric power visual model, is specifically as follows: When the evaluation value of the detection result of the distribution data exceeds the set threshold, the optimized power visual image data is out-of-distribution data. If the evaluation value of the detection result of the distribution data is within the threshold range, the optimized power visual image data is normal distribution data.
13. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method for evaluating the generalization ability of a power vision model for differentiated samples as described in any one of claims 1 to 6 are implemented.
14. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method for evaluating the generalization ability of a power vision model for differentiated samples as claimed in any one of claims 1 to 6 are implemented.