An adaptive data distillation method and system for power equipment component detection

CN119206403BActive Publication Date: 2026-09-22ELECTRIC POWER RESEARCH INSTITUTE OF STATE GRID SHANDONG ELECTRIC POWER COMPANY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411373064.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-29
Publication Date
2026-09-22
Estimated Expiration
2044-09-29

AI Technical Summary

Technical Problem

[0004]为了解决上述背景技术中存在的现有数据标注成本高和模型性能提升有限的瓶颈等技术问题,本发明提供一种面向电力设备部件检测的自适应数据蒸馏方法及系统,本发明通过一种自适应筛选和动态蒸馏机制,更加智能地利用有限的标注数据,并充分挖掘无标注数据的潜在信息,在提升模型的检测精度和泛化能力的同时,实现数据资源的高效管理与优化配置,大幅减少对人工标注的依赖,提高模型的训练效率与应用推广的可行性

Benefits of technology

[0056]本发明提出的基于特征聚类的数据筛选方法,能够从大规模无标注的原始电力设备图像中有效筛选出具有代表性和多样性的样本。通过这一方法,可以将庞大的数据集进行浓缩,显著减少存储空间需求,同时保留最具信息价值的核心数据,提升后续模型训练的效率与效果。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119206403B_ABST
    Figure CN119206403B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of power equipment, and provides a self-adaptive data distillation method and system for power equipment component detection. The method comprises the following steps: training an improved teacher network by using an image set of labeled power equipment components; screening an unlabeled core image set from an unlabeled power equipment component image set; generating pseudo labels for the unlabeled core image set by using a self-integrated data distillation method; training an improved student network by using the core image set with the pseudo labels; fusing the core image set and the image set of labeled power equipment components to obtain a fused image set; and retraining the improved teacher network and the improved student network by using the fused image set to obtain a trained student model for checking power equipment components in new images. The application can effectively screen out samples with representativeness and diversity from large-scale unlabeled original power equipment images.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power equipment technology, and in particular to an adaptive data distillation method and system for power equipment component testing. Background Technology

[0002] The statements in this section are merely background information related to the present invention and do not necessarily constitute prior art.

[0003] Current methods for detecting power equipment components are mostly based on deep learning, utilizing convolutional neural networks or Transformer networks to achieve accurate and efficient component detection, providing a foundation for subsequent defect detection and fault analysis. However, existing models require a large amount of manually labeled data for training. The collection and organization of labeled power equipment data requires annotators to possess specialized knowledge of power equipment, making it difficult to significantly increase the quantity of high-quality labeled data. Furthermore, with the increase in routine inspections using drones, robots, and manual inspections, the amount of raw, unlabeled power equipment monitoring data is exploding. How to efficiently organize unlabeled raw data, reduce storage requirements, and simultaneously improve the performance of power equipment component detection models by utilizing limited labeled data and stored unlabeled data is a major technical challenge in power equipment data management and model training. Summary of the Invention

[0004] To address the technical challenges of high data annotation costs and limited model performance improvement in the aforementioned background technologies, this invention provides an adaptive data distillation method and system for power equipment component detection. This invention utilizes an adaptive screening and dynamic distillation mechanism to more intelligently leverage limited labeled data and fully mine the potential information in unlabeled data. This improves the model's detection accuracy and generalization ability while achieving efficient management and optimized allocation of data resources, significantly reducing reliance on manual annotation, and enhancing model training efficiency and the feasibility of application and promotion.

[0005] To achieve the above objectives, the present invention adopts the following technical solution:

[0006] The first aspect of the present invention provides an adaptive data distillation method for the inspection of power equipment components.

[0007] An adaptive data distillation method for power equipment component inspection includes:

[0008] An improved teacher network was trained using an image set of labeled power equipment components;

[0009] Select an unlabeled core image set from an image set of unlabeled electrical equipment components;

[0010] A self-integrated data distillation method is used to generate pseudo-labels for an unlabeled core image set.

[0011] An improved student network was trained using a core image set with pseudo-labels.

[0012] The core image set is fused with the image set of labeled power equipment components to obtain a fused image set; the improved teacher network and improved student network are retrained using the fused image set to obtain a trained student model, which is used to examine power equipment components in new images;

[0013] The improved teacher network and the improved student network both introduce a dynamic anchor point mechanism into the YOLOv8 network to dynamically adjust the anchor frame according to the size ratio of the power equipment components; and divide the decoding head into multiple layers to process anchor frames of different scales separately.

[0014] Furthermore, the anchor frame is dynamically adjusted according to the size proportions of the power equipment components, as expressed by the following formula:

[0015] Aspect Ratio(C i ) = W i / H i

