Insulator defect detection model determination method and device, electronic equipment and medium

By constructing a pre-trained model and a loss function-trained insulator defect detection model, the problem of limited detection efficiency under foggy conditions was solved, and effective defect detection was achieved in various foggy environments.

CN119444687BActive Publication Date: 2025-12-26GUANGDONG POWER GRID CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411486345.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-23
Publication Date
2025-12-26
Estimated Expiration
2044-10-23

AI Technical Summary

Technical Problem

Existing insulator defect detection models have limited detection efficiency under foggy conditions, and domain offset issues result in insufficient generalization ability of the models in unknown environments.

Method used

By acquiring insulator image data under sunny and foggy conditions, a pre-trained model is constructed, including a pre-trained YOLO model, a feature fusion module, and a domain classifier. The model is trained using target loss, MMD loss, and classification loss to construct a defect detection model and perform defect prediction in the unseen domain.

Benefits of technology

The adaptability and practicality of the insulator defect detection model have been improved in various foggy environments, enabling effective defect prediction under previously unseen foggy conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119444687B_ABST
    Figure CN119444687B_ABST
Patent Text Reader

Abstract

A method and device for determining an insulator defect detection model, electronic equipment and a medium are disclosed. The method comprises: obtaining a source domain and a target domain, training a pre-trained model based on the source domain and the target domain to obtain a defect detection model; the defect detection model is a pre-trained YOLO model corresponding to a target loss of the pre-trained model being less than or equal to a preset loss value; inputting insulator image data in an unseen domain into the defect detection model to obtain a defect prediction result corresponding to the unseen domain, determining a comparison result of the defect prediction result and the insulator image data in the unseen domain, and if the comparison result meets a preset condition, determining the defect detection model as an insulator defect detection model. The technical scheme greatly improves the practicability and adaptability of the insulator defect detection model, and effectively predicts insulator defects in various foggy environments that have not been seen before using the insulator defect detection model.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of power system inspection, and in particular to a method and device for determining an insulator defect detection model, an electronic device and a medium. BACKGROUND

[0002] Insulators play a crucial role in high-voltage power transmission systems, primarily responsible for supporting and isolating power lines to ensure the safety and stability of power transmission. Defects in insulators can lead to serious power transmission failures, increasing the risk of system operation.

[0003] With the combination of unmanned aerial vehicles and power vision technology, existing automated detection systems can effectively identify insulator defects under clear weather conditions through rich labeled data and advanced image processing techniques. However, under low-visibility conditions such as fog, the effectiveness of these technologies is greatly limited. This performance decline is mainly due to domain shift problems, i.e., there are significant differences in the feature distribution of images collected under different weather conditions.

[0004] Domain adaptation technology is an effective method to address the above challenges, aiming to align feature representations between the source domain (clear day images) and the target domain (foggy day images) to improve the adaptability of the insulator defect detection model to the target domain. However, domain adaptation assumes that the data distribution of the test domain is the same as the data distribution of the target domain used during training, which limits the generalization ability of the insulator defect detection model under unknown environmental conditions. Therefore, it is very important to improve the practicality and adaptability of the insulator defect detection model. SUMMARY

[0005] The present application provides a method and device for determining an insulator defect detection model, an electronic device and a medium, which greatly improves the practicality and adaptability of the insulator defect detection model, and realizes effective prediction of insulator defects under various foggy conditions that have not been seen before using the insulator defect detection model.

[0006] According to an aspect of the present application, a method for determining an insulator defect detection model is provided, the method comprising:

[0007] obtaining a source domain and a target domain, the source domain being a set of insulator image data with defect labels under clear weather conditions, and the target domain being a set of insulator image data without defect labels under a preset concentration of foggy weather conditions;

[0008] determine a pre-training model; wherein the pre-training model comprises a pre-training YOLO model, a feature mixing module, and a domain classifier, the pre-training YOLO model is used for image feature information extraction and defect prediction on insulator image data, the feature mixing module is used for feature mixing of image feature information output by the pre-training YOLO model to obtain mixed features, and the domain classifier is used for feature extraction and analysis of the mixed features mixed by the feature mixing module to obtain a domain classification result, and the domain classification result is used to describe a probability value of the mixed feature information belonging to a source domain or a target domain;

[0009] training the pre-training model based on the source domain and the target domain to obtain a defect detection model; the defect detection model is a pre-training YOLO model corresponding to a target loss of the pre-training model being less than or equal to a preset loss value, and the target loss is composed of a detection loss corresponding to the pre-training YOLO model, an MMD loss corresponding to the feature mixing module, and a classification loss corresponding to the domain classifier;

[0010] constructing at least three unseen domains, inputting insulator image data in the unseen domains into the defect detection model to obtain defect prediction results corresponding to the unseen domains, determining a comparison result of the defect prediction results and the insulator image data in the unseen domains, and if the comparison result reaches a preset condition, determining that the defect detection model is an insulator defect detection model; the unseen domain is a set of insulator image data with defect labels under a fog condition different from the target domain, and the comparison result is used to describe the similarity between the defect prediction result and the defect labels of the insulator image data in the unseen domain.

