Insulator defect detection method, device, equipment and storage medium

By using deep learning models to automatically detect insulators and defects, the problems of high labor costs and low efficiency in existing technologies have been solved, achieving efficient and accurate insulator defect detection.

CN114693609BActive Publication Date: 2026-03-24WUHAN FEILIU INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-10
Publication Date
2026-03-24

AI Technical Summary

Technical Problem

Existing methods for detecting defects in power insulators rely on manual judgment, resulting in high labor costs and low inspection efficiency.

Method used

A deep learning model is used to automatically detect insulators and defects. This includes training an insulator detection model and a defect detection model, identifying insulator pairs or strings through image processing technology, and performing magnification and rotation processing to improve detection accuracy.

Benefits of technology

It reduces the cost of manual inspection, improves detection efficiency and accuracy, reduces false detections, and realizes automated insulator defect detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114693609B_ABST
    Figure CN114693609B_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of power equipment inspection, and discloses an insulator defect detection method, device, equipment and storage medium. The method comprises the following steps: when a to-be-detected image is acquired, detecting an insulator pair or an insulator string from the to-be-detected image according to a trained insulator detection model to obtain an insulator detection frame; magnifying the insulator detection frame according to a preset ratio to obtain a target detection frame; and detecting an insulator defect from an image corresponding to the target detection frame according to a trained insulator defect detection model to obtain an insulator defect detection result. In the foregoing manner, after the image is collected, the insulator detection and the insulator defect detection are automatically performed, the occurrence position of the insulator defect is determined, the artificial inspection cost is reduced, and the detection precision and the detection efficiency are improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of power equipment inspection, and in particular to an insulator defect detection method, device, equipment and storage medium. BACKGROUND

[0002] At present, the insulator defect detection of electric power is generally in the mode of "mainly relying on manual inspection and supplemented by machine inspection": images are collected by a drone, and the positions of insulator defects in the images are determined by manual judgment. This method has the problems of high labor cost and low inspection efficiency.

[0003] The above content is only used to assist in understanding the technical solutions of the present application and does not represent the acknowledgement of the above content as prior art. SUMMARY

[0004] The main purpose of the present application is to provide an insulator defect detection method, device, equipment and storage medium, which aims to solve the technical problems of high labor cost and low inspection efficiency of the current insulator defect detection method of electric power.

[0005] To achieve the above purpose, the present application provides an insulator defect detection method, which comprises the following steps:

[0006] When the to-be-detected image is obtained, the insulator pair or insulator string is detected from the to-be-detected image according to the trained insulator detection model, and an insulator detection frame is obtained;

[0007] The insulator detection frame is enlarged according to a preset ratio, and a target detection frame is obtained;

[0008] The insulator defects are detected from the image corresponding to the target detection frame according to the trained insulator defect detection model, and an insulator defect detection result is obtained.

[0009] Optionally, after the insulator detection frame is enlarged according to the preset ratio to obtain the target detection frame, the method further comprises:

[0010] The main direction corresponding to the plurality of insulator pieces in the target detection frame is determined;

[0011] The target detection frame is rotated according to the main direction, so that the insulator pair or insulator string in the target detection frame is in a horizontal direction, and a target detection frame after rotation processing is obtained;

[0012] The insulator defects are detected from the image corresponding to the target detection frame after rotation processing according to the trained insulator defect detection model, and an insulator defect detection result is obtained.

[0013] Optionally, before the detecting insulator pairs or insulator strings from the to-be-detected image according to the trained insulator detection model to obtain an insulator detection frame when the to-be-detected image is acquired, the method further comprises:

[0014] acquiring a sample image and corresponding annotation information, wherein the annotation information comprises insulator annotation information and defect annotation information;

[0015] training an insulator detection model according to the sample image and the insulator annotation information to obtain a trained insulator detection model;

[0016] training an insulator defect detection model according to the sample image and the defect annotation information to obtain a trained insulator defect detection model.

[0017] Optionally, before the acquiring a sample image and corresponding annotation information, the method further comprises:

[0018] if paired insulator strings exist in the first sample image, a first annotation frame is obtained by framing the insulator pairs, and an insulator pair category is annotated for the first annotation frame according to insulator string features, and the insulator annotation information corresponding to the first sample image is generated according to the first annotation frame and the insulator pair category, wherein the insulator pair category is a glass insulator pair, a ceramic insulator pair, a composite insulator pair or other insulator pair;

[0019] if a single insulator string is contained in the second sample image, a second annotation frame is obtained by framing the insulator string, and an insulator string category is annotated for the second annotation frame according to insulator string features, and the insulator annotation information corresponding to the second sample image is generated according to the second annotation frame and the insulator string category, wherein the insulator string category is a glass insulator string, a ceramic insulator string, a composite insulator string or other insulator string;