[0016] A w =f(W i )

[0017] A h =f(H i )

[0018] Among them, C i Indicates the category of electrical equipment components, W i H represents the width of the target bounding box. i The Aspect Ratio(C) represents the height of the target bounding box. i A represents the proportional distribution of the dimensions of electrical equipment components. w The width of the anchor frame is dynamically adjusted, f() represents the function designed based on the dimensional changes of the power equipment components, and A h This indicates the height of the anchor frame after dynamic adjustment.

[0019] Furthermore, the method for selecting an unlabeled core image set from an image set of unlabeled power equipment components includes: using a visual feature extractor to extract image features from each image based on the image set of unlabeled power equipment components, obtaining an image feature set; using a clustering method to cluster the image feature set to obtain the cluster density; and dynamically adjusting the sampling ratio of center samples and boundary samples according to the cluster density to construct an unlabeled core image set.

[0020] Furthermore, the method of clustering the image feature set to obtain the cluster density includes: dynamically adjusting the neighborhood radius according to the local density distribution of the image feature set to perform preliminary clustering; analyzing the preliminary clustering results, splitting clusters whose internal distance is greater than a first set threshold, and merging clusters whose average threshold between clusters is less than a second set threshold.

[0021] Furthermore, the central sample is defined as:

[0022]

[0023] Among them, center(C i ) is clustering C i The center;

[0024] The boundary sample is defined as:

[0025] boundary(C i )={x∈C i |distance(x,neighbor(C i )) <threshold}

[0026] Among them, neighbor(C i ) for clustering C i Other adjacent clusters, distance(x,neighbor(C) i )) represents the distance between a sample and its neighboring clusters.

[0027] Furthermore, the dynamic adjustment of the sampling ratio of center samples and boundary samples based on the cluster density is expressed by the following formula:

[0028]

[0029] Where, p center Let λ be the sampling probability of the center sample, λ be the adjustment factor, μ be the density threshold, and density(C) be the density threshold. i The value represents the average distance within a cluster, and is defined as the density.

[0030] Furthermore, a self-integrated data distillation method is employed to generate pseudo-labels for the unlabeled core image set. The method includes: performing multiple random transformations on each image in the unlabeled core image set and inputting it into an improved teacher network, resulting in multiple detection results for each image; measuring the uncertainty of the target box based on the multiple detection results for each image; if the uncertainty of the target box is greater than a third preset threshold, reducing the weight of the target box; setting a confidence level based on the weight of the target box; and generating a pseudo-label for the image based on the confidence level and the detection results.

[0031] Furthermore, the uncertainty of the target bounding box is expressed by the following formula:

[0032]

[0033] Where U(x) represents the uncertainty of the target bounding box on image x, p t (x) is the confidence of the teacher network in the target box after the t-th transformation, where T is the number of transformations.

[0034] Furthermore, the confidence level is expressed by the following formula:

[0035]

[0036] Where, σ and U(x) is the adjustment coefficient, and U(x) is the uncertainty of the target box on image x.

[0037] Furthermore, after generating pseudo-labels, the process also includes optimizing the pseudo-labels: using intersection-union ratio (IU) to measure the degree of overlap of the target boxes; performing semantic analysis on the features of the target boxes and using cosine similarity to measure the similarity of the semantic features of the target boxes; assigning a fusion weight to each target box based on the degree of overlap of the target boxes and the similarity of the semantic features of the target boxes, and using the fusion weight to optimize the pseudo-labels.

[0038] Furthermore, the fusion weights are expressed using the following formula:

[0039] γ(x)=β·IoU(B1,B2)+(1-β)·Semantic_Sim(x1,x2)

[0040] Where β is a balancing factor used to adjust the weights of IoU and semantic similarity in the fusion; IoU(B1,B2) represents the degree of overlap of the target boxes, and Semantic_Sim(x1,x2) represents the similarity of the semantic features of the target boxes.

[0041] A second aspect of the present invention provides an adaptive data distillation system for the inspection of power equipment components.

[0042] An adaptive data distillation system for power equipment component inspection includes:

[0043] The teacher network training module is configured to train an improved teacher network using an image set of labeled power equipment components.

[0044] The filtering module is configured to filter an unlabeled core image set from an image set of unlabeled electrical equipment components.

[0045] The pseudo-label generation module is configured to generate pseudo-labels for the unlabeled core image set using a self-integrated data distillation method.

[0046] The student network training module is configured to train an improved student network using a core image set with pseudo-labels.

[0047] The detection module is configured to: fuse the core image set with the image set of labeled power equipment components to obtain a fused image set; and retrain the improved teacher network and the improved student network using the fused image set to obtain a trained student model, which is used to inspect power equipment components in new images.

