Metalearning-based low-voltage ammeter detection method, system and device and medium
By building a low-voltage meter detection system based on a meta-learning method, the problems of small sample data generalization and multi-scenario adaptation are solved, efficient and accurate meter detection is achieved, and the safe and stable operation of the smart grid is ensured.
Patent Information
- Application Number
- CN202510658799.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-21
- Publication Date
- 2025-09-19
AI Technical Summary
Existing low-voltage meter detection technology has shortcomings in generalizing small sample data, adapting to multiple scenario environments, and balancing real-time performance and accuracy, making it difficult to meet the complex needs of smart grid inspection scenarios.
A meta-learning-based method is adopted to generate model initialization parameters through the meta-learning framework, construct a universal feature space across tasks, strengthen the discriminative features of key areas of the meter, and improve detection robustness through a multi-task joint optimization strategy to achieve rapid migration and adaptation to new scenarios.
It improves the efficiency and accuracy of low-voltage meter detection, can promptly detect abnormal meter conditions, reduce false detection and missed detection rates, reduce manual inspection costs, and enhance the intelligence level of power grid operation and maintenance.
Smart Images

Figure CN120673084A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer vision and smart grid detection technology, and in particular to a low-voltage electric meter detection method, system, device and medium based on meta-learning. Background Art
[0002] With the rapid development of smart grids, intelligent inspection and fault warning technologies for low-voltage electricity meters are gaining increasing attention. Currently, deep learning-based object detection methods, such as the YOLO series and Faster R-CNN, are primarily used in this field to locate and identify electricity meters. The YOLOv5 model, due to its high detection speed and accuracy, has been widely used in power grid inspection scenarios. However, its generalization ability on small sample datasets remains insufficient. According to the China Electric Power Research Institute's 2024 inspection report, its training requires over 2,000 labeled samples, and adaptation to new electricity meters requires re-annotation, costing over 15,000 yuan per dataset. Faster R-CNN, on the other hand, experiences a sharp drop in accuracy with smaller sample sizes. For example, the IEEE TPAMI 2023 report found that its accuracy plummets to 72% for sample sizes below 50, making it difficult to meet the rapid deployment requirements of multi-meter models in emerging markets such as Southeast Asia. Furthermore, enhancement methods such as RetinexNet experience a signal-to-noise ratio drop to as low as 8.7dB in low-light scenarios, resulting in meter dial positioning errors exceeding 30 pixels. In addition, although the two-stage detector has low positioning error, the model is bulky and the inference delay on embedded devices such as NVIDIA Jetson AGX Xavier is greater than 200ms, making it difficult to achieve real-time warning.
[0003] Therefore, the existing low-voltage meter detection technology still has many problems in generalization of small sample data, adaptation to multi-scenario environments, balance between real-time and accuracy, and model deployment, making it difficult to fully meet the complex needs of smart grid inspection scenarios. Summary of the Invention
[0004] In order to solve the above technical problems, the present invention provides the following technical solutions:
[0005] In a first aspect, the present invention provides a low-voltage electricity meter detection method based on meta-learning, comprising generating model initialization parameters through a meta-learning framework and constructing a universal feature space across tasks;
[0006] Perform the first target processing on the initialization parameters to form a unified multi-level feature expression;
[0007] Perform secondary target processing on multi-level feature expressions to enhance the discriminative features of key areas of the meter;
[0008] Based on discriminative features, a cross-task similarity measurement matrix is constructed, and the model parameters are updated in combination with the target optimization mechanism to achieve rapid migration and adaptation to new scenarios;
[0009] Improve the detection robustness in complex environments through multi-task joint optimization strategy.
[0010] As a preferred solution of the low-voltage meter detection method based on meta-learning of the present invention, wherein: the model initialization parameters are generated through the meta-learning framework, and a universal feature space across tasks is constructed, including:
[0011] A low-voltage electricity meter image dataset containing various scene features is selected as the basic task set;
[0012] Use meta-learning algorithms to train the basic task set and obtain model initialization parameters suitable for different detection tasks;
[0013] Based on the initialization parameters, a cross-task universal feature space containing the key feature information of the electricity meter is constructed.
[0014] As a preferred solution of the low-voltage meter detection method based on meta-learning of the present invention, wherein: the initialization parameters are first processed to form a unified multi-level feature expression, including:
[0015] An improved convolutional neural network is used as a feature extractor, and its backbone network is used to process the initialization parameters to extract multi-level features of the meter image.
[0016] During the processing, the network structure is adjusted to reduce the number of parameters while retaining key features.
[0017] As a preferred solution of the low-voltage meter detection method based on meta-learning of the present invention, the second target processing is performed on the multi-level feature expression to strengthen the discriminative features of the key areas of the meter, including:
[0018] Perform feature covariance decoupling on multi-level feature expressions to eliminate linear correlation between channels;
[0019] The channel-spatial attention mechanism is used to enhance the target area features and achieve comprehensive optimization of feature expression.
[0020] As a preferred solution of the low-voltage meter detection method based on meta-learning of the present invention, the detection robustness in complex environments is improved through a multi-task joint optimization strategy, including:
[0021] Define a joint loss function, including classification loss, localization loss and meta-regularization term;
[0022] Dynamically adjust classification weights and positioning weights based on task difficulty;
[0023] By dynamically adjusting the weights of each part, the performance of multiple tasks is balanced to ensure the robustness of detection in complex environments.
[0024] As a preferred solution of the low-voltage meter detection method based on meta-learning of the present invention, a cross-task similarity measurement matrix is constructed based on discriminative features, and the model parameters are updated in combination with the target optimization mechanism to achieve rapid migration and adaptation of new scenarios, including:
[0025] Extract query features and support features, and align their spatial dimensions through the feature pyramid network;
[0026] Calculate the similarity between the Query feature and the Support feature to obtain the similarity matrix;
[0027] Normalize the similarity matrix to obtain the attention weight matrix, and use the attention weight matrix to perform weighted aggregation on the Support features to generate task-specific features;
[0028] Input task-specific features into the classification head and regression head, and output detection results;
[0029] Combined with the target optimization mechanism, the model parameters are updated by calculating the loss function of the query set.
[0030] As a preferred solution of the low-voltage electric meter detection method based on meta-learning of the present invention, the universal feature space covers the common features of the digital area and dial structure of the electric meter.
[0031] In a second aspect, the present invention provides a low-voltage electric meter detection system based on meta-learning, comprising: a construction module for generating model initialization parameters through a meta-learning framework and constructing a common feature space across tasks;
[0032] A first processing module, configured to perform a first target processing on the initialization parameters to form a unified multi-level feature expression;
[0033] The second processing module is used to perform second target processing on the multi-level feature expression to enhance the discriminative features of the key areas of the meter;
[0034] The update module is used to construct a cross-task similarity measurement matrix based on discriminative features and update model parameters in combination with the target optimization mechanism to achieve rapid migration and adaptation to new scenarios;
[0035] The optimization module is used to improve the detection robustness in complex environments through multi-task joint optimization strategies.
[0036] In a third aspect, the present invention provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above method when executing the computer program.
[0037] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, which implements the steps of the above method when the computer program is executed by a processor.
[0038] Compared with the existing technology, the beneficial effects of the present invention are as follows: based on the meta-learning framework, the feature distribution pattern of low-voltage electricity meters in complex environments can be accurately grasped. By constructing a universal feature space, the key features of the electricity meter can be efficiently extracted and expressed; the feature covariance decoupling and attention weighting mechanism are adopted to effectively enhance the discriminative features of the meter digital area and dial structure, reduce feature redundancy, and improve detection accuracy; and the improved YOLOv8 network is used to optimize the detection process, significantly improving positioning accuracy while ensuring detection speed. The present invention can effectively reduce the false detection rate and missed detection rate, improve the intelligent level of power grid operation and maintenance, and reduce the cost of manual inspections and the risk of equipment failure. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0040] Figure 1 This is the process intention diagram of the low-voltage meter detection method based on meta-learning.
[0041] Figure 2 A schematic diagram of the system framework.
[0042] Figure 3 This is a picture of the actual experiment.
[0043] Figure 4 Deploy a flowchart for the model. DETAILED DESCRIPTION
[0044] To make the above-mentioned objects, features, and advantages of the present invention more clearly understood, the following detailed description of the specific embodiments of the present invention is given in conjunction with the accompanying drawings. It is obvious that the described embodiments are only part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary persons in this field without creative work should fall within the scope of protection of the present invention.
[0045] Example 1, with reference to Figure 1 , which is the first embodiment of the present invention, provides a low-voltage meter detection method based on meta-learning, including:
[0046] S100: Generate model initialization parameters through a meta-learning framework and build a universal feature space across tasks;
[0047] S200: performing first target processing on the initialization parameters to form a unified multi-level feature expression;
[0048] S300: Performing secondary target processing on the multi-level feature expression to enhance the discriminative features of the key areas of the meter;
[0049] S400: Based on discriminative features, a cross-task similarity measurement matrix is constructed, and the model parameters are updated in combination with the target optimization mechanism to achieve rapid migration and adaptation to new scenarios;
[0050] S500: Improve detection robustness in complex environments through multi-task joint optimization strategy.
[0051] It should be noted that in the field of smart grid inspection, the detection of low-voltage meters faces numerous challenges. Due to the complex installation environments of meters, such as hidden locations like electrical cabinets and elevator shafts, they are subject to varying degrees of obstruction, uneven lighting, and varying viewing angles in different scenarios. These factors further exacerbate the difficulty of detection, especially under special operating conditions, such as extreme weather conditions like high temperature and high humidity. Furthermore, traditional detection models require re-labeling large amounts of data for training when faced with new meters or changes in scenarios to adapt to new detection tasks. This is not only time-consuming and labor-intensive, but also difficult to respond quickly in practical applications. Furthermore, existing detection methods struggle to simultaneously meet the requirements of high precision and real-time detection in complex environments, making it impossible to promptly and accurately detect abnormal meter conditions and issue early warnings, thus impacting the safe and stable operation of smart grids.
[0052] Therefore, to address the difficulties faced by low-voltage meter detection, a meta-learning framework is used to construct a universal feature space through steps S100 to S500, enabling the model to quickly adapt to new scenarios and reducing its reliance on large amounts of labeled data. Initialization parameters are layered to form a unified multi-level feature expression, strengthening the discriminative features of key areas of the meter and improving detection accuracy. A similarity measurement matrix is constructed based on the discriminative features and combined with a target optimization mechanism to update model parameters, achieving rapid migration and adaptation to new scenarios. A multi-task joint optimization strategy is adopted to balance the performance of classification and positioning tasks in complex environments, ensuring the robustness of detection. This method not only improves the efficiency and accuracy of low-voltage meter detection, but also enables timely detection of abnormal meter conditions and early warning, providing a strong guarantee for the safe and stable operation of smart grids.
[0053] Example 2, reference Figures 1 to 4 , which is an embodiment of the present invention, provides a high-temperature pipeline health online monitoring method based on the above embodiment.
[0054] In the embodiment of the present application, step S100 generates model initialization parameters through a meta-learning framework and constructs a universal feature space across tasks, including the following steps A1-A3:
[0055] A1: A low-voltage electricity meter image dataset containing various scene features is selected as the basic task set;
[0056] It can be understood that selecting a low-voltage electricity meter image dataset with multiple scene features as a basic task set includes selecting a low-voltage electricity meter image dataset with multiple occlusion levels, lighting conditions, and viewing angle changes as a basic task set.
[0057] A2: Use the meta-learning algorithm to train the basic task set to obtain the model initialization parameters suitable for different detection tasks. The meta-learning algorithm uses the model-independent meta-learning (MAML) algorithm to pre-train the model on the basic task set and use the cross entropy loss With GIoU loss Joint optimization,learning common feature representation;
[0058] A3: Based on the initialization parameters, a cross-task universal feature space containing the key feature information of the electricity meter is constructed.
[0059] It can be understood that the universal feature space covers the common features of the digital area and dial structure of the meter.
[0060] Specifically, in step A1, a low-voltage meter image dataset containing multiple scene features is selected as a basic task set including:
[0061] The system collects multi-scenario low-voltage meter images (resolution 1920×1080), covering concealed installation scenarios such as electrical cabinets and elevator shafts, as well as complex working conditions such as occlusion (≥50%), low illumination (≤10Lux), and multiple viewing angles. This ensures that the basic task set covers typical interference factors in power inspections, and uses Mosaic enhancement and adaptive histogram equalization (CLAHE) to improve data diversity.
[0062] Furthermore, the dataset is divided into support set (10-50 images) and query set (200 images).
[0063] Specifically, in step A2, the initialization weight generation process includes:
[0064] The meta-learner generates initialization parameters θ through MAML init ;
[0065] Support set gradient calculation: Where α is the channel-by-channel learning rate vector, and α∈R d ;
[0066] Second-order gradient backpropagation: Combining momentum acceleration (β=0.92) improves convergence efficiency.
[0067] Furthermore, the training strategies include:
[0068] The initial learning rate is set to 0.01, and the cosine annealing strategy is used to adjust the learning rate to prevent overfitting;
[0069] Support set preprocessing includes dynamic histogram equalization (CLAHE) and random erasure enhancement to enhance the robustness of the model to noise.
[0070] In an optional embodiment, the construction of a universal feature space across tasks in step S100 can also be achieved through self-supervised learning-based hindsight. That is, a large amount of unlabeled electricity meter image data is first enhanced, and self-supervised tasks such as image restoration are designed to allow the model to learn various features of the image; then a classic convolutional neural network is selected as a feature extractor to extract multi-level features; finally, a dimensionality reduction algorithm such as PCA or t-SNE is used to map high-dimensional features to a unified low-dimensional feature space to form a universal feature space across tasks, and the spatial structure is optimized through clustering analysis.
[0071] In another optional embodiment, the cross-task universal feature space constructed in step S100 can also be constructed based on transfer learning, that is, first select a deep convolutional neural network model pre-trained on a large general image dataset, then adjust the last few layers of the pre-trained model according to the characteristics of the low-voltage meter image, then extract features from the meter image and use jump connections or feature fusion technology to fuse features at different levels, and finally use supervised dimensionality reduction methods such as LDA or DCA to optimize the extracted features to construct a cross-task universal feature space with good discriminability.
[0072] In the embodiment of the present application, in step S200, the initialization parameters are subjected to the first target processing to form a unified multi-level feature expression, including the following steps B1-B2:
[0073] B1: An improved convolutional neural network is used as a feature extractor, and its backbone network is used to process the initialization parameters to extract multi-level features of the meter image. The improved convolutional neural network is an improved YOLOv8 network.
[0074] It should be noted that the backbone network extracts multi-level features of the image through operations such as convolutional layers and pooling layers. These multi-level features are mathematically represented as one or more feature matrices.
[0075] For example, when 32 3×3 convolution kernels are used to convolve the input image, 32 feature maps are obtained, which are combined into a 32×H×W feature matrix.
[0076] B2: During the processing, the network structure is adjusted to reduce the number of parameters while retaining key features.
[0077] Specifically, in step B1, the improved YOLOv8 network includes:
[0078] Replace the standard convolution with a depth-wise separable convolution (i.e., replace the original YOLOv8's Standard Convolution and decompose each layer into Depthwise Conv + Pointwise Conv), reducing the number of parameters by 45%;
[0079] The Ghost module is introduced in the P5 layer to generate redundant features through linear transformation, reducing the computational complexity by 30%;
[0080] Optimize the CSPNet structure, adopt Cross-Stage Partial connection, remove redundant residual blocks, and shorten the feature transfer path by 30%;
[0081] The activation function was replaced from Mish to SiLU (Sigmoid Linear Unit), reducing the computational complexity by 15%.
[0082] Furthermore, the extraction of multi-level features refers to the use of feature pyramid networks (FPN) to extract multi-scale features of the P3-P5 layers, and adaptively fuse high-resolution detail (P3) and low-resolution semantic (P5) features through dynamic scale weighting parameters (introducing learnable weight parameters), thereby improving the multi-scale fusion efficiency by 22%.
[0083] Specifically, in step B2, reducing the number of parameters while retaining key features through network structure adjustment includes:
[0084] Compress the model size from 250MB to 180MB to accommodate the memory limitations of power inspection terminals;
[0085] While reducing the number of parameters, the Ghost module retains key information and the attention mechanism strengthens the feature expression of the target area (such as the digital area of the meter).
[0086] In an optional embodiment, the unified multi-level feature expression formed in step S200 can also be formed using a generative adversarial network (GAN), that is, optimized features are generated through adversarial training of the generator and the discriminator, and are fused with real features to form a multi-level feature expression.
[0087] In another optional embodiment, the unified multi-level feature expression in step S200 can also be formed by using a spectral clustering algorithm, combining similarity graphs and feature subspace projections, extracting and fusing features at different levels, and then performing feature selection optimization to construct a multi-level feature expression.
[0088] In the embodiment of the present application, step S300 performs second target processing on the multi-level feature expression to enhance the discriminative features of the key area of the meter, including the following steps C1-C2:
[0089] C1: Decouple the feature covariance of multi-level feature expressions to eliminate linear correlation between channels;
[0090] It should be noted that feature covariance decoupling is performed on the multi-level feature expression, including calculating its covariance matrix and introducing a sliding window mechanism to dynamically estimate the covariance matrix to eliminate the linear correlation between channels.
[0091] C2: Adopt channel-spatial attention mechanism to enhance the target area features and achieve comprehensive optimization of feature expression.
[0092] It should be noted that the use of the channel-spatial attention mechanism to enhance the target area features includes first using global average pooling to generate channel weights, then using deformable convolution to construct a spatial weight map, and finally achieving comprehensive weighted optimization of feature expression.
[0093] Specifically, in step C1, the specific form of calculating the covariance matrix C is:
[0094]
[0095] Where: X∈R C×H×W (C is the number of channels, H is the height of the feature map, and W is the width of the feature map) is the input feature matrix, and μ is the feature mean;
[0096] Furthermore, the specific form of regularizing the covariance matrix through eigenvalue decomposition is:
[0097]
[0098] Where: represents the characteristic matrix after inverse square root transformation of covariance; represents the inverse square root of the covariance matrix C;
[0099] It should be noted that the inverse square root calculation of the eigenvalue decomposition includes:
[0100] First decompose C=UΛU T , where Λ is the diagonal matrix of the characteristic matrix;
[0101] Regularization where ε = 10 -5 ;
[0102] Reconstructing the transformation matrix
[0103] Furthermore, the sliding window mechanism is introduced to dynamically estimate the covariance matrix, including:
[0104] The sliding window mechanism (window size 16×16, step size 8 pixels) dynamically estimates the local covariance matrix and uses the momentum update strategy (momentum coefficient β = 0.9), which is specifically expressed as follows:
[0105] C t =0.9C t-1 +0.1C current
[0106] Where: C t represents the covariance matrix obtained by dynamic estimation at the current moment; C t-1 represents the estimated value of the covariance matrix at the previous moment; C current Represents the currently calculated covariance matrix (calculated based on the current batch of data).
[0107] Specifically, in step C2, the channel-spatial attention mechanism is used to enhance the target region features including:
[0108] The specific form of generating channel weights through global average pooling (GAP) is:
[0109] w=σ(W·GAP(X))
[0110] Where: W is the learnable parameter, σ is the Sigmoid function, and the weighted feature is:
[0111]
[0112] Furthermore, constructing the spatial weight map involves combining deformable convolution (DeformConv) with coordinate attention (CoordAttention) for generation, and the specific form is:
[0113] M spatial =DeformConv(X)+CoordAttention(X)
[0114] It can be understood that deformable convolution learns adaptive receptive fields through offsets to accurately locate tilted or occluded targets;
[0115] Coordinate attention encodes spatial coordinate information into channel attention to enhance position perception.
[0116] Furthermore, the final feature expression is:
[0117] X final =M spatial ⊙X′
[0118] Where ⊙ represents element-wise multiplication.
[0119] In an optional embodiment, the enhancement of the discriminative features of the key areas of the meter in step S300 can also involve performing a wavelet transform on the multi-level feature representation, decomposing the feature map into sub-bands of different frequencies. Next, energy enhancement is performed on the high-frequency sub-bands (containing rich edge and detail information) in the key areas of the meter to highlight the high-frequency features of the key areas, while smoothing is performed on the low-frequency sub-bands (containing the overall outline and background information) to reduce background interference. Finally, an inverse wavelet transform is performed on the enhanced high-frequency sub-bands and the processed low-frequency sub-bands to reconstruct the multi-level feature representation that enhances the discriminative features of the key areas.
[0120] In another optional embodiment, the enhancement of the discriminative features of the key areas of the electricity meter in step S300 can also be performed by superpixel segmentation of the multi-level feature expression, dividing the feature map into multiple superpixel blocks. The similarity of each superpixel block to the key area of the electricity meter is calculated (based on features such as color and texture), and the superpixel blocks belonging to the key area are identified. The features within the superpixel blocks in the key area are aggregated, and their feature means and variances are calculated. These statistics are used to enhance the features of the key area, highlighting the discriminative features of the key area while suppressing the features of non-key areas.
[0121] In the embodiment of the present application, step S400 constructs a cross-task similarity measurement matrix based on the discriminative features, and updates the model parameters in combination with the target optimization mechanism to achieve rapid migration and adaptation of the new scenario, including the following steps D1-D5:
[0122] D1: Extract query features and support features, and align their spatial dimensions through the feature pyramid network;
[0123] It can be understood that the detector extracts query features (query image) and support features (support set) through the improved YOLOv8 network, and uses the feature pyramid network (FPN) to perform bilinear interpolation on the spatial dimensions of the two to unify them to H×W resolution.
[0124] D2: Calculate the similarity between the query feature and the support feature to obtain the similarity matrix;
[0125] D3: Normalize the similarity matrix to obtain the attention weight matrix, and use the attention weight matrix to perform weighted aggregation on the Support features to generate task-specific features;
[0126] It can be understood that the attention weight matrix is obtained by performing softmax normalization on each row (Query position).
[0127] D4: Input task-specific features into the classification head and regression head, and output the detection results;
[0128] It can be understood that the input classification head (Class Head) and regression head (Box Head) are used to output the detection results, where the classification head: predicts the category probability distribution ∈ (K is the number of categories); the regression head: predicts the bounding box offset Δx, Δy, Δw, Δh.
[0129] D5: Combined with the target optimization mechanism, the model parameters are updated by calculating the loss function of the query set.
[0130] Specifically, in step D2, the specific expression of the similarity matrix is:
[0131]
[0132] That is, the query features and support features are projected into a low-dimensional space (d=64), the dot product similarity is calculated, and two-dimensional relative position encoding (generated by Sinusoidal function) is further added to enhance spatial perception ability.
[0133] In step D3, the specific form of the attention weight matrix is:
[0134] S ij =Softmax(S pos )∈[0.1] (H×W)×(H×W)
[0135] Where: S ij represents the normalized similarity matrix; S pos represents the original similarity matrix.
[0136] Furthermore, we use weighted aggregation of Support features to generate task-specific features:
[0137]
[0138] Where: Q enhanced represents the task-specific enhanced features generated after weighted aggregation; Vproj represents the Support features after projection; Wv represents the weight matrix.
[0139] Table 1 below shows a comparison of the sparse detection performance of different detection methods on a dataset. The horizontal axis represents the number of samples (1, 2, 3, 5, 10), and the vertical axis represents the detection performance metric (such as accuracy). The chart shows the detection performance of five different methods (YOLO-SE, YOLOv8-n, FSOD, Meta-YOLO, and Ours) at different sample sizes.
[0140] Table 1 Performance comparison of different methods on sparse detection tasks
[0141]
[0142]
[0143] That is, for all methods, detection performance generally improves with increasing sample size. This suggests that more samples help the model learn and generalize better. However, our method achieves the highest performance across all sample sizes, demonstrating its superiority over other methods for sparse detection tasks.
[0144] In the embodiment of the present application, step S500 improves the detection robustness in complex environments through a multi-task joint optimization strategy, including the following steps E1-E3:
[0145] E1: Define the joint loss function, including classification loss, localization loss and meta-regularization term;
[0146] E2: Dynamically adjust classification weight and positioning weight according to task difficulty;
[0147] E3: By dynamically adjusting the weights of each part, the performance of multiple tasks is balanced to ensure detection robustness in complex environments.
[0148] Specifically, in step E1, the specific expression of the joint loss function is:
[0149]
[0150] Where: Represents the joint loss function, which is used to comprehensively measure the performance of the model in multi-task learning; Represents classification loss, which is used to measure the performance of the model on classification tasks; Represents the positioning loss, which is used to measure the performance of the model in the target detection box positioning task; Represents the meta-regularization term, which is used to balance the generalization ability and task specificity of the model, prevent overfitting, and ensure that the model has good adaptability in different tasks. 1、 λ 2、 λ3: represents the weight coefficient of classification loss, localization loss and meta-regularization term, which is used to balance the contribution of different losses in the total loss.
[0151] The specific form of classification loss is:
[0152]
[0153] Where: N represents the number of samples; C represents the number of categories; y icIndicates that sample i belongs to the true label of category c, with a value of 0 or 1; p ic: It represents the probability that the model predicts that sample i belongs to category c; γ represents the adjustment parameter in Focal Loss, which is usually 2.
[0154] The specific manifestation of positioning loss is:
[0155]
[0156] Where: CIoU stands for Complete Intersection over Union, which is an improved IoU loss function; N pos represents the number of positive samples; Represents Distribution FocalLoss, which is used to measure the difference between the predicted distribution and the true distribution. i is the predicted distribution, is the true distribution.
[0157] The specific form of the meta-regularization term is:
[0158]
[0159] Where: N t represents the number of tasks, which is used to normalize the tasks when calculating the meta-regularization term; θτ represents the model parameters of task τ; θ init Represents the initial parameters of the model; λ represents the weight coefficient in the meta-regularization term; represents the orthogonality constraint of the model parameters; F represents the Frobenius norm.
[0160] In step E2, the classification weight and the localization weight are dynamically adjusted according to the task difficulty, including:
[0161] Classification weight adjustment:
[0162] Where: Acc t is the classification accuracy of the current batch, and η is the adjustment coefficient.
[0163] Positioning weight adjustment:
[0164] Where: IoU i represents the IoU value of the i-th positive sample; λ base Represents the base weight of the localization loss.
[0165] Meta-learning rate decay:
[0166] Where: T: represents the total number of training steps.
[0167] Finally, the optimized and trained model is integrated into the inspection robot to output the meter coordinates, category, and abnormal status (such as damage and leakage) in real time.
[0168] Furthermore, during the actual test and verification process, it was found that:
[0169] 1. The usage effects in the following three scenarios are:
[0170] Scene 1 (standard lighting): detection accuracy 98.2%, inference speed 45FPS;
[0171] Scenario 2 (50% occlusion): detection accuracy 88.6%, missed detection rate 5.1%;
[0172] Scene 3 (low light): detection accuracy 91.3%, false detection rate 7.8%.
[0173] 2. Long-term stability test:
[0174] In the temperature (-20℃-65℃) and humidity (30%-95%RH) cycle experiment:
[0175] Model accuracy fluctuation range is <±1.2%;
[0176] No memory leaks or performance degradation;
[0177] The mean time between failures (MTBF) is 2,300 hours.
[0178] 3. Comprehensive verification results are:
[0179] Efficient adaptation of small samples: After fine-tuning 10 samples, the accuracy is >85%, and the annotation cost is reduced by 90%;
[0180] Dynamic environment robustness: Accuracy remains >80% under extreme conditions (60% occlusion, 10 Lux illumination);
[0181] Industrial feasibility: 45FPS real-time detection capability is suitable for mobile devices and supports intelligent power grid upgrades.
[0182] In an optional embodiment, in step S500, the detection robustness in complex environments can be improved through a multi-task joint optimization strategy. Multi-task joint optimization of adversarial training can also be introduced. That is, through adversarial training, the model can be made to have the ability to resist input data noise and disturbance while optimizing the multi-task loss function.
[0183] In another optional implementation, in step S500, the detection robustness in complex environments can be improved through a multi-task joint optimization strategy. Multi-task learning and domain adaptation can also be integrated to construct a joint optimization objective function, which not only improves the performance of the model on different tasks, but also reduces the negative impact of scene changes.
[0184] In summary, the present invention is based on a meta-learning framework and accurately grasps the feature distribution patterns of low-voltage meters in complex environments. By constructing a universal feature space, efficient extraction and expression of key features of the meter are achieved; feature covariance decoupling and attention weighting mechanisms are adopted to effectively enhance the discriminative features of the meter's digital area and dial structure, reduce feature redundancy, and improve detection accuracy; and using an improved YOLOv8 network, the detection process is optimized, significantly improving positioning accuracy while ensuring detection speed. The present invention can effectively reduce false detection rates and missed detection rates, improve the intelligence level of power grid operation and maintenance, and reduce manual inspection costs and equipment failure risks.
[0185] In Example 3, the above is a schematic scheme of a low-voltage electricity meter detection method based on meta-learning. It should be noted that the technical solution of the low-voltage electricity meter detection system based on meta-learning and the technical solution of the low-voltage electricity meter detection method based on meta-learning above are based on the same concept. For details not described in detail in the technical solution of the low-voltage electricity meter detection system based on meta-learning in this embodiment, please refer to the description of the technical solution of the low-voltage electricity meter detection method based on meta-learning above.
[0186] This embodiment also provides a low-voltage electricity meter detection system based on meta-learning, including:
[0187] A building block for generating model initialization parameters through a meta-learning framework and constructing a universal feature space across tasks;
[0188] A first processing module, configured to perform a first target processing on the initialization parameters to form a unified multi-level feature expression;
[0189] The second processing module is used to perform second target processing on the multi-level feature expression to enhance the discriminative features of the key areas of the meter;
[0190] The update module is used to construct a cross-task similarity measurement matrix based on discriminative features and update model parameters in combination with the target optimization mechanism to achieve rapid migration and adaptation to new scenarios;
[0191] The optimization module is used to improve the detection robustness in complex environments through multi-task joint optimization strategies.
[0192] This embodiment also provides an electronic device suitable for low-voltage meter detection based on meta-learning, including: a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute computer-executable instructions to implement the low-voltage meter detection method based on meta-learning proposed in the above embodiment.
[0193] This embodiment also provides a storage medium on which a computer program is stored. When the program is executed by a processor, the low-voltage meter detection method based on meta-learning proposed in the above embodiment is implemented.
[0194] The storage medium proposed in this embodiment and the low-voltage meter detection method based on meta-learning proposed in the above embodiment belong to the same inventive concept. For technical details not fully described in this embodiment, please refer to the above embodiment, and this embodiment has the same beneficial effects as the above embodiment.
[0195] Through the above description of the implementation methods, those skilled in the art can clearly understand that the present invention can be implemented with the help of software and necessary general hardware, and of course can also be implemented by hardware. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ROM), random access memory (RAM), flash memory (FLASH), hard disk or optical disk, etc., including a number of instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute the methods of various embodiments of the present invention.
[0196] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.
Claims
1. A low-voltage meter detection method based on meta-learning, characterized by: include, Generate model initialization parameters through a meta-learning framework and build a universal feature space across tasks; Performing a first target processing on the initialization parameters to form a unified multi-level feature expression; performing a second target processing on the multi-level feature expression to enhance the discriminative features of the key area of the electric meter; Based on the discriminative features, a cross-task similarity measurement matrix is constructed, and the model parameters are updated in combination with the target optimization mechanism to achieve rapid migration and adaptation of new scenarios; Improve the detection robustness in complex environments through multi-task joint optimization strategy.
2. The low-voltage electric meter detection method based on meta-learning according to claim 1, characterized in that: The meta-learning framework is used to generate model initialization parameters and construct a universal feature space across tasks, including: A low-voltage electricity meter image dataset containing various scene features is selected as the basic task set; Using a meta-learning algorithm to train the basic task set to obtain model initialization parameters suitable for different detection tasks; Based on the initialization parameters, a cross-task universal feature space containing key feature information of the electricity meter is constructed.
3. The low-voltage electric meter detection method based on meta-learning according to claim 2, characterized in that: The first target processing is performed on the initialization parameters to form a unified multi-level feature expression, include, An improved convolutional neural network is used as a feature extractor, and its backbone network is used to process the initialization parameters to extract multi-level features of the meter image. During the processing, the network structure is adjusted to reduce the number of parameters while retaining key features.
4. The low-voltage electric meter detection method based on meta-learning according to claim 3, characterized in that: The second target processing of the multi-level feature expression to strengthen the discriminative features of the key area of the meter includes: Performing feature covariance decoupling on the multi-level feature expression to eliminate linear correlation between channels; The channel-spatial attention mechanism is used to enhance the target area features and achieve comprehensive optimization of feature expression.
5. The low-voltage electric meter detection method based on meta-learning according to claim 4, characterized in that: The multi-task joint optimization strategy is used to improve the detection robustness in complex environments, including: Define a joint loss function, including classification loss, localization loss and meta-regularization term; Dynamically adjust classification weights and positioning weights based on task difficulty; By dynamically adjusting the weights of each part, the performance of multiple tasks is balanced to ensure the robustness of detection in complex environments.
6. The low-voltage electric meter detection method based on meta-learning according to claim 5, characterized in that: Based on the discriminative features, a cross-task similarity measurement matrix is constructed, and the model parameters are updated in combination with the target optimization mechanism to achieve rapid migration and adaptation of new scenarios, including: Extract query features and support features, and align their spatial dimensions through the feature pyramid network; Calculating the similarity between the Query feature and the Support feature to obtain a similarity matrix; Normalizing the similarity matrix to obtain an attention weight matrix, and using the attention weight matrix to perform weighted aggregation on the Support features to generate task-specific features; Input task-specific features into the classification head and regression head, and output detection results; Combined with the target optimization mechanism, the model parameters are updated by calculating the loss function of the query set.
7. A low-voltage electric meter detection method based on meta-learning according to claim 1 or 2, characterized in that: The universal feature space covers the common features of the digital area and dial structure of the meter.
8. A low-voltage electric meter detection system based on meta-learning, applying the method according to any one of claims 1 to 7, characterized in that: include: A building block for generating model initialization parameters through a meta-learning framework and constructing a universal feature space across tasks; A first processing module, configured to perform a first target processing on the initialization parameters to form a unified multi-level feature expression; A second processing module is used to perform a second target processing on the multi-level feature expression to enhance the discriminative features of the key area of the meter; An update module, configured to construct a cross-task similarity measurement matrix based on the discriminative features, and update model parameters in combination with a target optimization mechanism to achieve rapid migration and adaptation to new scenarios; The optimization module is used to improve the detection robustness in complex environments through multi-task joint optimization strategies.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Femoral head necrosis detection method and system
CN121904035A