[0011] According to another aspect of the present application, an insulator defect detection model determination device is provided, which comprises:

[0012] a data acquisition module configured to acquire a source domain and a target domain, the source domain being a set of insulator image data with defect labels under a sunny condition, and the target domain being a set of insulator image data without defect labels under a preset density fog condition;

[0013] a first model determination module configured to determine a pre-training model; wherein the pre-training model comprises a pre-training YOLO model, a feature mixing module, and a domain classifier, the pre-training YOLO model is used for image feature information extraction and defect prediction on insulator image data, the feature mixing module is used for feature mixing of image feature information output by the pre-training YOLO model to obtain mixed features, and the domain classifier is used for feature extraction and analysis of the mixed features mixed by the feature mixing module to obtain a domain classification result, and the domain classification result is used to describe a probability value of the mixed feature information belonging to a source domain or a target domain;

[0014] The training module is configured to train the pre-training model based on the source domain and the target domain to obtain a defect detection model; the defect detection model is a pre-training YOLO model corresponding to a target loss of the pre-training model being less than or equal to a preset loss value, and the target loss is composed of a detection loss corresponding to the pre-training YOLO model, an MMD loss corresponding to the feature mixing module, and a classification loss corresponding to the domain classifier;

[0015] The second model determination module is configured to construct at least three unseen domains, input insulator image data in the unseen domains into the defect detection model to obtain defect prediction results corresponding to the unseen domains, determine a comparison result of the defect prediction results and the insulator image data in the unseen domains, and determine the defect detection model as an insulator defect detection model if the comparison result reaches a preset condition; the unseen domain is a set of insulator image data with defect labels under a foggy condition different from a target domain corresponding to the foggy condition, and the comparison result is used to describe a similarity between the defect prediction results and the defect labels of the insulator image data in the unseen domains.

[0016] According to another aspect of the present application, an electronic device is provided, the electronic device comprising:

[0017] at least one processor; and

[0018] a memory connected to the at least one processor in communication; wherein

[0019] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to execute the method for determining the insulator defect detection model according to any one of the embodiments of the present application.

[0020] According to another aspect of the present application, a computer readable storage medium is provided, the computer readable storage medium stores computer instructions for enabling a processor to implement the method for determining the insulator defect detection model according to any one of the embodiments of the present application when executed by the processor.

[0021] The technical scheme of the embodiment of the present application acquires a source domain and a target domain, the source domain is a set of insulator image data with defective marks under sunny conditions, and the target domain is a set of insulator image data without defective marks under a preset concentration of foggy conditions. The present application does not depend on the mark data in the target domain, thereby reducing the dependence on a large amount of mark data. A pre-training model is determined; the pre-training model includes a pre-training YOLO model, a feature mixing module, and a domain classifier. The pre-training model is further trained based on the source domain and the target domain to obtain a defect detection model; the defect detection model is a pre-training YOLO model corresponding to a target loss of the pre-training model being less than or equal to a preset loss value, and the target loss is composed of a detection loss corresponding to the pre-training YOLO model, an MMD loss corresponding to the feature mixing module, and a classification loss corresponding to the domain classifier, thereby realizing accurate determination of the defect detection model. Further, at least three unseen domains are constructed, insulator image data in the unseen domains are input into the defect detection model to obtain defect prediction results corresponding to the unseen domains, a comparison result of the defect prediction results and the insulator image data in the unseen domains is determined, and if the comparison result reaches a preset condition, the defect detection model is determined as an insulator defect detection model; the unseen domain is a set of insulator image data with defective marks under foggy conditions different from the target domain, and the comparison result is used to describe the similarity between the defect prediction result and the defective mark of the insulator image data in the unseen domain, thereby greatly improving the practicability and adaptability of the insulator defect detection model and realizing effective prediction of insulator defects under various foggy conditions that have not been seen before by using the insulator defect detection model.

[0022] It should be understood that the content described in this part is not intended to identify key or important features of the embodiments of the present application, nor is it used to limit the scope of the present application. Other features of the present application will become apparent from the following description. BRIEF DESCRIPTION OF DRAWINGS

[0023] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings needed in the embodiment description. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can also be obtained by those skilled in the art without creative labor.

[0024] Figure 1 is a flowchart of a method for determining an insulator defect detection model according to an embodiment of the present application;

[0025] Figure 2 is a flowchart of another method for determining an insulator defect detection model according to an embodiment of the present application;

[0026] Figure 3is a flow chart of a determination method of an insulator defect detection model according to an embodiment of the present application;

[0027] Figure 4 is a structural schematic diagram of a determination device of an insulator defect detection model according to an embodiment of the present application;

[0028] Figure 5 is a structural schematic diagram of an electronic device for implementing the determination method of the insulator defect detection model according to an embodiment of the present application. DETAILED DESCRIPTION

[0029] In order to enable persons skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by persons skilled in the art without creative work should fall within the scope of protection of the present application.

[0030] It should be noted that the terms "first", "second", and the like in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily indicate a specific order or a chronological sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device including a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to the process, method, product or device.

[0031] Embodiment one

