Image training database construction method and device and computer equipment

By introducing a defect growth model and an image validity evaluation model into the power inspection image training database, and by screening and generating structured labels, the problems of sample imbalance and poor quality in the power inspection image training database are solved, enabling efficient identification of power equipment defects and improving power grid security.

CN121640217APending Publication Date: 2026-03-10SHENZHEN POWER SUPPLY BUREAU
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-28
Publication Date
2026-03-10

AI Technical Summary

Technical Problem

Existing power inspection image training databases suffer from problems such as varying proportions of different types of samples and poor image sample quality, resulting in low defect recognition rates for power equipment in the trained image models, which are difficult to meet the reliability requirements of power scenarios.

Method used

By introducing a defect growth model to simulate and generate defect-expanded images of power equipment, and combining this with an image validity evaluation model to screen valid images, and using a decision model and decoder to generate structured labels, a structured training database is finally constructed to ensure that the image types are comprehensive and highly reliable.

Benefits of technology

It improves the generalization ability of image models and the efficiency of data retrieval and management, and can accurately identify defects in power equipment inspection images, which helps to maintain the safe operation of the power grid.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121640217A_ABST
    Figure CN121640217A_ABST
Patent Text Reader

Abstract

The invention relates to an image training database construction method and device and computer equipment. The method comprises the following steps: acquiring an extended image working condition set according to an initial power image working condition set and a pre-constructed defect growth model; wherein the initial power image working condition set comprises an initial image of the power equipment and collection working condition information of the initial image; according to a pre-constructed image validity evaluation model, effective images are screened out from the extended image working condition set, and an effective image working condition set is formed; obtaining a structured label of the effective image according to a pre-constructed decision model, a preset decoder and the collection condition information of the effective image; the structured label is used for indicating the equipment type, the defect type and the defect stage of the power equipment in the effective image; and constructing a structured training database according to the effective image working condition set and the structured label of each effective image. By adopting the method, the quality of the constructed electric power inspection image training database can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing technology, and in particular to a method, apparatus and computer device for constructing an image training database. Background Technology

[0002] In power production and operation, inspection images of power equipment are typically input into a pre-trained image model to identify whether there are defects in the power equipment in the inspection images.

[0003] However, the power inspection image training database used to train the image model in related technologies has problems such as different proportions of different types of samples and poor image sample quality, resulting in a low defect recognition rate of the trained image model for power equipment, which is difficult to meet the reliability requirements of power scenarios. Summary of the Invention

[0004] Therefore, it is necessary to provide a method, apparatus, and computer equipment for constructing an image training database that can improve the quality of the constructed power inspection image training database, in response to the above-mentioned technical problems.

[0005] In a first aspect, this application provides a method for constructing an image training database, the method comprising:

[0006] Based on the initial power image condition set and the pre-built defect growth model, an extended image condition set is obtained; wherein, the initial power image condition set includes the initial image of the power equipment and the acquisition condition information of the initial image; the defect growth model is used to simulate and generate defect extended images of the initial image;

[0007] Based on the pre-built image validity evaluation model, valid images are selected from the extended image condition set to form a valid image condition set.

[0008] Based on the pre-built decision model, the preset decoder, and the acquisition condition information of the effective images, the structured labels of the effective images are obtained; the structured labels are used to indicate the equipment category, defect type, and defect stage of the power equipment in the effective images;

[0009] A structured training database is constructed based on the set of valid image conditions and the structured labels of each valid image.

[0010] In one embodiment, the initial power image condition set includes multiple initial images, among which at least one original defect image is included;

[0011] The step of obtaining an extended image condition set based on the initial power image condition set and a pre-built defect growth model includes:

[0012] Based on the original defect image, the preset target defect stage, and the defect growth model, a defect extension image of the original defect image is obtained; wherein, the defect stage of the power equipment in the defect extension image is different from the defect stage of the power equipment in the original defect image.

[0013] Based on the initial image, the acquisition condition information of the initial image, the acquisition condition information of the extended defect image and the original defect image, an extended image condition set is obtained.

[0014] In one embodiment, the image validity evaluation model includes a sharpness evaluation model and a working condition evaluation model;

[0015] Based on a pre-built image validity evaluation model, valid images are selected from the extended image condition set to form a valid image condition set, including:

[0016] Based on the sharpness evaluation model, a candidate image condition set is selected from the extended image condition set;

[0017] Based on the working condition evaluation model, a set of valid image working conditions is selected from the candidate image working condition set.

[0018] In one embodiment, the extended image condition set includes intermediate images and acquisition condition information of the intermediate images, wherein the intermediate images are the initial images or defect extension images generated by the defect growth model;

[0019] The step of selecting a candidate image condition set from the extended image condition set based on the sharpness evaluation model includes:

[0020] The sharpness of the intermediate images is obtained according to the sharpness evaluation model.

[0021] The intermediate images whose clarity meets the first preset condition are determined as candidate images;

[0022] Based on each candidate image and the acquisition condition information of each candidate image, a candidate image condition set is obtained.

[0023] In one embodiment, the candidate image condition set includes candidate images and acquisition condition information of the candidate images; the acquisition condition information includes at least a portion of image source information, image synthesis information, acquisition time information, acquisition environment information, and acquisition brightness information; the condition evaluation model includes a first evaluation rule, a second evaluation rule, and a third evaluation rule;

