An automatic image annotation method for power insulators

By acquiring significant information and spatial features in the power image, and combining SAM visual big model for adaptive image segmentation and filtering, the problem of automatic labeling of power insulators under zero sample conditions is solved, high-precision automatic labeling is achieved, and the improvement of Efficiency of development of AI detection model.

CN118736581BActive Publication Date: 2024-11-29STATE GRID HUNAN ELECTRIC POWER CO LTD ELECTRIC POWER SCI RES INST +3
View PDF 9 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Existing vision detection algorithms require a large amount of manual data, which makes it time-consuming and labor-intensive and easy to miss. Existing vision models such as SAM vision models cannot provide accurate power insulator target segmentation under zero sample conditions.

Method used

By inputting power images, an insulator target area probability map with image significance information is obtained, and image segmentation is performed using the spatial characteristics and significance spectrum information of the power images, adaptive threshold processing is used to generate an insulator guidance area, and a SAM visual large model is used to use Automatic labeling is performed, and finally guide filtering is performed to optimize the labeling results.

Benefits of technology

It realizes high-precision automatic labeling of power insulator targets under zero sample conditions, improves the efficiency of insulator AI detection model development, and has great significance and practical value in intelligent power operation and maintenance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118736581B_ABST
    Figure CN118736581B_ABST
Patent Text Reader

Abstract

The present invention provides an automatic image annotation method for power insulators, comprising: obtaining an insulator target region probability map with image saliency information; performing image segmentation by random walk using the spatial features and saliency spectrum information of the power image to obtain an insulator target generation probability map; performing adaptive threshold processing on the insulator target generation probability map to obtain an insulator guide region; using the insulator guide region as the input of a SAM visual large model, outputting the automatically generated insulator target region, and generating an insulator annotation file based on the insulator target region; performing guided filtering processing based on the insulator annotation file to obtain an optimized insulator annotation file. The present invention makes full use of the generalization ability and zero-sample learning ability of the SAM visual large model, fully explores the domain knowledge of the insulator itself, and realizes high-precision automatic annotation of insulator targets in power images under zero-sample conditions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of automatic image target annotation, and in particular to an automatic image annotation method for power insulators. Background Art

[0002] Insulators are important components of overhead power lines. Timely detection of insulator components plays a vital role in line operation and maintenance. However, existing visual inspection algorithms rely on a large amount of insulator training data for model training. These training data require a large amount of manual data annotation. Specifically, annotation engineers need to look at each image in detail and zoom in and out to annotate the data. This annotation mode is not only time-consuming and laborious, but also prone to omissions.

[0003] In recent years, with the rapid development of large visual model technology, such as Segment Anything Model (SAM Large Visual Model), which has achieved excellent general image segmentation by training on the SA-1B dataset (including 1B masks and 11M images). Although the SAM Large Visual Model can perform impressive zero-sample recognition and segmentation performance in various tasks, it cannot provide accurate semantic categories of segmented targets.

[0004] Therefore, there is an urgent need for an automatic image annotation method for power insulators, which can fully utilize the generalization ability and zero-sample learning ability of the SAM visual large model, and at the same time utilize the domain knowledge of the insulators themselves to achieve automatic annotation of power insulator targets under zero-sample conditions. Summary of the invention

[0005] The present invention aims to provide an automatic image annotation method for power insulators, aiming to solve the problem of automatic annotation of power insulator targets under zero sample conditions. The specific technical solution is as follows:

[0006] An automatic image annotation method for power insulators, comprising:

[0007] S1. Input power image , obtain the insulator target area probability map with image saliency information ;

[0008] S2, based on the probability map of the insulator target area , combined with power image The spatial features and significant spectral information of the image are segmented by random walk to obtain the insulator target generation probability map ;

[0009] S3. Generate probability map for insulator targets Perform adaptive threshold processing to obtain the insulator guide area ;

[0010] S4. Insulator guide area As the input of SAM visual large model, the output is the automatically generated insulator target area , based on the insulator target area Generate insulator dimension file ;

[0011] S5, based on insulator marking file Perform guided filtering to obtain optimized insulator marking files .

[0012] In the above technical solution, preferably, in S1, the input power image is calculated The Mahalanobis distance between each test pixel and the image background pixel in is used to obtain the probability map of the insulator target area with image saliency information. .

[0013] In the above technical solution, preferably, the Mahalanobis distance is calculated according to formula (1):

[0014] (1),

[0015] in: For power images The mean of For power images The covariance matrix of represents the transpose of a matrix, represents the probability value that the test pixel belongs to the insulator target, Representing power image A test pixel in .

[0016] In the above technical solution, the random walk solution model in S2 is preferably:

[0017] (3),