[0048] The improved teacher network and the improved student network both introduce a dynamic anchor point mechanism into the YOLOv8 network to dynamically adjust the anchor frame according to the size ratio of the power equipment components; and divide the decoding head into multiple layers to process anchor frames of different scales separately.

[0049] A third aspect of the present invention provides a computer-readable storage medium.

[0050] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the adaptive data distillation method for power equipment component detection as described in the first aspect above.

[0051] A fourth aspect of the present invention provides a computer device.

[0052] A computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the program, implements the steps of the adaptive data distillation method for power equipment component detection as described in the first aspect above.

[0053] A fifth aspect of the present invention provides a computer device.

[0054] This invention provides a computer program product or computer program including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the steps in the adaptive data distillation method for power equipment component detection as described in the first aspect above.

[0055] Compared with the prior art, the beneficial effects of the present invention are:

[0056] The data filtering method based on feature clustering proposed in this invention can effectively filter out representative and diverse samples from large-scale unlabeled raw power equipment images. This method condenses massive datasets, significantly reducing storage space requirements while retaining the most valuable core data, thus improving the efficiency and effectiveness of subsequent model training.

[0057] The proposed model learning method based on data distillation in this invention fully utilizes a strategy that combines unlabeled data with limited labeled data to effectively train a power equipment component detection model. This method not only significantly reduces the demand for labeled data and training resources, but also obtains a high-performance power equipment component detection model, achieving a dual optimization of resource efficiency and model accuracy. Attached Figure Description

[0058] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an improper limitation of the invention.

[0059] Figure 1 This is a framework diagram of the adaptive data distillation method for power equipment component detection shown in this invention;

[0060] Figure 2 This is a flowchart of an adaptive data distillation method for power equipment component inspection as shown in this invention;

[0061] Figure 3 This is a framework diagram of data distillation as shown in this invention;

[0062] Figure 4 This is a structural diagram of the adaptive data distillation system for power equipment component detection shown in this invention. Detailed Implementation

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

[0064] It should be noted that the following detailed description is illustrative and intended to provide further explanation of the invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.

[0065] It should be noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the scope of exemplary embodiments according to the invention. As used herein, the singular form is intended to include the plural form as well, unless the context clearly indicates otherwise. Furthermore, it should be understood that when the terms "comprising" and / or "including" are used in this specification, they indicate the presence of features, steps, operations, devices, components, and / or combinations thereof.

[0066] It should be noted that the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of methods and systems according to various embodiments of this disclosure. It should be noted that each block in a flowchart or block diagram may represent a module, segment, or portion of code, which may include one or more executable instructions for implementing the logical functions specified in the various embodiments. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than that shown in the drawings. For example, two consecutively represented blocks may actually be executed substantially in parallel, or they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the flowcharts and / or block diagrams, and combinations of blocks in the flowcharts and / or block diagrams, may be implemented using a dedicated hardware-based system that performs the specified functions or operations, or using a combination of dedicated hardware and computer instructions.

[0067] Example 1

[0068] like Figure 1 As shown, this embodiment provides an adaptive data distillation method for the detection of power equipment components. This embodiment uses the application of this method to a server as an example for illustration. It is understood that this method can also be applied to terminals, and can also be applied to systems including terminals, servers, and other components, and can be implemented through interaction between the terminal and the server. The server can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network servers, cloud communication, middleware services, domain name services, CDN security services, and big data and artificial intelligence platforms. The terminal can be a smartphone, tablet, laptop, desktop computer, smart speaker, smartwatch, etc., but is not limited to these. The terminal and server can be directly or indirectly connected via wired or wireless communication, which is not limited herein. In this embodiment, the method includes the following steps:

[0069] An improved teacher network was trained using an image set of labeled power equipment components;

[0070] Select an unlabeled core image set from an image set of unlabeled electrical equipment components;

[0071] A self-integrated data distillation method is used to generate pseudo-labels for an unlabeled core image set.

[0072] An improved student network was trained using a core image set with pseudo-labels.

[0073] The core image set is fused with the image set of labeled power equipment components to obtain a fused image set; the improved teacher network and improved student network are retrained using the fused image set to obtain a trained student model, which is used to examine power equipment components in new images;

[0074] The improved teacher network and the improved student network both introduce a dynamic anchor point mechanism into the YOLOv8 network to dynamically adjust the anchor frame according to the size ratio of the power equipment components; and divide the decoding head into multiple layers to process anchor frames of different scales separately.