[0024] The step of obtaining an effective image condition set from the candidate image condition set according to the working condition evaluation model includes:

[0025] Obtain the target evaluation results, and determine the candidate images whose target evaluation results meet the second preset conditions as valid images to form a set of valid image conditions;

[0026] The target evaluation result includes at least one of a first evaluation result, a second evaluation result, or a third evaluation result; the first evaluation result is obtained based on the first evaluation rule, the acquired brightness information, and the image source information; the second evaluation result is obtained based on the second evaluation rule, the image synthesis information, and the acquisition environment information; and the third evaluation result is obtained based on the third evaluation rule, the acquisition time information, and the acquired brightness information.

[0027] In one embodiment, obtaining the structured labels of the effective images based on a pre-built decision model, a preset decoder, and the acquisition condition information of the effective images includes:

[0028] According to the decoder, multiple candidate structured labels and the joint probability of each candidate structured label are obtained for each valid image;

[0029] Based on a preset defect rule base and multiple candidate structured tags, the penalty score for each candidate structured tag is determined.

[0030] Based on the decision model, the joint probability of each candidate structured label, and the penalty score of each candidate structured label, the structured label of each valid image is determined from multiple candidate structured labels.

[0031] In one embodiment, the structured training database includes at least a training sample set and a validation sample set; the step of constructing the structured training database based on the effective image condition set and the structured labels of each effective image includes:

[0032] Based on the structured tags of the valid images, the valid images are divided into buckets; the structured tags of the valid images stored in each bucket are the same;

[0033] The coverage redundancy of each bucket is calculated based on the number of valid images in each bucket.

[0034] The sample weights of the effective images are obtained based on the joint probability of the structured labels of the effective images, the penalty score of the structured labels of the effective images, and the coverage redundancy of the bucket in which the effective images are located.

[0035] Valid images whose sample weights satisfy the third preset condition are stored in the training sample set;

[0036] Valid images whose sample weights satisfy the fourth preset condition are stored in the verification sample set.

[0037] Secondly, this application provides an image training database construction apparatus, the apparatus comprising:

[0038] The first execution module is used to obtain an extended image set based on an initial power image set and a pre-built defect growth model; wherein, the initial power image set includes an initial image of the power equipment and acquisition condition information of the initial image; the defect growth model is used to simulate and generate a defect extended image of the initial image;

[0039] The second execution module is used to filter out valid images from the extended image condition set according to the pre-built image validity evaluation model, and form a valid image condition set.

[0040] The third execution module is used to obtain structured labels for the effective images based on a pre-built decision model, a preset decoder, and the acquisition condition information of the effective images; the structured labels are used to indicate the equipment category, defect type, and defect stage of the power equipment in the effective images.

[0041] The fourth execution module is used to construct a structured training database based on the set of valid image conditions and the structured labels of each valid image.

[0042] Thirdly, this application 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 implement the steps of the method described in any of the above embodiments.

[0043] Fourthly, this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method described in any of the above embodiments.

[0044] The aforementioned image training database construction method, apparatus, and computer equipment, by using a defect growth model, can simulate the defect stages of power equipment in the initial images, effectively compensating for the scarcity of samples regarding the early and intermediate defect stages of power equipment images in the image training database, thereby improving the generalization ability of the image model. Simultaneously, this application introduces an image validity evaluation model to remove invalid images from the expanded image condition set. Then, using a decision model and decoder, combined with the collected operating condition information, structured labels are generated. Finally, a structured training database is constructed based on equipment category, defect type, and defect stage, improving the efficiency of data retrieval and management of the structured training database. The image training database constructed based on the method of this application has a comprehensive range of image types, and the image validity evaluation model ensures the reliability of the images in the image training database. Therefore, the image model trained using the image training database constructed based on the method of this application can accurately identify defects in power equipment inspection images, contributing to the maintenance of safe power grid operation. Attached Figure Description

[0045] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0046] Figure 1 This is a flowchart illustrating an image training database construction method in one embodiment;

[0047] Figure 2 This is a flowchart illustrating step S101 in one embodiment;

[0048] Figure 3 This is a flowchart illustrating step S102 in one embodiment;

[0049] Figure 4 This is a flowchart illustrating step S103 in one embodiment;

[0050] Figure 5 This is a flowchart illustrating step S104 in one embodiment;

[0051] Figure 6 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0052] 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.