[0032] Figure 1 A flow chart of a determination method of an insulator defect detection model according to an embodiment of the present application is provided, and the present embodiment can be applied to the case of training the insulator defect detection model. The method can be executed by a determination device of an insulator defect detection model, which can be realized in the form of hardware and / or software, and can be configured in any electronic device with network communication function. As shown in the figure, the method comprises: Figure 1

[0033] ​S110, acquire a source domain and a target domain, the source domain is a set of insulator image data with defect label under sunny condition, and the target domain is a set of insulator image data without defect label under preset density fog condition.

[0034] Specifically, the insulator image data of the source domain and the target domain can be collected by a drone or a fixed monitoring device. After collection, the insulator image data of the source domain is marked with defects as data for model training. The insulator image data of the target domain does not need to be marked, reducing the workload of marking data. The defect label includes normalized bounding box center coordinates, width, height and other information.

[0035] Further, the source domain and the target domain are acquired, including: acquiring first insulator image data, marking the first insulator image data with defects and a first domain label to obtain marked first insulator image data, and grouping the marked first insulator image data to form the source domain; the first insulator image data is insulator image data under sunny condition, and the first domain label is 0; acquiring second insulator image data, marking the second insulator image data with a second domain label to obtain marked second insulator image data, and grouping the marked second insulator image data to form the target domain; the second insulator image data is insulator image data under preset density fog condition, and the second domain label is 1.

[0036] S120, determine a pre-training model; the pre-training model includes a pre-training YOLO model, a feature mixing module and a domain classifier, the pre-training YOLO model is used for extracting image feature information and defect prediction of insulator image data, the feature mixing module is used for mixing image feature information output by the pre-training YOLO model to obtain mixed features, and the domain classifier is used for extracting and analyzing features of the mixed features mixed by the feature mixing module to obtain domain classification results, and the domain classification results are used to describe probability values of the mixed feature information belonging to the source domain or the target domain.

[0037] The pre-training YOLO model includes a feature extractor, the feature extractor is used to extract image feature information from the insulator image data, and the image feature information at least includes defect features in the insulator image data, and the pre-training YOLO model is also used for predicting and marking the defect features in the insulator image data. The feature extractor can extract image feature information from the global to the local in the insulator image data.

[0038] The feature extractor of the pre-training YOLO model includes at least one feature extraction layer, and the image feature information output by the preset number of feature extraction layers corresponding to the feature extractor is matched with the preset number of domain classifiers, and when calculating the classification loss, the losses corresponding to the preset number of domain classifiers are added as the classification loss.

[0039] S130, training the pre-training model based on the source domain and the target domain to obtain a defect detection model; the defect detection model is a pre-training YOLO model corresponding to a target loss of the pre-training model being less than or equal to a preset loss value; the target loss is composed of a detection loss corresponding to the pre-training YOLO model, an MMD loss corresponding to the feature mixing module, and a classification loss corresponding to the domain classifier.

[0040] Specifically, the detection loss L DET corresponding to the pre-training YOLO model is MMD the MMD loss L ADV corresponding to the feature mixing module is DET and the classification loss L MMD corresponding to the domain classifier is ADV added according to a preset weight ratio as a target loss L, which is expressed by the following formula:

[0041] L=L DET +αL MMD +βL ADV ;

[0042] Wherein, α and β are weight coefficients of the MMD loss and the classification loss, respectively.

[0043] S140, constructing at least three unseen domains, inputting the insulator image data in the unseen domain into the defect detection model to obtain a defect prediction result corresponding to the unseen domain, determining a comparison result of the defect prediction result and the insulator image data in the unseen domain, and if the comparison result meets a preset condition, determining the defect detection model as an insulator defect detection model.

[0044] Wherein, the unseen domain is a set of insulator image data with defect labels under different fog conditions than the target domain, and the comparison result is used to describe the similarity between the defect prediction result and the defect labels of the insulator image data in the unseen domain.

[0045] Specifically, the unseen domain can be obtained by collecting insulator image data under different types of real fog conditions, and / or by using at least three different types of fogging methods to fog the insulator image data in the source domain. The comparison result can include at least one of the accuracy, recall rate and false positive rate, i.e. the similarity between the defect prediction result and the defect labels of the insulator image data in the unseen domain is reflected by at least one of the accuracy, recall rate and false positive rate.

[0046] Further, the comparison result of the defect prediction result and the insulator image data in the unseen domain is determined; if the comparison result reaches a preset condition, the defect detection model is determined as the insulator defect detection model. If the comparison result does not reach the preset condition, the pre-training model is updated based on the target loss, the updated pre-training model is continuously trained based on the source domain and the target domain, an updated defect detection model is obtained, the insulator image data in the unseen domain is input into the updated defect detection model to obtain the defect prediction result corresponding to the unseen domain, the comparison result of the defect prediction result and the insulator image data in the unseen domain is determined, until the comparison result reaches the preset condition, and then the defect detection model corresponding to the comparison result is determined as the insulator defect detection model.