[0018] in: is the balance factor, is the spatial constraint, is the significant spectral information constraint term, is the Laplace matrix, is the probability value of a pixel belonging to the insulator target, represents the transpose of a matrix, represents the probability map of the insulator target area, represents the energy function.

[0019] The preferred technical solution is: the probability map of the insulator target area The pixel value is greater than the threshold standard The pixel point is recorded as the insulator target seed point, which is defined as =1, Represents the probability map of the insulator target area The pixel value in the insulator target area probability map The pixel value is less than or equal to the threshold standard The pixel point is recorded as the non-insulated sub-target seed point, which is defined as , Represents the probability map of the insulator target area The pixel value in ;

[0020] Substitute the insulator target seed point and the non-insulator target seed point into formula (3) to obtain formula (5), and solve to obtain The probability value is:

[0021] (5),

[0022] By all And all the solved Composition Collection , for the set Matrix generation of insulator target generation probability map ;

[0023] in: is the value of the pixel point selected as the insulator target seed point in the Laplacian matrix, is the value of the pixel point recorded as the non-insulating sub-target seed point in the Laplacian matrix.

[0024] The above technical solution is preferably, wherein the threshold standard According to formula (4), we can get:

[0025] (4),

[0026] in, The probability map of the insulator target area The average pixel value, The probability map of the insulator target area The maximum pixel value.

[0027] In the above technical solution, preferably, in S2, the insulator target area probability map obtained in S1 needs to be Convert to vectorized representation.

[0028] In the above technical solution, preferably, in S3, a probability map is generated for the insulator target according to formula (6): Perform adaptive thresholding:

[0029] (6),

[0030] in, It stands for adaptive threshold processing.

[0031] In the above technical solution, preferably, in S4, the target area of ​​the insulator is summarized Generate insulator annotation files at each coordinate point :

[0032] (7)

[0033] in, Insulator target area The total number of pixels, Insulator target area Middle The coordinates of the pixel points.

[0034] In the above technical solution, preferably, in S5, guided filtering processing is performed according to formula (8):

[0035] (8)

[0036] in, To guide the filtering operation, the guide image is the power image The first principal component ; are the parameters that guide the filtering operation, Dimension files for optimized insulators.

[0037] The application of the technical solution of the present invention has the following beneficial effects:

[0038] The present invention makes full use of the generalization ability and zero-sample learning ability of the SAM visual large model, and combines the power image The spatial characteristics and significant spectral information of the insulator are used for image segmentation through random walk, which fully mines the domain knowledge of the insulator itself, realizes high-precision automatic labeling of insulator targets in power images under zero-sample conditions, and improves the efficiency of the development of insulator AI detection models, which is of great significance and practical value in intelligent power operation and maintenance.

[0039] In addition to the above-described purposes, features and advantages, the present invention has other purposes, features and advantages. The present invention will be further described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] The drawings constituting a part of this application are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0041] Figure 1 It is a flow chart of the automatic image annotation method for power insulators of the present invention. DETAILED DESCRIPTION

[0042] In order to facilitate the understanding of the present invention, the present invention will be described more fully below, and preferred embodiments of the present invention are provided. However, the present invention can be implemented in many different forms and is not limited to the embodiments described herein. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present invention more thorough and comprehensive.

[0043] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used in the specification of the present invention herein are only for the purpose of describing specific embodiments and are not intended to limit the present invention.

[0044] Example:

[0045] See also Figure 1 This embodiment provides an automatic image annotation method for power insulators, which specifically includes the following steps:

[0046] S1. Input power image , obtain the insulator target area probability map with image saliency information ;

[0047] Preferably, the power image of the input is calculated The Mahalanobis distance between each test pixel and the image background pixel in is used to obtain the insulator target area probability map with image saliency information. ;

[0048] Specifically, the Mahalanobis distance is calculated according to formula (1):

[0049] (1),

[0050] in, For power images The mean of For power images The covariance matrix of represents the transpose of a matrix, represents the probability value that the test pixel belongs to the insulator target, Representing power image A test pixel in .

[0051] It is known to those skilled in the art that in an electric power image The statistical information of the insulator target pixels and the surrounding background pixels in the power image has a large difference. Specifically, the insulator target pixels in the power image account for a small proportion, and most of the pixels in the power image account for the background area target. Therefore, the Mahalanobis distance calculation can effectively detect the power image. Insulator target region probability map with image saliency information in .

[0052] S2, based on the probability map of the insulator target area , combined with power image The spatial characteristics and significant spectral information of the image are used for image segmentation to obtain the insulator target generation probability map ;

[0053] The following will describe step S2 in detail, as follows:

[0054] Prior art "L. Grady, Grady N: L, Firstname: L, et al. Random Walksfor Image Segmentation[J]. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2006. DOI:10.1109 / TPAMI.2006.233." proposed a random walk algorithm for image segmentation, specifically an image segmentation method based on spatial constraints, and its solution formula is as follows:

[0055] (2),

[0056] in, Represents the target type of a certain category, is the Laplace matrix, Indicates that a pixel in the image belongs to The probability value of the class, represents the energy function; for how to solve formula (2), please refer to the prior art, which will not be described in detail in this embodiment.

[0057] The random walk algorithm in the prior art is to use the spatial information of the image itself and combine it with known labeled pixels to perform image segmentation; however, using only the spatial features of the image may not be able to obtain a good segmentation result for the insulator target. On this basis, this embodiment improves the random walk algorithm in the prior art. In order to improve the image segmentation effect of the random walk algorithm, this embodiment combines the use of power image segmentation The spatial features and significant spectral information of the image are used for image segmentation. Based on formula (2), a significant spectral information constraint term is constructed: , substituting into formula (2) to obtain formula (3):

[0058] (3),

[0059] in, is the balance factor, which is used to balance the weight value of the formula. is the spatial constraint term (i.e. the existing random walk solution model), is the Laplace matrix, is the probability value of a certain pixel belonging to the insulator target.

[0060] Furthermore, in order to generate significant spectral information constraints , the insulator target area probability map needs to be Converted into vectorized representation, the salient spectral constraint term can effectively mine the salient spectral information of the insulator target in the image and fully mine the domain knowledge of the insulator itself.

[0061] Specifically, in order to automatically extract the vectorized insulator target area probability map The seed point of the insulator target needs to set a threshold standard :

[0062] (4),

[0063] in, The probability map of the insulator target area The average pixel value, The probability map of the insulator target area The maximum pixel value.

[0064] When the insulator target area probability map The pixel value of the pixel in the middle is greater than the threshold standard When , the pixel point is selected as the insulator target seed point and defined as =1, Represents the probability map of the insulator target area The pixel value in the insulator target area probability map The pixels that are not selected as insulator target seed points are recorded as non-insulator target seed points (i.e., the insulator target region probability map The pixel value is less than or equal to the threshold standard ), which is defined as , Represents the probability map of the insulator target area In this embodiment, the seed point is based on the initial power image It is automatically generated in the process, so no additional manual interaction is required, which is more practical in the automatic marking of insulators.

[0065] Substituting the insulator target seed point and the non-insulator target seed point into formula (3) yields formula (5):

[0066] (5),

[0067] In formula (5), represents the transpose of a matrix, represents the pixel point selected as the insulator target seed point, =1, The probability map of the pixel point selected as the insulator target seed point in the insulator target area The pixel value in is the value of the pixel point selected as the insulator target seed point in the Laplacian matrix, Indicates the pixel point recorded as the non-insulating sub-target seed point, The probability map of pixels marked as non-insulator target seed points in the insulator target area The pixel value in is the value of the pixel point recorded as the non-insulating sub-target seed point in the Laplacian matrix, is the balancing factor.

[0068] Furthermore, for the energy function shown in formula (5) Solve to obtain all The probability value of and after solving Composition Collection , for the set Matrix generation of insulator target generation probability map .

[0069] S3. Generate probability map for insulator targets Perform adaptive threshold processing to obtain the insulator guide area ;

[0070] Preferably, a probability map is generated based on the insulator target Gray value distribution in different regions, calculate its local threshold, and be able to adaptively calculate different thresholds, and then adaptively generate high-quality insulator guide regions :

[0071] (6),

[0072] in, It stands for adaptive threshold processing.

[0073] S4. Insulator guide area As the input of SAM visual large model, the output is the automatically generated insulator target area , based on the insulator target area Generate insulator dimension file ;

[0074] Among them, the SAM visual model (Segment Anything Model) generates high-quality object segmentation regions through input prompts such as points or boxes, and can be used to generate segmentation regions for all objects in the image. It has been trained on a dataset of 11 million images and 1.1 billion segmentation regions, and has strong zero-shot performance on various segmentation tasks. This embodiment makes full use of the generalization ability and zero-shot learning ability of the SAM visual model, using the insulator-guided region As the input of the SAM visual model, the insulator target region is automatically generated through adaptive image segmentation. .

[0075] Further, in step S4, the insulator marking file is obtained Specifically:

[0076] By summarizing the insulator target area Generate insulator annotation files at each coordinate point :

[0077] (7)

[0078] in, Insulator target area The total number of pixels, Insulator target area Middle The coordinates of the pixel points.

[0079] S5, based on insulator marking file Perform guided filtering to obtain optimized insulator marking files ;