[0053] As described in the background section, in power production and maintenance, inspection images are often affected by factors such as day and night changes, switching between strong and weak light, temperature and humidity fluctuations, and random shooting angles. Minor defects are manifested as subtle texture and low contrast changes. Traditional methods that rely on general enhancement and manual annotation are difficult to obtain a stable trainable data distribution under real working conditions. While small-scale image models in related technologies can achieve certain results on controlled data, mismatches often occur in the source, quality, and semantic meaning of training samples in field environments with multiple equipment types, defect forms, and overlapping operating conditions. On the one hand, early and mid-stage defect samples are scarce, causing the model to be sensitive only to severe defects and resulting in poor generalization. On the other hand, the clarity and operating conditions of field-acquired images are not systematically constrained, and general cleaning rules cannot identify invalid samples caused by weak light, high humidity, or synthetic artifacts, mistakenly including them in the training set. At the same time, label generation is often disconnected from operating conditions; the phenomenon of "reflective" images has drastically different meanings at night and under strong light, and general annotation cannot reflect this industry common sense constraint. Finally, the storage organization is mostly managed with folders or simple table structures, lacking the ability to search and control the distribution of data across task dimensions such as "equipment-defect-stage-lighting," making it difficult for the training and validation sets to maintain balanced coverage of key dimensions. This leads to a simultaneous decrease in recognition rate and an increase in false alarm rate in field deployment, making it difficult to meet the reliability requirements of power scenarios.

[0054] To address the above technical problems, please refer to some exemplary embodiments. Figure 1 This application provides a method for constructing an image training database, including steps S101 to S104.

[0055] S101: Obtain an extended set of image conditions based on the initial power image condition set and the pre-built defect growth model.

[0056] In this embodiment of the application, the initial power image condition set includes multiple initial images of power equipment and acquisition condition information for each initial image. J represents the total number of initial images in the initial power image operating condition set. This represents the j-th initial image in the initial power image set. This represents the acquisition status information of the j-th initial image, where 1 ≤ j ≤ J and 1 < J.

[0057] Specifically, the initial images are those captured during inspections of the power production environment using image acquisition equipment. In one example, the image acquisition equipment may include a drone equipped with a high-resolution visible light camera, a fixed camera, and a head-mounted image acquisition device worn by workers. The drone, equipped with a high-resolution visible light camera, is used to inspect high-altitude equipment such as transmission lines, towers, and insulator chains. It acquires initial images from a standard perspective by setting an automatic cruise path and taking pictures at fixed waypoints. The fixed camera is deployed at key equipment locations within the substation, such as transformer side shells and switchgear fronts. The equipment is typically an infrared-visible dual-mode monitoring unit with night vision supplementary lighting capabilities, supporting continuous day and night image acquisition. The head-mounted image acquisition device worn by workers is used to acquire close-range images during manual inspections, particularly suitable for observing minor structural defects such as terminal bolt corrosion and loose joints. All initial images are stored in JPEG format with a uniform compression ratio and a size of 1920×1080 pixels, and are timestamped and numbered on the image acquisition device side. The power equipment can be common power equipment components such as transformer shells, insulator strings, and switchgear panels.

[0058] The initial image acquisition status information is obtained in real time by the environmental sensing module on the image acquisition device, mainly including the timestamp T and ambient temperature. Ambient humidity Light level L. The timestamp T is generated by the device system's internal time synchronization module, accurate to the second, and is used to subsequently determine whether the inspection was conducted at night, in the early morning, or in the afternoon; ambient temperature. With ambient humidity Temperature and humidity are collected via a built-in digital temperature and humidity sensor, which can be a SHT31 series sensor with accuracies of ±0.3℃ and ±2%RH, respectively. The output is in floating-point format, and the unit value is not shown in this description. The illumination level L is determined by the front-end illumination sensing module of the device. The module outputs an integer classification value, defined as 0 for dark environments (e.g., nighttime patrols), 1 for low-light environments (e.g., indoors or cloudy days), and 2 for strong-light environments (sunny outdoor days). These operating condition fields are bound one-to-one with the image number and recorded uniformly. This forms an initial image and working condition information pair. .in, This represents the timestamp of the acquisition of the j-th initial image. This represents the ambient temperature at the time the j-th initial image was acquired. This represents the ambient humidity at the time the j-th initial image was acquired. This represents the illumination level at the time the j-th initial image was acquired.

[0059] To address the common problem of scarce early-stage defect images in inspection data, this application further introduces a defect growth model to supplement the sample space. Specifically, this application can pre-construct a symmetric convolutional autoencoder model. (i.e., defect growth model), in one example, defect growth model The structure is a shallow convolutional network. The encoder contains three convolutional layers with 32, 64, and 128 channels respectively, using 3×3 convolutional kernels, a stride of 1, and the ReLU activation function. The decoder is a symmetrical three-layer transposed convolutional network with channels restored to 64, 32, and 3 (RGB output channels). The output image size is consistent with the input. The training data is constructed using multiple pre-set historical defect image pairs. In each historical defect image pair, one image is a sample of a minor defect, and the other is a sample of a severe defect. The two images in the historical defect image pair are manually confirmed to be images of the same device and the same area at different times. The defect growth model is trained using the mean squared error loss function. This allows the model to learn the spatial morphological changes and texture evolution trends of defect regions. Furthermore, the trained defect growth model can then be used. Defect expansion image from the initial image in the simulated initial power image operating condition set, defect growth model The generated defect-extended image is added to the initial power image condition set. In this process, an extended image condition set is formed. The acquisition condition information of the defect extension image inherits the acquisition condition information of the initial image corresponding to the defect extension image.