[0075] This invention constructs a teacher network model for power equipment component detection using a YOLOv8 model with a dynamic anchor mechanism, and performs initial training using limited labeled data. Building upon this, it innovatively introduces an adaptive core dataset selection algorithm based on feature extraction and clustering from a pre-trained large model, automatically identifying the most representative core samples from a large-scale unlabeled dataset. Then, through self-ensemble data distillation, more accurate pseudo-labels are generated for these core samples, and these pseudo-labels are used to train a performance-optimized student network model.

[0076] The following is a detailed description of this embodiment with reference to the accompanying drawings, such as... Figure 1 , Figure 2 As shown:

[0077] Step (1): Train a YOLOv8 power equipment component detection teacher network model with a dynamic anchoring mechanism using limited labeled data;

[0078] Step (2): Use the feature extraction and feature clustering method based on pre-trained large model to automatically cluster large-scale unlabeled data with adaptive parameters, and use a hybrid sampling strategy to filter and obtain the unlabeled core dataset;

[0079] Step (3): Use self-integrated data distillation technology to adaptively optimize the integration from multiple prediction results of the teacher network to obtain pseudo-labels for each image in the unlabeled core set;

[0080] Step (4): Use the generated pseudo-label data to train a new YOLOv8 student network model for detecting power equipment components based on a dynamic anchoring mechanism;

[0081] Step (5): Alternately iterate the dataset update and model training to obtain the distilled concentrated dataset and high-performance detection model, thereby achieving efficient management of data resources.

[0082] In some embodiments, in step (1), the YOLOv8 model pre-trained on a general object detection dataset is selected as the base model, and it is improved according to the category and characteristics of power equipment components. Specifically, considering the diverse shapes and sizes of power equipment components, the decoding head of the YOLOv8 model based on the fixed anchor mechanism is replaced.

[0083] First, after modifying and adapting the classification head, a dynamic anchor point mechanism is introduced. Based on the actual detection results of power equipment components, the size and proportion of the anchor points are automatically adjusted, thereby improving the model's adaptability to targets of different shapes and sizes. Specifically, during training, the model calculates the width W and height H of the target bounding box and their ratio (W / H) based on the actual target size distribution, and generates corresponding anchor points. This allows the anchor points to automatically adapt to different targets in the detection task, rather than being limited to preset fixed anchor boxes.

[0084] For each target category C i The bounding boxes of the target category appearing in the training set are statistically analyzed to obtain the scale distribution of the bounding boxes in the training set. Assume the target bounding box is (W... i H i Then, the scale distribution of the target can be calculated:

[0085] Aspect Ratio(C i ) = W i / H i

[0086] Based on this distribution, the dynamic anchor point mechanism adjusts the scale of the anchor frame (A) using a formula. w A h ):

[0087] A w =f(W i )

[0088] A h =f(H i )

[0089] The function f() is designed based on the scale variations of the bounding boxes in the training set, ensuring that the generated anchor points can better adapt to the actual size of different target categories. The dynamic anchor point mechanism also adjusts in real time based on the detection results in each image, ensuring that the model can efficiently capture targets in different scenarios.

[0090] Secondly, the decoding head is divided into multiple layers to process targets of different scales separately. A dynamic anchoring mechanism and a hierarchical decoding strategy are used to improve the model's adaptability to targets of different shapes and sizes. The improved teacher network model is trained and optimized on a limited-scale dataset of labeled power equipment images.

[0091] In some embodiments, in step (2), the visual encoder of the pre-trained large model CLIP is first used to extract the features of each image in the large-scale unlabeled raw data. Then, the image features are clustered using the DBSCAN automatic clustering method, and an adaptive clustering optimization strategy is introduced to automatically adjust the DBSCAN parameters (neighborhood radius eps) according to the data distribution to ensure that the clustering can be adaptively adjusted, thereby improving the stability of the clustering, reducing the number of outliers (noise), and enhancing the representativeness of the core samples.

[0092] The specific automatic parameter adjustment strategy is as follows: The neighborhood radius eps is dynamically adjusted based on the local density distribution of the dataset. First, the K-nearest neighbor distances of the image features are calculated (e.g., K=5), and the distance distribution is analyzed. eps is then dynamically set based on the local density estimation, i.e.:

[0093] eps=α·mean(d k )

[0094] Where, mean(d) k ) is the mean of the distances to the Kth nearest neighbors, and α is an adjustment factor that is adjusted according to the sparsity of the data.

[0095] After initial clustering, hierarchical clustering algorithms are used to further segment or merge the clustering results, enabling each cluster to more accurately reflect the inherent structure of the data. The initial DBSCAN clustering results are analyzed. If some clusters exhibit significant density variations, they can be further segmented using hierarchical clustering. Conversely, if the boundaries between some clusters are unclear, they can be merged. The segmentation criterion is that for regions with significant density gradient changes, a bottom-up hierarchical clustering algorithm is used for segmentation.