[0020] if no insulator string is contained in the third sample image, empty annotation information is taken as the insulator annotation information corresponding to the third sample image.

[0021] Optionally, the detecting insulator pairs or insulator strings from the to-be-detected image according to the trained insulator detection model to obtain an insulator detection frame when the to-be-detected image is acquired comprises:

[0022] when the to-be-detected image is acquired, the to-be-detected image is input into the trained insulator detection model to detect whether the to-be-detected image contains insulator pairs or insulator strings;

[0023] determining the confidence degree corresponding to each insulator pair category or each insulator string category;

[0024] select a target category with the highest confidence from each insulator pair category or each insulator string category, and determine an insulator detection frame corresponding to the target category.

[0025] Optionally, before the sample images and the corresponding label information are acquired, the method further comprises:

[0026] If there is an insulator string missing defect in the fourth sample image, a missing position and an insulator piece adjacent to the missing position are framed to obtain a first defect label frame, and the first defect label frame is labeled with a missing category, and the defect label information corresponding to the fourth sample image is generated according to the first defect label frame and the missing category;

[0027] If there is a defect other than the insulator string missing defect in the fifth sample image, a second defect label frame is generated by framing a defect occurrence position, and the second defect label frame is labeled with a defect category, and the defect label information corresponding to the fifth sample image is generated according to the second defect label frame and the defect category;

[0028] If there is no insulator defect in the sixth sample image, empty label information is taken as the defect label information corresponding to the sixth sample image.

[0029] Optionally, after the sample images and the corresponding label information are acquired, the method further comprises:

[0030] The sample images are respectively subjected to rotation processing, flip processing and mosaic enhancement to increase the number of sample images;

[0031] A training set is generated according to the sample images, the processed sample images and the label information;

[0032] The insulator detection model and the insulator defect detection model are trained according to the training set to obtain a trained insulator detection model and a trained insulator defect detection model

[0033] In addition, to achieve the above object, the application further provides an insulator defect detection device, which comprises:

[0034] An insulator detection module is configured to, when a to-be-detected image is acquired, detect an insulator pair or an insulator string from the to-be-detected image according to a trained insulator detection model to obtain an insulator detection frame;

[0035] An adjusting module is configured to magnify the insulator detection frame by a preset ratio to obtain a target detection frame;

[0036] A defect detection module is configured to detect an insulator defect from an image corresponding to the target detection frame according to a trained insulator defect detection model to obtain an insulator defect detection result.

[0037] In addition, to achieve the above object, the application further provides an insulator defect detection device, comprising a memory, a processor and an insulator defect detection program stored in the memory and executable on the processor, the insulator defect detection program being configured to implement the insulator defect detection method as described above.

[0038] In addition, to achieve the above object, the application further provides a storage medium having an insulator defect detection program stored thereon, the insulator defect detection program being executable by a processor to implement the insulator defect detection method as described above.

[0039] In the application, when the to-be-detected image is acquired, the insulator pair or the insulator string is detected from the to-be-detected image according to the trained insulator detection model to obtain an insulator detection frame; the insulator detection frame is enlarged according to a preset ratio to obtain a target detection frame; and the insulator defect is detected from the image corresponding to the target detection frame according to the trained insulator defect detection model to obtain an insulator defect detection result. In the foregoing manner, after the image is collected, the insulator detection and the insulator defect detection are automatically performed, the occurrence position of the insulator defect is determined, the artificial inspection cost is reduced, the detection efficiency is improved, the insulator detection frame is enlarged, the defects of the insulator pair or the insulator string and the surrounding image are detected, the false detection caused by the defect position exceeding the target detection frame is avoided, and the insulator defect detection precision is improved. BRIEF DESCRIPTION OF DRAWINGS

[0040] Figure 1 FIG. 1 is a structural schematic diagram of an insulator defect detection device of a hardware running environment related to an embodiment scheme of the application;

[0041] Figure 2 FIG. 2 is a flowchart of a first embodiment of an insulator defect detection method of the application;

[0042] Figure 3 FIG. 3 is a flowchart of a second embodiment of an insulator defect detection method of the application;

[0043] Figure 4 FIG. 4 is a structural block diagram of a first embodiment of an insulator defect detection device of the application.

[0044] The implementation, functional features and advantages of the application will be further described with reference to the embodiments and the accompanying drawings. DETAILED DESCRIPTION

[0045] It should be understood that the specific embodiments described herein are merely intended to explain the application, and are not intended to limit the application.

[0046] Reference Figure 1 ,Figure 1 A structure diagram of an insulator defect detection device related to a hardware running environment of an embodiment of the present application is shown.