[0047] The technical scheme of the embodiment of the application acquires a source domain and a target domain, the source domain is a set of insulator image data with defect labels under sunny conditions, and the target domain is a set of insulator image data without defect labels under a preset density of foggy conditions. The application does not depend on the label data in the target domain, thereby reducing the dependence on a large amount of label data. A pre-training model is determined; the pre-training model includes a pre-training YOLO model, a feature mixing module, and a domain classifier. The pre-training model is trained based on the source domain and the target domain to obtain a defect detection model. The defect detection model is a pre-training YOLO model corresponding to a target loss of the pre-training model that is less than or equal to a preset loss value. The target loss is composed of a detection loss corresponding to the pre-training YOLO model, an MMD loss corresponding to the feature mixing module, and a classification loss corresponding to the domain classifier. The accuracy of the defect detection model is determined. Further, at least three unseen domains are constructed. Insulator image data in the unseen domain is input into the defect detection model to obtain a defect prediction result corresponding to the unseen domain. The comparison result of the defect prediction result and the insulator image data in the unseen domain is determined. If the comparison result reaches a preset condition, the defect detection model is determined as an insulator defect detection model. The unseen domain is a set of insulator image data with defect labels under foggy conditions different from the target domain. The comparison result is used to describe the similarity between the defect prediction result and the defect labels of the insulator image data in the unseen domain. The practicability and adaptability of the insulator defect detection model are greatly improved. The insulator defect detection model is used to effectively predict insulator defects under various unseen foggy conditions.

[0048] Embodiment two

[0049] Figure 2 The flowchart of another method for determining an insulator defect detection model provided by the embodiment of the application is provided. The technical scheme of the embodiment is further optimized for the process of S130 in the foregoing embodiment. The embodiment can be combined with each optional scheme in one or more of the foregoing embodiments.

[0050] AsFigure 2 As shown, the method for determining the insulator defect detection model of the application comprises the following processes:

[0051] S210, acquiring a source domain and a target domain, determining a pre-training model, the source domain being a set of insulator image data with defect labels under sunny conditions, the target domain being a set of insulator image data without defect labels under a preset concentration of foggy conditions, and the pre-training model comprising a pre-training YOLO model, a feature mixing module and a domain classifier.

[0052] The feature mixing module is configured to perform feature mixing on image feature information output by the pre-training YOLO model to obtain mixed features, and the domain classifier is configured to perform feature extraction analysis on the mixed features mixed by the feature mixing module to obtain a domain classification result, the domain classification result being used to describe a probability value of the mixed feature information belonging to the source domain or the target domain.

[0053] S220, performing feature extraction on the insulator image data in the source domain based on a feature extractor of the pre-training YOLO model to obtain first image feature information, and performing feature extraction on the insulator image data in the target domain based on the feature extractor of the pre-training YOLO model to obtain second image feature information.

[0054] The first image feature information can be understood as feature information output by a preset number of feature extraction layers in the feature extractor after performing feature extraction on the insulator image data in the source domain. The second image feature information can be understood as feature information output by the preset number of feature extraction layers in the feature extractor after performing feature extraction on the insulator image data in the target domain.

[0055] S230, determining an MMD loss based on the first image feature information and the second image feature information.

[0056] The MMD (Maximum Mean Discrepancy) loss is used to measure the difference between the distributions of the first image feature information and the second image feature information.

[0057] Specifically, a suitable target kernel function is selected. The target kernel function includes a Gaussian kernel function and the like. The selection of the kernel function will affect the calculation result and performance of the MMD. Further, the MMD loss is determined based on the first image feature information, the second image feature information and the target kernel function.

[0058] Optionally, the MMD loss is determined by using the following formula:

[0059]

[0060] wherein, represents the first image feature information, denotes the second image feature information, and φ(x) is a kernel function for mapping the first image feature information and the second image feature information to a reproducing Hilbert space, n s is the number of samples of the source domain, and n t is the number of samples of the target domain.

[0061] S240, determine a first mixing ratio of the first image feature information and a second mixing ratio of the second image feature information, and obtain mixed feature information by linearly mixing the first image feature information and the second image feature information based on the first mixing ratio and the second mixing ratio; the sum of the first mixing ratio and the second mixing ratio is 1.

[0062] Specifically, the mixed feature information is determined by using the following formula:

[0063]

[0064] wherein, denotes the first image feature information, denotes the second image feature information, and λ i is the first mixing ratio taken from the interval [0, 1], and is also the domain label of the mixed feature information, (1-λ i ) is the second mixing ratio.

[0065] S250, taking the first mixing ratio as the domain label of the mixed feature information, obtaining a domain classification result by performing feature extraction analysis on the mixed feature information based on a domain classifier, and determining a classification loss based on the domain label and the domain classification result; the domain classification result is used to describe a probability value of the mixed feature information belonging to the source domain or the target domain.

[0066] Specifically, the classification loss is determined by using the following formula:

[0067]

[0068] wherein, D(f(x i )) is the domain classification result, λ i is the domain label of the mixed feature information, and N represents the sum of the number of samples of the source domain and the target domain.

