Insulator detection method based on computer vision
Automatically identify insulator defects through computer vision technology, solving the problem of inefficient traditional manual detection, achieving efficient and accurate defect detection, reducing operation and maintenance costs, and improving power system safety.
Patent Information
- Application Number
- CN202510026186.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-08
- Publication Date
- 2025-07-22
AI Technical Summary
Traditional insulator defect detection relies on manual inspection, resulting in inefficiency, high risks of missed inspection and missed inspection, especially difficult to implement in high altitude or remote line sections.
Using computer vision-based insulator detection method, defect recognition is achieved through image enhancement, feature extraction, multi-layer feature aggregation and decoder model, combined with the supervision model.
It improves detection efficiency and accuracy, reduces manual inspection frequency, reduces operation and maintenance costs, promptly detects defects to prevent failures, and improves the safety and stability of the power system.
Smart Images

Figure CN120355643A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of insulator detection, and particularly relates to an insulator detection method based on computer vision. Background Art
[0002] Insulators play a crucial role in the power system, and their quality and performance are directly related to the safe and stable operation of the power system. However, during long-term operation, insulators may develop various defects due to various reasons, such as cracking, breaking, rusting, fouling, etc. These defects not only reduce the performance of the insulators but may also cause line failures and even lead to the collapse of the entire power system.
[0003] Traditional methods for detecting insulator defects mainly rely on manual inspections. The inspection personnel need to carry tools and conduct on-site inspections along the transmission lines, and judge whether there are defects in the insulators by means of observation, touch, etc. However, this method has many deficiencies. First of all, manual inspections are time-consuming and laborious, with low efficiency, and cannot meet the inspection requirements of large-scale transmission lines. Secondly, the experience and skill levels of the inspection personnel directly affect the accuracy of the detection results, and there are risks of missed detections and false detections. In addition, for line segments that are difficult to reach, such as high altitudes and remote areas, manual inspections are even more difficult to implement.
[0004] Therefore, there is an urgent need for an insulator detection method based on computer vision to solve the above problems. Summary of the Invention
[0005] The purpose of the present invention is to provide an insulator detection method based on computer vision, which solves the technical problems that in the prior art, traditional methods for detecting insulator defects mainly rely on manual inspections, resulting in time-consuming and laborious inspections, low efficiency, and high risks of missed detections and false detections.
[0006] The purpose of the present invention can be achieved by the following technical solutions:
[0007] An insulator detection method based on computer vision, the method includes:
[0008] Obtain the initial image of the insulator to be detected, input the initial image of the insulator to be detected into the insulator image enhancement module, and output the enhanced image of the insulator to be detected;
[0009] Feature extraction is performed on the enhanced insulator image to be detected based on a feature extraction model to obtain feature maps of surface defects in the image to be detected at each layer. Aggregation processing is performed on the feature maps at each layer based on a multi-layer feature aggregation model to obtain an aggregated feature map. Based on a decoder model, the aggregated feature map is fused from high-level features to low-level features step by step, and the AFF outputs of the last level of the decoder model and the BR outputs of each level of the branches are output; among them, the decoder model has multiple levels of branches, and each level of branch includes several attention-based feature fusion blocks AFF.
[0010] Based on a supervision model, convolution and interpolation operations are used to convert the output of the decoder model into a supervision feature map with the same size as the initial image of the insulator to be detected.
[0011] Based on the comparison and analysis between the supervision feature map and the defect supervision feature map, the detection result of the insulator to be detected is obtained.
[0012] Furthermore, inputting the initial image of the insulator to be detected into an insulator image enhancement module and outputting the enhanced insulator image to be detected specifically includes the following process:
[0013] Step 1, decompose the initial image of the insulator to be detected into an illumination map and a reflection map through an image decomposition module;
[0014] Step 2, perform denoising processing on the reflection map and the illumination map, and reconstruct the denoised reflection map and illumination map;
[0015] Step 3, update the reconstruction loss parameter, the structure loss parameter, and the structure smoothness loss parameter based on minimizing the loss function LD, and output the reconstructed image, which is the enhanced insulator image to be detected.
[0016] Furthermore, updating the reconstruction loss parameter, the structure loss parameter, and the structure smoothness loss parameter based on minimizing the loss function LD specifically includes the following process:
[0017] LD = L recon + λ ss L ssim + λ sm L smooth ;
[0018] where λ ss 、λ sm respectively represent the coefficients used to balance the structural similarity and smoothness;
[0019] The reconstruction loss parameter L recon is the difference between the reconstructed illumination map S ss and the original illumination map S ys :
[0020] Lrecon = ||S ys -S ss ||2;
[0021] Among them, ||S ys -S ss ||2 represents taking the Euclidean norm of S ys -S ss ;
[0022] The structural loss parameter L ssim is used to improve the similarity between the reconstructed illumination map S ss and the original illumination map S ys :
[0023]
[0024] Among them, μ1 and μ2 respectively represent the means of the original illumination map S ys and the reconstructed illumination map S ss , σ f represents the covariance of the original illumination map S ys and the reconstructed illumination map S ss , σ1 and σ2 are the standard deviations of the original illumination map S ys and the reconstructed illumination map S ss , and C1 and C2 are constants to ensure that the denominator is not zero;
[0025] The structural smoothness loss parameter L smooth is used to balance the gradient mutation in the reconstructed image and is set by the user himself.
[0026] Furthermore, based on the feature extraction model, feature extraction is performed on the enhanced insulator image to be detected, and the specific process of obtaining the feature maps of surface defects in the image to be detected is as follows:
[0027] Use ResNet50 as the backbone network of the feature extraction model to extract multi-layer features of the surface defects of the insulator image to be detected, and obtain the feature maps of the surface defects in the image to be detected F = {F k}; among them, k represents the number of layers of the ResNet50 backbone network, and k = 1, 2, 3, 4, 5.
[0028] Furthermore, based on the multi-layer feature aggregation model, aggregation processing is performed on the feature maps of each layer, and the specific process of obtaining the aggregated feature maps is as follows:
[0029] Step 1, use a 3×3 convolution with a stride of 2 to adjust the size and channel dimension of the low-level feature map F j , where j = 1, 2, 3, 4, and its output is expressed as Successively for Perform average pooling and 1×1 convolution with a stride of 1 on the low-level feature map F j for the adjacent feature map F i Perform average pooling and 1×1 convolution with a stride of 1, where i = j + 1, and then multiply the processed low-level feature map by the adjacent feature map. The output is expressed as
[0030] Step 2, when i is equal to 5, the feature map Performs 1×1 convolution with a stride of 1 and adds it to to obtain the aggregated feature map When i is not equal to 5, the feature map Performs 1×1 convolution with a stride of 1 and adds it to and then adds it to the high-level feature map F5 for aggregation to obtain the aggregated feature map
[0031] Step 3, use 1×1 convolution with a stride of 1 to adjust the channel dimension of to output the aggregated feature map.
[0032] Furthermore, the working process of the attention-based feature fusion block AFF specifically includes the following processes:
[0033] The decoder model has multiple levels of branches, and each level of branch contains several attention-based feature fusion blocks AFF. The working process of the attention-based feature fusion block AFF is as follows:
[0034] First, use element-wise addition and 1×1 convolution with a stride of 1 to fuse the features in the aggregated feature map, and the output is expressed as F r , and use max pooling and average pooling operations to capture context semantic information. The results are respectively sent to the fully connected operation layer. Among them, the fully connected operation layer uses a 3-layer neural network to generate a feature map. Finally, fuse the feature maps through matrix addition and perform element-wise multiplication with F r .
[0035] Furthermore, the specific process of outputting the outputs of each AFF in the last level of branch of the decoder model and the BR outputs of each level of branch includes the following processes:
[0036] The first stage, each level of branch of the decoder model gradually fuses the feature maps from high-level to low-level through AFF to generate a rough segmentation map;
[0037] The second stage, except for the last level of branch, the outputs of the decoders of other levels of branches will be fed back to each layer of this level of branch, added and fused with the outputs of each layer, and then sent to the same layer of the next level of branch as an input to the AFF of the next level of branch;
[0038] In the third stage, the outputs of each level of branches are first processed by the boundary refinement module BR and then spliced and fused. Finally, a 3×3 convolution with a stride of 1 is used to output the final BR result.
[0039] Furthermore, based on the supervised model, using convolution and interpolation operations, converting the output of the decoder model into a supervised feature map with the same size as the initial image of the insulator to be detected specifically includes the following process:
[0040] The loss function of the supervised model is the weighted binary cross-entropy loss function:
[0041]
[0042] where H represents the height of the initial image of the insulator to be detected, W represents the width of the initial image of the insulator to be detected, γ represents the hyperparameter, represents the importance degree of pixel (α, β), GT αβ represents the true annotation value of pixel (α, β), P αβ represents the predicted value of pixel (α, β).
[0043] Furthermore, based on the comparison and analysis of the supervised feature map and the defect supervised feature map, obtaining the detection result of the insulator to be detected specifically includes the following process:
[0044] Judge whether the supervised feature map shows the feature representation corresponding to the corrosion of the insulator steel cap in the defect supervised feature map. If so, the insulator is abnormal with steel cap corrosion. Judge whether the supervised feature map shows the feature representation corresponding to the breakage and crack of the insulator in the defect supervised feature map. If so, the insulator is abnormal with breakage and crack.
[0045] Compared with the existing solutions, the beneficial effects achieved by the present invention:
[0046] I. Improve detection efficiency and accuracy
[0047] Automated processing: This method automatically identifies and detects the defects of insulators through computer vision technology without manual intervention, significantly improving the detection efficiency.
[0048] Precise positioning: Using machine vision technology, this method can accurately locate the defect positions of insulators, reducing the risks of missed detection and false detection.
[0049] Strong adaptability: This method can handle various complex backgrounds, light changes, image blurring, etc., improving the detection accuracy and robustness.
[0050] II. Reduce operation and maintenance costs
[0051] Reduce manual inspection: Automated detection reduces the frequency and number of manual inspections, reducing the labor cost.
[0052] Preventing fault occurrence: Through real-time monitoring and early warning, this method can timely detect potential defects of insulators, prevent the occurrence of faults, and reduce power outages and maintenance costs caused by faults.
[0053] Improving equipment utilization rate: Timely detecting and repairing defects of insulators can extend the service life of equipment and improve the utilization rate of equipment.
[0054] III. Enhancing the safety of the power system
[0055] Ensuring stable operation: The defect detection of insulators is an important guarantee for the stable operation of the power system. This method improves the safety and stability of the power system by timely detecting and handling defects.
[0056] Reducing accident risks: Defects of insulators may lead to line faults and accidents. This method reduces the risk of accidents by reducing the missed detection and false detection rates of defects.
[0057] Enhancing emergency response capabilities: This method can monitor the status of insulators in real time. Once an anomaly is detected, the emergency response mechanism can be immediately activated to quickly handle the fault and restore power supply. Description of the drawings
[0058] To more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required in the embodiments. Obviously, the drawings described below are only some embodiments recorded in the present invention. For those of ordinary skill in the art, other drawings can also be obtained based on these drawings.
[0059] Figure 1 is the flowchart of the first computer vision-based insulator detection method in the embodiments of the present invention;
[0060] Figure 2 is the flowchart of the second computer vision-based insulator detection method in the embodiments of the present invention;
[0061] Figure 3 is the flowchart of the third computer vision-based insulator detection method in the embodiments of the present invention. Detailed implementation manners
[0062] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the protection scope of the present invention.
[0063] In addition, the described features, structures, or characteristics may be combined in any suitable manner in one or more example embodiments. In the following description, numerous specific details are provided to give a thorough understanding of the example embodiments of the present disclosure. However, those skilled in the art will recognize that the technical solutions of the present disclosure may be practiced without one or more of the specific details, or other methods, components, steps, etc. may be employed. In other cases, well-known structures, methods, implementations, or operations are not shown or described in detail to avoid obscuring aspects of the present disclosure.
[0064] This embodiment provides an insulator detection method based on computer vision. Figure 1 It is the flowchart of the first insulator detection method based on computer vision in the embodiments of the present invention. As Figure 1 shown, the method includes the following steps:
[0065] Step S101: Obtain the initial image of the insulator to be detected, input the initial image of the insulator to be detected into the insulator image enhancement module, and output the enhanced image of the insulator to be detected.
[0066] Step S102: Extract features from the enhanced image of the insulator to be detected based on the feature extraction model to obtain the feature maps of surface defects in the image to be detected.
[0067] Step S103: Aggregate the feature maps based on the multi-layer feature aggregation model to obtain the aggregated feature map.
[0068] Step S104: Based on the decoder model, fuse the aggregated feature map from high-level features to low-level features step by step, and output the AFF outputs of the last level branch of the decoder model and the BR outputs of each level branch.
[0069] Step S105: Based on the supervision model, use convolution and interpolation operations to convert the output of the decoder model into a supervision feature map with the same size as the initial image of the insulator to be detected.
[0070] Step S106: Conduct a comparative analysis based on the supervision feature map and the defect supervision feature map to obtain the detection result of the insulator to be detected.
[0071] In summary, the present invention can improve the detection efficiency and accuracy: automatically identify and detect insulator defects through computer vision technology without manual intervention, significantly improving the detection efficiency. Using machine vision technology, this method can accurately locate the defect positions of insulators, reducing the risks of missed detection and false detection. It can handle various complex backgrounds, light changes, image blurring, etc., improving the detection accuracy and robustness.
[0072] Furthermore, the present invention can reduce the operation and maintenance costs: Automated detection reduces the frequency and number of manual inspections, thus lowering the labor costs. Through real-time monitoring and early warning, this method can promptly detect potential defects of the insulators, prevent the occurrence of faults, and reduce the power outage and maintenance costs caused by faults. It can also improve the equipment utilization rate: By promptly detecting and repairing the defects of the insulators, the service life of the equipment can be extended, and the equipment utilization rate can be improved.
[0073] In some embodiments, Figure 2 is the flowchart of the second insulator detection method based on computer vision according to the embodiments of the present invention. As Figure 2 shown, the steps of inputting the initial image of the insulator to be detected into the insulator image enhancement module and outputting the enhanced image of the insulator to be detected are as follows:
[0074] Step 1: Decompose the initial image of the insulator to be detected into a illumination map and a reflection map through the image decomposition module;
[0075] Specifically: I. Preprocessing stage
[0076] Image acquisition: First, the initial image of the insulator to be detected needs to be acquired. This can be accomplished by cameras, drone inspections, or other image acquisition devices.
[0077] Image calibration: Calibrate the acquired image, including removing noise, adjusting the image size and resolution, etc., to ensure that the image quality meets the requirements of subsequent processing.
[0078] II. Image decomposition stage
[0079] Select the decomposition algorithm: According to the specific image decomposition requirements, select a suitable decomposition algorithm. Common image decomposition algorithms include decomposition methods based on physical models, machine learning-based methods, etc. For insulator images, an algorithm that can separate illumination and reflection information may need to be selected.
[0080] Initialize the parameters: According to the selected algorithm, initialize the corresponding parameters. These parameters may include the parameters of the illumination model, the parameters of the reflection model, etc.
[0081] Execute the decomposition: Use the selected algorithm and the initialized parameters to decompose the initial image of the insulator. The purpose of this step is to separate the illumination information and reflection information in the image, and generate an illumination map and a reflection map respectively.
[0082] Post-processing: Perform post-processing on the decomposed illumination map and reflection map, including removing artifacts, enhancing contrast, etc., to improve the image quality and readability.
[0083] Step 2: Denoise the reflection map and the illumination map, and reconstruct the denoised reflection map and illumination map;
[0084] Specifically, background noise collection and estimation:
[0085] In the absence of a reflecting surface, capture a segment of background noise images. This can be achieved by taking several images without a reflecting surface under the same environmental conditions and averaging them.
[0086] Subtract the background noise image from the reflecting surface image to obtain a rough background noise estimate. This can be done by simply subtracting the pixel values of the two images.
[0087] Reflecting surface correction:
[0088] Use the background noise estimate to correct the reflecting surface image and remove the background noise. This can be achieved by subtracting the background noise estimate from each pixel value of the reflecting surface image.
[0089] Apply a smoothing filter:
[0090] To further reduce noise, a smoothing filter, such as a Gaussian filter or a median filter, can be applied to smooth the corrected reflecting surface image.
[0091] The Gaussian filter smooths the image by calculating the weighted average of surrounding pixels and reduces noise, being particularly suitable for handling random noise caused by illumination changes.
[0092] The median filter replaces the value of each pixel with the median of its neighboring pixel values, being particularly effective for removing salt-and-pepper noise.
[0093] Histogram equalization:
[0094] Enhance the contrast and brightness of the illumination map by redistributing the pixel values of the image, thereby reducing the impact of illumination changes to a certain extent.
[0095] Step 3: Update the reconstruction loss parameter, the structure loss parameter, and the structure smoothness loss parameter based on minimizing the loss function LD, and output the reconstructed image, which is the enhanced insulator image to be detected.
[0096] Specifically, LD = L recon + λ ss L ssim + λ sm L smooth ;
[0097] where λ ss , λ sm respectively represent the coefficients used to balance the structural similarity and smoothness;
[0098] Reconstruction loss parameter L recon is the reconstructed illumination map S ss and the original illumination map S ys The difference between them is:
[0099] L recon = ||S ys - S ss ||²;
[0100] where ||S ys - S ss ||² means taking the Euclidean norm of S ys - S ss ;
[0101] Structure loss parameter L ssim is used to improve the similarity between the reconstructed illumination map S ss and the original illumination map S ys The similarity between them is:
[0102]
[0103] where μ1 and μ2 respectively represent the means of the original illumination map S ys and the reconstructed illumination map S ss , σ f represents the covariance of the original illumination map S ys and the reconstructed illumination map S ss , σ1 and σ2 are the standard deviations of the original illumination map S ys and the reconstructed illumination map S ss , and C1 and C2 are constants to ensure that the denominator is not zero;
[0104] Structure smoothness loss parameter L smooth is used to balance the gradient mutation in the reconstructed image and is set by the user himself.
[0105] In some embodiments, based on the feature extraction model, feature extraction is performed on the enhanced insulator image to be detected, and the feature maps of surface defects in the image to be detected are obtained. The specific process includes the following:
[0106] Use ResNet50 as the backbone network of the feature extraction model to extract multi-layer features of the surface defects of the insulator image to be detected, and obtain the feature maps of surface defects in the image to be detected F = {F k}, where k represents the number of layers of the ResNet50 backbone network, and k = 1, 2, 3, 4, 5.
[0107] In some embodiments, based on the multi-layer feature aggregation model, aggregation processing is performed on the feature maps of each layer to obtain the aggregated feature maps. The specific process includes the following:
[0108] Step 1: Adjust the size and channel dimension of the low-level feature map F using a 3×3 convolution with a stride of 2, where j = 1, 2, 3, 4, and its output is denoted as j Perform average pooling and a 1×1 convolution with a stride of 1 on sequentially, and perform average pooling and a 1×1 convolution with a stride of 1 on the adjacent feature maps F of the low-level feature map F where i = j + 1, and then multiply the processed low-level feature map by the adjacent feature map, and the output is denoted as j of the adjacent feature maps F i where i = j + 1, and then multiply the processed low-level feature map by the adjacent feature map, and the output is denoted as
[0109] Step 2: When i is equal to 5, the feature map performs a 1×1 convolution with a stride of 1 and adds it to to obtain the aggregated feature map When i is not equal to 5, the feature map performs a 1×1 convolution with a stride of 1 and adds it to and then adds it to the high-level feature map F5 for aggregation to obtain the aggregated feature map
[0110] Step 3: Use a 1×1 convolution with a stride of 1 to adjust the channel dimension and output the aggregated feature map.
[0111] In some embodiments, the working process of the attention-based feature fusion block AFF specifically includes the following processes:
[0112] The decoder model has multiple levels of branches, and each level of branch contains several attention-based feature fusion blocks AFF. The working process of the attention-based feature fusion block AFF is as follows:
[0113] First, use element-wise addition and a 1×1 convolution with a stride of 1 to fuse the features in the aggregated feature map, and the output is denoted as F r , use max pooling and average pooling operations to capture context semantic information, and the results are respectively sent to the fully connected operation layer. Among them, the fully connected operation layer uses a three-layer neural network to generate a feature map. Finally, fuse the feature maps through matrix addition and perform element-wise multiplication with F r .
[0114] In some embodiments, Figure 3 is the flowchart of the third insulator detection method based on computer vision in the embodiments of the present invention, as shown in Figure 3As shown, the specific processes of the AFF outputs of each level of the last-level branch of the output decoder model and the BR (Boundary Refinement Block) outputs of each level of branches are as follows:
[0115] In the first stage, the feature maps of each level of the decoder model are gradually fused from high-level to low-level through AFF to generate a rough segmentation map.
[0116] In the second stage, the outputs of the decoders of other levels of branches except the last-level branch will be fed back to each layer of this level of branch, added and fused with the outputs of each layer, and then transmitted to the same layer of the next-level branch as an input to the AFF of the next-level branch.
[0117] In the third stage, the outputs of each level of branch are first processed by the boundary refinement module BR and then stitched and fused, and finally the final BR result is output using a 3×3 convolution with a stride of 1.
[0118] In some embodiments, based on the supervised model, using convolution and interpolation operations to convert the output of the decoder model into a supervised feature map with the same size as the initial image of the insulator to be detected specifically includes the following processes:
[0119] The loss function of the supervised model is a weighted binary cross-entropy loss function:
[0120]
[0121] where H represents the height of the initial image of the insulator to be detected, W represents the width of the initial image of the insulator to be detected, γ represents a hyperparameter, represents the importance degree of pixel (α, β), GT αβ represents the true annotation value of pixel (α, β), and P αβ represents the predicted value of pixel (α, β).
[0122] In some embodiments, based on the comparison and analysis of the supervised feature map and the defect supervised feature map, the detection result of the insulator to be detected specifically includes the following processes:
[0123] Judge whether the supervised feature map shows the feature representation corresponding to the rust of the insulator steel cap in the defect supervised feature map. If so, the insulator is abnormal with rust on the steel cap. Judge whether the supervised feature map shows the feature representation corresponding to the breakage and crack of the insulator in the defect supervised feature map. If so, the insulator is abnormal with breakage and crack.
[0124] The above embodiments can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the processes or functions described in the embodiments of the present application are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wired (such as infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or a data center that includes one or more collections of available media. The available media can be magnetic media (such as floppy disks, hard disks, magnetic tapes), optical media (such as DVDs), or semiconductor media. The semiconductor media can be a solid-state drive.
[0125] Those of ordinary skill in the art can realize that the units and algorithm steps of the examples described in combination with the embodiments disclosed herein can be implemented by electronic hardware or a combination of computer software and electronic hardware. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. A professional technician can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application.
[0126] Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the systems, devices, and units described above can refer to the corresponding processes in the foregoing method embodiments and will not be elaborated herein.
[0127] In several embodiments provided in the present application, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units is only for some logical function divisions, and there can be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections to each other can be through some interfaces. The indirect couplings or communication connections of the devices or units can be in electrical, mechanical, or other forms.
[0128] The unit described as a separation component may or may not be physically separated. The component shown as a unit may or may not be a physical unit, that is, it may be located in one place or may be distributed over multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0129] As described above, it is only the specific implementation manner of this application, but the protection scope of this application is not limited thereto. Any person skilled in the art within the technical scope disclosed by this application can easily think of changes or substitutions, which should all be covered within the protection scope of this application. Therefore, the protection scope of this application should be subject to the protection scope of the claimed rights.
Claims
1. An insulator detection method based on computer vision, characterized in that, The method includes: Obtain the initial image of the insulator to be detected, input the initial image of the insulator to be detected into the insulator image enhancement module, and output the enhanced image of the insulator to be detected; Extract features from the enhanced image of the insulator to be detected based on the feature extraction model to obtain feature maps of surface defects in the image to be detected. Aggregate the feature maps based on the multi-layer feature aggregation model to obtain the aggregated feature map. Based on the decoder model, fuse the aggregated feature map from high-level features to low-level features step by step, and output the AFF outputs of the last level branch of the decoder model and the BR outputs of each level branch; wherein, the decoder model has multiple levels of branches, and each level of branch contains several attention-based feature fusion blocks AFF; Based on the supervision model, use convolution and interpolation operations to convert the output of the decoder model into a supervision feature map with the same size as the initial image of the insulator to be detected; Perform comparative analysis based on the supervision feature map and the defect supervision feature map to obtain the detection result of the insulator to be detected.
2. The insulator detection method based on computer vision according to claim 1, characterized in that Inputting the initial image of the insulator to be detected into the insulator image enhancement module and outputting the enhanced image of the insulator to be detected specifically includes the following process: Step 1, decompose the initial image of the insulator to be detected into a illumination map and a reflection map through the image decomposition module; Step 2, denoise the reflection map and the illumination map, and reconstruct the denoised reflection map and illumination map; Step 3, update the reconstruction loss parameter, the structure loss parameter, and the structure smoothness loss parameter based on minimizing the loss function LD, and output the reconstructed image, which is the enhanced image of the insulator to be detected.
3. The insulator detection method based on computer vision according to claim 2, characterized in that Updating the reconstruction loss parameter, the structure loss parameter, and the structure smoothness loss parameter based on minimizing the loss function LD specifically includes the following process: LD = L recon + λ ss L ssim + λ sm L smooth ; Among them, λ ss and λ sm respectively represent the coefficients used to balance the structural similarity and smoothness; Reconstruction loss parameter L recon for the reconstructed illumination map S ss and the original illumination map S ys The difference between them is: L recon = ||S ys - S ss ||2; Among them, ||S ys -S ss ||2 represents taking the ys -S ss Euclidean norm of; Structural loss parameter L ssim used to improve the reconstructed illumination map S ss and the original illumination map S ys similarity between: Among them, μ1 and μ2 respectively represent the mean values of the original illumination map S ys and the reconstructed illumination map S ss , σ f represents the covariance of the original illumination map S ys and the reconstructed illumination map S ss , σ1 and σ2 are the standard deviations of the original illumination map S ys and the reconstructed illumination map S ss , and C1 and C2 are constants to ensure that the denominator is not zero; Smoothing loss parameter L of the structure smooth Used to balance the gradient mutation in the reconstructed image and is set by the user himself / herself.
4. The insulator detection method based on computer vision according to claim 1, characterized in that Extracting features from the enhanced image of the insulator to be detected based on the feature extraction model to obtain feature maps of surface defects in the image to be detected specifically includes the following process: The ResNet50 is used as the backbone network of the feature extraction model to extract multi-layer features of the surface defects of the insulator image to be detected, and feature maps F = {F k} of the surface defects in the image to be detected are obtained, where k represents the number of layers of the ResNet50 backbone network, and k = 1, 2, 3, 4, 5.
5. The insulator detection method based on computer vision according to claim 4, characterized in that, Aggregating the feature maps based on the multi-layer feature aggregation model to obtain the aggregated feature map specifically includes the following process: Step 1, adjust the size and channel dimension of the low-level feature map F with a 3×3 convolution with a stride of 2, where j = 1, 2, 3, 4, and its output is denoted as j Perform average pooling and 1×1 convolution operation with a stride of 1 on sequentially, and perform average pooling and 1×1 convolution operation with a stride of 1 on the adjacent feature map F of the low-level feature map F j where i = j + 1, and then multiply the processed low-level feature map by the adjacent feature map, and the output is denoted as i Step 2, when i is equal to 5, the feature map performs a 1×1 convolution with a stride of 1 and adds it to to obtain an aggregated feature map When i is not equal to 5, the feature map performs a 1×1 convolution with a stride of 1 and adds it to and then adds it to the high-level feature map F5 for aggregation to obtain an aggregated feature map Step 3: Use a 1×1 convolution with a step size of 1 to adjust the channel dimension and output the aggregated feature map.
6. The insulator detection method based on computer vision according to claim 5, wherein, The working process of the attention-based feature fusion block AFF specifically includes the following process: The decoder model has multiple levels of branches, and each level of branch contains several attention-based feature fusion blocks AFF. The working process of the attention-based feature fusion block AFF is as follows: First, the features in the aggregated feature map are fused using element-wise addition and a 1×1 convolution with a stride of 1, and the output is denoted as F r , max pooling and average pooling operations are used to capture context semantic information, and the results are respectively sent to the fully connected operation layer. Among them, the fully connected operation layer uses a three-layer neural network to generate a feature map. Finally, the feature maps are fused through matrix addition and multiplied element-wise with F r 7. The insulator detection method based on computer vision according to claim 5, wherein, Outputting the AFF outputs of the last level branch of the decoder model and the BR outputs of each level branch specifically includes the following process: The first stage, each level of branch of the decoder model gradually fuses the feature maps from high-level to low-level through AFF to generate a rough segmentation map; The second stage, except for the last level branch, the outputs of the decoder of other levels of branches will be fed back to each layer of this level of branch, added and fused with the outputs of each layer, and then transmitted to the same layer of the next level of branch as an input to AFF of the next level of branch; The third stage, the outputs of each level of branch are first processed by the boundary refinement module BR and then spliced and fused, and finally the final BR result is output by using a 3×3 convolution with a stride of 1.
8. A method for detecting insulators based on computer vision according to claim 1, wherein, Based on the supervised model, using convolution and interpolation operations, converting the output of the decoder model into a supervised feature map with the same size as the initial image of the insulator to be detected, which specifically includes the following process: The loss function of the supervised model is the weighted binary cross-entropy loss function: Among them, H represents the height of the initial image of the insulator to be detected, W represents the width of the initial image of the insulator to be detected, γ represents a hyperparameter, represents the importance degree of the pixel (α, β), GT αβ represents the true annotation value of the pixel (α, β), P αβ represents the predicted value of the pixel (α, β).
9. A method for detecting insulators based on computer vision according to claim 1, wherein Based on the comparison and analysis of the supervised feature map and the defect supervised feature map, obtaining the detection result of the insulator to be detected, which specifically includes the following process: Judge whether the supervised feature map shows the feature representation corresponding to the corrosion of the insulator steel cap in the defect supervised feature map. If so, the insulator is abnormally corroded at the steel cap. Judge whether the supervised feature map shows the feature representation corresponding to the breakage and crack of the insulator in the defect supervised feature map. If so, the insulator is abnormally broken and cracked.