[0047] As shown in Figure 1 , the insulator defect detection device can include a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. The communication bus 1002 is used to realize the connection and communication between the components. The user interface 1003 can include a display, an input unit such as a keyboard, and can also include a standard wired interface, a wireless interface. The network interface 1004 can optionally include a standard wired interface, a wireless interface (such as a wireless fidelity (Wi-Fi) interface). The memory 1005 can be a high-speed random access memory (RAM) or a stable non-volatile memory (NVM), such as a disk memory. The memory 1005 can also be a storage device independent of the aforementioned processor 1001.

[0048] Those skilled in the art can understand that Figure 1 the structure shown in the figure does not constitute a limitation on the insulator defect detection device, and can include more or fewer components than the figure, or combine certain components, or different component arrangements.

[0049] As shown in Figure 1 , the memory 1005 as a storage medium can include an operating system, a network communication module, a user interface module, and an insulator defect detection program.

[0050] In the insulator defect detection device shown in Figure 1 , the network interface 1004 is mainly used for data communication with a network server; the user interface 1003 is mainly used for data interaction with a user; the processor 1001 and the memory 1005 in the insulator defect detection device of the present application can be arranged in the insulator defect detection device, and the insulator defect detection device calls the insulator defect detection program stored in the memory 1005 through the processor 1001, and executes the insulator defect detection method provided by the embodiment of the present application.

[0051] The embodiment of the present application provides an insulator defect detection method, which refers to Figure 2 , Figure 2 A flowchart of a first embodiment of the insulator defect detection method of the present application is shown.

[0052] In this embodiment, the insulator defect detection method comprises the following steps:

[0053] Step S10: When the to-be-detected image is acquired, the insulator pair or insulator string is detected from the to-be-detected image according to the trained insulator detection model, and an insulator detection box is obtained.

[0054] It can be understood that the execution subject of the embodiment is an insulator defect detection device, which can be a computer, a server, a mobile terminal or a device with inference capability, and can also be a drone with inference capability. The embodiment does not limit this.

[0055] It should be noted that the drone flies according to the pre-set inspection route, collects video data or image data, extracts multiple images from the video data according to a pre-set frequency, thereby obtaining to-be-detected images, and transmits the to-be-detected images to the insulator defect detection device for insulator detection and insulator defect detection.

[0056] It should be understood that the insulator detection model and the insulator defect detection model are trained in advance according to a large amount of sample data to obtain trained models, wherein the trained insulator detection model is used to detect a single insulator string or a pair of insulator pairs in an image and output a detection box and a corresponding insulator string category or insulator pair category. The insulator string category includes: glass insulator string, ceramic insulator string, composite insulator string and other insulator string. The insulator pair category includes: glass insulator pair, ceramic insulator pair, composite insulator pair and other insulator pair. The trained insulator defect detection model is used to detect insulator defects in an image and output defect positions and defect categories. The defect category includes: insulator missing, umbrella skirt damage, root breakage, RTV shedding, surface corrosion, etc.

[0057] Step S20: The insulator detection box is enlarged according to a pre-set ratio to obtain a target detection box.

[0058] It should be noted that there can be multiple target detection boxes in the same image, and each target detection box contains a single insulator string or a pair of insulator pairs. The pre-set ratio is a fixed ratio set in advance. In this embodiment, the insulator detection box is enlarged so that the positions that may have defects are all included in the target detection box, avoiding insulator defect mis-detection. For example, an insulator piece in an insulator string is missing, but the detection box output by the insulator detection model does not frame the missing position. By enlarging the insulator detection box, the target detection box frames the missing position, providing data support for subsequent insulator defect detection.

[0059] Further, in order to further improve the detection rate of insulator defects, after the step S20, the method further comprises: determining a main direction corresponding to the plurality of insulator pieces in the target detection frame; rotating the target detection frame according to the main direction, so that the insulator pair or the insulator string in the target detection frame is in a horizontal direction, to obtain a target detection frame after rotation processing; and detecting insulator defects from the image corresponding to the target detection frame after rotation processing according to the trained insulator defect detection model, to obtain an insulator defect detection result.

[0060] It should be understood that, in the embodiment, the insulator pieces are detected at the same time as the insulator string or the insulator pair is detected, the PCA principal component analysis technology is used to determine the main direction of the insulator pieces in the target detection frame, i.e., the insulator string direction, the target detection frame is rotated according to the main direction, so that the insulator string or the insulator pair is rotated to be horizontal, and then the trained insulator defect detection model is used for defect detection, so that the detection rate is significantly improved. In the training process, the insulator defect detection model learns the insulator defects placed horizontally and the insulator string defects placed in other directions at the same time, and when the insulator string fails to rotate due to the failure of insulator piece detection or the like, the insulator defects can still be detected.