[0096] The specific formula is as follows:

[0097]

[0098] Among them, D(C) i C j ) is cluster C i and C j The average distance between samples, distance(x,y), is the distance between samples. If D(C i C jIf the distance is less than a set threshold, clustering and merging are performed; if the internal distance is too large, segmentation is performed.

[0099] Finally, a hybrid sampling strategy is adopted, combining center sample sampling and boundary sample sampling, dynamically adjusting the sampling ratio according to the cluster density. In dense clustering, more emphasis is placed on selecting boundary samples; while in loose clustering, center samples are prioritized. This method ensures reasonable coverage of different types of data, selecting the most representative and information-rich samples while maintaining sample diversity, thereby condensing the original dataset, reducing storage space, and subsequently reducing model training time.

[0100] The central sample is defined as:

[0101]

[0102] Among them, center(C i ) is clustering C i The point that is closest to all other points in a cluster represents the center of that cluster.

[0103] Boundary samples are defined as:

[0104] boundary(C i )={x∈C i |distance(x,neighbor(C i )) <threshold}

[0105] Among them, neighbor(C i ) for C i Other adjacent clusters, distance(x,neighbor(C) i )) represents the distance between a sample and its neighboring clusters.

[0106] The sampling ratio of center and boundary samples is dynamically adjusted based on the cluster density. Density is assumed to be defined as the average distance within a cluster (density(C0)). i If so, the sampling ratio can be adjusted using the following rules:

[0107]

[0108] Where, p center Let be the sampling probability of the center sample, λ be an adjustment factor, and μ be the density threshold. For dense clustering, density(C) = ... i The greater the probability of sampling a central sample, the lower its probability, while the higher its probability of sampling a boundary sample. For loose clustering, the sampling probability of central samples increases.

[0109] In some embodiments, in step (3), a self-integrated data distillation method is used to generate pseudo-labels for images in the unlabeled core dataset. For example... Figure 3 As shown, the specific method involves randomly rotating, cropping, and color-changing any image before inputting it into the trained teacher network for inference, and then fusing the detection results of different transformed images. A dynamic uncertainty evaluation mechanism is introduced, which calculates the prediction uncertainty of the teacher network on different transformed images, reduces the weight of pseudo-labels in high-uncertainty regions, or increases their confidence through multiple inferences, thereby reducing misleading information in pseudo-labels and improving model accuracy.

[0110] The uncertainty calculation involves performing multiple random transformations (such as rotation, cropping, and color changes) on each image. The teacher network then infers from each transformed image segment, resulting in multiple detection results. Significant differences between the results after different transformations indicate high uncertainty in that region. Uncertainty can be measured using the following formula:

[0111]

[0112] Where U(x) represents the uncertainty of the target bounding box on image x, p t (x) represents the confidence level of the teacher network in predicting the target box after the t-th transformation, where T is the number of transformations. A high uncertainty U(x) indicates that the prediction of the target box is relatively unstable.

[0113] For bounding boxes with high uncertainty, their weight is dynamically reduced to decrease their impact on pseudo-label generation. The confidence level is set to α(x), which is dynamically adjusted based on the uncertainty.

[0114]

[0115] Where, σ and α(x) is the adjustment coefficient. For regions with high uncertainty, α(x) tends to decrease, thereby reducing the impact of false labels.

[0116] Furthermore, an adaptive pseudo-label optimization strategy is proposed, which not only considers the intersection-union ratio (IU) but also introduces a semantic consistency metric. The reliability of the bounding boxes is determined by comparing the semantic features of detected components in images with different transformations. Bounding boxes with high semantic consistency are assigned higher weights, while those with inconsistent semantics need to be re-evaluated.

[0117] The Intersection over Union (IoU) ratio measures the degree of overlap between the bounding boxes. The specific formula is:

[0118]

[0119] Here, B1 and B2 are the target boxes generated after different transformations. A high Intersection over Union (IoU) ratio indicates that the target boxes are highly overlapping, suggesting higher reliability. Based on IoU, it can be determined whether to retain or modify certain detection boxes.

[0120] Besides the overlap of target bounding boxes, semantic consistency must also be considered. Even if target bounding boxes are close in position, if their semantic features are inconsistent, the detection result may be erroneous. This invention performs semantic analysis on the features of the target bounding boxes and uses cosine similarity to measure the similarity of the semantic features of the detected boxes:

[0121]

[0122] Here, v(x1) and v(x2) are the semantic feature vectors of the target box in different transformed images. A higher semantic similarity metric indicates higher semantic consistency of the target box and a more reliable detection box.

