CN-122023782-A - Power grid equipment detection method, system and medium under highlight sky background
Abstract
The invention relates to the technical field of intelligent inspection of power systems, in particular to a power grid equipment detection method, a system and a medium under a highlight sky background. The method comprises the steps of carrying out denoising and edge protection processing on an original image by adopting a bilateral filter to obtain a first image, carrying out brightness segmentation on the first image by adopting an improved K-means clustering algorithm based on regional texture stability to obtain a second image, carrying out distinguishing enhancement on the second image by adopting an improved Laplacian operator to obtain a third image, embedding a local texture sensitive channel weighting module into a feature fusion layer of a YOLOv framework to construct an equipment target detection model, and inputting the third image into the equipment target detection model to obtain a power grid equipment detection result. The method has the advantages that the brightness interference of the highlight sky background is restrained, meanwhile, the slender and low-contrast power grid equipment structure is maintained and enhanced, and the detection precision and stability of the power grid equipment under the actual outdoor complex illumination conditions such as highlight sky and backlight are systematically improved.
Inventors
- DENG FENGTAO
- Pan Dilong
- LI DONGYE
- LIU CHAO
- Ling Zhenping
- MO XIAOWEI
- LEI JIAN
Assignees
- 浙江红谱科技有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20260410
Claims (10)
- 1. The power grid equipment detection method under the highlight sky background is characterized by comprising the following steps of: s1, acquiring an original image of power grid equipment under a highlight sky background; S2, denoising and edge protection processing is carried out on the original image by adopting a bilateral filter, so as to obtain a first image; s3, performing brightness segmentation on the first image by adopting an improved K-means clustering algorithm based on region texture stability to obtain a second image segmented into a highlight sky background and a power grid equipment region; s4, carrying out distinguishing enhancement on the second image by adopting an improved Laplace operator to obtain a third image; s5, constructing an equipment target detection model, wherein the equipment target detection model is embedded with a local texture sensitive channel re-weighting module in a feature fusion layer of YOLOv framework; S6, inputting the third image into the equipment target detection model, and outputting to obtain a power grid equipment detection result.
- 2. The method for grid device detection in the presence of a highlighted sky background of claim 1, S3, performing brightness segmentation on the first image by adopting an improved K-means clustering algorithm based on region texture stability to obtain a second image segmented into a highlight sky background and a power grid equipment region, wherein the method comprises the following steps: s31, setting two clustering centers which are respectively used for representing an initial center value of a highlight sky background and an initial center value of a power grid equipment area; s32, introducing a local variance penalty term for representing the complexity of the regional texture into a distance measurement formula of the K-means clustering algorithm to obtain an improved K-means clustering algorithm; s33, determining an improved distance from each pixel in the first image to two clustering centers by adopting an improved K-means clustering algorithm, and dividing each pixel into corresponding clusters based on the improved distance; s34, based on the clustering results of all pixels, recalculating a new central value of the highlight sky background and a new central value of the power grid equipment area to be used as an updated clustering center; and S35, repeating the steps S33-S34 until a preset iteration condition is reached, marking class labels of all pixels, and obtaining a second image which is divided into a highlight sky background and a power grid equipment area.
- 3. The method for grid device detection in the presence of a highlighted sky background of claim 2, In S32, introducing a local variance penalty term for representing the complexity of the regional texture into a distance measurement formula of the K-means clustering algorithm to obtain an improved K-means clustering algorithm, wherein the expression is as follows: , Wherein, the Representing the modified distance of pixel x to the center of the kth cluster, I (x) representing the pixel value of pixel x in the first image, A central value representing a current kth cluster, a highlighting sky background cluster when k=1, a grid equipment area cluster when k=2, Representing a preset penalty factor, var (I) is used to evaluate the regional texture complexity, representing the color variance within a local neighborhood window centered on pixel x.
- 4. The method for grid device detection in the presence of a highlighted sky background of claim 2, In S34, based on the clustering results of all the pixels, the new center value of the highlight sky background and the new center value of the power grid equipment area are recalculated, and the new center value is used as an updated clustering center, and includes: Calculating the average value of the pixel values of all pixels divided into the highlight sky background clusters to obtain a new center value of the highlight sky background; and calculating the average value of the pixel values of all the pixels divided into the power grid equipment area clusters to obtain a new central value of the power grid equipment area.
- 5. The method for grid device detection in the presence of a highlighted sky background of claim 1, In S4, the improvement laplace operator is adopted to differentially enhance the second image, so as to obtain a third image, which includes: Traversing each pixel point in the second image, and calculating a second-order Laplacian of each pixel point; calculating a gradient amplitude of each pixel point; And subtracting the corresponding second-order Laplacian from the pixel value of the pixel point, and adding a corresponding one-step amplitude to obtain the pixel value with the distinguishing enhancement of each pixel point to form a third image.
- 6. The method for grid device detection in the presence of a highlighted sky background of claim 5, Subtracting the corresponding second-order Laplacian from the pixel value of the pixel point, and adding a corresponding one-step amplitude to obtain the pixel value with the distinguishing enhancement of each pixel point, so as to form a third image, wherein the method comprises the following steps: determining a first weight coefficient and a second weight coefficient of each pixel point based on the highlighting sky background in the second image and the segmentation result of the power grid equipment area; correspondingly weighting the first weight coefficient and the second-order Laplace operator to obtain a Laplace term of each pixel point; correspondingly weighting the second weight coefficient and a gradient amplitude value to obtain gradient items of each pixel point; and subtracting the corresponding Laplacian term from the pixel value of the pixel point, and adding the corresponding gradient term to obtain the pixel value with the enhanced distinguishing property of each pixel point, thereby forming a third image.
- 7. The method for grid device detection in the presence of a highlighted sky background of claim 1, The local texture sensitive channel re-weighting module takes an original feature map of a feature fusion layer as input and is used for executing the following steps: carrying out local average pooling on the input original feature map to obtain texture intensity statistical information of different local areas; carrying out 1x1 convolution on texture intensity statistical information of different local areas, and then carrying out Sigmoid activation to generate local texture sensitive channel attention weight; And carrying out weighted fusion on the original feature map based on the local texture sensitive channel attention weight to obtain an optimized feature map.
- 8. Electric wire netting equipment detecting system under highlight sky background, its characterized in that includes: the image acquisition module is used for acquiring an original image of the power grid equipment under the highlight sky background; the bilateral filter is used for carrying out denoising and edge protection processing on the original image to obtain a first image; The brightness segmentation module is used for carrying out brightness segmentation on the first image by adopting an improved K-means clustering algorithm based on the regional texture stability to obtain a second image segmented into a highlight sky background and a power grid equipment region; The distinguishing enhancement module is used for distinguishing and enhancing the second image by adopting the improved Laplace operator to obtain a third image; the model construction module is used for constructing an equipment target detection model, and the equipment target detection model is embedded with a local texture sensitive channel re-weighting module in a feature fusion layer of YOLOv framework; the device detection module is used for inputting the third image into the device target detection model and outputting the result to obtain the power grid device detection result.
- 9. An electronic device comprising a processor and a memory; the processor is connected with the memory; The memory is used for storing executable program codes; The processor runs a program corresponding to the executable program code by reading the executable program code stored in the memory for performing the grid device detection method in the highlight sky background of any one of claims 1 to 7.
- 10. A computer readable storage medium having stored thereon a computer program, which when executed by a processor implements the grid device detection method in the context of a highlight sky according to any one of claims 1 to 7.
Description
Power grid equipment detection method, system and medium under highlight sky background Technical Field The invention relates to the technical field of intelligent inspection of power systems, in particular to a power grid equipment detection method, a system and a medium under a highlight sky background. Background With the continuous expansion of the power grid scale, the inspection tasks of key power grid equipment such as power transmission line towers, cross arms, insulators, hardware fittings and wires are increasingly heavy, the traditional manual inspection-dependent mode has the problems of low efficiency, large influence of subjective factors, high inspection omission rate and the like, so that an automatic and intelligent power grid equipment detection technology becomes the main stream of industry research. However, the power grid equipment is mostly arranged in an outdoor open environment and highly coupled with a sky background environment, and particularly under the conditions of strong light and high sky, the phenomena of direct sunlight, sky whitening or large-area overexposure are very easy to occur in the image acquisition of the power grid equipment, so that the detection technology of the power grid equipment faces serious challenges. The existing power grid equipment detection technology mainly depends on a deep learning model, such as a traditional YOLO (on line) and Faster R-CNN (computer-aided network) target detection algorithm, and aims to improve recognition accuracy in a data driving mode by combining a conventional image enhancement method, such as histogram equalization, retinex algorithm or Gamma correction. However, the existing power grid equipment detection technology still has the following significant defects in the complex illumination environments such as actual outdoor highlight sky, backlight and the like: 1. The existing power grid equipment detection technology cannot accurately separate a power grid equipment area from a sky area, due to serious non-uniformity of brightness under a highlight sky background, an overexposure area is easily mistakenly identified as reflective equipment such as a cross rod and an insulator by an existing deep learning model, and meanwhile, due to low contrast of the power grid equipment and the highlight sky background, the edges of an elongated structure (such as a wire and an insulator string) of the power grid equipment are fuzzy, and the model is difficult to identify, so that a large number of false detection and omission detection are generated; 2. The power grid equipment such as the electric wires, the insulator strings and the like are generally of an elongated structure, the textures of the power grid equipment are greatly weakened under the background of backlighting or highlighting sky, and the conventional image enhancement method (such as histogram equalization) can improve the overall contrast, but lacks the understanding capability of the power grid scene, so that the edges and key details of the elongated structure of the power grid equipment can be further damaged by blind enhancement, and the detection reliability of the power grid equipment is reduced; 3. the existing power grid equipment detection technology lacks a scene self-adaptation mechanism, cannot dynamically suppress interference according to sky brightness intensity, so that the existing deep learning model is insufficient in stability under backlight or complex illumination, and meanwhile, the existing deep learning model is excessively relied on to neglect the advantages of traditional image processing, so that the existing model is insufficient in generalization capability under complex illumination environments such as high-brightness sky and backlight, and cannot effectively cope with outdoor variable environments. In summary, the detection of power grid equipment in a high-brightness sky background is a long-standing technical problem which cannot be effectively solved in a specific application scene. Disclosure of Invention Aiming at the technical problems, the invention provides a power grid equipment detection method, a system and a medium under a highlight sky background, and aims to keep and enhance a slender and low-contrast power grid equipment structure while inhibiting brightness interference of the highlight sky background, and systematically improve detection precision and stability of the power grid equipment under actual outdoor complex illumination conditions such as highlight sky, backlight and the like. In a first aspect, the present application provides a method for detecting a power grid device in a highlight sky background, including the steps of: s1, acquiring an original image of power grid equipment under a highlight sky background; S2, denoising and edge protection processing is carried out on the original image by adopting a bilateral filter, so as to obtain a first image; s3, performing brightness segmentation on the first