Equipment defect sample generation method and device, computer equipment and storage medium
By constructing a target power equipment model, using finite element analysis and dynamic parameter correction of chemical models, and combining cross-domain color fusion and dynamic confidence threshold algorithms, highly diverse defect samples are generated. This solves the problems of sample scarcity and poor generalization of power equipment defect detection models, and achieves efficient automated annotation and closed-loop training, thereby improving the accuracy and adaptability of the detection model.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- NANJING PANENG TECHNOLOGY DEVELOPMENT CO LTD
- Filing Date
- 2025-12-22
- Publication Date
- 2026-04-21
AI Technical Summary
Existing power equipment defect detection models suffer from insufficient sample diversity and poor generalization due to the scarcity of defect samples. Furthermore, existing 3D modeling methods do not consider the high load and highly corrosive environment characteristics of power equipment, resulting in low simulation accuracy and low similarity between synthesized images and real scenes, which increases the workload of manual annotation.
By constructing an equipment model of the target power equipment, using finite element analysis and chemical model to dynamically correct parameters, and combining a cross-domain color fusion model and a dynamic confidence threshold algorithm, highly diverse defect samples are generated. Automated annotation and closed-loop training are then performed to optimize the defect detection model.
It improves the generalization ability and accuracy of the defect detection model, reduces the workload of manual annotation, enhances the similarity between synthetic images and real scenes, and strengthens the physical authenticity and scene adaptability of defect samples.
Smart Images