[0123] When generating pseudo-labels, both the IoU and semantic similarity of the target boxes are considered to comprehensively evaluate the reliability of the target boxes. A fusion weight γ(x) is assigned to each target box, as shown in the formula:

[0124] γ(x)=β·IoU(B1,B2)+(1-β)·Semantic_Sim(x1,x2)

[0125] Here, β is a balancing factor used to adjust the weights of IoU and semantic similarity in the fusion process. When the location and semantic features of the bounding box are highly consistent, γ(x) is higher, and the bounding box will be assigned a higher confidence score; otherwise, it needs to be re-evaluated.

[0126] By using dynamic uncertainty assessment and adaptive pseudo-label optimization, the problem of missed detections can be effectively mitigated, misleading can be reduced, and the accuracy of detection boxes can be improved, making the training of the model on unlabeled datasets more efficient and reliable.

[0127] In some embodiments, in step (4), a new YOLOv8 network based on a dynamic anchor mechanism is trained using the core dataset and pseudo-labels generated by distillation, serving as a newly trained student network.

[0128] In some embodiments, in step (5), the core dataset is fused with the labeled dataset to obtain an updated dataset, and the teacher network is retrained using this dataset. Subsequent steps are then performed to ultimately generate a condensed dataset and an updated student network as the final model for detecting power equipment components. Through multiple rounds of iterative optimization, the teacher network is retrained after each iteration to generate updated pseudo-labels, and the core dataset is further refined, gradually improving the performance of both the teacher and student networks until a high-precision model is achieved. This strategy fully leverages the potential of the dataset, significantly enhances the model's generalization ability, and selects representative core datasets, enabling efficient management of data resources.

[0129] This invention employs a dynamic iterative strategy, which involves alternating between dataset updates and model training to achieve joint optimization of the core dataset and the detection model. During each iteration, the model not only acquires more accurate feature information from the new core dataset but also gradually optimizes the filtering algorithm through a feedback mechanism, thereby further improving the utilization efficiency of unlabeled data and the final performance of the model.

[0130] This invention can generate a highly efficient condensed dataset in environments with limited labeled data and a large amount of unlabeled data, and train a higher-performance power equipment component detection model, greatly improving the accuracy and stability of detection, and optimizing the efficient management of data resources, thus having broad practical application value.

[0131] Example 2

[0132] This embodiment provides an adaptive data distillation system for the detection of power equipment components.

[0133] like Figure 4 As shown, an adaptive data distillation system for power equipment component inspection includes:

[0134] The teacher network training module is configured to train an improved teacher network using an image set of labeled power equipment components.

[0135] The filtering module is configured to filter an unlabeled core image set from an image set of unlabeled electrical equipment components.

[0136] The pseudo-label generation module is configured to generate pseudo-labels for the unlabeled core image set using a self-integrated data distillation method.

[0137] The student network training module is configured to train an improved student network using a core image set with pseudo-labels.

[0138] The detection module is configured to: fuse the core image set with the image set of labeled power equipment components to obtain a fused image set; and retrain the improved teacher network and the improved student network using the fused image set to obtain a trained student model, which is used to inspect power equipment components in new images.

[0139] The improved teacher network and the improved student network both introduce a dynamic anchor point mechanism into the YOLOv8 network to dynamically adjust the anchor frame according to the size ratio of the power equipment components; and divide the decoding head into multiple layers to process anchor frames of different scales separately.

[0140] In some embodiments, the anchor frame is dynamically adjusted according to the size proportions of the power equipment components, as expressed by the following formula:

[0141] Aspect Ratio(C i ) = W i / H i

[0142] A w =f(W i )

[0143] A h =f(H i )

[0144] Among them, C i Indicates the category of electrical equipment components, W i H represents the width of the target bounding box. i The Aspect Ratio(C) represents the height of the target bounding box. i A represents the proportional distribution of the dimensions of electrical equipment components. w The width of the anchor frame is dynamically adjusted, f() represents the function designed based on the dimensional changes of the power equipment components, and A h This indicates the height of the anchor frame after dynamic adjustment.

[0145] In some embodiments, the filtering module is further configured to: extract image features from each image based on the image set of unlabeled power equipment components using a visual feature extractor to obtain an image feature set; cluster the image feature set using a clustering method to obtain the cluster density; and dynamically adjust the sampling ratio of center samples and boundary samples according to the cluster density to construct an unlabeled core image set.

[0146] In some embodiments, the filtering module is further configured to: dynamically adjust the neighborhood radius according to the local density distribution of the image feature set to perform preliminary clustering; analyze the preliminary clustering results, segment clusters whose internal distance is greater than a first set threshold, and merge clusters whose average threshold between clusters is less than a second set threshold.