[0069] Through the above formula, the model can consider the feature mixing degree between the source domain and the target domain in the domain adversarial learning process, and gradually learn how to align the source domain and target domain features in the mixed feature space, thereby enhancing the generalization ability of the model.

[0070] S260, determine a detection loss of the pre-trained YOLO model.

[0071] Specifically, the pre-trained YOLO model will label the insulator image data of the source domain for defects to obtain a reference defect prediction result, which includes information such as the normalized center coordinates, width, and height of the bounding box. The detection loss of the pre-trained YOLO model mainly includes three parts: bounding box loss, confidence loss, and classification loss.

[0072] Bounding box loss: This loss calculates the deviation between the predicted bounding box and the actually labeled bounding box. The pre-trained YOLO model usually uses IOU (Intersection over Union) or more complex variants such as GIOU, CIOU to evaluate the alignment between the predicted box and the true box.

[0073] Confidence loss: This loss evaluates the confidence of the pre-trained YOLO model in predicting whether the bounding box contains a defect object, and compares it with the actual situation. If the predicted box correctly contains the defect object, the loss value is smaller; on the contrary, if the predicted box incorrectly labels as containing a defect object or fails to identify the real object, the loss value increases.

[0074] Classification loss: If the predicted box correctly identifies the object, this loss calculates the error between the predicted class and the actual class. This is usually achieved through cross-entropy loss, which evaluates the difference between the model's predicted probability for each class and the actual label.

[0075] Further, the bounding box loss, confidence loss, and classification loss are added together according to the weight proportion as the detection loss value of the pre-trained YOLO model.

[0076] S270, determine the target loss based on the MMD loss, classification loss, and detection loss, and use the pre-trained YOLO model with a target loss less than or equal to a preset loss value as the defect detection model.

[0077] Specifically, the MMD loss, classification loss, and detection loss can be weighted and summed according to the weight proportion to obtain the target loss of the pre-trained model. When the target loss is greater than the preset loss value, update the pre-trained YOLO model corresponding to the target loss in the pre-trained model, i.e., as shown in Figure 3 backpropagation to update the model parameters, and continue training the pre-trained model based on the training set until the target loss is less than or equal to the preset loss value. The pre-trained YOLO model corresponding to the target loss when the target loss is less than or equal to the preset loss value is used as the defect detection model.

[0078] S280, at least three unseen domains are constructed, the insulator image data in the unseen domains is input into the defect detection model to obtain a defect prediction result corresponding to the unseen domain, a comparison result of the defect prediction result and the insulator image data in the unseen domain is determined, and if the comparison result reaches a preset condition, it is determined that the defect detection model is an insulator defect detection model.

[0079] The comparison result is used to describe the similarity between the defect prediction result and the defect mark of the insulator image data in the unseen domain.

[0080] In addition, as shown in Figure 3 After the defect detection model is determined, the defect detection model can be comprehensively evaluated on the target domain to verify whether the model can adapt to the foggy environment of the target domain. The comprehensive evaluation includes but is not limited to the key performance indicators such as the recognition accuracy, recall rate and false positive rate of the model. This evaluation helps to determine whether the model has effectively learned the conversion from the source domain to the target domain and can accurately detect the insulator defects in the actual foggy conditions.

[0081] The technical scheme of the embodiment comprises the following steps: acquiring a source domain and a target domain, and determining a pre-training model; a feature extractor based on the pre-training YOLO model is used to extract features of insulator image data in the source domain to obtain first image feature information, and a feature extractor based on the pre-training YOLO model is used to extract features of insulator image data in the target domain to obtain second image feature information; MMD loss is determined based on the first image feature information and the second image feature information; a first mixing ratio of the first image feature information and a second mixing ratio of the second image feature information are determined, and the first image feature information and the second image feature information are linearly mixed based on the first mixing ratio and the second mixing ratio to obtain mixed feature information; the first mixing ratio is taken as a domain label of the mixed feature information, a domain classifier is used to extract and analyze features of the mixed feature information to obtain a domain classification result, a classification loss is determined based on the domain label and the domain classification result, and accurate determination of the classification loss is realized; a detection loss of the pre-training YOLO model is determined; the target loss is determined based on the MMD loss, the classification loss and the detection loss, and the pre-training YOLO model when the target loss is less than or equal to a preset loss value is taken as a defect detection model, and accurate determination of the defect detection model is realized. Further, at least three unseen domains are constructed, insulator image data in the unseen domains are input into the defect detection model to obtain defect prediction results corresponding to the unseen domains, an alignment result of the defect prediction results and the insulator image data in the unseen domains is determined, and if the alignment result meets a preset condition, the defect detection model is determined as an insulator defect detection model, which greatly improves the practicability and adaptability of the insulator defect detection model and realizes effective prediction of insulator defects in various foggy environments that have not been seen before by using the insulator defect detection model.

[0082] Embodiment three

[0083] Figure 4 A structural diagram of an insulator defect detection model determination device provided by the embodiment of the application is shown in the figure, the embodiment can be applied to the case of training an insulator defect detection model, and the insulator defect detection model determination device can be realized in the form of hardware and / or software and can be configured in any electronic device with network communication function.