[0060] In summary, this step is used to construct the original image and operating condition data set (i.e., the extended image and operating condition set) for the power production environment inspection scenario, serving as the basic input for subsequent image selection, automatic annotation, and training database organization. Considering that power equipment usually operates in complex outdoor conditions, and inspection tasks face practical problems such as uneven lighting, large humidity variations, and strong randomness of manual inspection perspectives, the image acquisition and data structure designed in this step has the characteristics of wide environmental coverage, complete defect distribution, and unified operating condition records to ensure the quality and usability of subsequent training data.

[0061] S102: Based on the pre-built image validity evaluation model, select valid images from the extended image condition set to form a valid image condition set.

[0062] In power production environment inspection scenarios, image quality and consistency of operating conditions have a significant impact on model training. This application obtains an extended image set of operating conditions. Subsequently, further work was done on expanding the image condition set. Based on this, a set of valid image conditions that meets the quality requirements and adaptability to the working conditions is selected according to a pre-built image validity evaluation model. .

[0063] S103: Obtain structured labels for valid images based on the pre-built decision model, the preset decoder, and the acquisition conditions information of valid images.

[0064] The structured tags are used to indicate the equipment category, defect type, and defect stage of the power equipment in the valid images. This step aims to refine the set of valid images obtained in the previous step. Semantic annotation is performed to output structured labels for subsequent training database construction. Defects in power inspection images often manifest as small-scale texture changes, material reflections, and edge weakening, and are significantly affected by operating conditions (e.g., low light, strong light, high temperature and humidity). Therefore, this step explicitly introduces operating condition modulation during image semantic extraction and superimposes operating condition consistency constraints based on business common sense during label decision-making to obtain high-confidence labels that match the power scenario.

[0065] S104: Construct a structured training database based on the effective image condition set and the structured labels of each effective image.

[0066] Finally, based on the effective image condition set and the structured labels of each effective image, this application constructs a bucket key for each effective image, calculates the sample weight, and divides the training set and validation set according to the weight, establishes a database index and view, and forms a structured training database.

[0067] The aforementioned image training database construction method, by using a defect growth model, can simulate the defect stages of power equipment in the initial images, effectively compensating for the scarcity of samples regarding the early and middle defect stages of power equipment images in the image training database, thereby improving the generalization ability of the image model. Simultaneously, this application introduces an image validity evaluation model to remove invalid images from the expanded image condition set. Then, using a decision model and decoder, combined with the collected operating condition information, structured labels are generated. Finally, a structured training database is constructed based on equipment category, defect type, and defect stage, improving the efficiency of data retrieval and management of the structured training database. The image training database constructed based on this application's method has a comprehensive range of image types, and the image validity evaluation model ensures the reliability of the images in the image training database. Therefore, the image model trained using the image training database constructed using this application's method can accurately identify defects in power equipment inspection images, contributing to the maintenance of safe power grid operation.

[0068] In some exemplary embodiments, the initial power image set includes multiple initial images, among which at least one original defect image is included; see [link to relevant documentation]. Figure 2Step S101: Based on the initial power image condition set and the pre-built defect growth model, obtain the extended image condition set, including steps S201 and S202.

[0069] S201: Based on the original defect image, the preset target defect stage, and the defect growth model, obtain the defect extension image of the original defect image.

[0070] The defect stage of the power equipment in the defect expansion image differs from that in the original defect image. The original defect image is the initial image of the defective power equipment that has been manually verified from all initial images in the initial power image operating condition set. This difference is addressed in the defect growth model. After training, the original defect image can be input into the defect growth model. By combining the stage control parameter s, the defect growth model can be optimized. Generate the defect extension image corresponding to the defect stage; the computational relationship can be represented as follows: .

[0071] in, The image shows the original defect, and s represents the stage control parameter. For defect growth model Based on the original defect image The defect expansion image is generated by the stage control parameter s; in one example, the defect stages include early defects, intermediate defects, and severe defects; when s is 0, the defect growth model... Generate a defect expansion image of the early defect; when s is 1, the defect growth model... Generate a defect expansion image of the intermediate-term defect; when s is 2, the defect growth model... Generate an expanded image of the severe defect.

[0072] S202: Obtain the extended image condition set based on the initial image, the initial image acquisition condition information, the defect extension image, and the original defect image acquisition condition information.

[0073] Furthermore, defect growth model Generated Defect Extended Image Inherit the acquisition condition information of the corresponding original defect image and add a synthesis flag bit. Ultimately, all initial images, initial image acquisition information, defect extension images, and defect extension image acquisition information are unified into an extension image condition set. .in, This represents the k-th intermediate image in the extended image condition set. This represents the acquisition condition information of the k-th intermediate image in the extended image condition set, where 1≤k≤K, 1<J<K, and the intermediate image is either the initial image or the defect extension image.

[0074] In order to maintain the consistency of acquisition condition information for each image in the extended image condition set, a synthesis flag is also set for the initial image. The initial image's synthesis flag bit Furthermore, operating condition information is collected. .

[0075] Extended Image Condition Set As the sole input for subsequent steps of image selection and automatic annotation, it meets the requirements of data integrity, semantic consistency, and operational adaptability in constructing the training database.