[0080] Although the insulator marking file has been automatically generated in step S4 However, the texture features of power images are complex and changeable, so the insulator annotation file There are still a few outlier annotated area blocks in the file. These annotated area blocks do not contain the insulator target area, and most of them focus on the background interference area. Therefore, in this embodiment, On this basis, guided filtering operation is also required to generate the optimal insulator segmentation result map by removing the spatially isolated pixel blocks in the segmented area, and output the result map as a sample annotation file to achieve the purpose of automatic insulator annotation.

[0081] Preferably, the guided filtering in step S5 is specifically:

[0082] (8)

[0083] in, To guide the filtering operation, the guide image is the power image The first principal component ; are the parameters that guide the filtering operation, For the optimized insulator marking file; further, in this embodiment, according to experience, =0.5, =5, the first principal component Power image processing by principal component analysis (PCA) Get.

[0084] The effect of applying the technical solution in this embodiment is: fully utilizing the generalization ability and zero-sample learning ability of the SAM visual large model, and combining the power image The spatial characteristics and significant spectral information of the insulator are used for image segmentation through random walk, which fully mines the domain knowledge of the insulator itself, realizes high-precision automatic labeling of insulator targets in power images under zero-sample conditions, and improves the efficiency of the development of insulator AI detection models, which is of great significance and practical value in intelligent power operation and maintenance.

[0085] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. An automatic image annotation method for power insulators, characterized in that: include: S1. Input power image , obtain the insulator target area probability map with image saliency information ; S2, based on the probability map of the insulator target area , combined with power image The spatial features and significant spectral information of the image are segmented by random walk to obtain the insulator target generation probability map ; S3. Generate probability map for insulator targets Perform adaptive threshold processing to obtain the insulator guide area ; S4. Insulator guide area As the input of SAM visual large model, the output is the automatically generated insulator target area , based on the insulator target area Generate insulator dimension file ; S5, based on insulator marking file Perform guided filtering to obtain optimized insulator marking files ; In S1, the input power image is calculated The Mahalanobis distance between each test pixel and the image background pixel in is used to obtain the insulator target area probability map with image saliency information. ; Calculate the Mahalanobis distance according to formula (1): (1), in: For power images The mean of For power images The covariance matrix of represents the transpose of a matrix, represents the probability value that the test pixel belongs to the insulator target, Representing power image A test pixel in ; The solution model for random walk in S2 is: (3), in: is the balance factor, is the spatial constraint, is the significant spectral information constraint term, is the Laplace matrix, is the probability value of a pixel belonging to the insulator target, represents the transpose of a matrix, represents the probability map of the insulator target area, represents the energy function; Insulator target area probability map The pixel value is greater than the threshold standard The pixel point is recorded as the insulator target seed point, which is defined as =1, Represents the probability map of the insulator target area The pixel value in the insulator target area probability map The pixel value is less than or equal to the threshold standard The pixel point is recorded as the non-insulated sub-target seed point, which is defined as , Represents the probability map of the insulator target area The pixel value in ; Substitute the insulator target seed point and the non-insulator target seed point into formula (3) to obtain formula (5), and solve to obtain The probability value is: (5), By all And all the solved Composition Collection , for the set Matrix generation of insulator target generation probability map ; in: is the value of the pixel point selected as the insulator target seed point in the Laplacian matrix, is the value of the pixel point recorded as the non-insulating sub-target seed point in the Laplacian matrix.

2. The automatic image annotation method for power insulators according to claim 1 is characterized in that: The threshold standard According to formula (4), we can get: (4), in, The probability map of the insulator target area The average pixel value, The probability map of the insulator target area The maximum pixel value.

3. The automatic image annotation method for power insulators according to claim 1 is characterized in that: In S2, the insulator target area probability map obtained in S1 needs to be Convert to vectorized representation.

4. The automatic image annotation method for power insulators according to claim 1 is characterized in that: In S3, a probability map is generated for the insulator target according to formula (6): Perform adaptive thresholding: (6), in, It stands for adaptive threshold processing.

5. The automatic image annotation method for power insulators according to claim 1 is characterized in that: S4 by summarizing the insulator target area Generate insulator annotation files at each coordinate point : (7), in, Insulator target area The total number of pixels, Insulator target area Middle The coordinates of the pixel points.

6. The automatic image annotation method for power insulators according to claim 1 is characterized in that: In S5, guided filtering is performed according to formula (8): (8), in, To guide the filtering operation, the guide image is the power image The first principal component ; are the parameters that guide the filtering operation, Dimension files for optimized insulators.

Citation Information

Patent Citations

  • Automatic image labeling method based on K neighbors and random walk algorithm

    CN110516092A

  • Insulator image recognition method and system based on salient features

    CN111881922A

  • Salient edge guided insulator region detection method

    CN112435208A

  • Light-weight insulator defect detection method and device based on deep learning

    CN117496223A

  • Image automatic annotation method and computer readable storage medium

    CN118015620A