[0084] As Figure 4 shown, the insulator defect detection model determination device of the application comprises:

[0085] The data acquisition module 310 is configured to acquire a source domain and a target domain, wherein the source domain is a set of insulator image data with defect labels under sunny conditions, and the target domain is a set of insulator image data without defect labels under a preset concentration of foggy conditions.

[0086] The first model determination module 320 is configured to determine a pre-training model; the pre-training model comprises a pre-training YOLO model, a feature mixing module, and a domain classifier; the pre-training YOLO model is used for image feature information extraction and defect prediction on insulator image data; the feature mixing module is used for feature mixing of image feature information output by the pre-training YOLO model to obtain mixed features; the domain classifier is used for feature extraction and analysis of the mixed features mixed by the feature mixing module to obtain a domain classification result; and the domain classification result is used to describe a probability value of the mixed feature information belonging to a source domain or a target domain.

[0087] The training module 330 is configured to train the pre-training model based on the source domain and the target domain to obtain a defect detection model; the defect detection model is a pre-training YOLO model corresponding to a target loss of the pre-training model being less than or equal to a preset loss value; and the target loss is composed of a detection loss corresponding to the pre-training YOLO model, an MMD loss corresponding to the feature mixing module, and a classification loss corresponding to the domain classifier.

[0088] The second model determination module 340 is configured to construct at least three unseen domains, input insulator image data in the unseen domains into the defect detection model to obtain defect prediction results corresponding to the unseen domains, determine a comparison result of the defect prediction results and the insulator image data in the unseen domains, and determine the defect detection model as an insulator defect detection model if the comparison result reaches a preset condition; the unseen domain is a set of insulator image data with defect labels under a fog condition different from a fog condition corresponding to the target domain; and the comparison result is used to describe a similarity between the defect prediction result and the defect labels of the insulator image data in the unseen domain.

[0089] On the basis of the above-mentioned embodiments, optionally, the pre-training YOLO model comprises a feature extractor, the feature extractor is used to extract image feature information from insulator image data, the image feature information at least comprises defect features in the insulator image data, and the pre-training YOLO model is further used for defect label prediction on the defect features in the insulator image data.

[0090] On the basis of the above-mentioned embodiments, optionally, the training module comprises:

[0091] The feature extractor based on the pre-training YOLO model is used to extract features of the insulator image data in the source domain to obtain first image feature information, and the feature extractor based on the pre-training YOLO model is used to extract features of the insulator image data in the target domain to obtain second image feature information.

[0092] The MMD loss is determined based on the first image feature information and the second image feature information.

[0093] determine a first mixing ratio of the first image feature information and a second mixing ratio of the second image feature information, linearly mix the first image feature information and the second image feature information based on the first mixing ratio and the second mixing ratio to obtain mixed feature information, wherein a sum of the first mixing ratio and the second mixing ratio is 1;

[0094] take the first mixing ratio as a domain label of the mixed feature information, perform feature extraction analysis on the mixed feature information based on a domain classifier to obtain a domain classification result, and determine a classification loss based on the domain label and the domain classification result, wherein the domain classification result is used to describe a probability value of the mixed feature information belonging to a source domain or a target domain;

[0095] determine a detection loss of the pre-trained YOLO model, determine a target loss based on the MMD loss, the classification loss and the detection loss, and take the pre-trained YOLO model when the target loss is less than or equal to a preset loss value as a defect detection model.

[0096] On the basis of the above embodiment, optionally, the MMD loss is determined by the following formula:

[0097]

[0098] wherein, the first image feature information is represented by x, the second image feature information is represented by y, and φ(x) is a kernel function for mapping the first image feature information and the second image feature information to a reproducing Hilbert space, n s is a sample quantity of the source domain, and n t is a sample quantity of the target domain.

[0099] On the basis of the above embodiment, optionally, the mixed feature information is determined by the following formula:

[0100]

[0101] wherein, the first image feature information is represented by x, the second image feature information is represented by y, and λ i is the first mixing ratio taken from the interval [0, 1], and is also a domain label of the mixed feature information, and (1-λ i ) is the second mixing ratio.

[0102] On the basis of the above embodiment, optionally, the classification loss is determined by the following formula:

[0103]

[0104] wherein D(f(x i )) is the domain classification result, λ i is the domain label of the mixed feature information, and N represents the sum of the sample quantities of the source domain and the target domain.

[0105] On the basis of the above-mentioned embodiments, optionally, the second model determining module comprises a judging unit, which is configured to:

[0106] If the comparison result does not reach the preset condition, the pre-training model is updated based on the target loss, and the updated pre-training model is continuously trained based on the source domain and the target domain to obtain a defect detection model.

[0107] The insulator defect detection model determining device provided in the embodiments of the present application can execute the insulator defect detection model determining method provided in any of the embodiments of the present application, and has the corresponding function modules and beneficial effects of the execution method.

[0108] Embodiment four

[0109] According to embodiments of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.