[0061] Step S30: detecting insulator defects from the image corresponding to the target detection frame according to the trained insulator defect detection model, to obtain an insulator defect detection result.

[0062] It should be noted that, in the embodiment, the trained insulator defect detection model is used to detect the image in the target detection frame, and a defect detection frame and a defect category are output, wherein the defect detection frame is used to locate the position where the defect occurs, and if no insulator defect is detected in the image corresponding to the target detection frame, an empty detection frame and a defect category null value are output. Preferably, when the insulator defect is detected, attribute information corresponding to the image to be detected is acquired, such as shooting time, shooting position and the like, an inspection record is generated according to the attribute information and the insulator defect detection result, and the inspection record is reported to prompt an inspection personnel to process the insulator defect.

[0063] In a specific implementation, the basic framework of the insulator detection model and the insulator defect detection model of the embodiment can be divided into four parts: Input, Backbone, Neck and Prediction; wherein:

[0064] The Input part enriches the data set through splicing data, rotating data, enhancing mosaic and the like;

[0065] The Backbone part is mainly composed of a CSP module, and performs feature extraction;

[0066] The Neck part uses a FPN and a path aggregation network (PANet) to aggregate image features of this stage.

[0067] The Prediction part performs target prediction and outputs by prediction.

[0068] In the embodiment, when the to-be-detected image is acquired, insulator pairs or insulator strings are detected from the to-be-detected image according to the trained insulator detection model to obtain insulator detection boxes; the insulator detection boxes are enlarged according to a preset ratio to obtain target detection boxes; and insulator defects are detected from images corresponding to the target detection boxes according to the trained insulator defect detection model to obtain insulator defect detection results. Through the above manner, insulator detection and insulator defect detection are automatically performed after the image is collected, the occurrence position of the insulator defect is determined, the artificial inspection cost is reduced, the detection efficiency is improved, the insulator detection boxes are enlarged, the insulator pairs or insulator strings and the surrounding images are detected for defects, the false detection caused by the defect position exceeding the target detection box is avoided, and the insulator defect detection precision is improved.

[0069] Reference Figure 3 , Figure 3 FIG. 2 is a flowchart of an insulator defect detection method according to a second embodiment of the present application.

[0070] Based on the above first embodiment, the insulator defect detection method of the present embodiment further comprises, before the step S10:

[0071] Step S101: acquiring sample images and corresponding annotation information, wherein the annotation information comprises insulator annotation information and defect annotation information.

[0072] It can be understood that the deep learning neural network is iteratively trained multiple times using the sample images and the annotation information in the embodiment to obtain two models for detecting insulator strings and insulator defects, respectively. The annotation information is a detection box that frames a target and a corresponding category. In a specific implementation, an identifier is set in advance to distinguish the insulator annotation information and the defect annotation information, and the annotation information corresponding to the sample images is read according to the identifier when the different models are trained.

[0073] Further, before the step S101, the method further comprises: if there are pairs of insulator strings in the first sample image, then a first bounding box is obtained by bounding the insulator pairs, and a class of the insulator pairs is labeled for the first bounding box according to the characteristics of the insulator strings, and insulator labeling information corresponding to the first sample image is generated according to the first bounding box and the class of the insulator pairs, wherein the class of the insulator pairs is a glass insulator pair, a ceramic insulator pair, a composite insulator pair, or other insulator pairs; if the second sample image contains a single insulator string, then a second bounding box is obtained by bounding the insulator string, and a class of the insulator string is labeled for the second bounding box according to the characteristics of the insulator string, and insulator labeling information corresponding to the second sample image is generated according to the second bounding box and the class of the insulator string, wherein the class of the insulator string is a glass insulator string, a ceramic insulator string, a composite insulator string, or other insulator strings; and if the third sample image does not contain an insulator string, then empty labeling information is taken as the insulator labeling information corresponding to the third sample image.

[0074] It should be noted that, in the embodiment, different insulator characteristics are distinguished and labeled, so as to improve the detection efficiency of the insulator string or the insulator pair. Since the insulator strings appear in pairs, if the trained model detects a single insulator string, the insulator string paired with it will affect the model detection result, increasing the difficulty of model detection. In the embodiment, the paired insulator strings are labeled as glass insulator pairs, ceramic insulator pairs, composite insulator pairs, and other insulator pairs, and the single insulator string is labeled as glass insulator string, ceramic insulator string, composite insulator string, and other insulator string. In this way, the deep learning neural network is guided to learn characteristics with stronger expressiveness and easier classification and detection. The deep learning neural network uses these characteristics to achieve detection and classification, further improving the model detection accuracy.