[0076] In one example, the initial power image condition set includes 10 initial images and the acquisition condition information for these 10 initial images. Of these 10 initial images, the images of the defective electrical equipment that have been manually verified are considered the initial images. and initial image and the initial image and initial image All defects in the power equipment were at a severe stage, among which... , , the initial image and initial image Input the defect growth model respectively The stage control parameter s is set to 0, and the defect growth model is... It can output the initial image. Defect expansion image corresponding to early defects and initial image Defect expansion image corresponding to early defects Defect extended image Inherit the acquisition condition information of the corresponding original defect image and add a synthesis flag bit. ,Right now Defect extended image Inherit the acquisition condition information of the corresponding original defect image and add a synthesis flag bit. ,Right now At the same time, each initial image Also set the synthesis flag. This allows for the formation of an extended image condition set. .

[0077] In some exemplary embodiments, the image validity evaluation model includes a sharpness evaluation model and a working condition evaluation model; please refer to [link to relevant documentation]. Figure 3Step S102 involves selecting valid images from the extended image condition set based on the pre-built image validity evaluation model, forming a valid image condition set, including steps S301 and S302.

[0078] S301: Based on the sharpness evaluation model, select a candidate image condition set from the extended image condition set.

[0079] The extended image condition set includes intermediate images and their acquisition conditions. The intermediate images are either the initial images or defect extension images generated by the defect growth model. The selection process for the extended image condition set in this application includes two core judgment dimensions: image structural clarity and consistency of condition logic.

[0080] First, the sharpness of the intermediate images is obtained according to the sharpness evaluation model. Specifically, this application constructs an improved sharpness evaluation function (i.e., sharpness evaluation model) for image structural sharpness. This function introduces a confidence suppression term on the basis of the traditional Fourier high-frequency energy ratio to avoid misjudgment of sharpness when there is abnormal enhancement of local edges in the image. The sharpness evaluation function can be expressed as: .in, intermediate image The two-dimensional Fourier transform; This refers to the high-frequency domain region. The confidence suppression term designed for defect-extended images is defined as the standard deviation of image texture complexity; The adjustment coefficient can be 0.05. This regularization term suppresses common local enhancement textures in defect extension images, preventing high-frequency energy from being misjudged as clear images due to synthesis errors, thereby improving the ability of the sharpness evaluation to distinguish real inspection images.

[0081] Furthermore, intermediate images whose sharpness meets a first preset condition are determined as candidate images. Specifically, when the sharpness of the intermediate image meets a first preset condition... When the resolution exceeds a set threshold, the intermediate image structure can be preliminarily considered valid and marked as a candidate image, proceeding to the next stage of condition consistency screening. Finally, based on each candidate image and its acquisition condition information, a candidate image condition set is obtained. Among these, the resolution threshold... It can be 0.28.

[0082] S302: Based on the working condition evaluation model, select the effective image working condition set from the candidate image working condition set.

[0083] In this embodiment of the application, the candidate image condition set includes candidate images and acquisition condition information of the candidate images; the acquisition condition information includes at least a portion of image source information, image synthesis information, acquisition time information, acquisition environment information, and acquisition brightness information; the condition evaluation model includes a first evaluation rule, a second evaluation rule, and a third evaluation rule.

[0084] According to the working condition evaluation model, the step of selecting the effective image working condition set from the candidate image working condition set may specifically include obtaining the target evaluation result according to the working condition evaluation model, determining the candidate images whose target evaluation results meet the second preset condition as effective images, and forming the effective image working condition set.

[0085] The target evaluation result includes at least one of the first evaluation result, the second evaluation result, or the third evaluation result; the first evaluation result is obtained based on the first evaluation rule, the acquired brightness information, and the image source information; the second evaluation result is obtained based on the second evaluation rule, the image synthesis information, and the acquisition environment information; and the third evaluation result is obtained based on the third evaluation rule, the acquisition time information, and the acquired brightness information.

[0086] In one example, the first evaluation rule is: lighting level. Furthermore, the shooting device is not a fixed camera (image source information can be obtained through...). (Through cross-verification of timestamp and device type), the image is determined to have exposure deficiencies, and the candidate image is discarded. The second evaluation rule is: the candidate image is a composite image (…). ), and its temperature And humidity This indicates that the conditions under which the generated samples were generated were extremely unreasonable, potentially introducing false labels, and therefore they were also removed. The third evaluation rule is: candidate image timestamps. If the image is displayed as nighttime (e.g., 20:00~6:00), but the average brightness of the image is greater than the standard exposure threshold of the device, it is judged as an infrared night shooting image distortion and is rejected.

[0087] In this embodiment, the above-mentioned sharpness determination and working condition logic judgment are integrated into an image validity evaluation model: .in, intermediate image Effectiveness evaluation indicators This is a Boolean indicator function, and its output is... This indicates that the condition is met. For the working condition evaluation model, when the intermediate image If the first evaluation rule, the second evaluation rule, and the third evaluation rule are not met simultaneously This image validity evaluation model can be implemented in practical engineering by configuring a conditional logic tree. The rule numbers and screening logs are recorded in the database, which facilitates subsequent tracking and backtracking of model training samples.

[0088] Effectiveness evaluation indicators The intermediate image is determined as the valid image, and thus the valid image condition set can be obtained. , h≥1.

