Power grid image line anomaly detection method based on deep learning feature extraction
By combining deep learning feature extraction and convolutional neural network models with an adaptive threshold segmentation algorithm, the accuracy and efficiency issues of power grid line anomaly detection are solved, enabling real-time early warning and operation and maintenance scheduling of power grid lines, and improving the accuracy and reliability of detection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- STATE GRID SICHUAN ELECTRIC POWER CORP ELECTRIC POWER RES INST
- Filing Date
- 2026-03-24
- Publication Date
- 2026-04-24
AI Technical Summary
Existing methods for detecting power grid line anomalies rely on manual inspections and simple sensors, which are inefficient and have limited detection accuracy. They are difficult to accurately identify line anomalies in complex environments, especially minor damage to insulators and hanging foreign objects.
A deep learning-based feature extraction method is adopted. Visible light image data of power grid lines are acquired through an image acquisition device. After preprocessing, the data is input into a pre-trained convolutional neural network model to extract multi-level features. Low-level texture and high-level semantic features are fused, and anomaly region localization is performed by combining adaptive threshold segmentation and optimization algorithms to generate a formatted anomaly report.
It enables real-time early warning and operation and maintenance scheduling of power grid line anomalies, improves the accuracy and reliability of detection, reduces false detections and missed detections, and enhances the efficiency and reliability of power grid operation and maintenance management.
Smart Images