[0147] In some embodiments, the central sample is defined as:

[0148]

[0149] Among them, center(C i ) is clustering C i The center;

[0150] The boundary sample is defined as:

[0151] boundary(C i )={x∈C i |distance(x,neighbor(C i )) <threshold}

[0152] Among them, neighbor(C i ) for clustering C i Other adjacent clusters, distance(x,neighbor(C) i )) represents the distance between a sample and its neighboring clusters.

[0153] In some embodiments, the dynamic adjustment of the sampling ratio of center samples and boundary samples based on the cluster compactness is expressed by the following formula:

[0154]

[0155] Where, p center Let λ be the sampling probability of the center sample, λ be the adjustment factor, μ be the density threshold, and density(C) be the density threshold. i The value represents the average distance within a cluster, and is defined as the density.

[0156] In some embodiments, the pseudo-label generation module is further configured to: perform multiple random transformations on each image in the unlabeled core image set and input them into the improved teacher network, resulting in multiple detection results for each image; measure the uncertainty of the target box based on the multiple detection results for each image; if the uncertainty of the target box is greater than a third preset threshold, reduce the weight of the target box, set a confidence level based on the weight of the target box, and generate a pseudo-label for the image based on the confidence level and the detection results.

[0157] In some embodiments, the uncertainty of the target bounding box is expressed by the following formula:

[0158]

[0159] Where U(x) represents the uncertainty of the target bounding box on image x, p t(x) is the confidence of the teacher network in the target box after the t-th transformation, where T is the number of transformations.

[0160] In some embodiments, the confidence level is expressed by the following formula:

[0161]

[0162] Where, σ and U(x) is the adjustment coefficient, and U(x) is the uncertainty of the target box on image x.

[0163] In some embodiments, the pseudo-label generation module is further configured to: use intersection-union ratio (IU) to measure the degree of overlap of target boxes; perform semantic analysis on the features of the target boxes and use cosine similarity to measure the similarity of the semantic features of the target boxes; assign a fusion weight to each target box based on the degree of overlap of the target boxes and the similarity of the semantic features of the target boxes, and use the fusion weight to optimize the pseudo-labels.

[0164] In some embodiments, the fusion weights are represented by the following formula:

[0165] γ(x)=β·IoU(B1,B2)+(1-β)·Semantic_Sim(x1,x2)

[0166] Where β is a balancing factor used to adjust the weights of IoU and semantic similarity in the fusion; IoU(B1,B2) represents the degree of overlap of the target boxes, and Semantic_Sim(x1,x2) represents the similarity of the semantic features of the target boxes.

[0167] Example 3

[0168] This embodiment provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the adaptive data distillation method for power equipment component detection as described in Embodiment 1 above.

[0169] Example 4

[0170] This embodiment provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the steps in the adaptive data distillation method for power equipment component detection as described in Embodiment 1 above.

[0171] Example 5

[0172] This embodiment provides a computer program product or computer program that includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the steps in the aforementioned adaptive data distillation method for power equipment component detection.

[0173] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of hardware embodiments, software embodiments, or embodiments combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage and optical storage) containing computer-usable program code.

[0174] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0175] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0176] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0177] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.

[0178] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. An adaptive data distillation method for power equipment component inspection, characterized in that, include: An improved teacher network was trained using an image set of labeled power equipment components; Select an unlabeled core image set from an image set of unlabeled electrical equipment components; A self-integrated data distillation method is used to generate pseudo-labels for an unlabeled core image set. An improved student network was trained using a core image set with pseudo-labels. The core image set is fused with the image set of labeled power equipment components to obtain a fused image set; An improved teacher network and an improved student network were retrained using a fused image set to obtain a trained student model, which was used to examine electrical equipment components in new images. Among them, the improved teacher network and the improved student network both introduce a dynamic anchor point mechanism into the YOLOv8 network to dynamically adjust the anchor frame according to the size ratio of the power equipment components; and divide the decoding head into multiple layers to process anchor frames of different scales separately. A self-integrated data distillation method is used to generate pseudo-labels for an unlabeled core image set. This includes: performing multiple random transformations on each image in the unlabeled core image set and then inputting it into an improved teacher network, resulting in multiple detection results for each image; measuring the uncertainty of the bounding box based on the multiple detection results for each image; if the uncertainty of the bounding box is greater than a third preset threshold, reducing the weight of the bounding box; setting a confidence level based on the weight of the bounding box; and generating a pseudo-label for the image based on the confidence level and the detection results.