[0089] In some exemplary embodiments, please refer to Figure 4 Step S103: Based on the pre-built decision model, the preset decoder, and the acquisition condition information of the effective image, obtain the structured label of the effective image, including steps S401 to S403.

[0090] S401: Based on the decoder, obtain multiple candidate structured labels for each valid image and the joint probability of each candidate structured label.

[0091] First, this application employs a multi-scale convolutional encoder as the image backbone, specifically composed of four convolutional layers. The convolution kernel has a stride of 1, and the number of channels is expanded to 128 layer by layer. A channel attention module is then added after each layer's output to emphasize details of equipment components (such as the edges of insulator skirts and the outlines of connector hardware). To address the systematic impact of power conditions on image quality, a "condition modulation residual" is introduced. The condition vector is encoded through a two-layer fully connected network (the dimension is mapped from the condition field length to the same dimension as the feature channel) and then added to the backbone features. Adjustable coefficients are set for low-light and high-humidity scenes. The core expression of this fusion is: ,in, For the convolutional backbone in the h-th valid image The feature tensor obtained from it; The working condition encoding vector is obtained by... After numericalizing and linearly mapping each field, it is extended to the form with two fully connected layers. The channels are consistent, and then broadcast to the feature space according to the channels; For residual modulation coefficients, based on (Light level) and (Humidity) selectivity is improved to enhance attention to structural texture under low-light and high-humidity conditions. Both sides of the above expression are tensors of the same dimension, maintaining consistent dimensions. In actual implementation, the convolutional backbone can be obtained by pruning a standard deep convolutional backbone, and channel attention can adopt a lightweight structure with channel-wise weighting; the functional encoding consists of fully connected layers and activation functions, with no circular dependencies.

[0092] Among them, residual modulation coefficient in accordance with (Light level) and Increased selectivity (in terms of humidity) refers to the significant weakening of image texture details under low-light conditions, necessitating an increase in the contribution ratio of the operating condition residual term. The value will be increased from the default value (e.g., 0.5) to the upper limit of the range (e.g., 0.7); in high humidity environments, the texture of hardware and insulator surfaces will exhibit weak features such as reflection and fogging, which also requires improving the modulation effect of operating condition information on the feature tensor. Increase from the default value (e.g., 0.5) to the upper limit of the range (e.g., 0.7).

[0093] The decoder in this application is a three-branch decoder. When an effective image is input into the three-branch decoder, the three-branch decoder will output at least one candidate equipment category, at least one candidate defect type, and at least one candidate defect stage of the power equipment in the effective image, as well as the predicted probability of the candidate equipment category, the predicted probability of the candidate defect type, and the predicted probability of the candidate defect stage, thereby obtaining the candidate structured label and the joint probability of the candidate structured label of the effective image.

[0094] For example, a valid image is input into a three-branch decoder. The three-branch decoder outputs that the candidate device category of the valid image is terminal bolt, with a probability of 1; the candidate defect types of the valid image are metal corrosion and bolt loosening, where the probability of the candidate defect type metal corrosion is 0.6 and the probability of the candidate defect type bolt loosening is 0.4; the candidate defect stage of the valid image is severe defect, with a probability of 1. Then, the candidate structured labels X1: {terminal bolt; metal corrosion; severe defect; joint probability: 0.6} and the candidate structured labels X2: {terminal bolt; bolt loosening; severe defect; joint probability: 0.4} can be obtained.

[0095] S402: Based on the preset defect rule base and multiple candidate structured tags, determine the penalty score for each candidate structured tag.

[0096] This application pre-builds a defect rule base, which is coded in the form of rule tables and contains queryable conditions of "equipment - defect - stage - working condition". A penalty score is assigned for a match and zero for a non-match, ensuring reproducibility and maintainability.

[0097] S403: Based on the decision model, the joint probability of each candidate structured label, and the penalty score of each candidate structured label, determine the structured label of each valid image from multiple candidate structured labels.

[0098] The decision model is calculated as follows: , Let X be the joint probability of the three-branch decoder for the candidate structured label X; As a penalty, according to the rules of common sense in power maintenance, a higher penalty will be given for unreasonable combinations of "label-operating condition" (e.g.) Furthermore, the non-fixed infrared acquisition predicted "surface high-brightness reflection defect," or (Extremely low but predicted as "severe corrosion stage"). When a valid image has multiple candidate structured labels, the group of candidate structured labels with the highest decision score calculated by the decision model is determined as the structured label of the valid image.

[0099] In some exemplary embodiments, the structured training database includes at least a training sample set and a validation sample set; see [link to relevant documentation]. Figure 5 Step S104: Construct a structured training database based on the effective image condition set and the structured labels of each effective image, including steps S501 to S505.

[0100] S501: Determine the buckets of valid images based on their structured labels; the structured labels of all valid images stored in each bucket are the same.

[0101] First, this application integrates the set of valid image conditions and the structured labels of each valid image to form a set of structured labeled samples. Each sample (i.e., a valid image) constructs a power task bucket key. ,in, For the device category of the h-th valid image, For the defect type of the h-th valid image, For the defect stage of the h-th valid image, For the reason The dual-level illumination label obtained by discrete mapping is defined as when (In low / weak light) ;when (Under strong light) Based on this, Aggregate statistics yield the sample count for each bucket. .