Figure CN121921310A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the fields of power grid and information technology, and in particular to a method and system for detecting line anomalies in power grid images based on deep learning feature extraction. Background Technology
[0002] In the field of power grid operation and maintenance management, the safe and stable operation of power grid lines is of paramount importance. Power grid lines are widely distributed and operate in complex environments; line faults can lead to power outages, affecting the reliability and stability of power supply. To ensure the normal operation of the power grid, real-time monitoring and anomaly detection of power grid lines are necessary.
[0003] Currently, traditional methods for detecting anomalies in power grid lines mainly rely on manual inspections and simple sensor monitoring. Manual inspections are inefficient and labor-intensive, and they struggle to detect some hidden faults in a timely manner. While simple sensor monitoring can provide some information about the line's status, its accuracy is limited when dealing with complex line anomalies, such as minor damage to insulators or hanging foreign objects.
[0004] To address the aforementioned issues, several detection methods based on image recognition technology have been proposed. These methods acquire image data of power grid lines and utilize image processing and analysis algorithms to identify line anomalies. However, existing image recognition methods are easily affected by factors such as lighting and occlusion when processing power grid images in complex environments, leading to low accuracy and reliability of detection results. Furthermore, they lack sufficient capacity for multi-level line feature extraction and accurate classification of anomaly types, making it difficult to meet the needs of actual power grid operation and maintenance. Summary of the Invention
[0005] The main purpose of this application is to provide a method and system for detecting power grid line anomalies based on deep learning feature extraction, which can improve the accuracy and reliability of power grid line anomaly detection and realize real-time early warning and operation and maintenance scheduling of line anomalies.
[0006] To achieve the above objectives, embodiments of the present invention provide a method for detecting line anomalies in power grid images based on deep learning feature extraction, the method comprising the following steps: Visible light image data of the power grid is acquired by an image acquisition device deployed in the power grid line area. The visible light image data is preprocessed to obtain a standardized image dataset, wherein the standardized image dataset includes an image matrix with pixel values normalized to a preset range, as well as corresponding acquisition time information and spatial location information. The standardized image dataset is input into a pre-trained convolutional neural network model, which extracts multi-level feature representations from the image to generate a feature set. The feature set includes low-level texture feature vectors and high-level semantic feature vectors. The low-level texture feature vectors represent the edge and gradient information of the circuit surface, and the high-level semantic feature vectors represent the structural relationships and contextual information of the circuit components. The low-level texture feature vector and the high-level semantic feature vector are fused to obtain a fused feature matrix. Multi-class classification calculation is performed on the fused feature matrix to output an anomaly probability distribution and an anomaly type identifier. The anomaly probability distribution represents the probability score of multiple line anomaly types. The line anomaly type identifier includes at least one of wire breakage, insulator damage, and foreign object suspension. Based on the abnormal probability distribution and abnormal type identifier, an adaptive threshold segmentation algorithm is used to locate abnormal regions, generating an initial abnormal region map. The initial abnormal region map is then corrected using an optimization algorithm to eliminate false detections and missed detections, generating a final abnormal detection result. The final abnormal detection result includes the abnormal type, abnormal probability, and location coordinates of the abnormal region. Based on the final anomaly detection results, a formatted anomaly report is generated and sent to the power grid monitoring center to achieve real-time early warning and operation and maintenance scheduling of line anomalies.
[0007] In summary, the technical solution of this application, by preprocessing visible light image data of power grid lines to obtain a standardized image dataset, effectively reduces noise interference and improves data quality. Utilizing a pre-trained convolutional neural network model to extract multi-level feature representations of the images comprehensively captures the edges, gradients, structural relationships, and contextual information of the lines. Fusing low-level texture feature vectors and high-level semantic feature vectors and performing multi-class classification calculations accurately determines the type and probability of line anomalies. Employing adaptive threshold segmentation and optimization algorithms for anomaly region localization and correction eliminates false detections and missed detections, improving detection accuracy. Finally, a formatted anomaly report is generated and sent to the power grid monitoring center, realizing real-time early warning and operation and maintenance scheduling of line anomalies, and improving the efficiency and reliability of power grid operation and maintenance management. Attached Figure Description
[0008] Figure 1 This is a schematic diagram of a scenario for a power grid image line anomaly detection method based on deep learning feature extraction in an embodiment of this application; Figure 2 A flowchart of a power grid image line anomaly detection method based on deep learning feature extraction is provided for embodiments of this application; Figure 3A schematic diagram illustrating the process of generating a set containing multi-level features, provided for embodiments of this application; Figure 4 A flowchart illustrating the anomaly type identification process provided in this application embodiment; Figure 5 This is a schematic diagram of the process for generating the fusion matrix provided in an embodiment of this application; Figure 6 A schematic diagram illustrating the process of abnormal region identification provided in an embodiment of this application; Figure 7 This is a schematic diagram illustrating the process of generating the initial abnormal region map provided in the embodiments of this application; Figure 8 A schematic diagram of the structure of a power grid image line anomaly detection system based on deep learning feature extraction provided in an embodiment of this application; Figure 9 A schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation
[0009] The technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings.
[0010] This application provides a method and system for detecting line anomalies in power grid images based on deep learning feature extraction, which will be described in detail below.
[0011] Figure 1 illustrates a scenario for detecting anomalies in power grid images based on deep learning feature extraction, applicable to power grids. This scenario primarily includes power grid lines, an image acquisition device, a server, and a power grid monitoring center. The image acquisition device, server, and power grid monitoring center are connected via wired or wireless networks.
[0012] Take the power grid system of a large city as an example. The power grid lines of the city are widely distributed and cover all areas of the city, including residential areas, commercial areas and industrial areas.
[0013] Image acquisition devices are deployed at key locations along power grid lines, such as poles and substations. These devices, including high-definition cameras, are capable of acquiring real-time visible light image data of the power grid lines. For example, a high-definition camera installed on a high-voltage transmission line pole can capture images of the line from different angles, including its overall appearance, the condition of the insulators, and whether any foreign objects are hanging there. Simultaneously, the image acquisition devices record the acquisition time and spatial location information for each image, which is crucial for subsequent anomaly analysis and localization.
[0014] The server receives visible light image data uploaded by the image acquisition device and performs a series of processing and analysis operations on it. Specifically, the server first preprocesses the image data, including noise filtering and pixel value normalization, to improve the image data quality. Then, the server uses a pre-trained convolutional neural network model to extract features from the preprocessed image data, obtaining multi-level feature representations. Next, the extracted features are fused and multi-class classified to determine the anomaly type and probability of the line. Finally, an adaptive threshold segmentation algorithm and optimization algorithm are used to locate and correct the abnormal regions, generating the final anomaly detection result.
[0015] The power grid monitoring center receives formatted anomaly reports from the server and provides real-time alerts and maintenance scheduling based on the report content. Upon receiving an anomaly report, the monitoring center immediately notifies relevant maintenance personnel to inspect and repair the affected line area. For example, if a report indicates a line breakage, maintenance personnel will quickly bring repair tools to the affected area to troubleshoot and repair the fault, restoring the line to normal operation as soon as possible.
[0016] refer to Figure 2 , Figure 2 This is a flowchart illustrating a method for detecting line anomalies in power grid images based on deep learning feature extraction, provided in an embodiment of this application. The method can be executed by a computer device, such as a server. Specifically, the method for detecting line anomalies in power grid images based on deep learning feature extraction provided in this embodiment includes:
[0017] S10: Acquire visible light image data of the power grid line by using an image acquisition device deployed in the power grid line area, and perform preprocessing operations on the visible light image data to obtain a standardized image dataset.
[0018] The standardized image dataset includes an image matrix with pixel values normalized to a preset range, as well as corresponding acquisition time information and spatial location information.
[0019] In one embodiment, step S10 can be implemented as follows: P1: Acquire visible light image data of the target line area through image acquisition devices deployed in the power grid line area, and record the acquisition time and spatial location information of each image.
[0020] In this embodiment, the image acquisition device is used to acquire visible light image data of power grid lines, and it has high resolution and good light adaptability. Acquisition time information and spatial location information are crucial for subsequent anomaly analysis and localization. Acquisition time information helps determine the temporal sequence of anomalies, while spatial location information can pinpoint the specific location of the anomaly.
[0021] In one embodiment, a suitable image acquisition device (such as a high-definition camera) can be selected and installed at key locations in the power grid area, such as the top of towers or near substations. The image acquisition device will acquire visible light image data of the target power grid area at regular time intervals (such as once per minute). Simultaneously, the acquisition time and spatial location information of each image are recorded using a Global Positioning System (GPS) and a clock module.
[0022] For example, multiple high-definition cameras are installed in the transmission line area of a large power grid. Each camera accurately records the acquisition time (e.g., 10:30:00 on October 1, 2024) and spatial location (e.g., longitude 120.1°, latitude 30.2°) when acquiring images. This information is saved along with the acquired image data, providing a basis for subsequent anomaly detection.
[0023] P2: Perform noise filtering on the visible light image data to remove random noise interference in the image and generate preliminary denoised image data.
[0024] In this embodiment, noise filtering is a process of removing random noise interference from visible light image data. Random noise may be caused by factors such as changes in illumination and sensor noise, which can affect image quality and subsequent analysis results.
[0025] In one embodiment, a median filtering algorithm can be used to filter noise from visible light image data. The median filtering algorithm sorts the neighboring pixel values of each pixel in the image and takes the median value as the new value for that pixel. In this way, random noise such as salt-and-pepper noise can be effectively removed.
[0026] For example, in a visible light image, there may be some randomly distributed bright or dark spots, which are random noise. After median filtering, these noise points are removed, the image becomes clearer, and a better foundation is provided for subsequent pixel value normalization processing.
[0027] P3: Perform pixel value normalization processing on the image data after preliminary denoising, and map the pixel values to a preset range to obtain a normalized image matrix.
[0028] In one embodiment, the Min-Max normalization method can be used to process the initially denoised image data. Assuming the minimum pixel value in the image is min and the maximum value is max, for each pixel value x in the image, the normalized pixel value y can be calculated using the formula y = (x - min) / (max - min). If the preset range is 0 to 255, then the normalized pixel value y is multiplied by 255.
[0029] For example, if the pixel values in the initially denoised image range from 10 to 200, for a pixel with a value of 50, after Min-Max normalization, its normalized pixel value is (50 - 10) / (200 - 10) ≈ 0.21. If the preset range is 0 to 255, then the final normalized value of that pixel is... In this way, the pixel values of the entire image are mapped to a preset range, resulting in a normalized image matrix.
[0030] P4: Integrate the normalized image matrix with the corresponding acquisition time information and spatial location information into a standardized image dataset.
[0031] In one embodiment, the normalized image matrix is stored as a multidimensional array, while the acquisition time and spatial location information are stored as corresponding metadata. A data structure (such as a dictionary) can be used to associate the normalized image matrix with the acquisition time and spatial location information. For example, a dictionary can be created with the key "image_matrix" and the value being the normalized image matrix; the key "acquisition_time" and the value being the acquisition time information; and the key "spatial_location" and the value being the spatial location information.
[0032] For example, for a normalized image matrix, its acquisition time information is "October 1, 2024, 10:30:00", and its spatial location information is "longitude 120.1°, latitude 30.2°". These can be integrated into a dictionary to form a standardized image dataset. Such a standardized image dataset can be easily input into a convolutional neural network model for feature extraction and anomaly detection.
[0033] S20: Input the standardized image dataset into a pre-trained convolutional neural network model, and extract multi-level feature representations from the image through the convolutional neural network model to generate a feature set, wherein the feature set includes low-level texture feature vectors and high-level semantic feature vectors. The low-level texture feature vectors represent the edge and gradient information of the circuit surface, and the high-level semantic feature vectors represent the structural relationship and contextual information of the circuit components.
[0034] In this embodiment, the pre-trained convolutional neural network model is a model trained on a large-scale image dataset, possessing excellent feature extraction capabilities. For example, commonly used convolutional neural network models include ResNet and VGG, which have achieved excellent results in tasks such as image classification and object detection.
[0035] In this embodiment, the low-level texture feature vector is a quantified representation of local detail features in an image, primarily reflecting the edge and gradient information of the line surface. For example, in a line image, the edges of conductors and the outlines of insulators can be represented by low-level texture feature vectors.
[0036] In this embodiment, the high-level semantic feature vector is an abstract representation of global and semantic information in an image, capable of characterizing the structural relationships and contextual information of line components. For example, information such as the connection relationship between insulators and conductors in a line, and the relative positions of towers and lines, can be represented by the high-level semantic feature vector.
[0037] In one embodiment, a standardized image dataset can be input into a pre-trained ResNet convolutional neural network model. The ResNet model, through a combination of multiple convolutional layers and residual blocks, can effectively extract multi-level features of the image. In the shallow convolutional layers of the model, small-scale convolutional kernels are used to extract local detail features of the image, generating primary feature maps. These primary feature maps, after processing, yield low-level texture feature vectors. In the deep convolutional layers of the model, large-scale convolutional kernels are used to extract global contextual information of the image, generating high-level feature maps. After feature vectorization, high-level semantic feature vectors are obtained.
[0038] S30: The low-level texture feature vector and the high-level semantic feature vector are fused to obtain a fused feature matrix. Multi-class classification calculation is performed on the fused feature matrix to output an anomaly probability distribution and an anomaly type identifier. The anomaly probability distribution represents the probability score of multiple line anomaly types. The line anomaly type identifier includes at least one of wire breakage, insulator damage, and foreign object suspension.
[0039] In this embodiment, feature fusion processing is an operation that integrates feature vectors of different types. The aim is to comprehensively utilize information from low-level texture feature vectors and high-level semantic feature vectors to improve the accuracy of anomaly detection. For example, by weighted concatenation, low-level texture feature vectors and high-level semantic feature vectors can be fused into a single fusion feature matrix.
[0040] In this embodiment, the multi-category classification calculation is a process of classifying line anomaly types based on the fused feature matrix. The classification algorithm may include a Softmax classifier, which can map the fused feature matrix to different anomaly types and output a probability score for each anomaly type.
[0041] In this embodiment, the anomaly probability distribution is a vector that represents the probability scores of various types of line anomalies. For example, the anomaly probability distribution may be [0.1, 0.8, 0.1], representing the probabilities of line breakage, insulator damage, and foreign object suspension, respectively.
[0042] In this embodiment of the application, the line anomaly type identifier is a clear label for the type of line anomaly, including at least one of wire breakage, insulator damage, and foreign object hanging. For example, if the probability of insulator damage is the highest in the anomaly probability distribution, then the line anomaly type identifier is insulator damage.
[0043] S40: Based on the abnormal probability distribution and abnormal type identifier, an adaptive threshold segmentation algorithm is used to perform abnormal region localization processing to generate an initial abnormal region map. The initial abnormal region map is then corrected using an optimization algorithm to eliminate false detections and missed detections, generating a final abnormal detection result. The final abnormal detection result includes the abnormal type, abnormal probability, and location coordinates of the abnormal region.
[0044] In this embodiment, the adaptive threshold segmentation algorithm is an algorithm that automatically determines the segmentation threshold based on local image features. For example, in an image of a power grid line, different regions may have different lighting, texture, and other features. The adaptive threshold segmentation algorithm can dynamically adjust the segmentation threshold based on these local features, thereby more accurately locating abnormal regions.
[0045] In this embodiment, the initial abnormal region map is a binary image obtained by an adaptive threshold segmentation algorithm, where white areas represent possible abnormal regions and black areas represent normal regions.
[0046] In this embodiment, the optimization algorithm is used to correct the initial abnormal region map, with the aim of eliminating false positives and false negatives. For example, morphological opening and closing operations can remove small noise points and broken boundaries of abnormal regions, improving the connectivity of the abnormal regions.
[0047] S50: Generate a formatted anomaly report based on the final anomaly detection result, and send the formatted anomaly report to the power grid monitoring center to realize real-time early warning and operation and maintenance scheduling of line anomalies.
[0048] In this embodiment, the formatted anomaly report is a report that organizes and outputs the final anomaly detection results according to a certain format. The report may include anomaly type, anomaly probability, location coordinates of the anomaly area, and related image information, making it easier for staff at the monitoring center to intuitively understand the anomaly situation of the line.
[0049] In this embodiment, the power grid monitoring center is a platform for receiving and processing abnormal reports. It can take corresponding measures in a timely manner based on the report content, such as notifying maintenance personnel to carry out repairs or adjusting the power grid operation mode.
[0050] In one embodiment, the server can generate a formatted anomaly report based on the final anomaly detection results. The report can be in common file formats such as PDF or Excel. The report details the anomaly type, probability, and location coordinates of the anomaly area, and includes relevant line images. The server then sends the formatted anomaly report to the power grid monitoring center via the network. Upon receiving the report, the monitoring center staff immediately review its contents and issue real-time warnings and dispatch maintenance personnel based on the severity of the anomaly. For example, if the anomaly type is a line outage, the monitoring center will quickly notify nearby maintenance personnel to bring repair tools to the affected line area for emergency repairs to restore normal line operation as quickly as possible. In this way, real-time warnings and maintenance dispatching for line anomalies can be achieved, ensuring the safe and stable operation of the power grid.
[0051] In one embodiment, the structure and training process of the convolutional neural network are as follows: The convolutional neural network model in this application mainly consists of shallow convolutional layers, mid-level convolutional layers, deep convolutional layers, global average pooling layers, global max pooling layers, and fully connected layers. Shallow convolutional layers can use small-scale convolutional kernels (e.g., 3x3) to extract local detail features of the image, generating primary feature maps and highlighting the edges and gradient information of the line surface. Mid-level convolutional layers use medium-scale convolutional kernels (e.g., 7x7) to capture the local structural features of line components, generating intermediate feature maps. Deep convolutional layers contain multiple sub-layers. First, large-scale convolutional kernels (e.g., 11x11) are used to capture long-distance dependencies between line components. Then, small-scale convolutional kernels are used to extract local structural features. After channel attention weight calculation, channel weighting, residual connections, and non-linear activation function processing, high-level feature maps are generated, representing the structural relationships and contextual information of the line components. Global average pooling layers process the primary feature maps to generate low-level texture feature vectors; global max pooling layers process the high-level feature maps to generate high-level semantic feature vectors. Finally, the fully connected layer is used for feature fusion and classification computation.
[0052] Model training mainly consists of four steps: data preparation, forward propagation, loss calculation, and backpropagation. In the data preparation stage, a large amount of visible light image data of power grid lines is collected and preprocessed to obtain a standardized image dataset. This standardized image dataset is then divided into training, validation, and test sets. During forward propagation, the image data from the training set is input into the convolutional neural network model, sequentially passing through shallow convolutional layers, mid-level convolutional layers, deep convolutional layers, global average pooling layers, global max pooling layers, and fully connected layers to obtain the predicted anomaly probability distribution and anomaly type identifiers. In the loss calculation step, the cross-entropy loss function is used to calculate the loss value between the predicted result and the true label. The cross-entropy loss function measures the degree of difference between the predicted result and the true label; a smaller loss value indicates a more accurate prediction. In the backpropagation stage, the gradient is calculated based on the loss value, and optimization algorithms (such as stochastic gradient descent) are used to update the model parameters to reduce the loss value. The forward propagation, loss calculation, and backpropagation processes are repeated until the model's performance reaches a satisfactory level.
[0053] In one embodiment, reference Figure 3 Step S20 may include steps S21-S26, which will be described in detail below: S21: Input the standardized image dataset into the shallow convolutional layer of the pre-trained convolutional neural network model, extract local detail features in the image through small-scale convolutional kernels, and generate a primary feature map representing the edge and gradient information of the line surface.
[0054] In this embodiment, shallow convolutional layers are the first few layers of a convolutional neural network model. They typically have a small receptive field, making them suitable for extracting local detail features of an image. Small-scale convolutional kernels generally refer to small kernels such as 3x3 or 5x5, which can perform convolution operations on local regions of an image, capturing edge and gradient information.
[0055] In this embodiment, the primary feature map is a feature map obtained after a shallow convolutional layer performs a convolution operation on the image, reflecting the feature information of local details in the image. For example, in a line image, the primary feature map can highlight information such as the edge of the line and the outline of the insulator.
[0056] In one embodiment, a standardized image dataset is input into a shallow convolutional layer of a pre-trained ResNet model, and a 3x3 small-scale convolutional kernel is used to perform a convolution operation on the image. The convolution operation slides over each local region of the image, calculating the sum of the product of the convolution kernel and the pixel value of that region to obtain a convolution result. Combining the convolution results of all local regions yields the primary feature map.
[0057] For example, assuming the input standardized image dataset is a 256x256 image, after convolution with a 3x3 small-scale convolution kernel, the resulting primary feature map might be a 254x254 feature map. In this feature map, the edges and gradient information of the lines will be more obvious, facilitating subsequent processing and analysis.
[0058] S22: The primary feature map is input into the intermediate convolutional layer, and the local structural features of the circuit components are captured by the medium-scale convolutional kernel to generate an intermediate feature map that represents the basic shape and arrangement relationship of the circuit components.
[0059] In this embodiment, the middle convolutional layer is located in the middle part of the convolutional neural network model. Its receptive field is larger than that of the shallow convolutional layer, and it can capture a wider range of feature information in the image. Medium-scale convolutional kernels generally refer to convolutional kernels of sizes such as 7x7 and 9x9. They can perform further convolution operations on the primary feature maps and capture the local structural features of the circuit components.
[0060] In this embodiment, the intermediate feature map is a feature map obtained by performing a convolution operation on the primary feature map by the intermediate convolutional layer. It reflects the basic shape and arrangement of line components. For example, in a line image, the intermediate feature map can display information such as the shape of the insulator and the arrangement of the conductors.
[0061] In one embodiment, the primary feature map is input into a mid-level convolutional layer of the ResNet model, and convolution is performed using a 7x7 medium-scale convolutional kernel. The convolution operation slides across each local region of the primary feature map, calculating the sum of the product of the convolution kernel and the feature value of that region, resulting in a convolution result. Combining the convolution results of all local regions yields the intermediate feature map. In this way, the local structural features of circuit components can be captured, providing richer information for subsequent high-level feature extraction.
[0062] For example, assuming the initial feature map is a 254x254 feature map, after convolution with a 7x7 medium-scale convolution kernel, the resulting intermediate feature map might be a 248x248 feature map. In this feature map, the basic shape and arrangement of the circuit components will be clearer, which is helpful for subsequent feature analysis and anomaly detection.
[0063] S23: Input the intermediate feature map into the deep convolutional layer, extract the global context information of the circuit components through large-scale convolutional kernels, and generate a high-level feature map that represents the structural relationship and spatial context between the circuit components.
[0064] In this embodiment, the deep convolutional layers are located at a relatively deep position in the convolutional neural network model, and their receptive fields are larger, enabling them to acquire a wider range of information from the image. Large-scale convolutional kernels are generally 11x11 or larger in size, which helps to extract global contextual information of circuit components, namely the structural relationships and spatial contextual information between circuit components.
[0065] In this embodiment, the high-level feature map is a feature map obtained by processing the intermediate feature maps by a deep convolutional layer. It can characterize the complex structural relationships and spatial context between line components. For example, in a power grid line image, the high-level feature map can reflect the relative positions and connections between components such as towers, conductors, and insulators.
[0066] In one embodiment, the intermediate feature map is input into a deep convolutional layer of the ResNet model, and convolution is performed using a large-scale 11x11 convolutional kernel. The large-scale kernel slides across the intermediate feature map, comprehensively processing feature information over a larger range to extract the global contextual information of the circuit components. Through a series of convolutions, pooling, and other operations, a high-level feature map is finally generated. This approach allows the model to better understand the complex relationships between circuit components and improves its ability to identify anomalies.
[0067] For example, if the intermediate feature map is a 248x248 feature map, after convolution with a large-scale 11x11 convolution kernel, the resulting high-level feature map might be a 238x238 feature map. In this high-level feature map, the structural relationships and spatial context information between circuit components become clearer, providing strong support for subsequent anomaly analysis.
[0068] In one embodiment, step S23 can be implemented as follows: H1: The intermediate feature map is input into the first deep convolutional layer, and a first-scale convolutional kernel is used to perform convolution operations to capture the long-distance dependencies between line components and generate the first deep feature map.
[0069] In this embodiment, the first deep convolutional layer is a layer in a deep convolutional network, which further extracts features based on the intermediate feature maps. The first-scale convolutional kernel is a relatively large-sized convolutional kernel, and its convolution operation can capture long-distance dependencies between line components, that is, the association information between line components at different locations.
[0070] In this embodiment of the application, the first deep feature map is obtained by performing a convolution operation on the intermediate feature map by the first deep convolutional layer, and it contains long-distance dependency feature information between line components.
[0071] In one embodiment, the intermediate feature map is input to a first deep convolutional layer, and a 13x13 first-scale convolutional kernel is used for convolution. The convolutional kernel slides across the intermediate feature map, comprehensively processing feature information over a large range to capture long-range dependencies between line components. For example, in a power grid line image, long-range dependencies such as the connection between towers and distant conductors can be captured through this convolution operation. After the convolution operation, the first deep feature map is generated.
[0072] For example, if the intermediate feature map is a 248x248 feature map, after convolution with a 13x13 first-scale convolution kernel, the resulting first deep feature map might be a 236x236 feature map. In this first deep feature map, the long-distance dependencies between circuit components become more apparent, providing richer information for subsequent feature extraction.
[0073] H2: Input the first deep feature map into the second deep convolutional layer, perform convolution operation using the second-scale convolutional kernel, extract local structural features of the line components, and generate the second deep feature map, wherein the second-scale convolutional kernel is smaller than the first-scale convolutional kernel.
[0074] In this embodiment, the second deep convolutional layer is a layer following the first deep convolutional layer in the deep convolutional network, and it further processes the first deep feature map. The second-scale convolutional kernel is a relatively small kernel, which is suitable for extracting local structural features of line components, such as the specific shape of insulators and the local texture of conductors.
[0075] In this embodiment of the application, the second deep feature map is obtained by performing a convolution operation on the first deep feature map by the second deep convolutional layer, and it contains local structural feature information of the circuit components.
[0076] In one embodiment, the first deep feature map is input to a second deep convolutional layer, and a 7x7 second-scale convolutional kernel is used for convolution. Smaller kernels allow for more refined processing of feature information, extracting local structural features of circuit components. For example, for insulator components, the second-scale kernel can better capture the texture and edge features of their surface. After the convolution operation, the second deep feature map is generated.
[0077] For example, if the first deep feature map is a 236x236 feature map, after convolution with a 7x7 second-scale convolution kernel, the resulting second deep feature map might be a 230x230 feature map. In this second deep feature map, the local structural features of the circuit components will be clearer.
[0078] H3: Calculate channel attention weights for the second deep feature map, analyze the contribution of each feature channel to the characterization of the structural relationship of the line components, and generate feature channel weight vectors.
[0079] In this embodiment, channel attention weight calculation refers to evaluating each channel of the second deep feature map to determine the importance of each channel in representing the structural relationship of the line components. The feature channel weight vector is a one-dimensional vector, where each element represents the weight of the corresponding channel, reflecting the contribution of that channel to the representation of the structural relationship of the line components.
[0080] In one embodiment, a global average pooling operation is used to process each channel of the second deep feature map to obtain the average value for each channel. These average values are then fed into a fully connected layer and an activation function (such as the sigmoid function) to calculate the weights for each channel. The sigmoid function converts the input values into probability values between 0 and 1, which are used as the channel weights.
[0081] For example, if the second deep feature map has 128 channels, after processing with global average pooling, a fully connected layer, and the sigmoid function, a 128-dimensional feature channel weight vector is obtained. The larger the weight value of a channel, the greater its contribution to the characterization of the structural relationships of the circuit components.
[0082] H4: The second deep feature map is weighted according to the feature channel weight vector to enhance the feature channels that are sensitive to the spatial context information of the line components, and a weighted feature map is generated.
[0083] In this embodiment, channel weighting refers to multiplying the feature channel weight vector element-wise with each channel of the second deep feature map, adjusting the features according to the channel weights. Channel weighting enhances feature channels sensitive to the spatial context information of circuit components, making the feature information of these channels more prominent.
[0084] In one embodiment, the feature channel weight vector is element-wise multiplied with each channel of the second deep feature map. For channels with larger weights, their corresponding eigenvalues are amplified, while for channels with smaller weights, their corresponding eigenvalues are reduced. This highlights feature channels that are important to the spatial context information of the circuit components.
[0085] For example, if the feature channel weight vector is [w1, w2, ..., w128], and the i-th channel of the second deep feature map is Fi, then the i-th channel of the weighted feature map is... After channel weighting, a weighted feature map is generated, making the spatial context information of the line components more apparent.
[0086] H5: Perform a residual connection between the weighted feature map and the intermediate feature map, and fuse local structural features and global context information to generate a residual feature map.
[0087] In this embodiment, residual connection is a connection method in neural networks that adds the weighted feature map to the intermediate feature map, fusing the feature information of both. Residual connection avoids the vanishing gradient problem in deep neural networks while simultaneously fusing local structural features with global contextual information.
[0088] For example, if both the weighted feature map and the intermediate feature map are 230x230 in size, summing their corresponding elements yields a 230x230 residual feature map. This residual feature map contains both the local structural features of the circuit components and global contextual information.
[0089] H6: Perform nonlinear activation function processing on the residual feature map to enhance the nonlinear representation of the structural relationship between line components and generate the final high-level feature map.
[0090] In this embodiment, the nonlinear activation function processing involves inputting the residual feature map into a nonlinear activation function (such as the ReLU function) and performing a nonlinear transformation on it. This nonlinear activation function processing enhances the model's ability to nonlinearly represent the structural relationships between line components, making the features more complex and diverse.
[0091] In one embodiment, the residual feature map is input into a ReLU function, which sets values less than 0 to 0 and leaves values greater than 0 unchanged. This nonlinear transformation enhances the expressive power of important features in the residual feature map while suppressing unimportant features.
[0092] For example, for a certain element x in the residual feature map, if x < 0, it becomes 0 after processing by the ReLU function; if x > 0, it remains x. After processing by the ReLU function, the final high-level feature map is generated, enabling a more effective representation of the structural relationships between circuit components.
[0093] S24: Perform feature vectorization processing on the primary feature map, compress the spatial information into feature vectors through global average pooling operation, and generate low-level texture feature vectors that specifically characterize the edge and gradient information of the line surface.
[0094] In this embodiment, feature vectorization is the process of converting a feature map into a feature vector, which facilitates subsequent calculation and analysis. Global average pooling refers to calculating the average value for each channel of the feature map, compressing the spatial information of the feature map into a single value, thereby converting the feature map into a feature vector.
[0095] In one embodiment, a global average pooling operation is performed on the primary feature map. Assume the primary feature map has C channels, each with a size of H x W. For each channel, the average of all pixel values is calculated, resulting in C values. Combining these C values yields a C-dimensional feature vector, i.e., a low-level texture feature vector. This method effectively compresses spatial information, highlighting the edges and gradient features of the line surface.
[0096] For example, if the primary feature map has 64 channels, each with a size of 254x254, after global average pooling, a 64-dimensional low-level texture feature vector is obtained. This vector can accurately reflect the edge and gradient information of the circuit surface, providing an important basis for subsequent feature fusion and anomaly detection.
[0097] S25: Perform feature vectorization processing on the high-level feature map, retain significant semantic features through global max pooling operation, and generate high-level semantic feature vectors that specifically represent the structural relationships and contextual information of line components.
[0098] In this embodiment, the global max pooling operation selects the maximum value on each channel of the feature map, compressing the spatial information of the feature map into a single value, thereby converting the feature map into a feature vector. In this way, significant semantic features in the feature map can be preserved, highlighting important information.
[0099] In one embodiment, global max pooling is performed on the high-level feature map. Assume the high-level feature map has D channels, each with a size of H'xW'. For each channel, the maximum value among all its pixel values is selected, resulting in D values. Combining these D values yields a D-dimensional feature vector, i.e., the high-level semantic feature vector.
[0100] For example, if a high-level feature map has 128 channels, each with a size of 238x238, after global max pooling, a 128-dimensional high-level semantic feature vector is obtained. This vector can accurately reflect the structural relationships and contextual information of circuit components, helping to improve the accuracy of anomaly detection.
[0101] S26: Integrate the low-level texture feature vector and the high-level semantic feature vector to form a feature set containing multi-level feature representations.
[0102] In this embodiment, the feature set containing multi-level feature representation is obtained by integrating low-level texture feature vectors and high-level semantic feature vectors. It includes both edge and gradient information of the circuit surface and structural relationships and contextual information of the circuit components.
[0103] In one embodiment, low-level texture feature vectors and high-level semantic feature vectors are concatenated sequentially to form a new feature vector, i.e., a feature set containing multi-level feature representations. Assuming the low-level texture feature vector is a 64-dimensional vector and the high-level semantic feature vector is a 128-dimensional vector, the concatenation yields a 192-dimensional feature vector. This feature set can comprehensively reflect the multi-level feature information of the circuit, providing richer evidence for subsequent anomaly detection.
[0104] For example, in actual power grid line anomaly detection, this feature set containing multi-level feature representations can more accurately describe the state of the line and help the model better identify various anomalies, such as broken wires, damaged insulators, and foreign objects hanging.
[0105] In one embodiment, reference Figure 4 Step S30 may include steps S31-S35, which will be described in detail below: S31: Perform dimension alignment processing on the low-level texture feature vector and the high-level semantic feature vector, and project the two feature vectors onto the same feature dimension through a fully connected layer to generate dimension-aligned feature vectors.
[0106] In this embodiment, dimension alignment is performed to ensure that the low-level texture feature vector and the high-level semantic feature vector have the same dimension, facilitating subsequent feature fusion operations. A fully connected layer is a neural network layer that connects each input neuron to each output neuron, performing a linear transformation on the input feature vector and projecting it onto a specified feature dimension.
[0107] In one embodiment, assume the low-level texture feature vector has a dimension of m, and the high-level semantic feature vector has a dimension of n, where m ≠ n. A fully connected layer is designed with input dimensions m and n, and an output dimension of k (k being a pre-defined dimension). The low-level texture feature vector and the high-level semantic feature vector are input into their respective fully connected layers, and after linear transformation, dimension-aligned feature vectors of dimension k are obtained.
[0108] For example, if the low-level texture feature vector has a dimension of 64 and the high-level semantic feature vector has a dimension of 128, and the same dimension k is set to 256, then fully connected layers with input dimensions of 64 and 128, and output dimensions of 256 are constructed respectively. After inputting the low-level texture feature vector and the high-level semantic feature vector into the corresponding fully connected layers, both result in dimension-aligned feature vectors of 256.
[0109] S32: Perform feature fusion processing on the dimension-aligned low-level texture feature vector and high-level semantic feature vector, and generate a fused feature matrix by combining edge gradient information and structural context information through weighted concatenation. The structural context information includes the structural relationship and context information of the circuit components, and the edge gradient information includes the edge and gradient information of the circuit surface.
[0110] In one embodiment, weights w1 and w2 (w1 + w2 = 1) are assigned to the dimension-aligned low-level texture feature vector and high-level semantic feature vector, respectively. The low-level texture feature vector is multiplied by w1, and the high-level semantic feature vector is multiplied by w2. The two results are then concatenated to obtain a fused feature matrix. By adjusting the values of weights w1 and w2, edge gradient information or structural context information can be highlighted according to the actual situation.
[0111] For example, if edge gradient information on the line surface is considered more important, w1 can be set to 0.6 and w2 to 0.4. The low-level texture feature vector (256 dimensions aligned) is multiplied by 0.6, and the high-level semantic feature vector is multiplied by 0.4, then concatenated into a 512-dimensional fusion feature matrix. This allows the fusion feature matrix to better integrate the two types of information, improving the accuracy of anomaly detection.
[0112] In one embodiment, reference Figure 5 Step S32 may include steps S321-S326, which will be described in detail below: S321: Perform feature importance analysis on the low-level texture feature vector after dimension alignment, calculate the contribution of each feature dimension to the edge gradient information representation, and generate an edge gradient weight vector.
[0113] In this embodiment, feature importance analysis evaluates the importance of each feature dimension in the dimension-aligned low-level texture feature vector to the representation of edge gradient information. The edge gradient weight vector is a one-dimensional vector, where each element represents the weight of the corresponding feature dimension, reflecting the contribution of that dimension to the representation of edge gradient information.
[0114] In one embodiment, a feature selection algorithm (such as the random forest algorithm) is used to perform feature importance analysis on the dimension-aligned low-level texture feature vectors. The random forest algorithm constructs multiple decision trees and calculates the importance score for each feature dimension based on its splitting behavior within the decision trees. These scores are then normalized to obtain the edge gradient weight vector.
[0115] For example, if the dimension-aligned low-level texture feature vector is a 256-dimensional vector, after processing with the random forest algorithm and normalization, a 256-dimensional edge gradient weight vector is obtained. The larger the weight value of a feature dimension, the greater its contribution to the representation of edge gradient information.
[0116] S322: The low-level texture feature vector is weighted based on the edge gradient weight vector to generate an enhanced edge gradient feature representation.
[0117] In this embodiment, the weighted processing refers to element-wise multiplying the edge gradient weight vector with the dimension-aligned low-level texture feature vector, adjusting the value of each feature dimension according to the weight. Through weighted processing, the feature dimensions that are important for representing edge gradient information can be enhanced, while the unimportant feature dimensions can be suppressed, generating an enhanced edge gradient feature representation.
[0118] In one embodiment, the edge gradient weight vector is multiplied element-wise with the dimension-aligned low-level texture feature vector. For feature dimensions with larger weights, their corresponding feature values are amplified, while for feature dimensions with smaller weights, their corresponding feature values are reduced.
[0119] For example, if the edge gradient weight vector is [w1, w2, ..., w256], and the dimension-aligned low-level texture feature vector is [x1, x2, ..., x256], then the i-th element of the enhanced edge gradient feature representation is... After weighted processing, an enhanced edge gradient feature representation is generated, making the edge gradient information more obvious.
[0120] S323: Perform feature importance analysis on the dimension-aligned high-level semantic feature vector, calculate the contribution of each feature dimension to the representation of structural context information, and generate a structural context weight vector.
[0121] In this embodiment, feature importance analysis is performed on the dimension-aligned high-level semantic feature vectors, similar to the analysis of low-level texture feature vectors, to evaluate the importance of each feature dimension to the representation of structural context information. The structural context weight vector is a one-dimensional vector, where each element represents the weight of the corresponding feature dimension, reflecting the contribution of that dimension to the representation of structural context information.
[0122] In one embodiment, the random forest algorithm is also used to perform feature importance analysis on the dimension-aligned high-level semantic feature vectors. The random forest algorithm calculates the importance score based on the splitting of the feature dimensions in the decision tree. These scores are then normalized to obtain the structural context weight vector.
[0123] For example, if the dimension-aligned high-level semantic feature vector is a 256-dimensional vector, after processing with the random forest algorithm and normalization, a 256-dimensional structural context weight vector is obtained. The larger the weight value of a feature dimension, the greater its contribution to the representation of structural context information.
[0124] S324: The high-level semantic feature vector is weighted based on the structural context weight vector to generate an enhanced structural context feature representation.
[0125] In this embodiment, the weighting process involves element-wise multiplying the structural context weight vector with the dimension-aligned high-level semantic feature vector, adjusting the value of each feature dimension according to its weight. Through weighting, feature dimensions that are important for representing structural context information can be enhanced, while less important feature dimensions can be suppressed, resulting in an enhanced structural context feature representation.
[0126] In one embodiment, the structural context weight vector is multiplied element-wise with the dimension-aligned high-level semantic feature vector. For feature dimensions with larger weights, their corresponding feature values are amplified, while for feature dimensions with smaller weights, their corresponding feature values are reduced.
[0127] For example, if the structural context weight vector is [v1, v2, ..., v256], and the dimension-aligned high-level semantic feature vector is [y1, y2, ..., y256], then the i-th element of the enhanced structural context feature representation is... After weighted processing, an enhanced structural context feature representation is generated, making the structural context information more prominent.
[0128] In one embodiment, step S324 can be implemented as follows: K1: The structural context weight vector and the high-level semantic feature vector are mapped element-wise to establish a mapping relationship between weights and feature dimensions.
[0129] In this embodiment of the application, element-by-element correspondence means associating each element of the structural context weight vector with the corresponding element of the high-level semantic feature vector to establish a mapping relationship between weights and feature dimensions.
[0130] In one embodiment, assume the structural context weight vector is [v1, v2, ..., v256] and the high-level semantic feature vector is [y1, y2, ..., y256]. Mapping v1 to y1, v2 to y2, and so on, establishes a mapping relationship between weights and feature dimensions.
[0131] K2: Perform a dimension-wise weighted calculation on the high-level semantic feature vector based on the mapping relationship to generate a weighted feature vector.
[0132] In this embodiment, the dimension-wise weighted calculation refers to multiplying each element of the structural context weight vector with the corresponding element of the high-level semantic feature vector according to the established mapping relationship between weights and feature dimensions. Through this dimension-wise weighted calculation, each feature dimension in the high-level semantic feature vector can be adjusted, thereby enhancing the dimensions that are important for representing structural context information.
[0133] In one embodiment, based on the previously established mapping relationship, the structural context weight vector [v1, v2, ..., v256] is multiplied element-wise with the high-level semantic feature vector [y1, y2, ..., y256]. That is, the first weight element v1 is multiplied by the first feature dimension y1, the second weight element v2 is multiplied by the second feature dimension y2, and so on, to obtain the weighted feature vector. .
[0134] For example, if v1 = 0.8 and y1 = 0.5, then the first element of the weighted eigenvector is... Through this dimensional weighted calculation, the importance of different feature dimensions is revealed, laying the foundation for generating more effective structural context feature representations in the future.
[0135] K3: The weighted feature vector is linearly combined with the original high-level semantic feature vector to generate preliminary enhanced features.
[0136] In this embodiment, linear combination refers to adding the weighted feature vector and the original high-level semantic feature vector according to a certain coefficient. Through linear combination, the structural context information highlighted in the weighted feature vector and the original information in the original high-level semantic feature vector can be combined to generate preliminary enhanced features.
[0137] In one embodiment, coefficients a and b (a + b = 1) are assigned to the weighted feature vector and the original high-level semantic feature vector, respectively. Each element of the weighted feature vector is multiplied by a, and each element of the original high-level semantic feature vector is multiplied by b. The corresponding elements are then summed to obtain the preliminary enhanced feature. For example, if the weighted feature vector is [w1, w2, ..., w256] and the original high-level semantic feature vector is [y1, y2, ..., y256], then the i-th element of the preliminary enhanced feature is... .
[0138] For example, if a = 0.6, b = 0.4, the first element of the weighted feature vector w1 = 0.4, and the first element of the original high-level semantic feature vector y1 = 0.3, then the first element of the initial enhanced feature is... This linear combination method allows for a better balance between weighted and original information in the initial enhancement, preparing for subsequent nonlinear transformations.
[0139] K4: Perform nonlinear transformation processing on the preliminary enhancement features to generate nonlinear enhancement features.
[0140] In one embodiment, the initial enhancement features are input into a ReLU function. The ReLU function sets elements less than 0 to 0 and leaves elements greater than 0 unchanged. For example, if an element in the initial enhancement feature is -0.2, it becomes 0 after processing by the ReLU function; if an element is 0.5, it remains 0.5. Through this non-linear transformation, some unimportant information in the initial enhancement features is suppressed, while important information is further highlighted.
[0141] K5: Adjust the feature distribution scale of the nonlinear enhancement features and output the enhanced structural context feature representation.
[0142] In this embodiment, feature distribution scale adjustment involves adjusting the feature distribution of the nonlinear enhancement features to give it a suitable scale range. By adjusting the feature distribution scale, the features can be made more suitable for subsequent calculations and analysis, thereby improving the stability and performance of the model.
[0143] In one embodiment, a normalization method (such as Min-Max normalization) is used to adjust the feature distribution scale of the nonlinear augmentation feature. Min-Max normalization maps each element of the nonlinear augmentation feature to a preset range (such as 0 to 1). Assuming that the minimum value of the nonlinear augmentation feature is min and the maximum value is max, for an element x, the new element obtained after Min-Max normalization is (x - min) / (max - min).
[0144] For example, if the elements in the nonlinear augmented features range from -1 to 2, after Min-Max normalization, the elements will be mapped to the range of 0 to 1. Through this feature distribution scaling adjustment, the augmented structural context feature representation can be better used for subsequent operations such as feature concatenation and anomaly detection.
[0145] S325: Perform feature concatenation operation on the enhanced edge gradient feature representation and the enhanced structural context feature representation to generate a preliminary fused feature representation.
[0146] In one embodiment, it is assumed that the enhanced edge gradient feature representation is a 256-dimensional vector, and the enhanced structural context feature representation is also a 256-dimensional vector. These two vectors are concatenated sequentially to obtain a preliminary 512-dimensional fused feature representation.
[0147] S326: Perform a fully connected transformation and nonlinear activation processing on the preliminary fused feature representation to generate the final fused feature matrix.
[0148] In this embodiment, the fully connected transformation involves inputting the preliminary fused feature representation into a fully connected layer for linear transformation. The fully connected layer performs a weighted summation on each element of the input, achieving further combination and transformation of the features. The nonlinear activation processing involves inputting the result of the fully connected transformation into a nonlinear activation function (such as the ReLU function), introducing nonlinear factors to enhance the model's expressive power.
[0149] In one embodiment, a preliminary fusion feature representation of 512 dimensions is input into a fully connected layer, which has 512 input nodes and a predetermined number (e.g., 256) of output nodes. After linear transformation by the fully connected layer, a 256-dimensional intermediate result is obtained. This intermediate result is then input into a ReLU function for nonlinear activation processing to obtain the final fusion feature matrix.
[0150] S33: Input the fused feature matrix into a multi-class classifier, perform anomaly type discrimination calculation through a fully connected layer and activation function, and generate an initial anomaly probability distribution.
[0151] In this embodiment, the multi-class classifier is a model used to classify the fused feature matrix. It can determine the possible anomaly types of the line based on the input feature matrix. The fully connected layer can perform further linear transformation on the fused feature matrix, and the activation function can convert the result of the linear transformation into a non-linear output, enhancing the expressive power of the model.
[0152] In one embodiment, the fused feature matrix is input to the fully connected layer of a multi-class classifier. After a linear transformation, an intermediate result is obtained. This intermediate result is then input into an activation function (such as the Softmax function) to convert it into a probability distribution. The Softmax function converts the input values into probability values, and the sum of all probability values is 1.
[0153] For example, suppose a multi-class classifier needs to identify three types of anomalies: broken wires, damaged insulators, and suspended foreign objects. After processing with a fully connected layer and a Softmax function, a three-dimensional initial anomaly probability distribution is obtained, such as [0.2, 0.7, 0.1], representing the initial probabilities of broken wires, damaged insulators, and suspended foreign objects in the line, respectively. In this way, the possible types of anomalies in the line can be preliminarily determined.
[0154] S34: Normalize the initial abnormal probability distribution and convert the output value into a probability score through an activation function to generate an abnormal probability distribution.
[0155] In this embodiment, the normalization process is used to ensure that the sum of all probability values in the initial anomaly probability distribution is 1, and that the probability values are within a reasonable range. The activation function can further adjust the output value to better conform to the requirements of the probability distribution.
[0156] In one embodiment, the Softmax activation function is used to normalize the initial anomaly probability distribution. The Softmax function performs an exponential operation on each element of the initial anomaly probability distribution, and then divides the result by the sum of the exponential operations on all elements to obtain the final anomaly probability distribution.
[0157] For example, if the initial anomaly probability distribution is [x1, x2, x3], after processing with the Softmax function, the anomaly probability distribution becomes [exp(x1) / (exp(x1) + exp(x2) + exp(x3)), exp(x2) / (exp(x1) + exp(x2) + exp(x3)), exp(x3) / (exp(x1) + exp(x2) + exp(x3))]. This ensures that the sum of all probability values in the anomaly probability distribution is 1, and that each probability value is between 0 and 1, facilitating subsequent anomaly detection and handling.
[0158] S35: Select the anomaly type with the highest probability score according to the anomaly probability distribution, and generate an anomaly type identifier that includes at least one of wire breakage, insulator damage, and foreign object suspension.
[0159] In this embodiment, the anomaly type identifier is determined based on the anomaly probability distribution, which clearly indicates the possible anomaly types of the line. By selecting the anomaly type with the highest probability score, the actual anomaly of the line can be most likely determined.
[0160] In one embodiment, the probability scores in the anomaly probability distribution are compared, and the anomaly type with the highest score is selected as the anomaly type identifier. For example, if the anomaly probability distribution is [0.1, 0.8, 0.1], then the anomaly type with a probability score of 0.8 (assuming it is insulator damage) is selected as the anomaly type identifier. This provides clear information for subsequent operation and maintenance scheduling, guiding maintenance personnel to conduct targeted inspections and repairs.
[0161] In one embodiment, reference Figure 6 Step S40 may include steps S41-S46, which will be described in detail below: S41: Map the abnormal probability distribution to the image space coordinate system, and generate a probability heatmap with the same resolution as the original image using a bilinear interpolation algorithm.
[0162] In this embodiment, mapping the anomaly probability distribution to the image space coordinate system means corresponding the anomaly probability to each pixel position in the image, so that each pixel has a corresponding anomaly probability value. Bilinear interpolation is an image interpolation method that can calculate the values at other positions based on the known values of discrete points, thereby generating a probability heatmap with the same resolution as the original image.
[0163] In this embodiment, the probability heatmap is an image with the same resolution as the original image, where the color or brightness of each pixel represents the probability of an anomaly at that location. The probability heatmap allows for a visual understanding of which areas in the image may contain anomalies.
[0164] In one embodiment, the mapping relationship between the anomaly probability distribution and the image spatial coordinate system is first determined. It is assumed that the anomaly probability distribution is a one-dimensional vector, while the image is two-dimensional. Based on the number of elements in the anomaly probability distribution and the number of pixels in the image, the elements of the anomaly probability distribution are sequentially mapped to the pixel positions in the image. Then, a bilinear interpolation algorithm is used to interpolate these discrete probability values to generate a probability heatmap with the same resolution as the original image.
[0165] For example, if the original image has a resolution of 256x256 and the anomaly probability distribution has 64 elements, these 64 elements are mapped to pixel locations in the image according to certain rules. Then, bilinear interpolation is used to interpolate the probability values at these locations, resulting in a 256x256 probability heatmap. In this heatmap, brighter areas represent regions with higher anomaly probabilities.
[0166] S42: Traverse the probability heatmap using a sliding window method, calculate a dynamic segmentation threshold based on the mean and standard deviation of pixel values within each local window, and apply the dynamic segmentation threshold to perform binarization segmentation on the probability heatmap to generate an initial abnormal region map.
[0167] In this embodiment, the sliding window method refers to sliding a window of a certain size across the probability heatmap, analyzing and processing the pixel values within each window. The dynamic segmentation threshold is calculated based on the mean and standard deviation of the pixel values within each local window. It can dynamically adjust the segmentation threshold according to the pixel features within the window, thereby improving the accuracy of segmentation.
[0168] In this embodiment, binarization segmentation is the process of converting pixel values of a probability heatmap into binary values (0 or 1), and dividing pixels into foreground (potential abnormal regions) and background (normal regions) based on a dynamic segmentation threshold. The initial abnormal region map is the image obtained after binarization segmentation, where white regions represent potential abnormal regions and black regions represent normal regions.
[0169] In one embodiment, reference Figure 7 Step S42 may include steps S421-S426, which will be described in detail below: S421: Determine the size and overlap parameters of the sliding window, and set a fixed-size local window and a preset overlap amount.
[0170] In this embodiment, the size parameter of the sliding window determines the size of the local window, which affects the accuracy of the analysis of local information in the probability heatmap. The overlap parameter specifies the degree of overlap between adjacent windows; an appropriate amount of overlap can ensure comprehensive coverage of image information and avoid information omission.
[0171] In this embodiment, a fixed-size local window is the basic unit for sliding analysis on a probability heatmap. The preset overlap amount can allow for some intersection between adjacent windows, thereby better capturing continuous features in the image.
[0172] In one embodiment, the size parameters of the sliding window are determined based on the resolution of the probability heatmap and the possible size of the anomalous regions. For example, if the resolution of the probability heatmap is 256x256, and experience shows that the average size of the anomalous regions is between 10x10 and 20x20, the size of the sliding window can be set to 15x15. Simultaneously, to ensure comprehensive coverage of the image information, a preset overlap is set to 50%, meaning that half of the area between adjacent windows overlaps.
[0173] For example, in practice, this setting allows the sliding window to perform detailed analysis of local areas while ensuring the continuity of information between adjacent areas when sliding on the probability heatmap, thereby improving the accuracy of anomaly location.
[0174] S422: Generate a sliding window grid on the probability heatmap according to the size parameters and overlap parameters, and divide the image into multiple local windows with overlapping regions.
[0175] In this embodiment, the sliding window grid is a grid structure divided on the probability heatmap according to set size and overlap parameters, which divides the probability heatmap into multiple local windows. By generating the sliding window grid, the probability heatmap can be systematically traversed and analyzed.
[0176] In one embodiment, starting from the top left corner of the probability heatmap, local windows are generated sequentially according to set size and overlap parameters. For example, if the sliding window size is 15x15 and the overlap is 50%, then the top left corner coordinates of the first window are (0, 0), the top left corner coordinates of the second window are (0, 7) (because the overlap is 50%, it moves 7 pixels vertically), and so on, until the entire probability heatmap is covered.
[0177] For example, on a 256x256 probability heatmap, multiple overlapping 15x15 local windows can be generated in this way, providing a basis for subsequent dynamic segmentation threshold calculation.
[0178] S423: Perform statistical analysis on the pixel values within each local window, and calculate the arithmetic mean and standard deviation of the pixel values within the window.
[0179] In this embodiment, statistical analysis involves performing mathematical calculations on the pixel values within each local window to obtain the distribution characteristics of the pixel values within that window. The arithmetic mean reflects the average level of the pixel values within the window, while the standard deviation measures the degree of dispersion of the pixel values relative to the mean.
[0180] In one embodiment, for each local window, all pixel values are iterated through, summed, and divided by the number of pixels to obtain the arithmetic mean. Then, the square of the difference between each pixel value and the mean is calculated, these squared values are summed, divided by the number of pixels, and the square root is taken to obtain the standard deviation.
[0181] For example, in a 15x15 local window, there are 225 pixel values. Adding these 225 pixel values together and dividing by 225 gives the arithmetic mean. Then, the standard deviation is calculated using the method described above. These statistical results reflect the distribution of outlier probabilities within the local window.
[0182] S424: Based on the mean and standard deviation of each window, generate the corresponding dynamic segmentation threshold according to the preset threshold calculation rules.
[0183] In this embodiment, the preset threshold calculation rule is a method for determining the dynamic segmentation threshold based on the mean and standard deviation. Different threshold calculation rules will affect the segmentation effect of abnormal regions, and a reasonable rule can improve the accuracy of segmentation.
[0184] In one embodiment, the preset threshold calculation rule can be a threshold value. For example, let's set k = 1.5. For each local window, based on the calculated mean and standard deviation, generate the corresponding dynamic segmentation threshold according to this rule.
[0185] For example, if the mean of a local window is 0.3 and the standard deviation is 0.1, then the dynamic segmentation threshold obtained according to the threshold calculation rule is: By dynamically generating thresholds in this way, we can adapt to the pixel features of different local areas and improve the accuracy of anomaly location.
[0186] S425: Map the dynamic segmentation threshold of each window to the corresponding window region, generate the dynamic threshold distribution of the entire image range through interpolation algorithm, compare and analyze the probability value of each pixel in the probability heatmap with the dynamic threshold at the corresponding position, and classify the pixels into foreground abnormal pixels and background pixels according to the comparison results to generate a binary segmentation result.
[0187] In this embodiment, mapping the dynamic segmentation threshold to the corresponding window region means correlating the dynamic segmentation threshold of each local window with its position in the probability heatmap. An interpolation algorithm is used to calculate the dynamic thresholds for other locations within the entire map based on the known dynamic segmentation thresholds for the windows, generating a dynamic threshold distribution across the entire map.
[0188] In one embodiment, a bilinear interpolation algorithm is used to generate a dynamic threshold distribution across the entire image based on the dynamic segmentation threshold of each window. For each pixel in the probability heatmap, the dynamic threshold at its corresponding location is obtained, and the probability value of that pixel is compared with the dynamic threshold. If the probability value is greater than the threshold, the pixel is classified as a foreground anomalous pixel (marked as 1); if the probability value is less than or equal to the threshold, the pixel is classified as a background pixel (marked as 0).
[0189] For example, in a 256x256 probability heatmap, after dynamic threshold distribution generation and comparative analysis, a binary image is obtained, in which white areas (marked as 1) represent possible abnormal areas and black areas (marked as 0) represent normal areas.
[0190] S426: Mark the connected regions of the binarized segmentation results to generate an initial anomaly region map containing anomaly region location information.
[0191] In this embodiment, connected component labeling involves grouping foreground anomalous pixels in the binarized segmentation result and marking interconnected foreground pixels as the same connected component. Through connected component labeling, the extent and location of each anomalous region can be determined.
[0192] In one embodiment, a seed-filling algorithm is used to label connected components in the binarized segmentation results. Starting with an unlabeled foreground anomalous pixel, it is used as a seed point, and the algorithm expands to its neighboring foreground pixels, marking all connected foreground pixels as the same connected component and assigning them a unique label value. This process is repeated until all foreground anomalous pixels have been labeled.
[0193] For example, in the binarized segmentation result, there may be multiple scattered foreground anomalous pixel regions. After connected component labeling, each anomalous region has a unique label, thereby generating an initial anomalous region map containing anomalous region location information, which facilitates further processing and analysis of the anomalous regions.
[0194] S43: Perform a morphological opening operation on the initial abnormal region map, use circular structuring elements to eliminate isolated noise points with an area smaller than a preset threshold, and generate a denoised abnormal region map.
[0195] In this embodiment, morphological opening is an image processing method that first performs erosion on the image, followed by dilation. A circular structuring element is a template used for morphological operations; its shape is circular. By combining morphological opening and the circular structuring element, isolated noise points with small areas in the image can be eliminated, improving image quality.
[0196] In one embodiment, a suitable circular structuring element is selected, such as a circle with a radius of 3. An erosion operation is performed on the initial abnormal region image, which involves determining whether the center of the structuring element matches a pixel in the image; if they match, the pixel is retained; otherwise, it is deleted. Then, a dilation operation is performed on the eroded image, expanding the image according to the shape of the structuring element. In this way, isolated noise points with an area smaller than a preset threshold can be eliminated.
[0197] For example, suppose the preset threshold is 10 pixels. In the initial anomaly region map, there are some isolated white noise points with an area less than 10 pixels. After a morphological opening operation on a circular structuring element with a radius of 3, these isolated noise points are eliminated, resulting in a denoised anomaly region map, making the anomaly region more accurate.
[0198] S44: Perform a morphological closing operation on the denoised anomaly region map, connect the broken anomaly region boundaries using the same structuring element, and generate an anomaly region map with optimized connectivity.
[0199] In this embodiment, the morphological closing operation involves first dilating the image and then eroding it. By using the morphological closing operation and the same circular structuring element, the broken boundaries of abnormal regions in the denoised abnormal region image can be connected, improving the connectivity of the abnormal regions.
[0200] In one embodiment, a circular structuring element with a radius of 3 is still used to perform a closing operation on the denoised anomalous region map. First, an expansion operation is performed, using the center of the circular structuring element as a reference to expand the area it covers, allowing adjacent but broken anomalous region boundaries to connect. Then, an erosion operation is performed to remove any excess parts that may have been generated after expansion, restoring the reasonable shape of the anomalous regions.
[0201] For example, in the denoised anomalous region map, there may be breaks in the boundaries of anomalous regions due to factors such as lighting and occlusion. After performing a morphological closing operation on a circular structuring element with a radius of 3, these broken boundaries are connected, forming an anomalous region map with better connectivity, which is more conducive to the accurate identification and analysis of anomalous regions in the future.
[0202] S45: Based on the geometric feature constraints corresponding to the anomaly type identifier, perform region filtering on the connectivity-optimized anomaly region map, remove false detection regions that are too small or have irregular shapes, and generate a refined anomaly region map.
[0203] In this embodiment, the geometric feature constraints corresponding to the anomaly type identifier are pre-defined rules based on the characteristics of different anomaly types. For example, a broken wire may appear as a long and thin region, and an insulator break may have a specific shape and area range. Region filtering involves screening the connectivity-optimized anomaly region map based on these constraints to remove falsely detected regions that do not meet the conditions.
[0204] In one embodiment, corresponding geometric feature constraints are set for different anomaly types. For example, for a broken wire anomaly, the length-to-width ratio of the anomaly region must be greater than a certain threshold, and the area must be greater than a certain value. For an insulator damage anomaly, the shape of the anomaly region must approximate the shape of the insulator, and the area must be within a certain range. For each anomaly region in the connectivity-optimized anomaly region graph, it is checked whether it meets the corresponding geometric feature constraints; if not, the region is removed.
[0205] For example, in the connectivity-optimized anomaly region map, there may be some isolated regions with very small areas, or regions whose shapes differ greatly from normal anomaly types. By filtering regions based on the geometric feature constraints corresponding to the anomaly type identifier, these false detection regions are removed, resulting in a refined anomaly region map, making the anomaly detection results more accurate and reliable.
[0206] S46: Extract the minimum bounding rectangle coordinates of each abnormal region from the refined abnormal region map, and combine them with the corresponding abnormal type identifier and abnormal probability value to generate the final abnormal detection result containing the abnormal type, abnormal probability and location coordinates.
[0207] In this embodiment, the coordinates of the minimum bounding rectangle refer to the coordinates of the four vertices of the smallest rectangle that can completely enclose the abnormal region, which can accurately represent the location of the abnormal region. By extracting the coordinates of the minimum bounding rectangle and combining them with the abnormality type identifier and the abnormality probability value, the abnormal situation can be completely described.
[0208] In one embodiment, an image processing algorithm is used to extract the coordinates of the minimum bounding rectangle for each anomaly region in the refined anomaly region map. For each anomaly region, the coordinates of the top-left and bottom-right vertices of its minimum bounding rectangle are determined. These coordinates are then combined with the corresponding anomaly type identifier and anomaly probability value to form the final anomaly detection result.
[0209] For example, given a refined anomaly map, two anomaly regions were detected. The first anomaly region was classified as insulator damage with a probability of 0.8, and its minimum bounding rectangle coordinates were (x1, y1, x2, y2). The second anomaly region was classified as foreign object suspension with a probability of 0.7, and its minimum bounding rectangle coordinates were (x3, y3, x4, y4). After processing this information, the final anomaly detection results were obtained, facilitating maintenance personnel to quickly locate and handle anomalies.
[0210] Accordingly, to better implement the above methods, this application also provides a power grid image line anomaly detection system based on deep learning feature extraction. For example... Figure 8 As shown, the power grid image line anomaly detection system 80 based on deep learning feature extraction includes:
[0211] The acquisition module 801 is used to acquire visible light image data of the power grid line through an image acquisition device deployed in the power grid line area, and to perform preprocessing operations on the visible light image data to obtain a standardized image dataset. The feature extraction module 802 is used to input the standardized image dataset into a pre-trained convolutional neural network model, and extract multi-level feature representations from the image through the convolutional neural network model to generate a feature set; The fusion processing module 803 is used to fuse the low-level texture feature vector and the high-level semantic feature vector to obtain a fused feature matrix, and to perform multi-class classification calculation on the fused feature matrix to output an anomaly probability distribution and an anomaly type identifier. The anomaly probability distribution represents the probability score of multiple line anomaly types, and the line anomaly type identifier includes at least one of wire breakage, insulator damage, and foreign object suspension. The region positioning module 804 is used to perform abnormal region positioning processing using an adaptive threshold segmentation algorithm based on the abnormal probability distribution and abnormal type identifier, generate an initial abnormal region map, and correct the initial abnormal region map using an optimization algorithm to eliminate false detections and missed detections, and generate a final abnormal detection result, wherein the final abnormal detection result includes the abnormal type, abnormal probability and location coordinates of the abnormal region. The report generation module 805 is used to generate a formatted anomaly report based on the final anomaly detection result and send the formatted anomaly report to the power grid monitoring center to realize real-time early warning and operation and maintenance scheduling of line anomalies.
[0212] The implementation details of each module are provided in the preceding method embodiments and will not be repeated here. The technical effects achieved by each module and device are described in the foregoing method embodiments.
[0213] like Figure 9As shown, this application embodiment also provides a computer device 90, which includes a processor 901 and a memory 902, wherein the memory 902 stores a computer program, and when the computer program is executed by the processor 901, the processor 901 performs the steps of any of the methods described above.
[0214] The above-disclosed embodiments are merely preferred embodiments of this application and should not be construed as limiting the scope of this application. Therefore, any equivalent variations made in accordance with the claims of this application are still within the scope of this application.
Claims
1. A method for detecting line anomalies in power grid images based on deep learning feature extraction, characterized in that, Includes the following steps: Visible light image data of the power grid line is acquired by an image acquisition device deployed in the power grid line area. The visible light image data is preprocessed to obtain a standardized image dataset, wherein the standardized image dataset includes an image matrix with pixel values normalized to a preset range, as well as corresponding acquisition time information and spatial location information. The standardized image dataset is input into a pre-trained convolutional neural network model, which extracts multi-level feature representations from the image to generate a feature set. The feature set includes low-level texture feature vectors and high-level semantic feature vectors. The low-level texture feature vectors represent the edge and gradient information of the circuit surface, and the high-level semantic feature vectors represent the structural relationships and contextual information of the circuit components. The low-level texture feature vector and the high-level semantic feature vector are fused to obtain a fused feature matrix. Multi-class classification calculation is performed on the fused feature matrix to output an anomaly probability distribution and an anomaly type identifier. The anomaly probability distribution represents the probability score of multiple line anomaly types. The line anomaly type identifier includes at least one of wire breakage, insulator damage, and foreign object suspension. Based on the abnormal probability distribution and abnormal type identifier, an adaptive threshold segmentation algorithm is used to locate abnormal regions, generating an initial abnormal region map. The initial abnormal region map is then corrected using an optimization algorithm to eliminate false detections and missed detections, generating a final abnormal detection result. The final abnormal detection result includes the abnormal type, abnormal probability, and location coordinates of the abnormal region. Based on the final anomaly detection results, a formatted anomaly report is generated and sent to the power grid monitoring center to achieve real-time early warning and operation and maintenance scheduling of line anomalies.
2. The method according to claim 1, characterized in that, The process of inputting the standardized image dataset into a pre-trained convolutional neural network model and extracting multi-level feature representations from the images through the convolutional neural network model to generate a feature set includes the following steps: The standardized image dataset is input into the shallow convolutional layer of a pre-trained convolutional neural network model. Local detail features in the image are extracted through small-scale convolutional kernels to generate a primary feature map representing the edge and gradient information of the line surface. The primary feature map is input into the intermediate convolutional layer, and the local structural features of the circuit components are captured by the medium-scale convolutional kernel to generate an intermediate feature map that represents the basic shape and arrangement relationship of the circuit components. The intermediate feature maps are input into deep convolutional layers, and global context information of circuit components is extracted through large-scale convolutional kernels to generate high-level feature maps that characterize the structural relationships and spatial context between circuit components. The primary feature map is processed into feature vectors. Spatial information is compressed into feature vectors through global average pooling, generating low-level texture feature vectors that specifically characterize the edges and gradient information of the line surface. The advanced feature map is processed into feature vectors, and significant semantic features are preserved through global max pooling to generate advanced semantic feature vectors that specifically represent the structural relationships and contextual information of line components. The low-level texture feature vectors and high-level semantic feature vectors are integrated to form a feature set containing multi-level feature representations.
3. The method according to claim 1, characterized in that, The process of fusing the low-level texture feature vector and the high-level semantic feature vector to obtain a fused feature matrix, and then performing multi-class classification calculations on the fused feature matrix to output anomaly probability distribution and anomaly type identifier, includes the following steps: The low-level texture feature vector and the high-level semantic feature vector are dimensionally aligned by projecting the two feature vectors onto the same feature dimension through a fully connected layer to generate dimensionally aligned feature vectors. The low-level texture feature vector and the high-level semantic feature vector after dimension alignment are subjected to feature fusion processing. The edge gradient information and structural context information are combined by weighted concatenation to generate a fused feature matrix. The structural context information includes the structural relationship and context information of the line components, and the edge gradient information includes the edge and gradient information of the line surface. The fused feature matrix is input into a multi-class classifier, and anomaly type discrimination calculation is performed through a fully connected layer and activation function to generate an initial anomaly probability distribution. The initial anomaly probability distribution is normalized, and the output value is converted into a probability score through an activation function to generate an anomaly probability distribution. Based on the anomaly probability distribution, the anomaly type with the highest probability score is selected, and an anomaly type identifier containing at least one of wire breakage, insulator damage, and foreign object suspension is generated.
4. The method according to claim 1, characterized in that, The process of locating anomaly regions using an adaptive threshold segmentation algorithm based on the anomaly probability distribution and anomaly type identifier to generate an initial anomaly region map, and then refining the initial anomaly region map using an optimization algorithm to eliminate false detections and missed detections, thereby generating the final anomaly detection result, includes the following steps: The abnormal probability distribution is mapped to the image space coordinate system, and a probability heatmap with the same resolution as the original image is generated by bilinear interpolation algorithm. The probability heatmap is traversed using a sliding window approach. A dynamic segmentation threshold is calculated based on the mean and standard deviation of pixel values within each local window. The dynamic segmentation threshold is then applied to perform binarization segmentation on the probability heatmap to generate an initial abnormal region map. A morphological opening operation is performed on the initial abnormal region map, and a circular structuring element is used to eliminate isolated noise points with an area smaller than a preset threshold, thereby generating a denoised abnormal region map. A morphological closing operation is performed on the denoised anomaly region map to connect the broken anomaly region boundaries using the same structuring element, thereby generating an anomaly region map with optimized connectivity. Based on the geometric feature constraints corresponding to the anomaly type identifier, the connectivity-optimized anomaly region map is filtered to remove false detection regions that are too small or have irregular shapes, thus generating a refined anomaly region map. The minimum bounding rectangle coordinates of each abnormal region are extracted from the refined abnormal region map. Combined with the corresponding abnormal type identifier and abnormal probability value, the final abnormal detection result containing abnormal type, abnormal probability and location coordinates is generated.
5. The method according to claim 3, characterized in that, The step of inputting the intermediate feature map into a deep convolutional layer and extracting global context information of the circuit components through large-scale convolutional kernels to generate a high-level feature map representing the structural relationships and spatial context between the circuit components includes the following steps: The intermediate feature map is input into the first deep convolutional layer, and a first-scale convolutional kernel is used to perform convolution operations to capture the long-distance dependencies between line components and generate the first deep feature map. The first deep feature map is input into the second deep convolutional layer, and a second-scale convolutional kernel is used to perform convolution operations to extract local structural features of the line components and generate the second deep feature map. The second-scale convolutional kernel is smaller than the first-scale convolutional kernel. Channel attention weights are calculated for the second deep feature map, the contribution of each feature channel to the characterization of the structural relationship of the line components is analyzed, and feature channel weight vectors are generated. The second deep feature map is weighted according to the feature channel weight vector to enhance the feature channels that are sensitive to the spatial context information of line components, and a weighted feature map is generated. The weighted feature map is residually connected to the intermediate feature map, and local structural features and global context information are fused to generate a residual feature map. The residual feature map is processed by a nonlinear activation function to enhance the nonlinear representation of the structural relationship between line components and generate the final high-level feature map.
6. The method according to claim 3, characterized in that, The process of fusing the dimension-aligned low-level texture feature vector and high-level semantic feature vector, and generating a fused feature matrix by combining edge gradient information and structural context information through weighted concatenation, includes the following steps: The low-level texture feature vector after dimensional alignment is subjected to feature importance analysis, the contribution of each feature dimension to the edge gradient information representation is calculated, and an edge gradient weight vector is generated. The low-level texture feature vector is weighted based on the edge gradient weight vector to generate an enhanced edge gradient feature representation. The high-level semantic feature vector after dimensional alignment is subjected to feature importance analysis, the contribution of each feature dimension to the representation of structural context information is calculated, and a structural context weight vector is generated. The high-level semantic feature vector is weighted based on the structural context weight vector to generate an enhanced structural context feature representation. The enhanced edge gradient feature representation and the enhanced structural context feature representation are concatenated to generate a preliminary fused feature representation. The preliminary fused feature representation is subjected to a fully connected transformation and nonlinear activation processing to generate the final fused feature matrix.
7. The method according to claim 4, characterized in that, The process of traversing the probability heatmap using a sliding window approach, calculating a dynamic segmentation threshold based on the mean and standard deviation of pixel values within each local window, and applying the dynamic segmentation threshold to perform binarization segmentation on the probability heatmap to generate an initial anomaly region map includes the following steps: Determine the size and overlap parameters of the sliding window, and set a fixed-size local window and a preset overlap amount; Based on the size parameters and overlap parameters, a sliding window grid is generated on the probability heatmap to divide the image into multiple local windows with overlapping regions. Perform statistical analysis on the pixel values within each local window, and calculate the arithmetic mean and standard deviation of the pixel values within the window; Based on the mean and standard deviation of each window, a corresponding dynamic segmentation threshold is generated according to a preset threshold calculation rule. The dynamic segmentation thresholds of each window are mapped to the corresponding window regions. An interpolation algorithm is used to generate a dynamic threshold distribution across the entire image. The probability value of each pixel in the probability heatmap is compared and analyzed with the dynamic threshold at the corresponding location. Based on the comparison results, the pixels are classified into foreground abnormal pixels and background pixels to generate a binarized segmentation result. Connected region labeling is performed on the binarized segmentation results to generate an initial anomaly region map containing anomaly region location information.
8. The method according to claim 6, characterized in that, The step of weighting the high-level semantic feature vector based on the structural context weight vector to generate an enhanced structural context feature representation includes the following steps: The structural context weight vector and the high-level semantic feature vector are mapped element-by-element to establish a mapping relationship between weights and feature dimensions; Based on the mapping relationship, a dimension-wise weighted calculation is performed on the high-level semantic feature vector to generate a weighted feature vector; The weighted feature vector is linearly combined with the original high-level semantic feature vector to generate preliminary enhanced features; The preliminary enhancement features are subjected to nonlinear transformation processing to generate nonlinear enhancement features; The feature distribution scale of the nonlinear enhancement features is adjusted to output an enhanced structural context feature representation.
9. The method according to claim 1, characterized in that, The process involves acquiring visible light image data of the power grid lines using image acquisition devices deployed in the power grid line area, and performing standardized preprocessing operations on the visible light image data to obtain a standardized image dataset, including: Visible light image data of the target line area is acquired by image acquisition devices deployed in the power grid line area, and the acquisition time and spatial location information of each image are recorded. The visible light image data is subjected to noise filtering to remove random noise interference in the image and generate image data after preliminary denoising. The pixel values of the image data after initial denoising are normalized to map the pixel values to a preset range, thereby obtaining a normalized image matrix. The normalized image matrix is integrated with the corresponding acquisition time information and spatial location information to form a standardized image dataset.
10. A power grid image line anomaly detection system based on deep learning feature extraction, characterized in that, The system includes: The acquisition module is used to acquire visible light image data of the power grid line through an image acquisition device deployed in the power grid line area, and to perform preprocessing operations on the visible light image data to obtain a standardized image dataset, wherein the standardized image dataset includes an image matrix with pixel values normalized to a preset range and corresponding acquisition time information and spatial location information; The feature extraction module is used to input the standardized image dataset into a pre-trained convolutional neural network model, and extract multi-level feature representations from the image through the convolutional neural network model to generate a feature set, wherein the feature set includes low-level texture feature vectors and high-level semantic feature vectors. The low-level texture feature vectors represent the edge and gradient information of the circuit surface, and the high-level semantic feature vectors represent the structural relationship and contextual information of the circuit components. The fusion processing module is used to fuse the low-level texture feature vector and the high-level semantic feature vector to obtain a fused feature matrix, and to perform multi-class classification calculation on the fused feature matrix to output an anomaly probability distribution and an anomaly type identifier. The anomaly probability distribution represents the probability score of multiple line anomaly types, and the line anomaly type identifier includes at least one of wire breakage, insulator damage, and foreign object suspension. The region positioning module is used to perform abnormal region positioning processing using an adaptive threshold segmentation algorithm based on the abnormal probability distribution and abnormal type identifier, generate an initial abnormal region map, and then correct the initial abnormal region map using an optimization algorithm to eliminate false detections and missed detections, generating a final abnormal detection result, wherein the final abnormal detection result includes the abnormal type, abnormal probability, and location coordinates of the abnormal region. The report generation module is used to generate a formatted anomaly report based on the final anomaly detection results, and send the formatted anomaly report to the power grid monitoring center to realize real-time early warning and operation and maintenance scheduling of line anomalies.
Citation Information
Patent Citations
Power grid equipment defect detection method based on multi-level multi-scale feature fusion
CN116739963A
Pseudo-anomaly enhancement method based on SegAug visual segmentation model and related device
CN118823002A
Power transmission line reliability prediction method, system and equipment based on SENet and OffNet
CN119251641A
Resistor disc defect online detection system and grading method based on machine vision
CN120765532A
Engineering construction defect automatic detection and classification method based on deep learning
CN121095141A