[0110] Figure 5 A structural schematic diagram of an electronic device 10 that can be used to implement embodiments of the present application is shown. The electronic device is intended to represent various forms of digital computers, such as laptops, desktops, tablets, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular telephones, smart phones, wearable devices (e.g., headsets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not intended to limit the implementations of the present application described and / or claimed in this document.

[0111] As Figure 5As shown, the electronic device 10 includes at least one processor 11, and a memory, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., connected to the at least one processor 11 in communication. The memory stores computer programs executable by the at least one processor 11, and the processor 11 can perform various appropriate actions and processes according to the computer programs stored in the read-only memory (ROM) 12 or loaded from the storage unit 18 into the random access memory (RAM) 13. Various programs and data required for the operation of the electronic device 10 can also be stored in the RAM 13. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0112] Various components in the electronic device 10 are connected to the I / O interface 15, including an input unit 16, such as a keyboard, a mouse, etc., an output unit 17, such as various types of displays, a speaker, etc., a storage unit 18, such as a magnetic disk, an optical disk, etc., and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network, such as the Internet, and / or various telecommunication networks.

[0113] The processor 11 can be various general and / or special-purpose processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 performs various methods and processes described above, such as the determination method of the insulator defect detection model.

[0114] In some embodiments, the determination method of the insulator defect detection model can be implemented as a computer program tangibly embodied in a computer readable storage medium, such as the storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed onto the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the determination method of the insulator defect detection model described above can be performed. Alternatively, in other embodiments, the processor 11 can be configured to perform the determination method of the insulator defect detection model by any other appropriate means, such as by means of firmware.

[0115] The various embodiments of the systems and techniques described above can be implemented in digital electronic circuitry, integrated circuitry, a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on a chip (SOC), a complex programmable logic device (CPLD), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include implementation in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be special or general purpose, coupled to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device.

[0116] Computer programs used to implement the processes of the application can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer program, when executed, can cause instructions defined in the flow charts and / or block diagrams to be implemented on the computer or other programmable apparatus. The computer programs can be executed entirely on a machine, partially on a machine, partially on a machine as a stand-alone software package, partially on a machine and partially on a remote machine or entirely on a remote machine or server.

[0117] In the context of the present application, a computer-readable storage medium can be a tangible medium that can contain or store computer programs for use by or in connection with an instruction execution system, apparatus, or device. Computer-readable storage media can include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium can be a machine-readable signal medium. More specific examples of the machine-readable storage medium will include one or more lines of electrical connections, portable computer disks, hard disk drives, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or Flash memory), optical fibers, portable compact disc read-only memories (CD-ROMs), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0118] To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the electronic device. Other kinds of devices can be used to provide for interaction with a user as well; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form, including acoustic, speech, or tactile input.

[0119] The systems and techniques described here can be implemented in a computing system that includes a back end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front end component (e.g., a user computer having a graphical user interface or a Web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back end, middleware, or front end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0120] The computing system can include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. A server can be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system, to solve the defects of large management difficulty and weak business scalability in traditional physical host and VPS service.

[0121] It should be understood that the various forms of flow shown above can be re-ordered, added to, or deleted from without departing from the scope of the present disclosure. For example, the steps recited in the present disclosure can be executed in parallel, executed in sequence, or executed in a different order, as long as the desired results of the present disclosure are achieved, and the present disclosure is not limited herein.

[0122] The specific embodiments described above are not intended to be limiting, and persons skilled in the art will appreciate that various modifications, combinations, sub-combinations and alternatives can be made to the specific embodiments without departing from the spirit and principles of the disclosure. Accordingly, the disclosure is not limited to the specific embodiments described above, but only by the scope of the appended claims.

Claims

1. A method for determining a defect detection model of an insulator, characterized in that, The method comprises: obtaining a source domain and a target domain, the source domain being a set of insulator image data with defective labels under sunny conditions, and the target domain being a set of insulator image data without defective labels under a preset concentration of foggy conditions; determining a pre-training model; wherein the pre-training model comprises a pre-training YOLO model, a feature mixing module, and a domain classifier, the pre-training YOLO model is used for image feature information extraction and defect prediction of insulator image data, the feature mixing module is used for feature mixing of image feature information output by the pre-training YOLO model to obtain mixed features, and the domain classifier is used for feature extraction and analysis of the mixed features mixed by the feature mixing module to obtain a domain classification result, the domain classification result is used to describe the probability value of the mixed feature information belonging to the source domain or the target domain; training the pre-training model based on the source domain and the target domain to obtain a defect detection model; the defect detection model is a pre-training YOLO model corresponding to a target loss of the pre-training model being less than or equal to a preset loss value, and the target loss is composed of a detection loss corresponding to the pre-training YOLO model, an MMD loss corresponding to the feature mixing module, and a classification loss corresponding to the domain classifier; constructing at least three unseen domains, inputting insulator image data in the unseen domains into the defect detection model to obtain defect prediction results corresponding to the unseen domains, determining a comparison result of the defect prediction results and the insulator image data in the unseen domains, and if the comparison result reaches a preset condition, determining that the defect detection model is an insulator defect detection model; the unseen domain is a set of insulator image data with defective labels under foggy conditions different from the target domain, and the comparison result is used to describe the similarity between the defect prediction result and the defective label of the insulator image data in the unseen domain.