[0075] Specifically, the step S101 comprises: when a to-be-detected image is acquired, inputting the to-be-detected image into the trained insulator detection model to detect whether the to-be-detected image contains an insulator pair or an insulator string; determining a confidence degree corresponding to each insulator pair class or each insulator string class; selecting a target class with the highest confidence degree from each insulator pair class or each insulator string class, and determining an insulator detection box corresponding to the target class.

[0076] It should be understood that, for the same insulator detection box, the trained insulator detection model only outputs the class with the highest confidence degree, further improving the detection rate and recognition rate.

[0077] Further, before the step S101, the method further comprises: if there is a missing insulator string defect in the fourth sample image, then frame the missing position and the insulator pieces adjacent to the missing position to obtain a first defect bounding box, and label the missing category for the first defect bounding box, and generate the defect labeling information corresponding to the fourth sample image according to the first defect bounding box and the missing category; if there is a defect other than the missing insulator string defect in the fifth sample image, then frame the defect occurrence position to generate a second defect bounding box, and label the defect category for the second defect bounding box, and generate the defect labeling information corresponding to the fifth sample image according to the second defect bounding box and the defect category; if there is no insulator defect in the sixth sample image, then empty labeling information is taken as the defect labeling information corresponding to the sixth sample image.

[0078] It should be noted that, since the insulator missing curve is easy to be confused with the insulator end, leading to misidentification of the insulator defect, in the embodiment, the insulator missing position is combined with the insulator pieces adjacent to the left and right sides to be labeled, so that after the sample picture is labeled and the insulator defect detection model is trained, the model learns how to detect the insulator missing defect, effectively detects the insulator missing defect, and does not misdetect the insulator end. Other category defects (including umbrella skirt damage, root breakage, RTV shedding, surface corrosion, etc.) only label the position where the defect occurs. When detecting the insulator defect, the insulator string or the insulator pair is first detected, and then the insulator defect is detected in the insulator string or the insulator string region, thereby reducing the misdetection rate of the insulator defect.

[0079] Further, after the step S101, the method further comprises: performing rotation processing, flip processing and mosaic enhancement on the sample images respectively to increase the number of sample images; generating a training set according to the sample images, the processed sample images and the labeling information; training the insulator detection model and the insulator defect detection model according to the training set to obtain the trained insulator detection model and the trained insulator defect detection model

[0080] It should be understood that, when training the model, the data splicing, rotation processing, flip processing and mosaic enhancement are used to increase the number of training samples and increase the coverage of the training samples. The clustering method is used to determine a plurality of best candidate values of the search box size, thereby avoiding that the target cannot be detected due to the search box being too large, too small or having an inappropriate aspect ratio.

[0081] Step S102: training the insulator detection model according to the sample images and the insulator labeling information to obtain a trained insulator detection model.

[0082] Step S103: training the insulator defect detection model according to the sample image and the defect annotation information, to obtain a trained insulator defect detection model.

[0083] It should be noted that in the embodiment, the sample image and the corresponding annotation information are input to the insulator detection model, the insulator detection model identifies the sample image, and outputs a first prediction result, the first prediction result includes a predicted detection frame, the predicted detection frame is enlarged according to a preset ratio to obtain a target prediction detection frame, an image corresponding to the target prediction detection frame is input to the insulator defect detection model, the insulator defect detection model performs defect detection, and outputs a second prediction result, a joint loss value is determined according to the insulator annotation information, the first prediction result, the defect annotation information and the second prediction result, whether the joint loss value is less than a preset threshold is determined, if yes, it indicates that the insulator detection model and the insulator defect detection model are trained, if not, iterative learning is continued until the joint loss value is less than the preset threshold or the number of iterations reaches a maximum number of iterations, to obtain a trained insulator detection model and a trained insulator defect detection model.

[0084] In the embodiment, the sample image and the corresponding annotation information are obtained, the annotation information includes insulator annotation information and defect annotation information, the insulator detection model is trained according to the sample image and the insulator annotation information, to obtain a trained insulator detection model, the insulator defect detection model is trained according to the sample image and the defect annotation information, to obtain a trained insulator defect detection model, when the to-be-detected image is obtained, the insulator pair or the insulator string is detected from the to-be-detected image according to the trained insulator detection model, to obtain an insulator detection frame, the insulator detection frame is enlarged according to a preset ratio, to obtain a target detection frame, and the insulator defect is detected from the image corresponding to the target detection frame according to the trained insulator defect detection model, to obtain an insulator defect detection result. In the above manner, the model is trained by using the sample image and the annotation information, the trained model is used to automatically perform insulator detection and insulator defect detection after the image is collected, the occurrence position of the insulator defect is determined, the artificial inspection cost is reduced, the detection efficiency is improved, the insulator detection frame is enlarged, the defect detection is performed on the insulator pair or the insulator string and the surrounding image, the false detection caused by the defect position exceeding the target detection frame is avoided, and the insulator defect detection precision is improved.