Figure CN121904498A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of power technology, and in particular to a method, apparatus, computer equipment, and storage medium for generating equipment defect samples. Background Technology
[0002] With the development of power systems, manual inspections can no longer meet the ever-increasing maintenance needs. Therefore, power equipment defect detection models have emerged. These models are used to automatically analyze inspection images of power equipment to automatically detect defects. However, due to the generally scarce availability of defect samples in power equipment, the training data for these models is limited.
[0003] Traditional techniques employ image enhancement methods such as rotation, cropping, brightness adjustment, and mirroring to process original defect samples and expand their quantity. However, these techniques only allow for geometric or lighting changes at the image level of the original defect samples, resulting in insufficient diversity, a defect simulation error of 35.2%, and scene similarity below 60%, leading to poor generalization of the defect detection model. Existing 3D modeling methods require actual equipment scanning, do not consider material constitutive equations, directly use artificial fracture mechanics models with fixed material parameters, resulting in low simulation accuracy. Furthermore, they fail to consider the high-load, highly corrosive environment of power equipment, leading to severe data manifold discontinuities in the generated defects. Recent interdisciplinary research shows that embedding materials mechanics into the data can improve the physical consistency of synthesized defects by 70%. This provides a theoretical basis for the physics engine-based defect generation proposed in this invention, fundamentally solving the data manifold discontinuity problem by coupling finite element analysis, fracture mechanics, and electrochemical corrosion models.
[0004] Most existing methods for generating 3D defect models rely on background generation using Photoshop or computer vision. This approach fails to account for various real-world scenarios. Traditional image synthesis methods (such as StyleGAN) only consider general scene lighting and do not adapt to the high reflectivity and dirty color characteristics of power equipment (e.g., gray-black flashing dirt on insulators). This results in synthesized images having a similarity of less than 60% to real substation scenes. Furthermore, the synthesized images require manual annotation and verification, increasing the workload of annotators and proving both cumbersome and time-consuming. In existing technologies, defect annotation thresholds are often fixed values (e.g., 0.5), failing to consider the differences in the types of defects in power equipment. Defects are easily affected by background interference, leading to large fluctuations in confidence levels. Fixed thresholds result in high false positives, causing a decrease in detection rates. Summary of the Invention
[0005] Therefore, it is necessary to provide a method, apparatus, computer device, and storage medium for generating equipment defect samples that can enhance the diversity of defect samples and thus improve the generalization ability of defect detection models, in order to address the above-mentioned technical problems.
[0006] In a first aspect, this application provides a method for generating equipment defect samples, including:
[0007] The equipment model of the target power equipment is constructed based on the modeling data of the target power equipment. The modeling data is determined by the initial defect detection model after detecting defects in the original dataset. The original dataset includes the corresponding initial defect samples and normal state data. The modeling data is the normal state data collected by the multi-view acquisition system of the target power equipment inspection image, and the modeling data is three-dimensional point cloud data.
[0008] The stress field of the equipment model is calculated using finite element analysis, and the parameters of the pre-selected physical field model or chemical model are dynamically corrected based on the product of the actual operating environment parameters of the target power equipment and the load weight coefficient. Using the dynamically corrected physical field model or chemical model and the stress field, various defect models of the target power equipment are determined.
[0009] Various defect models are rendered in an image format, and a cross-domain chromaticity fusion model that includes the device reflectivity factor is used to perform chromaticity fusion processing on the rendered image to obtain preliminary defect samples.
[0010] The confidence threshold for each defect category is dynamically set based on the defect category of the target power equipment, and the initial defect samples are screened for credibility based on the confidence threshold to obtain the target defect samples of the target power equipment.
[0011] In one embodiment, the method further includes: performing defect detection on the initial defect sample using an initial defect detection model to obtain an initial defect detection result; the initial defect detection result includes a defect category and a defect detection value;
[0012] The number of each defect category is determined based on the initial defect detection results, and the initial defect samples corresponding to the defect categories with a number lower than the target value are determined as the first defect samples.
[0013] The initial defect sample whose defect detection value is lower than the defect detection threshold is identified as the second defect sample;
[0014] The normal state data corresponding to the first defect sample and the second defect sample are determined as the modeling data.
[0015] In one embodiment, the defect model includes a crack defect model, and the physical field model includes Paris's law; based on the equipment model, finite element analysis and physical field or chemical models are used to determine various defect models of the target power equipment, including:
[0016] Finite element analysis was used to determine the nodal displacement data of the equipment model, and the stress field of the equipment model was determined based on the nodal displacement data.
[0017] The parameters of the Paris rule are dynamically matched by the power equipment material database, and the parameters of the Paris rule are corrected based on the environmental factor and the load weight factor to obtain the corrected parameters.
[0018] The modified Paris rule is determined based on the modified parameters, and the crack propagation rate of the device model is determined based on the stress field and the modified Paris rule.
[0019] The crack defect model is determined based on the crack propagation rate.
[0020] In one embodiment, constructing a device model of the target power equipment based on modeling data of the target power equipment includes:
[0021] Construct a 3D model of the target power equipment based on the modeling data;
[0022] The target material is determined based on the material properties of the target power equipment, and the target material is configured into the 3D model to obtain the equipment model.
[0023] Secondly, this application also provides an automated annotation and closed-loop training method for a defect detection model, including target defect samples generated in the first aspect, the method comprising:
[0024] Based on the target defect sample, a dynamic prompt word algorithm is used to generate text prompt words for the defect background. Based on the text prompt words, the target defect sample, and the image synthesis model, a synthesized defect sample is generated. The dynamic prompt word algorithm includes: mapping the target power equipment type to the corresponding keywords of the target power equipment, and combining the mapped keywords with the actual operating environment parameters of the target power equipment to generate text prompt words for synthesizing multi-view target defect samples.
[0025] Based on the material properties of the target power equipment and the actual operating environment parameters of the target power equipment, a cross-domain colorimetric fusion model including the equipment reflectivity factor is constructed, and the cross-domain colorimetric fusion model is used to perform colorimetric fusion on the synthesized defect sample to obtain the fused defect sample.
[0026] An initial defect detection model is used to detect defects in the fused defect samples to obtain the target defect detection results; the target defect detection results include the defect category and the detection confidence level.
[0027] Based on the defect categories of the target power equipment, the confidence threshold for each defect category is dynamically determined; and the fused defect samples corresponding to the detection confidence scores greater than the confidence threshold are identified as training samples. The initial defect detection model is updated using the training fused samples to obtain the target defect detection model; the confidence threshold is dynamically adjusted according to the statistical distribution of historical detection confidence scores, the type of target power equipment, and the defect category.
[0028] Based on the test accuracy of the target defect detection model in real-world scenarios, the parameters of the pre-selected physical field model or chemical model are adjusted accordingly.
[0029] The core innovation of the automated annotation and closed-loop training method for a defect detection model provided in this application lies in its reliance on physically realistic target defect samples generated by the device defect sample generation method described in the first aspect. A dynamic confidence threshold algorithm is used to screen the generated target defect samples, obtaining high-confidence samples for training and optimizing the target defect detection model, ultimately improving its accuracy and generalization ability in real-world scenarios. Furthermore, based on the feedback from the accuracy in real-world testing, the parameters of a pre-selected physical field model or chemical model are adjusted, thus forming a closed-loop system. This solves the problem of poor generalization caused by insufficient sample realism in traditional training methods. This dependency ensures the uniqueness and technological advancement of the training method.
[0030] Thirdly, this application also provides an apparatus for generating equipment defect samples, comprising:
[0031] The construction module is used to construct the equipment model of the target power equipment based on the modeling data of the target power equipment. The modeling data is determined by the initial defect detection model after detecting defects in the original dataset. The original dataset includes the corresponding initial defect samples and normal state data. The modeling data is the normal state data collected by the multi-view acquisition system of the target power equipment inspection image, and the modeling data is three-dimensional point cloud data.
[0032] The defect simulation module is used to calculate the stress field of the equipment model using finite element analysis, and dynamically corrects the parameters of the pre-selected physical field model or chemical model based on the product of the actual operating environment parameters of the target power equipment and the load weight coefficient; using the dynamically corrected physical field model or chemical model and stress field, various defect models of the target power equipment are determined.
[0033] The first acquisition module is used to perform image rendering on various defect models, and to perform color fusion processing on the image-rendered image using a cross-domain color fusion model that includes the device reflectivity factor, so as to obtain preliminary defect samples.
[0034] The second acquisition module is used to dynamically set the confidence threshold for each defect category based on the defect category of the target power equipment, and to perform confidence screening on the preliminary defect samples based on the confidence threshold to obtain the target defect samples of the target power equipment.
[0035] Fourthly, this application also provides an automated annotation and closed-loop training device for a defect detection model, comprising:
[0036] The generation module is used to generate text prompts for the defect background based on the target defect sample using a dynamic prompt word algorithm, and to generate a synthesized defect sample based on the text prompts, the target defect sample, and the image synthesis model. The dynamic prompt word algorithm includes: mapping the target power equipment type to the corresponding keywords of the target power equipment, and combining the mapped keywords with the actual operating environment parameters of the target power equipment to generate text prompts for synthesizing multi-view target defect samples.
[0037] The fusion module is used to construct a cross-domain colorimetric fusion model that includes the reflectivity factor of the equipment based on the material characteristics and actual operating environment parameters of the target power equipment. The cross-domain colorimetric fusion model is then used to perform colorimetric fusion on the synthesized defect sample to obtain the fused defect sample.
[0038] The detection module is used to perform defect detection on the fused defect samples using the initial defect detection model, and obtain the target defect detection result; the target defect detection result includes the defect category and the detection confidence level.
[0039] The model update module is used to dynamically determine the confidence threshold for each defect category based on the defect category of the target power equipment; and to determine the fused defect samples corresponding to the detection confidence scores greater than the confidence threshold as training samples. The initial defect detection model is updated using the training fused samples to obtain the target defect detection model; the confidence threshold is dynamically adjusted according to the statistical distribution of historical detection confidence scores, the type of target power equipment, and the defect category.
[0040] A parameter adjustment module is used to adjust the parameters of a pre-selected physical field model or chemical model based on the test accuracy of the target defect detection model in a real-world scenario. Fifthly, this application also provides a computer device, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to perform the following steps:
[0041] The equipment model of the target power equipment is constructed based on the modeling data of the target power equipment. The modeling data is determined by the initial defect detection model after detecting defects in the original dataset. The original dataset includes the corresponding initial defect samples and normal state data. The modeling data is the normal state data collected by the multi-view acquisition system of the target power equipment inspection image, and the modeling data is three-dimensional point cloud data.
[0042] The stress field of the equipment model is calculated using finite element analysis, and the parameters of the pre-selected physical field model or chemical model are dynamically corrected based on the product of the actual operating environment parameters of the target power equipment and the load weight coefficient. Using the dynamically corrected physical field model or chemical model and the stress field, various defect models of the target power equipment are determined.
[0043] Various defect models are rendered in an image format, and a cross-domain chromaticity fusion model that includes the device reflectivity factor is used to perform chromaticity fusion processing on the rendered image to obtain preliminary defect samples.
[0044] The confidence threshold for each defect category is dynamically set based on the defect category of the target power equipment, and the initial defect samples are screened for credibility based on the confidence threshold to obtain the target defect samples of the target power equipment.
[0045] Sixthly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:
[0046] Based on the target defect sample, a dynamic prompt word algorithm is used to generate text prompt words for the defect background. Based on the text prompt words, the target defect sample, and the image synthesis model, a synthesized defect sample is generated. The dynamic prompt word algorithm includes: mapping the target power equipment type to the corresponding keywords of the target power equipment, and combining the mapped keywords with the actual operating environment parameters of the target power equipment to generate text prompt words for synthesizing multi-view target defect samples.
[0047] Based on the material properties of the target power equipment and the actual operating environment parameters of the target power equipment, a cross-domain colorimetric fusion model including the equipment reflectivity factor is constructed, and the cross-domain colorimetric fusion model is used to perform colorimetric fusion on the synthesized defect sample to obtain the fused defect sample.
[0048] An initial defect detection model is used to detect defects in the fused defect samples to obtain the target defect detection results; the target defect detection results include the defect category and the detection confidence level.
[0049] Based on the defect categories of the target power equipment, the confidence threshold for each defect category is dynamically determined; and the fused defect samples corresponding to the detection confidence scores greater than the confidence threshold are identified as training samples. The initial defect detection model is updated using the training fused samples to obtain the target defect detection model; the confidence threshold is dynamically adjusted according to the statistical distribution of historical detection confidence scores, the type of target power equipment, and the defect category.
[0050] Based on the test accuracy of the target defect detection model in real-world scenarios, the parameters of the pre-selected physical field model or chemical model are adjusted accordingly.
[0051] In a seventh aspect, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the following steps:
[0052] The equipment model of the target power equipment is constructed based on the modeling data of the target power equipment. The modeling data is determined by the initial defect detection model after detecting defects in the original dataset. The original dataset includes the corresponding initial defect samples and normal state data. The modeling data is the normal state data collected by the multi-view acquisition system of the target power equipment inspection image, and the modeling data is three-dimensional point cloud data.
[0053] The stress field of the equipment model is calculated using finite element analysis, and the parameters of the pre-selected physical field model or chemical model are dynamically corrected based on the product of the actual operating environment parameters of the target power equipment and the load weight coefficient. Using the dynamically corrected physical field model or chemical model and the stress field, various defect models of the target power equipment are determined.
[0054] Various defect models are rendered in an image format, and a cross-domain chromaticity fusion model that includes the device reflectivity factor is used to perform chromaticity fusion processing on the rendered image to obtain preliminary defect samples.
[0055] The confidence threshold for each defect category is dynamically set based on the defect category of the target power equipment, and the initial defect samples are screened for credibility based on the confidence threshold to obtain the target defect samples of the target power equipment.
[0056] Eighthly, this application also provides a computer-readable storage medium including a computer program that, when executed by a processor, performs the following steps:
[0057] Based on the target defect sample, a dynamic prompt word algorithm is used to generate text prompt words for the defect background. Based on the text prompt words, the target defect sample, and the image synthesis model, a synthesized defect sample is generated. The dynamic prompt word algorithm includes: mapping the target power equipment type to the corresponding keywords of the target power equipment, and combining the mapped keywords with the actual operating environment parameters of the target power equipment to generate text prompt words for synthesizing multi-view target defect samples.
[0058] Based on the material properties of the target power equipment and the actual operating environment parameters of the target power equipment, a cross-domain colorimetric fusion model including the equipment reflectivity factor is constructed, and the cross-domain colorimetric fusion model is used to perform colorimetric fusion on the synthesized defect sample to obtain the fused defect sample.
[0059] An initial defect detection model is used to detect defects in the fused defect samples to obtain the target defect detection results; the target defect detection results include the defect category and the detection confidence level.
[0060] Based on the defect categories of the target power equipment, the confidence threshold for each defect category is dynamically determined; and the fused defect samples corresponding to the detection confidence scores greater than the confidence threshold are identified as training samples. The initial defect detection model is updated using the training fused samples to obtain the target defect detection model; the confidence threshold is dynamically adjusted according to the statistical distribution of historical detection confidence scores, the type of target power equipment, and the defect category.
[0061] Based on the test accuracy of the target defect detection model in real-world scenarios, the parameters of the pre-selected physical field model or chemical model are adjusted accordingly.
[0062] The aforementioned equipment defect sample generation method, apparatus, computer equipment, and storage medium construct an equipment model of the target power equipment based on its modeling data. This modeling can be completed without relying on the actual target power equipment, improving the efficiency of equipment model construction and ensuring the realism of the equipment model. The modeling data is determined by the initial defect detection model and the original dataset of the target power equipment. The original dataset includes corresponding initial defect samples and normal state data, while the modeling data is the normal state data. Based on the equipment model, finite element analysis and physical field or chemical models are used to determine various defect models of the target power equipment, enhancing the diversity of defect models. A model data visualization processing algorithm is applied to various defect models to obtain target defect samples of the target power equipment, significantly improving the physical realism and scene adaptability of the generated defect samples, ensuring the diversity of defect samples, and thus enhancing the generalization ability of the defect detection model. Attached Figure Description
[0063] To more clearly illustrate the technical solutions in the embodiments or related technologies of this application, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0064] Figure 1 This is an application environment diagram of the device defect sample generation method in one embodiment;
[0065] Figure 2 This is a flowchart illustrating a method for generating device defect samples in one embodiment;
[0066] Figure 3 This is a structural block diagram of a device defect sample generation device in one embodiment;
[0067] Figure 4 This is a structural block diagram of an automated annotation and closed-loop training device for a defect detection model in one embodiment. Detailed Implementation
[0068] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0069] The equipment defect sample generation method provided in this application embodiment can be applied to, for example... Figure 1 In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be integrated onto server 104 or placed in the cloud or on another network server. Terminal 102 sends a device defect sample generation request to server 104. Server 104 receives the request and constructs a device model of the target power equipment based on the modeling data of the target power equipment. The modeling data is determined by the initial defect detection model after defect detection on the original dataset. The original dataset includes corresponding initial defect samples and normal state data. The modeling data is the normal state data collected by the multi-view acquisition system of the target power equipment inspection images, and the modeling data is three-dimensional point cloud data. Based on the device model, finite element analysis and physical field models or chemical models are used to determine various defect models of the target power equipment. A model data visualization processing algorithm is used for each defect model to obtain the target defect sample of the target power equipment. During the finite element analysis process, by optimizing the mesh generation algorithm (such as adaptive mesh parameters, setting the stress region mesh size to 8mm), redundant data in the computation nodes is reduced, thereby reducing memory usage and CPU computation time, and improving the efficiency of physical simulation. The dynamic prompt word algorithm employs a distributed computing framework to parallelize the prompt word generation task, utilizing GPUs to accelerate text rendering and reduce I / O latency. The dynamic confidence threshold algorithm optimizes storage access patterns by caching historical confidence data, avoiding redundant computations and improving model inference speed. These optimizations ensure the algorithm is technically compatible with the computer's internal architecture (such as memory and processor), directly improving hardware resource utilization. Terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, and smart in-vehicle devices. Portable wearable devices can include smartwatches, smart bracelets, and head-mounted devices. Server 104 can be implemented using a standalone server or a server cluster consisting of multiple servers.
[0070] Firstly, such as Figure 2 As shown, a method for generating equipment defect samples is provided, which can be applied to... Figure 1Taking the server in the example, the explanation includes the following steps 202 to 208. Wherein:
[0071] Step 202: Construct the equipment model of the target power equipment based on the modeling data of the target power equipment. The modeling data is determined by the initial defect detection model after detecting defects in the original dataset. The original dataset includes the corresponding initial defect samples and normal state data. The modeling data is the normal state data collected by the multi-view acquisition system of the target power equipment inspection image, and the modeling data is three-dimensional point cloud data.
[0072] The target power equipment can be electrical equipment, mechanical equipment, pipeline equipment, etc. The initial defect sample consists of images and physical feature data of the target power equipment when it is in a defective state, representing its structural or physical characteristics when an anomaly occurs. The normal state data consists of images and physical feature data of the target power equipment when it is in a normal state and no anomalies are observed. There is a correspondence between the initial defect sample and the normal state data, providing benchmark data for the subsequent construction of the target power equipment model. The initial defect detection model is used to perform defect detection on the initial defect sample, obtaining the corresponding defect detection results.
[0073] For example, based on the initial defect detection model, defect detection is performed on the initial defect samples in the original dataset to obtain initial defect detection results. Based on these initial defect detection results, sample data that meets preset conditions is selected from the initial defect samples to obtain the selected initial defect samples. The normal state data corresponding to these selected initial defect samples is then used as modeling data. The preset conditions are determined by the initial defect detection results and the defect detection threshold.
[0074] Step 204: The stress field of the equipment model is calculated using finite element analysis, and the parameters of the pre-selected physical field model or chemical model are dynamically corrected based on the product of the actual operating environment parameters of the target power equipment and the load weight coefficient; using the dynamically corrected physical field model or chemical model and the stress field, various defect models of the target power equipment are determined.
[0075] Among them, the physical field model refers to a comprehensive mathematical model that considers the interaction between multiple physical phenomena, such as Paris's rule. The defect model refers to a model with specific defect morphology obtained by finite element analysis and simulation using physical field models or chemical models based on the equipment model of the target power equipment. This defect model can include crack defect models, aging damage defect models, corrosion defect models, etc.
[0076] Optionally, finite element analysis is used to mesh the equipment model of the target power equipment to obtain a finite element model of the target power equipment. Based on the finite element model of the target power equipment, according to the defect model to be simulated, the corresponding physical field model or chemical model is called to generate the corresponding defect model, such as calling the Paris rule to simulate a crack defect model, calling an electrochemical corrosion model to simulate a rust defect model, and using a material degradation model to simulate an aging and damage defect model. Specifically, taking the simulation of a crack defect model as an example, based on the finite element model of the target power equipment, corresponding actual operating environment parameters (such as environmental corrosion coefficients) and load weight coefficients are introduced into the coupling environment of the physical field model (Paris rule) to dynamically correct the parameters of the physical field model (Paris rule) to obtain a corrected physical field model (Paris rule). Based on the corrected physical field model and the stress field determined by the finite element model of the target power equipment, the crack propagation rate is obtained. Then, based on the crack propagation rate, the equipment model is subjected to a target number of load cycles, so that the geometry of the equipment model is continuously updated and changed to obtain the crack defect model.
[0077] Step 206: Render the various defect models into images, and use a cross-domain chromaticity fusion model that includes the device reflectivity factor to perform chromaticity fusion processing on the rendered images to obtain preliminary defect samples.
[0078] Optionally, multi-view image rendering technology is employed to render the defect model from different angles, generating an image dataset containing the geometric and surface feature information of the defect model, thus obtaining target defect samples of the target power equipment. Specifically, considering the compatibility of the initial defect detection model, the RGB three channels are selected for mapping to obtain the image dataset, RGB textures are created, stress data is mapped to the R channel, temperature data to the G channel, and defect data to the B channel, and these are combined. Finally, multi-angle output is performed to obtain preliminary defect samples.
[0079] Step 208: Dynamically set the confidence threshold for each defect category based on the defect category of the target power equipment, and perform confidence screening on the preliminary defect samples based on the confidence threshold to obtain the target defect samples of the target power equipment.
[0080] Optionally, defect data generated during the historical operation or testing of the target power equipment is acquired, and a corresponding confidence threshold is set for each defect category based on the defect data. For example, the confidence threshold is increased accordingly for defect categories with high historical false alarm rates. The confidence score of each preliminary defect sample is compared with the confidence threshold corresponding to its defect category, and all preliminary defect samples with confidence scores not lower than the corresponding confidence threshold are selected and retained, thereby constructing a high-fidelity target defect sample that conforms to the real defect characteristics of the target power equipment. Specifically, a pre-trained deep feature extraction network can be used to analyze the similarity of the distribution of the preliminary defect sample and the real defect image in the feature space to obtain the confidence score of the preliminary defect sample; alternatively, the confidence score of the preliminary defect sample can be determined based on the degree of conformity between the defect geometric parameters and physical constraints.
[0081] In the aforementioned method for generating equipment defect samples, an equipment model of the target power equipment is constructed based on the modeling data of the target power equipment. This modeling can be completed without relying on the actual target power equipment, improving the efficiency of equipment model construction and ensuring the realism of the equipment model. The modeling data is determined by the initial defect detection model and the original dataset of the target power equipment. The original dataset includes the corresponding initial defect samples and normal state data, while the modeling data is the normal state data. Based on the equipment model, finite element analysis and physical field models or chemical models are used to determine various defect models of the target power equipment, which can improve the diversity of defect models. The model data visualization processing algorithm is used on various defect models to obtain the target defect samples of the target power equipment, which can significantly improve the physical realism and scene adaptability of the generated defect samples, ensure the diversity of defect samples, and thus enhance the generalization ability of the defect detection model.
[0082] In an exemplary embodiment, the method further includes: performing defect detection on the initial defect sample using an initial defect detection model to obtain an initial defect detection result; the initial defect detection result includes a defect category and a defect detection value; determining the number of each defect category based on the initial defect detection result, and determining the initial defect sample corresponding to the defect category with a number lower than a target value as the first defect sample; determining the initial defect sample corresponding to the defect detection value lower than the defect detection threshold as the second defect sample; and determining the normal state data corresponding to the first defect sample and the second defect sample as modeling data.
[0083] For example, an initial defect detection model is used to detect defects in the initial defect samples, resulting in initial defect detection results. These results include a corresponding defect category and a defect detection value. The defect categories corresponding to all initial defect detection results are then classified and statistically analyzed to determine the number of each category. Defect categories with a number lower than a target value are selected, and the initial defect samples corresponding to these selected categories are designated as the first defect samples. The target value is set according to actual conditions and is not specifically limited here. The defect detection values corresponding to all initial defect detection results are compared with a defect detection threshold. The initial defect samples with defect detection values lower than the threshold are designated as the second defect samples.
[0084] In the original dataset, the normal state data corresponding to the first and second defect samples are determined, and this normal state data is used as the modeling data. This normal state data may include equipotential bonding rings, grounding leads, capacitors, etc.
[0085] In this embodiment, an initial defect detection model is used to detect defects in the initial defect samples to obtain initial defect detection results. Based on the initial defect detection results and defect detection thresholds, a first defect sample and a second defect sample are obtained. Then, normal state data corresponding to the first and second defect samples are determined in the original dataset. The normal state data corresponding to the first and second defect samples are used to construct the equipment model of the target power equipment. That is, the equipment model of the target power equipment is constructed by using defect samples with low defect detection values and normal state data corresponding to a small number of defect categories. This can generate a large number of high-quality defect samples in a targeted manner, effectively making up for the data gap of defect samples with low defect detection values and a small number of defect categories.
[0086] In an exemplary embodiment, constructing a device model of the target power equipment based on the modeling data of the target power equipment includes: constructing a three-dimensional model of the target power equipment based on the modeling data; determining the target material based on the material characteristics of the target power equipment; and configuring the target material into the three-dimensional model to obtain the device model.
[0087] Based on the modeling data, a 3D model of the target power equipment in its normal state was constructed using 3ds Max. Specifically, the 3D modeling environment used millimeter units, with the scene frame rate set to 25fps, gamma value to 2.2, and rendering precision to 16 samples, and global illumination and ambient occlusion effects enabled. Optionally, the modeling data included the geometric parameters, structural features, and shape of the target power equipment. When modeling the target power equipment in 3D, the front view, top view, and side view of the target power equipment were determined based on the modeling data, and these views were designated as reference images. These reference images were imported into 3ds Max and placed on two-dimensional planes in 3D space for spatial alignment. Furthermore, the opacity of the imported reference images was adjusted to 50%, and after calibrating the size, scale, and position of the reference images, they were set to an uneditable state, making them readily available as a reference for constructing the 3D model of the target power equipment.
[0088] For example, taking a 10kV parallel capacitor as the target power equipment, a 3D model of the target power equipment is constructed. The capacitor consists of components such as a shell, terminals, and insulator bushings, with standard dimensional parameters of 650mm height, 320mm diameter, and 3mm shell thickness. The basic outline of the capacitor is created, the main frame of the capacitor is constructed, and custom parameters are set for key dimensions. A reference circle with a diameter of 320mm is drawn in the view as the modeling datum for the capacitor; a local coordinate system is established with the center of the capacitor's bottom surface as the origin, the Z-axis as the height direction, and the X-axis as the radial reference direction. The basic outline is created with an outer radius of 160mm, an inner radius of 157mm, an inner wall thickness of 3mm, and a height of 600mm. The top and bottom edges are chamfered to simulate actual edge-rolling. The insulating sleeve is modeled, drawing a trapezoidal outline with a bottom diameter of 80mm, a top diameter of 50mm, and a height of 100mm. A flange with radius 1 of 100mm, radius 2 of 81mm (1mm gap with the sleeve), and a height of 10mm is created, aligned with the bottom of the sleeve, and embedded in the top of the capacitor casing. The terminal block is modeled, creating a hexagonal terminal body with a length of 20mm, a width of 20mm, a height of 30mm, and a chamfer value of 2mm, aligned with the center of the top of the sleeve. A bolt hole with a diameter of 10mm is created, penetrating the terminal block to construct the complete 3D model of the capacitor.
[0089] The target material is determined based on the material properties of the target power equipment, and then configured into the 3D model. That is, physical material properties are assigned to the 3D model of the target power equipment based on these material properties. These physical material properties include elastic modulus, Poisson's ratio, yield strength, etc. For example, for metallic material properties, the target material is determined to be aluminum alloy. Furthermore, the resolution texture of the 3D model is set to 4K to facilitate the subsequent evolution of defects, and physical property mapping is performed on the 3D model, ensuring that all texture maps are accurately aligned with the UVW coordinates to obtain the equipment model. A mapping table between target materials and parameters is created to record the parameters corresponding to each target material, providing data support for subsequent finite element analysis.
[0090] Compared to traditional techniques that use simplified / fixed material parameters, resulting in low simulation accuracy and non-compliance with physical laws in equipment models, this embodiment determines the target material based on the material characteristics of the target power equipment and configures the target material into the three-dimensional model. This improves the realism of the equipment model in terms of material and surface texture, thereby ensuring the simulation accuracy of the equipment model.
[0091] In an exemplary embodiment, the defect model includes a crack defect model, and the physical field model includes the Paris rule. Based on the equipment model, multiple defect models of the target power equipment are determined using finite element analysis and physical field or chemical models, including: determining the nodal displacement data of the equipment model using finite element analysis, and determining the stress field of the equipment model based on the nodal displacement data; dynamically matching the Paris rule parameters through a power equipment material database, and correcting the Paris rule parameters based on environmental factors and load weighting factors to obtain corrected parameters; determining the corrected Paris rule based on the corrected parameters, and determining the crack propagation rate of the equipment model according to the stress field and the corrected Paris rule; and determining the crack defect model according to the crack propagation rate.
[0092] The power equipment materials database includes a database system containing parameters such as material physical properties, mechanical parameters, fatigue and corrosion characteristics, and environmental response coefficients. Environmental coefficients include environmental corrosion coefficients, and load weighting coefficients include load weighting coefficients.
[0093] Optionally, based on the finite element analysis method, the equipment model is adaptively meshed. Specifically, the mesh size for the stress region is set to 8 mm, and for other regions, it is 35 mm. Since the target power equipment operates under different temperature, load, and environmental conditions, and these conditions affect its performance, a 3DsMAX model is integrated into finite element software (such as ANSYS) according to the actual operating conditions of the target power equipment. Multiphysics parameters (such as ambient temperature from -10°C to 40°C and rated load of 1.0-1.2 times) are input to adapt to different ambient temperatures and loads for stress distribution calculation.
[0094] For example, consider generating a crack defect model. Finite element analysis is used to determine the nodal displacement data of the equipment model. and based on The deformation gradient tensor F of the device model is calculated using the gradient operator. The formula for calculating the deformation gradient tensor F is as follows:
[0095]
[0096] In the above formula, for The unit tensor. Based on this deformation gradient tensor F, the stress field of the device model, which is directly related to the material constitutive relation, is determined, thus obtaining the stress distribution results. The stress intensity factor is then determined based on these stress distribution results. .
[0097] The Paris rule is used in the stress concentration region of the device model to determine the crack propagation rate in that region. The Paris rule is as follows:
[0098]
[0099] In the above formula, This represents the crack propagation rate. and All are Paris constants. This is the stress intensity factor, determined by the stress distribution results of the equipment model. In this embodiment, it will... The value was set to 2.8, and the parameters of the Paris rule were adjusted based on the environmental factor and the load weighting factor. Make corrections, specifically. It is obtained by combining the environmental corrosion coefficient and the load weighting coefficient. The calculation formula is as follows:
[0100]
[0101] In the above formula, The reference crack propagation coefficient of the target power equipment material is measured experimentally under standard laboratory conditions (typically room temperature, non-corrosive environment, and standard load). The environmental corrosion coefficient is determined by the equipment operating environment. For example, the outdoor environmental corrosion coefficient is 1.8, and the indoor environmental corrosion coefficient is 1.0. This is the load weighting coefficient, determined by the equipment load status. It is 2.0 under heavy load and 1.0 under normal conditions.
[0102] After determining the crack propagation rate of the equipment model based on Paris's rule, the equipment model is subjected to a target number of load cycles based on the determined crack propagation rate, so that the geometry of the equipment model is continuously updated and changed to obtain the crack defect model.
[0103] In this embodiment, finite element analysis, along with physical field models or chemical models, is used to determine various defect models of the target power equipment, thereby improving the realism and physical consistency of the defect models. Furthermore, dynamically fusing the defect generation process using the product relationship between the environmental corrosion coefficient and the load weight coefficient can enhance the reliability of the defect models.
[0104] Secondly, an automated annotation and closed-loop training method for a defect detection model is proposed, including the target defect sample generated in the first aspect. This method includes: generating text prompts for the defect background using a dynamic prompt word algorithm based on the target defect sample; and generating synthesized defect samples based on the text prompts, the target defect sample, and an image synthesis model. The dynamic prompt word algorithm includes: mapping keywords corresponding to the target power equipment type, and combining the mapped keywords with the actual operating environment parameters of the target power equipment to generate text prompts for synthesizing multi-view target defect samples. Based on the material characteristics of the target power equipment and the actual operating environment parameters of the target power equipment, a cross-domain chromaticity fusion model including the equipment reflectivity factor is constructed, and cross-domain chromaticity fusion is employed. The model performs colorimetric fusion on the synthetic defect samples to obtain fused defect samples; the initial defect detection model is then used to detect defects in the fused defect samples to obtain target defect detection results; the target defect detection results include defect category and detection confidence level; based on the defect category of the target power equipment, the confidence threshold for each defect category is dynamically determined; and fused defect samples with detection confidence levels greater than the confidence threshold are identified as training samples. The initial defect detection model is updated using the training fused samples to obtain the target defect detection model; the confidence threshold is dynamically adjusted based on the statistical distribution of historical detection confidence levels, the type of target power equipment, and the defect category; based on the test accuracy of the target defect detection model in real-world scenarios, the parameters of the pre-selected physical field model or chemical model are adjusted accordingly.
[0105] In this embodiment, the target defect samples generated in the first aspect are automatically labeled and trained in a closed loop. This includes: generating a background adapted to the power scenario based on a dynamic prompt word algorithm; performing illumination fusion using a cross-domain color fusion model to obtain fused defect samples; applying a dynamic confidence threshold algorithm to select high-quality training samples from the fused defect samples to train and update the initial defect detection model, thus obtaining the target defect detection model; and adjusting the parameters of a pre-selected physical field model or chemical model based on the test accuracy of the target defect detection model on power equipment in a real-world scenario, thereby initiating a new round of sample generation and target detection model training with higher data quality. This method significantly improves the accuracy of the target defect detection model in power scenarios, reduces the workload of labelers, and increases efficiency.
[0106] Specifically, the generated target defect samples undergo alpha channel checks to determine their normality and prevent the generated images from lacking channels. After channel checks, a dynamic prompt word algorithm is constructed. The text prompt words generated by this algorithm, along with the target defect samples, are input into the image synthesis model to generate different backgrounds for each target defect sample, resulting in synthesized defect samples. Specifically, keywords corresponding to the target power equipment type (e.g., capacitor, substation) are mapped, and combined with the mapped keywords, actual operating environment parameters of the target power equipment, and the target shooting angle, the dynamic prompt word algorithm generates text prompt words for synthesizing multi-view target defect samples. The actual operating environment parameters of the target power equipment can include the season, lighting conditions, and environmental characteristics. For example, based on the conditions "capacitor background in an outdoor substation scene in winter, midday sunlight on a sunny day, and a 3-meter upward viewing angle from the equipment," the dynamic prompt word algorithm generates text prompt words corresponding to the target defect samples to achieve accurate generation of the defect backgrounds corresponding to the target defect samples. The text prompts corresponding to each target defect sample are determined. The target defect samples and their corresponding text prompts are then input into an image synthesis model to generate synthesized defect samples. A colorimetric fusion model is used to adapt the synthesized defect samples to lighting conditions. This colorimetric fusion model is a cross-domain colorimetric constraint optimization algorithm. This algorithm incorporates weights based on the reflectivity of the target power equipment material and parameters specific to the equipment scene, automatically synthesizing the reflectivity of the target power equipment and the ambient lighting characteristics with the synthesized defect samples and outputting them in batches. The calculation process of this colorimetric fusion model is shown below:
[0107]
[0108] In the above formula, The hue gradient of the HSV (Hue, Saturation, Value) color space. For hue gradient matching, where This is a reflectivity factor for target electrical equipment, used to compensate for the high reflectivity of metal equipment. To ensure KL three-dimensional constraint on color distribution consistency, For color distribution similarity, As an adaptive factor, To generate a foreground image of the defect, Background image generated for the image synthesis model.
[0109] In this embodiment, the characteristics of the target power equipment and ambient lighting are converted into the HSV color space to facilitate subsequent processing of chroma, saturation, and brightness. Histogram matching technology is used to unify the brightness distribution of the foreground and background. The hue gradient difference and Jensen-Shannon divergence (JS) between the two are calculated, and the reflectivity factor and adaptive factor of the target power equipment are introduced to adapt to the inspection scenario of the equipment, minimize the chroma gradient difference, realize the natural fusion of images and batch output, thereby ensuring the authenticity of the fused defect samples.
[0110] An initial defect detection model is used to detect defects in the fused defect samples, resulting in target defect detection results. Optionally, these results can be documents containing information such as defect coordinates, defect category, and detection confidence level. These documents are then normalized to obtain absolute coordinates, which are used to check the defect coordinates and determine if any are invalid.
[0111] After detecting the defect coordinates, the detection confidence level in the target defect detection results is judged. For example, a dynamic confidence threshold is applied according to different defect categories, and detection confidence levels greater than the threshold are selected. The fused defect samples corresponding to these selected detection confidence levels are then set as training fused samples. The initial defect detection model is updated using these training fused samples to obtain the target defect detection model. The dynamic confidence threshold can be determined according to the following formula:
[0112]
[0113] In the formula, Based on the threshold, For equipment coefficients, The number of historical prediction samples. The confidence threshold for the output. This represents the current prediction confidence value. This represents the historical confidence average. Furthermore, this embodiment uses insulator crack defects on 10kV parallel capacitors, the most common and difficult-to-detect defect in power systems, as a specific example, simulating a complete closed-loop training cycle involving two iterations. The aim is to demonstrate how this method, through two core mechanisms—dynamic confidence threshold selection and physical parameter feedback adjustment—achieves automated and adaptive continuous improvement of the detection model's performance, thereby overcoming the technical bottlenecks of traditional methods that rely on manual labor, are inefficient, and have insufficient model generalization ability.
[0114] The specific implementation method is as follows: A 10kV parallel capacitor model is generated using the method described in the first aspect, and crack simulation is performed on the insulators of the capacitor. The initial environmental coefficient and load weight coefficient are both 1, resulting in 1000 first-generation insulator crack defect samples. A target detection model pre-trained on a power dataset is used as the initial defect detection model. Performance is evaluated using a test set containing 500 real insulator crack images (derived from real inspection footage), with Mean Average Precision@0.5:0.95 (mAP@0.5:0.95) as the core metric. The initial defect detection model achieves an mAP@0.5:0.95 result of 67.18% on the test set; this result serves as the initial benchmark for optimization.
[0115] Step 1: Based on the first-generation insulator crack defect sample, a dynamic cue word algorithm is used to generate text cue words for the defect background. The text cue words are: capacitor background in an outdoor substation scene in winter, rainy and foggy weather, and a 3-meter upward viewing angle from the equipment. Based on the generated text cue words, the first-generation insulator crack defect sample, and the image synthesis model, a synthetic defect sample is generated. A cross-domain color fusion model is then used to perform color fusion on the generated synthetic defect sample to obtain a fused defect sample. The fused defect sample is tested using the initial defect detection model. A dynamic confidence threshold is applied to filter the tested fused defect samples to obtain high-confidence annotation results. These high-confidence annotation results are then used to fine-tune the initial defect model to obtain the first-generation defect detection model. The first-generation defect detection model is then used to detect defects on a real test set, resulting in an mAP@0.5:0.95 result improved to 69.5%.
[0116] Step Two: Analysis revealed that the first-generation defect detection model had a high rate of missing detection for "fine cracks generated in rain and fog environments." This indicates that the crack features generated by the initial simulation parameters are insufficient for the first-generation defect detection model to learn to detect finer and more blurred crack morphologies in real rain and fog environments. This performance was fed back to adjust the pre-selected physics model, increasing the environmental coefficient from 1 to 1.6 to generate samples with more significant crack features. This aims to specifically address the defect detection bottleneck of the first-generation defect detection model.
[0117] Step 3: Using the adjusted parameters, generate second-generation insulator crack defect samples according to the method in the first aspect. In the second-generation insulator crack defect samples, the width and length of the cracks are significantly increased, more closely resembling the defect morphology under real rain and fog conditions. Repeat the automated annotation and training process, using the second-generation insulator crack defect samples to retrain the first-generation defect detection model, obtaining the second-generation target defect detection model. Finally, the second-generation target defect detection model achieves a mAP@0.5:0.95 result of 73.2% on the same real test set, with a particularly significant improvement in the detection rate of fine cracks.
[0118] In this embodiment, an initial defect detection model is used to detect defects in fused defect samples with high reliability and fidelity to obtain target defect detection results. These target defect detection results are then filtered using a dynamic confidence threshold algorithm to obtain high-quality fused defect samples. These high-quality fused defect samples are then used to fine-tune the parameters of the initial defect detection model to obtain the target defect detection model. This allows for fine-tuning of the initial defect detection model based on the actual defect detection accuracy, ensuring the reliability and flexibility of the target defect detection model and improving the efficiency and accuracy of defect detection.
[0119] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages in other steps. Based on the same inventive concept, this application also provides a device for generating device defect samples to implement the device defect sample generation method described above. The solution provided by this device is similar to the solution described in the above method. Therefore, the specific limitations of one or more device defect sample generation device embodiments provided below can be found in the limitations of the device defect sample generation method above, and will not be repeated here.
[0120] Thirdly, such as Figure 3 As shown, a device for generating equipment defect samples is provided, comprising: a construction module 302, a defect simulation module 304, a first determination module 306, and a second acquisition module 308, wherein:
[0121] The construction module 302 is used to construct the equipment model of the target power equipment based on the modeling data of the target power equipment. The modeling data is determined by the initial defect detection model after detecting defects in the original dataset. The original dataset includes the corresponding initial defect samples and normal state data. The modeling data is the normal state data collected by the multi-view acquisition system of the target power equipment inspection image, and the modeling data is three-dimensional point cloud data.
[0122] The defect simulation module 304 is used to calculate the stress field of the equipment model using finite element analysis, and dynamically correct the parameters of the pre-selected physical field model or chemical model based on the product of the actual operating environment parameters of the target power equipment and the load weight coefficient; using the dynamically corrected physical field model or chemical model and stress field, various defect models of the target power equipment are determined.
[0123] The first acquisition module 306 is used to perform image rendering on various defect models, and to perform color fusion processing on the image-rendered image using a cross-domain color fusion model that includes the device reflectivity factor, so as to obtain preliminary defect samples.
[0124] The second acquisition module 308 is used to dynamically set the confidence threshold of each defect category based on the defect category of the target power equipment, and to perform confidence screening on the preliminary defect samples based on the confidence threshold to obtain the target defect samples of the target power equipment.
[0125] In one exemplary embodiment, the device defect sample generation apparatus further includes:
[0126] The data acquisition module is used to perform defect detection on the initial defect samples using the initial defect detection model to obtain the initial defect detection results. The initial defect detection results include defect categories and defect detection values. Based on the initial defect detection results, the number of each defect category is determined, and the initial defect samples corresponding to the defect categories with a number lower than the target value are determined as the first defect samples. The initial defect samples corresponding to the defect detection values lower than the defect detection threshold are determined as the second defect samples. The normal state data corresponding to the first and second defect samples are determined as the modeling data.
[0127] In an exemplary embodiment, the defect model includes a crack defect model, and the physical field model includes the Paris rule. The determination module 304 is further configured to determine the nodal displacement data of the equipment model using finite element analysis, and determine the stress field of the equipment model based on the nodal displacement data; dynamically match the Paris rule parameters through the power equipment material database, and correct the parameters based on the environmental coefficient and load weight coefficient to obtain the corrected parameters; determine the corrected Paris rule based on the corrected parameters, and determine the crack propagation rate of the equipment model according to the stress field and the corrected Paris rule; and determine the crack defect model according to the crack propagation rate.
[0128] In an exemplary embodiment, the construction module 302 is further configured to construct a three-dimensional model of the target power equipment based on the modeling data; determine the target material according to the material characteristics of the target power equipment; and configure the target material into the three-dimensional model to obtain the equipment model.
[0129] Fourthly, such as Figure 4 As shown, an automated annotation and closed-loop training device for a defect detection model is provided, including: a generation module 401, a fusion module 402, a detection module 403, a model update module 404, and a parameter adjustment module 405, wherein:
[0130] The generation module 401 is used to generate text prompts for the defect background based on the target defect sample using a dynamic prompt word algorithm, and to generate a synthesized defect sample based on the text prompts, the target defect sample, and the image synthesis model. The dynamic prompt word algorithm includes: mapping the target power equipment type to the corresponding keywords, and combining the mapped keywords with the actual operating environment parameters of the target power equipment to generate text prompts for synthesizing multi-view target defect samples.
[0131] The fusion module 402 is used to construct a cross-domain colorimetric fusion model containing the reflectivity factor of the target power equipment based on the material characteristics and actual operating environment parameters of the target power equipment, and to perform colorimetric fusion on the synthesized defect sample using the cross-domain colorimetric fusion model to obtain the fused defect sample.
[0132] The detection module 403 is used to perform defect detection on the fused defect sample using the initial defect detection model to obtain the target defect detection result; the target defect detection result includes the defect category and the detection confidence level.
[0133] The model update module 404 is used to dynamically determine the confidence threshold for each defect category based on the defect category of the target power equipment; and to determine the fused defect samples corresponding to the detection confidence scores greater than the confidence threshold as training samples, and use the training fused samples to update the initial defect detection model to obtain the target defect detection model; the confidence threshold is dynamically adjusted according to the statistical distribution of historical detection confidence scores, the type of target power equipment and the defect category.
[0134] The parameter adjustment module 405 is used to adjust the parameters of the pre-selected physical field model or chemical model based on the test accuracy of the target defect detection model in a real scenario.
[0135] Each module in the aforementioned equipment defect sample generation device and the automated annotation and closed-loop training device for defect detection models can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the corresponding operations of each module.
[0136] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps in the above method embodiments.
[0137] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.
[0138] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.
[0139] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0140] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0141] The above embodiments are merely illustrative of several implementation methods of this application, and their descriptions are relatively specific and detailed. However, they should not be construed as limiting the scope of this application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A method for generating equipment defect samples, characterized in that, The method includes: The equipment model of the target power equipment is constructed based on the modeling data of the target power equipment; the modeling data is determined by the initial defect detection model after detecting defects in the original dataset, the original dataset includes the corresponding initial defect samples and normal state data, the modeling data is the normal state data collected by the multi-view acquisition system of the target power equipment inspection image, and the modeling data is three-dimensional point cloud data; The stress field of the equipment model is calculated using finite element analysis, and the parameters of the pre-selected physical field model or chemical model are dynamically corrected based on the product of the actual operating environment parameters of the target power equipment and the load weight coefficient. Using the dynamically corrected physical field model or chemical model and the stress field, various defect models of the target power equipment are determined. The various defect models are rendered in an image, and the rendered image is processed by a cross-domain chromaticity fusion model that includes the device reflectivity factor to obtain a preliminary defect sample. Based on the defect categories of the target power equipment, a confidence threshold is dynamically set for each defect category, and the initial defect samples are screened for confidence based on the confidence thresholds to obtain the target defect samples of the target power equipment.
2. The method according to claim 1, characterized in that, The method further includes: The initial defect detection model is used to perform defect detection on the initial defect sample to obtain initial defect detection results; the initial defect detection results include defect category and defect detection value; The number of each defect category is determined based on the initial defect detection results, and the initial defect samples corresponding to the defect categories whose number is lower than the target value are determined as the first defect samples. The initial defect sample whose defect detection value is lower than the defect detection threshold is identified as the second defect sample; The normal state data corresponding to the first defect sample and the second defect sample are determined as modeling data.
3. The method according to claim 1, characterized in that, The defect model includes a crack defect model, and the physical field model includes Paris's law; based on the equipment model, finite element analysis and physical field models or chemical models are used to determine multiple defect models of the target power equipment, including: Finite element analysis was used to determine the nodal displacement data of the equipment model, and the stress field of the equipment model was determined based on the nodal displacement data. The parameters of the Paris rule are dynamically matched using a power equipment material database, and the parameters of the Paris rule are corrected based on environmental factors and load weighting factors to obtain corrected parameters. The corrected Paris rule is determined based on the corrected parameters, and the crack propagation rate of the equipment model is determined according to the stress field and the corrected Paris rule. The crack defect model is determined based on the crack propagation rate.
4. The method according to claim 1, characterized in that, The step of constructing the equipment model of the target power equipment based on the modeling data of the target power equipment includes: A three-dimensional model of the target power equipment is constructed based on the modeling data; The target material is determined based on the material properties of the target power equipment, and the target material is configured into the three-dimensional model to obtain the equipment model.
5. An automated annotation and closed-loop training method for a defect detection model, characterized in that, The method includes the target defect sample generated according to any one of claims 1-3: Based on the target defect sample, a dynamic prompt word algorithm is used to generate text prompt words for the defect background, and based on the text prompt words, the target defect sample, and the image synthesis model, a synthesized defect sample is generated; The dynamic prompt word algorithm includes: mapping keywords corresponding to the target power equipment according to the target power equipment type, and combining the mapped keywords with the actual operating environment parameters of the target power equipment to generate text prompt words for synthesizing multi-view target defect samples; Based on the material characteristics of the target power equipment and the actual operating environment parameters of the target power equipment, a cross-domain colorimetric fusion model including the equipment reflectivity factor is constructed, and the cross-domain colorimetric fusion model is used to perform colorimetric fusion on the synthetic defect sample to obtain a fused defect sample. The initial defect detection model is used to detect defects in the fused defect samples to obtain target defect detection results; the target defect detection results include defect category and detection confidence level. Based on the defect category of the target power equipment, a confidence threshold for each defect category is dynamically determined; and fused defect samples corresponding to detection confidence scores greater than the confidence threshold are identified as training samples. The initial defect detection model is updated using the training fused samples to obtain the target defect detection model; the confidence threshold is dynamically adjusted according to the statistical distribution of historical detection confidence scores, the type of target power equipment, and the defect category. Based on the test accuracy of the target defect detection model in a real-world scenario, the parameters of the pre-selected physical field model or chemical model are adjusted accordingly.
6. A device for generating equipment defect samples, characterized in that, The device includes: The construction module is used to construct the equipment model of the target power equipment based on the modeling data of the target power equipment. The modeling data is determined by the initial defect detection model after performing defect detection on the original dataset. The original dataset includes the corresponding initial defect samples and normal state data. The modeling data is the normal state data collected by the multi-view acquisition system of the target power equipment inspection image, and the modeling data is three-dimensional point cloud data. The defect simulation module is used to calculate the stress field of the equipment model using finite element analysis, and dynamically correct the parameters of the pre-selected physical field model or chemical model based on the product of the actual operating environment parameters of the target power equipment and the load weight coefficient; using the dynamically corrected physical field model or chemical model and the stress field, various defect models of the target power equipment are determined. The first acquisition module is used to perform image rendering on various defect models, and to perform color fusion processing on the image-rendered image using a cross-domain color fusion model that includes device reflectivity factors, so as to obtain preliminary defect samples. The second acquisition module is used to dynamically set the confidence threshold of each defect category based on the defect category of the target power equipment, and to perform confidence screening on the preliminary defect sample based on the confidence threshold to obtain the target defect sample of the target power equipment.
7. An automated annotation and closed-loop training device for a defect detection model, characterized in that, The device includes: The generation module is used to generate text prompts for the defect background based on the target defect sample using a dynamic prompt word algorithm, and to generate a synthesized defect sample based on the text prompts, the target defect sample, and an image synthesis model; the dynamic prompt word algorithm includes: mapping keywords corresponding to the target power equipment according to the target power equipment type, and combining the mapped keywords with the actual operating environment parameters of the target power equipment to generate text prompts for synthesizing multi-view target defect samples; The fusion module is used to construct a cross-domain colorimetric fusion model containing the reflectivity factor of the target power equipment based on the material characteristics of the target power equipment and the actual operating environment parameters of the target power equipment, and to perform colorimetric fusion on the synthesized defect sample using the cross-domain colorimetric fusion model to obtain a fused defect sample. The detection module is used to perform defect detection on the fused defect sample using an initial defect detection model to obtain the target defect detection result; the target defect detection result includes the defect category and the detection confidence level; The model update module is used to dynamically determine the confidence threshold for each defect category based on the defect category of the target power equipment; and to determine the fused defect samples corresponding to the detection confidence scores greater than the confidence threshold as training samples, and to update the initial defect detection model using the training fused samples to obtain the target defect detection model; the confidence threshold is dynamically adjusted according to the statistical distribution of historical detection confidence scores, the type of target power equipment, and the defect category; The parameter adjustment module is used to adjust the parameters of the pre-selected physical field model or chemical model based on the test accuracy of the target defect detection model in a real scenario.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method described in any one of claims 1 to 4 or claim 5.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method described in any one of claims 1 to 4 or claim 5.