2. The adaptive data distillation method for power equipment component inspection according to claim 1, characterized in that, The anchor frame is dynamically adjusted based on the proportional distribution of the power equipment components, as expressed by the following formula: in, Indicates the category of electrical equipment components. Indicates the width of the target bounding box. Indicates the height of the target bounding box. This indicates the proportional distribution of dimensions of electrical equipment components. This indicates the width of the anchor frame after dynamic adjustment, and f() represents a function designed based on the dimensional changes of the power equipment components. This indicates the height of the anchor frame after dynamic adjustment.

3. The adaptive data distillation method for power equipment component inspection according to claim 1, characterized in that, The method for selecting an unlabeled core image set from an image set of unlabeled power equipment components includes: using a visual feature extractor to extract image features from each image based on the image set of unlabeled power equipment components, obtaining an image feature set; using a clustering method to cluster the image feature set to obtain the cluster density; and dynamically adjusting the sampling ratio of center samples and boundary samples according to the cluster density to construct an unlabeled core image set.

4. The adaptive data distillation method for power equipment component inspection according to claim 3, characterized in that, The method of clustering an image feature set to obtain the cluster density includes: dynamically adjusting the neighborhood radius according to the local density distribution of the image feature set to perform preliminary clustering; analyzing the preliminary clustering results, splitting clusters whose internal distance is greater than a first set threshold, and merging clusters whose average threshold between clusters is less than a second set threshold.

5. The adaptive data distillation method for power equipment component inspection according to claim 3, characterized in that, The central sample is defined as: in, It is clustering The center; The boundary sample is defined as: in, For clustering Other adjacent clusters, This represents the distance between a sample and its neighboring clusters.

6. The adaptive data distillation method for power equipment component inspection according to claim 3, characterized in that, The dynamic adjustment of the sampling ratio of center samples and boundary samples based on the cluster compactness is expressed by the following formula: in, The sampling probability of the center sample. To adjust the factor, Density threshold The average distance within a cluster is defined as the density.

7. The adaptive data distillation method for power equipment component inspection according to claim 1, characterized in that, The uncertainty of the target bounding box is expressed by the following formula: in, The uncertainty of the bounding box on image x. It represents the confidence level of the teacher network in the target box after the t-th transformation, where T is the number of transformations.

8. The adaptive data distillation method for power equipment component inspection according to claim 1, characterized in that, The confidence level is expressed by the following formula: in, and For adjustment coefficients, Let x represent the uncertainty of the bounding box on image x.

9. The adaptive data distillation method for power equipment component inspection according to claim 1, characterized in that, After generating pseudo-labels, the process also includes optimizing the pseudo-labels: using intersection-union ratio to measure the degree of overlap of the target boxes; performing semantic analysis on the features of the target boxes, and using cosine similarity to measure the similarity of the semantic features of the target boxes; Based on the degree of overlap of the target boxes and the similarity of the semantic features of the target boxes, a fusion weight is assigned to each target box, and the pseudo-label is optimized using the fusion weight.

10. The adaptive data distillation method for power equipment component inspection according to claim 9, characterized in that, The fusion weight is expressed by the following formula: in, As a balancing factor, it is used to adjust the weights of IoU and semantic similarity in the fusion process; Indicates the degree of overlap between the target bounding boxes. This indicates the similarity of semantic features of the target bounding boxes.

11. An adaptive data distillation system for power equipment component inspection, employing the adaptive data distillation method for power equipment component inspection as described in any one of claims 1-10, characterized in that, include: The teacher network training module is configured to train an improved teacher network using an image set of labeled power equipment components. The filtering module is configured to filter an unlabeled core image set from an image set of unlabeled electrical equipment components. The pseudo-label generation module is configured to generate pseudo-labels for the unlabeled core image set using a self-integrated data distillation method. The student network training module is configured to train an improved student network using a core image set with pseudo-labels. The detection module is configured to fuse the core image set with the image set of labeled power equipment components to obtain a fused image set; An improved teacher network and an improved student network were retrained using a fused image set to obtain a trained student model, which was used to examine electrical equipment components in new images. The improved teacher network and the improved student network both introduce a dynamic anchor point mechanism into the YOLOv8 network to dynamically adjust the anchor frame according to the size ratio of the power equipment components; and divide the decoding head into multiple layers to process anchor frames of different scales separately.

12. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the program implements the steps in the adaptive data distillation method for power equipment component detection as described in any one of claims 1-10.

13. A computer 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 program, it implements the steps in the adaptive data distillation method for power equipment component detection as described in any one of claims 1-10.

14. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the steps of the adaptive data distillation method for power equipment component detection as described in any one of claims 1-10.