2. The method of claim 1, wherein, The pre-training YOLO model comprises a feature extractor for extracting image feature information from insulator image data, wherein the image feature information at least comprises defect features in the insulator image data, and the pre-training YOLO model is further used for predicting the defect features in the insulator image data.

3. The method according to claim 1 or 2, characterized in that, Training the pre-training model based on the source domain and the target domain to obtain a defect detection model comprises: extracting features of the insulator image data in the source domain based on the feature extractor of the pre-training YOLO model to obtain first image feature information, and extracting features of the insulator image data in the target domain based on the feature extractor of the pre-training YOLO model to obtain second image feature information; determining an MMD loss based on the first image feature information and the second image feature information; determining a first mixing ratio of the first image feature information and a second mixing ratio of the second image feature information, and linearly mixing the first image feature information and the second image feature information based on the first mixing ratio and the second mixing ratio to obtain mixed feature information; the sum of the first mixing ratio and the second mixing ratio is 1. The first mixing ratio is taken as a domain label of the mixed feature information, a domain classification result is obtained by performing feature extraction analysis on the mixed feature information based on a domain classifier, and a classification loss is determined based on the domain label and the domain classification result; the domain classification result is used to describe a probability value of the mixed feature information belonging to a source domain or a target domain; A detection loss of the pre-trained YOLO model is determined, a target loss is determined based on the MMD loss, the classification loss and the detection loss, and a pre-trained YOLO model when the target loss is less than or equal to a preset loss value is taken as a defect detection model.

4. The method of claim 3, wherein, The MMD loss is determined based on the first image feature information and the second image feature information, including: The MMD loss is determined by using the following formula: ; wherein, represents the first image feature information, represents the second image feature information, is a kernel function for mapping the first image feature information and the second image feature information to a reproducing Hilbert space, is a number of samples of the source domain, is a number of samples of the target domain.

5. The method of claim 3, wherein, The first image feature information and the second image feature information are linearly mixed based on the first mixing ratio and the second mixing ratio to obtain mixed feature information, including: The mixed feature information is determined by using the following formula: ; wherein, denotes first image feature information, denotes second image feature information, is a first mixing ratio taken from the interval [0, 1] and is also a domain label for the mixed feature information, is a second mixing ratio.

6. The method of claim 3, wherein, The classification loss is determined based on the domain label and the domain classification result, including: The classification loss is determined by using the following formula: ; wherein, is the domain classification result, is the domain label of the mixed feature information, denotes the sum of the sample numbers of the source domain and the target domain.

7. The method of claim 1, wherein, After the comparison result of the defect prediction result and the insulator image data of the unseen domain is determined, the method further includes: If the comparison result does not meet a preset condition, the pre-trained model is updated based on the target loss, and the updated pre-trained model is continuously trained based on the source domain and the target domain to obtain a defect detection model. 8.A device for determining a defect detection model of an insulator, characterized by The device includes: The data acquisition module is configured to acquire a source domain and a target domain, the source domain being a set of insulator image data with defect labels under sunny conditions, and the target domain being a set of insulator image data without defect labels under a preset density of foggy conditions; The first model determination module is configured to determine a pre-trained model; wherein the pre-trained model includes a pre-trained YOLO model, a feature mixing module and a domain classifier, the pre-trained YOLO model is configured to extract image feature information and predict defects of insulator image data, the feature mixing module is configured to mix the image feature information output by the pre-trained YOLO model to obtain mixed features, and the domain classifier is configured to perform feature extraction analysis on the mixed features mixed by the feature mixing module to obtain a domain classification result, the domain classification result is used to describe a probability value of the mixed feature information belonging to a source domain or a target domain; The training module is configured to train the pre-trained model based on the source domain and the target domain to obtain a defect detection model; the defect detection model is a pre-trained YOLO model corresponding to the pre-trained model when a target loss of the pre-trained model is less than or equal to a preset loss value, and the target loss is composed of a detection loss corresponding to the pre-trained YOLO model, an MMD loss corresponding to the feature mixing module and a classification loss corresponding to the domain classifier. The second model determining module is configured to construct at least three unseen domains, input insulator image data in the unseen domains into the defect detection model to obtain defect prediction results corresponding to the unseen domains, determine a comparison result of the defect prediction results and the insulator image data in the unseen domains, and determine that the defect detection model is an insulator defect detection model if the comparison result reaches a preset condition; the unseen domains are a set of insulator image data with defect labels under different fog conditions corresponding to the target domain, and the comparison result is used to describe a similarity between the defect prediction result and the defect labels of the insulator image data in the unseen domains.

9. An electronic device, comprising: The electronic device includes: at least one processor; and a memory connected to the at least one processor in communication; wherein the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to perform the insulator defect detection model determination method in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer instructions, and the computer instructions are used to enable the processor to implement the insulator defect detection model determination method in any one of claims 1-7 when executed.

Citation Information

Patent Citations

  • Domain-adaptive object surface defect detection method and system, and storage medium

    CN115564752A

  • Identification method for insulators of different materials in power transmission line and storage medium

    CN115908315A