[0085] In addition, the embodiment of the present application also provides a storage medium, the storage medium stores an insulator defect detection program, and the insulator defect detection program is executed by a processor to realize the insulator defect detection method as described above.

[0086] Since the storage medium adopts all the technical solutions of the above embodiments, it has all the beneficial effects brought by the technical solutions of the above embodiments, which will not be repeated here.

[0087] With reference to Figure 4 , Figure 4 is a structural block diagram of the first embodiment of the insulator defect detection device.

[0088] As Figure 4 shown, the insulator defect detection device provided by the embodiment of the application comprises:

[0089] The insulator detection module 10 is configured to, when a to-be-detected image is acquired, detect an insulator pair or an insulator string from the to-be-detected image according to a trained insulator detection model, and obtain an insulator detection frame.

[0090] The adjusting module 20 is configured to magnify the insulator detection frame according to a preset ratio, and obtain a target detection frame.

[0091] The defect detection module 30 is configured to detect an insulator defect from an image corresponding to the target detection frame according to a trained insulator defect detection model, and obtain an insulator defect detection result.

[0092] It should be understood that the above is only for illustration, and does not constitute any limitation on the technical solutions of the application. In specific applications, those skilled in the art can set it up as needed, and the application does not limit this.

[0093] In the embodiment, when a to-be-detected image is acquired, an insulator pair or an insulator string is detected from the to-be-detected image according to a trained insulator detection model, an insulator detection frame is obtained, the insulator detection frame is magnified according to a preset ratio, a target detection frame is obtained, and an insulator defect is detected from an image corresponding to the target detection frame according to a trained insulator defect detection model, and an insulator defect detection result is obtained. Through the above manner, after the image is collected, the insulator detection and the insulator defect detection are automatically performed, the occurrence position of the insulator defect is determined, the artificial inspection cost is reduced, the detection efficiency is improved, the insulator detection frame obtained by detection is magnified, the insulator pair or the insulator string and the surrounding image are detected for defects, the false detection caused by the defect position exceeding the target detection frame is avoided, and the insulator defect detection precision is improved.

[0094] It should be noted that the above-described workflow is only illustrative and does not limit the scope of protection of the application. In actual applications, those skilled in the art can select part or all of them to achieve the purpose of the embodiment of the application according to actual needs, which is not limited here.

[0095] In addition, technical details not described in detail in the present embodiment can be found in the insulator defect detection method provided by any embodiment of the present application, which will not be described here.

[0096] In an embodiment, the adjusting module 20 is further configured to determine a main direction corresponding to a plurality of insulator pieces in the target detection frame, and rotate the target detection frame according to the main direction, so that the insulator pair or the insulator string in the target detection frame is in a horizontal direction, to obtain a target detection frame after rotation processing.

[0097] The defect detection module 30 is further configured to detect insulator defects from the image corresponding to the target detection frame after rotation processing according to the trained insulator defect detection model, to obtain an insulator defect detection result.

[0098] In an embodiment, the insulator defect detection device further comprises a training module.

[0099] The training module is configured to obtain sample images and corresponding annotation information, wherein the annotation information comprises insulator annotation information and defect annotation information, train an insulator detection model according to the sample images and the insulator annotation information, to obtain a trained insulator detection model, and train an insulator defect detection model according to the sample images and the defect annotation information, to obtain a trained insulator defect detection model.

[0100] In an embodiment, the insulator defect detection device further comprises an insulator annotation module.

[0101] The insulator annotation module is configured to:

[0102] If there is a pair of insulator strings in the first sample image, a first annotation frame is obtained by framing the insulator pair, and an insulator pair category is annotated for the first annotation frame according to the insulator string feature, and the insulator annotation information corresponding to the first sample image is generated according to the first annotation frame and the insulator pair category, wherein the insulator pair category is a glass insulator pair, a ceramic insulator pair, a composite insulator pair or other insulator pair.

[0103] If the second sample image contains a single insulator string, a second annotation frame is obtained by framing the insulator string, and an insulator string category is annotated for the second annotation frame according to the insulator string feature, and the insulator annotation information corresponding to the second sample image is generated according to the second annotation frame and the insulator string category, wherein the insulator string category is a glass insulator string, a ceramic insulator string, a composite insulator string or other insulator string.