[0102] S502: Calculate the coverage redundancy of each bucket based on the number of valid images in each bucket.

[0103] To suppress the over-emergence of popular buckets and increase the contribution of long-tail buckets in training, coverage redundancy is defined as the normalized ratio of bucket counts. , The coverage redundancy of the bucket containing the h-th valid image. This represents the number of valid images in the bucket containing the h-th valid image. This represents the number of samples in the bin with the largest number of samples among all bins. If the label confidence scalar in step S103... Then record If not saved, then without adding external input, let (That is, without amplifying or weakening the label confidence effect of the sample), this setting only affects the relative scale of the weight mapping and does not change the input fields and core calculations.

[0104] S503: Obtain the sample weights of valid images based on the joint probability of the structured labels of valid images, the penalty score of the structured labels of valid images, and the coverage redundancy of the bucket in which the valid images are located.

[0105] Without changing the label With working conditions Under the premise of sample weight The system integrates three aspects of information: "label confidence, coverage redundancy, and operating condition consistency penalty," and uses them for ranking and quota decisions during training / validation partitioning and sampling. .in For logical compression mapping; For scalar hyperparameters, the default value is... The recommended intervals are respectively , , The adjustment logic is: increase the capacity when the long-tail bucket coverage is insufficient. or reduce Increase when the consistency constraints of operating conditions need to be more stringent. . For the penalty score, its output scalar is reused here without changing its calculation method. The above three items are all dimensionless fractions, which are linearly combined and then... Mapped to a dimensionless weighted interval.

[0106] S504: Store the valid images whose sample weights meet the third preset condition into the training sample set.

[0107] according to Complete the training / validation partitioning and index construction. The partitioning uses a hybrid strategy of "bucket quota + weight threshold": for each bucket, according to... Samples that meet the minimum training quota are selected in descending order; among the remaining samples in the bucket, those that meet the minimum training quota are selected first. The samples are assigned to the validation sample set by default. Recommended range If the number of samples in a certain bucket is insufficient, the amount will be supplemented in the adjacent buckets of the stage (e.g., using...). (adjacent stages are treated as neighboring buckets), and the original... In order to backtrack.

[0108] S505: Store valid images whose sample weights meet the fourth preset condition into the validation sample set.

[0109] In the implementation of data storage, media objects (images) are associated with a sample record table using a unique key, and the sample record table has persistent fields. Create a composite index Supports four-dimensional task retrieval and establishes a system based on... Aggregated materialized views are used for quick estimation of coverage and pull of balanced batches; by A prefix index is built for the subkey to support template queries of "device-defect-stage-lighting". To avoid synthetic data dominating training, without modifying... Under the premise of, The samples are set when they are put into storage. (default Recommended range This constraint is implemented using field validation to ensure that it serves as a supplementary coverage rather than the primary source.

[0110] The output is limited to two items. First, the structured training database. It includes a sample record table, media storage, composite index, and task view, which can be directly accessed by the training and retrieval pipelines; secondly, it divides the list. Record each sample and (Training / validation) tags to support repeatable sampling and auditing.

[0111] It should be understood that although the steps in the flowcharts of the embodiments described above 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 embodiments described above 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 of other steps.

[0112] Based on the same inventive concept, this application also provides an image training database construction apparatus for implementing the image training database construction method described above. The solution provided by this apparatus is similar to the implementation described in the above method; therefore, the specific limitations in one or more of the image training database construction apparatus embodiments provided below can be found in the limitations of the image training database construction method described above, and will not be repeated here.

[0113] In one exemplary embodiment, an image training database construction apparatus is provided, comprising:

[0114] The first execution module is used to obtain an extended image set based on the initial power image set and the pre-built defect growth model; wherein, the initial power image set includes the initial image of the power equipment and the acquisition condition information of the initial image; the defect growth model is used to simulate and generate defect extended images of the initial image;

[0115] The second execution module is used to filter out valid images from the extended image condition set according to the pre-built image validity evaluation model, and form a valid image condition set.

[0116] The third execution module is used to obtain structured labels for valid images based on a pre-built decision model, a preset decoder, and the acquisition status information of valid images. The structured labels are used to indicate the equipment category, defect type, and defect stage of the power equipment in the valid images.

[0117] The fourth execution module is used to construct a structured training database based on the set of valid image conditions and the structured labels of each valid image.

[0118] Each module in the aforementioned image training database construction device 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, or stored in the memory of a computer device as software, so that the processor can call and execute the operations corresponding to each module.

[0119] In one exemplary embodiment, this application 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 implement the steps of the method described in any of the above embodiments.

[0120] This computer device can be a server, and its internal structure diagram can be as follows: Figure 6As shown, the computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores the operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage medium. The database includes a structured training database for storing data constructed using the image training database construction method of this application. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communication with external terminals via a network connection. When the computer program is executed by the processor, it implements an image training database construction method.

[0121] Those skilled in the art will understand that Figure 6 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0122] In one exemplary embodiment, this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method described in any of the above embodiments.

[0123] 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.

[0124] 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, and when executed, it 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 memory 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, artificial intelligence (AI) processors, etc., and are not limited to these.

[0125] 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 application.