[0104] If the third sample image does not contain an insulator string, empty annotation information is used as the insulator annotation information corresponding to the third sample image.

[0105] In an embodiment, the insulator detection module 10 is further configured to, when a to-be-detected image is acquired, input the to-be-detected image into the trained insulator detection model to detect whether the to-be-detected image contains an insulator pair or an insulator string, determine a confidence degree corresponding to each insulator pair category or each insulator string category, select a target category with the highest confidence degree from each insulator pair category or each insulator string category, and determine an insulator detection frame corresponding to the target category.

[0106] In an embodiment, the insulator defect detection device further comprises a defect labeling module.

[0107] The defect labeling module is configured to:

[0108] If the fourth sample image contains an insulator string missing defect, the missing position and the insulator piece adjacent to the missing position are framed to obtain a first defect labeling frame, the first defect labeling frame is labeled with a missing category, and defect labeling information corresponding to the fourth sample image is generated according to the first defect labeling frame and the missing category.

[0109] If the fifth sample image contains a defect other than the insulator string missing defect, a second defect labeling frame is generated by framing the defect occurrence position, the second defect labeling frame is labeled with a defect category, and defect labeling information corresponding to the fifth sample image is generated according to the second defect labeling frame and the defect category.

[0110] If the sixth sample image does not contain an insulator defect, empty labeling information is taken as the defect labeling information corresponding to the sixth sample image.

[0111] In an embodiment, the training module is further configured to perform rotation processing, flipping processing and mosaic enhancement on the sample images respectively to increase the number of sample images, generate a training set according to the sample images, the processed sample images and the labeling information, train the insulator detection model and the insulator defect detection model according to the training set, and obtain the trained insulator detection model and the trained insulator defect detection model.

[0112] In addition, it should be noted that, in this document, the terms “comprising” or “including” or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements not only includes those elements, but also includes other elements not explicitly listed, or further includes elements inherent to such a process, method, article or system. Without more limitations, the element defined by the statement “comprising a” does not exclude the presence of additional identical elements in the process, method, article or system including the element.

[0113] The above-mentioned embodiment numbers of the present application are only for description, and do not represent the advantages and disadvantages of the embodiments.

[0114] Through the above description of the embodiments, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be realized by means of software and the necessary general hardware platform, of course, they can also be realized by hardware, but in many cases the former is a better embodiment. Based on such understanding, the technical solutions of the present application can be embodied in the form of a software product, which is stored in a storage medium (such as a read-only memory (ROM) / RAM, a magnetic disk, an optical disk), and includes a plurality of instructions for causing an end device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in the various embodiments of the present application.

[0115] The above is only the preferred embodiment of the present application, and does not limit the patent scope of the present application, and any equivalent structure or equivalent flow transformation made by using the content of the specification and drawings, or directly or indirectly applied to other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A method for detecting defects in insulators, characterized in that, The insulator defect detection method includes: If there is a missing insulator string defect in the fourth sample image, the missing position and the insulator piece adjacent to the missing position are selected to obtain the first defect annotation box, and the first defect annotation box is labeled with the missing category. Based on the first defect annotation box and the missing category, the defect annotation information corresponding to the fourth sample image is generated. If there are other defects in the fifth sample image besides the missing insulator string, the location of the defect is selected to generate a second defect annotation box, and the defect category is labeled for the second defect annotation box. Based on the second defect annotation box and the defect category, the defect annotation information corresponding to the fifth sample image is generated. If there is no insulator defect in the sixth sample image, then the empty annotation information is used as the defect annotation information corresponding to the sixth sample image; When the image to be detected is acquired, insulator pairs or insulator strings are detected from the image to be detected according to the trained insulator detection model to obtain the insulator detection box; The insulator detection frame is enlarged according to a preset ratio to obtain the target detection frame; Based on the trained insulator defect detection model, insulator defects are detected from the image corresponding to the target detection box to obtain insulator defect detection results. The insulator defect detection results include defect detection boxes and defect categories. The defect detection boxes are used to locate the location of the defect. When no insulator defect is detected in the image corresponding to the target detection box, an empty detection box and a null value for the defect category are output. Before obtaining the insulator detection box by detecting insulator pairs or insulator strings from the image to be detected based on the trained insulator detection model when the image to be detected is acquired, the method further includes: Acquire sample images and corresponding annotation information, wherein the annotation information includes insulator annotation information and defect annotation information; The insulator detection model is trained based on the sample images and the insulator annotation information to obtain a trained insulator detection model; The insulator defect detection model is trained based on the sample images and the defect annotation information to obtain a trained insulator defect detection model.