[0126] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent 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. An image training database construction method characterized by comprising: The method comprises: According to the initial power image working condition set and the pre-constructed defect growth model, an extended image working condition set is obtained; wherein the initial power image working condition set comprises initial images of power equipment and acquisition working condition information of the initial images; the defect growth model is used for simulating to generate defect extension images of the initial images; According to the pre-constructed image validity evaluation model, valid images are screened from the extended image working condition set to form a valid image working condition set; According to the pre-constructed decision model, a preset decoder, and the acquisition working condition information of the valid images, a structured label of the valid images is obtained; the structured label is used to indicate a device category, a defect type, and a defect stage of the power equipment in the valid images; According to the valid image working condition set and the structured label of each valid image, a structured training database is constructed.

2. The method of claim 1, wherein, The initial power image working condition set comprises a plurality of initial images, and at least one original defect image is included in the plurality of initial images; The method comprises: According to the original defect image, a preset target defect stage, and the defect growth model, a defect extension image of the original defect image is obtained; wherein a defect stage of the power equipment in the defect extension image is different from a defect stage of the power equipment in the original defect image; According to the initial image, the acquisition working condition information of the initial image, the defect extension image, and the acquisition working condition information of the original defect image, an extended image working condition set is obtained.

3. The method of claim 1, wherein, The image validity evaluation model comprises a definition evaluation model and a working condition evaluation model; The method comprises: According to the definition evaluation model, a candidate image working condition set is screened from the extended image working condition set; According to the working condition evaluation model, a valid image working condition set is screened from the candidate image working condition set.

4. The method of claim 3, wherein, The extended image working condition set comprises an intermediate image and acquisition working condition information of the intermediate image; the intermediate image is the initial image or a defect extension image generated by the defect growth model; The method comprises: According to the definition evaluation model, a definition of the intermediate image is obtained respectively; An intermediate image satisfying a first preset condition is determined as a candidate image; According to each candidate image and the acquisition working condition information of each candidate image, a candidate image working condition set is obtained.

5. The method of claim 3, wherein, The candidate image working condition set comprises a candidate image and acquisition working condition information of the candidate image; the acquisition working condition information comprises at least part of image source information, image synthesis information, acquisition time information, acquisition environment information, and acquisition brightness information; The working condition evaluation model comprises a first evaluation rule, a second evaluation rule, and a third evaluation rule; The method comprises: Obtaining a target evaluation result, determining a candidate image as a valid image if the target evaluation result meets a second preset condition, and forming a valid image working condition set; The target evaluation result includes at least one of a first evaluation result, a second evaluation result or a third evaluation result; the first evaluation result is obtained according to the first evaluation rule, the acquisition brightness information and the image source information; the second evaluation result is obtained according to the second evaluation rule, the image synthesis information and the acquisition environment information; and the third evaluation result is obtained according to a third evaluation rule, the acquisition time information and the acquisition brightness information.

6. The method of claim 1, wherein, The structured label of the valid image is obtained according to the pre-constructed decision model, the preset decoder and the acquisition working condition information of the valid image, and includes: According to the decoder, a plurality of candidate structured labels of each valid image and a joint probability of each candidate structured label are obtained respectively; According to the preset defect rule library and the plurality of candidate structured labels, a penalty score of each candidate structured label is determined respectively; According to the decision model, the joint probability of each candidate structured label and the penalty score of each candidate structured label, a structured label of each valid image is determined from the plurality of candidate structured labels respectively.

7. The method of claim 6, wherein, The structured training database at least includes a training sample set and a verification sample set; and the structured training database is constructed according to the valid image working condition set and the structured label of each valid image, and includes: According to the structured label of the valid image, a bucket of the valid image is determined respectively; the structured labels of the valid images stored in the bucket are the same; According to the number of valid images in each bucket, a coverage redundancy of each bucket is calculated respectively; According to the joint probability of the structured label of the valid image, the penalty score of the structured label of the valid image and the coverage redundancy of the bucket where the valid image is located, a sample weight of the valid image is obtained; The valid image whose sample weight meets a third preset condition is stored in the training sample set; The valid image whose sample weight meets a fourth preset condition is stored in the verification sample set.

8. An image training database construction apparatus characterized by comprising: The device includes: The first execution module is configured to obtain an expanded image working condition set according to an initial power image working condition set and a pre-constructed defect growth model; the initial power image working condition set includes an initial image of a power equipment and acquisition working condition information of the initial image; and the defect growth model is used to simulate a defect expansion image of the initial image; The second execution module is configured to filter out valid images from the expanded image working condition set according to a pre-constructed image validity evaluation model, and form a valid image working condition set; The third execution module is configured to obtain a structured label of the valid image according to a pre-constructed decision model, a preset decoder and acquisition working condition information of the valid image; and the structured label is used to indicate a device category, a defect type and a defect stage of the power equipment in the valid image. A fourth executing module is configured to construct a structured training database according to the set of valid image working conditions and the structured labels of the valid images. 9.A computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the computer device is configured to perform the method according to any one of claims 1-8 when the computer program is executed by the processor. The computer program is executed by the processor to implement the steps of the method in any one of claims 1 to 7.

10. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the method in any one of claims 1 to 7.