2. The insulator defect detection method as described in claim 1, characterized in that, After enlarging the insulator detection frame according to a preset ratio to obtain the target detection frame, the method further includes: Determine the main direction corresponding to the multiple insulator discs in the target detection frame; The target detection frame is rotated according to the main direction so that the insulator pairs or insulator strings in the target detection frame are in the horizontal direction, thus obtaining the rotated target detection frame; Based on the trained insulator defect detection model, insulator defects are detected from the image corresponding to the rotated target detection box, and the insulator defect detection result is obtained.

3. The insulator defect detection method as described in claim 1, characterized in that, Before acquiring the sample image and corresponding annotation information, the method further includes: If there are paired insulator strings in the first sample image, the insulator pair is selected to obtain the first annotation box, and the insulator pair category is labeled for the first annotation box according to the characteristics of the insulator string. The insulator annotation information corresponding to the first sample image is generated according to the first annotation box and the insulator pair category, wherein the insulator pair category is glass insulator pair, ceramic insulator pair, composite insulator pair or other insulator pair; If the second sample image contains a single insulator string, the insulator string is selected to obtain a second annotation box, and the insulator string category is labeled for the second annotation box according to the characteristics of the insulator string. The insulator annotation information corresponding to the second sample image is generated according to the second annotation box and the insulator string category, wherein the insulator string category is glass insulator string, ceramic insulator string, composite insulator string or other insulator string; If the third sample image does not contain an insulator string, then the empty annotation information is used as the insulator annotation information corresponding to the third sample image.

4. The insulator defect detection method as described in claim 3, characterized in that, When the image to be detected is acquired, the insulator pairs or insulator strings are detected from the image to be detected according to the trained insulator detection model to obtain the insulator detection box, including: When the image to be detected is acquired, the image to be detected is input into the trained insulator detection model to detect whether there are insulator pairs or insulator strings in the image to be detected. Determine the confidence level corresponding to each insulator pair category or each insulator string category; Select the target category with the highest confidence from each insulator pair category or each insulator string category, and determine the insulator detection box corresponding to the target category.

5. The insulator defect detection method as described in claim 1, characterized in that, After acquiring the sample image and its corresponding annotation information, the method further includes: The sample images are rotated, flipped, and enhanced with mosaic to increase the number of sample images. A training set is generated based on the sample images, the processed sample images, and the annotation information. The insulator detection model and the insulator defect detection model are trained based on the training set to obtain the trained insulator detection model and the trained insulator defect detection model.

6. An insulator defect detection device, characterized in that, The insulator defect detection device includes: The defect annotation module is used to select the missing position and the adjacent insulator piece if there is a missing insulator string defect in the fourth sample image, to obtain a first defect annotation box, and to annotate the first defect annotation box with a missing category, and to generate the defect annotation information corresponding to the fourth sample image based on the first defect annotation box and the missing category. The defect annotation module is also used to select the location of the defect to generate a second defect annotation box if there are other defects in the fifth sample image besides the missing insulator string defect, and to annotate the second defect annotation box with the defect category, and generate the defect annotation information corresponding to the fifth sample image according to the second defect annotation box and the defect category; The defect annotation module is also used to use empty annotation information as the defect annotation information corresponding to the sixth sample image if there is no insulator defect in the sixth sample image. The insulator detection module is used to detect insulator pairs or insulator strings from the image to be detected based on the trained insulator detection model when the image to be detected is acquired, so as to obtain the insulator detection frame. An adjustment module is used to enlarge the insulator detection frame according to a preset ratio to obtain the target detection frame; The defect detection module is used to detect insulator defects from the image corresponding to the target detection box according to the trained insulator defect detection model, and obtain the insulator defect detection result. The insulator defect detection result includes the defect detection box and the defect category. The defect detection box is used to locate the location of the defect. When no insulator defect is detected in the image corresponding to the target detection box, an empty detection box and a null value for the defect category are output. The training module is used to acquire sample images and corresponding annotation information, wherein the annotation information includes insulator annotation information and defect annotation information; The training module is also used to train the insulator detection model based on the sample image and the insulator annotation information to obtain a trained insulator detection model. The training module is also used to train the insulator defect detection model based on the sample images and the defect annotation information to obtain a trained insulator defect detection model.

7. An insulator defect detection device, characterized in that, The device includes: a memory, a processor, and an insulator defect detection program stored in the memory and executable on the processor, the insulator defect detection program being configured to implement the insulator defect detection method as described in any one of claims 1 to 5.

8. A storage medium, characterized in that, The storage medium stores an insulator defect detection program, which, when executed by a processor, implements the insulator defect detection method as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Method and device for acquiring insulator identification model, and computer equipment

    CN113065598A

  • Insulator defect positioning method for electric power inspection image

    CN113592822A