Power transmission line micro-target detection method based on multi-scale global feature enhancement
By employing a multi-scale global feature enhancement method and utilizing the ResNet50 network and optimization strategies, the problem of low efficiency in traditional power facility inspection was solved, enabling rapid and accurate detection of small targets and preventing major accidents.
Patent Information
- Application Number
- CN202411138993.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-19
- Publication Date
- 2026-11-24
- Estimated Expiration
- 2044-08-19
AI Technical Summary
Traditional power facility inspections are inefficient and fail to cover all potential risk points. Existing methods for detecting small targets are slow and computationally expensive in complex scenarios, making it difficult to meet real-time requirements.
A multi-scale global feature enhancement method is adopted, which uses the ResNet50 network to extract image features. The detection process is optimized by combining the long-distance feature enhancement module and the multi-scale linear attention optimization strategy with learnable coordinates and width and height anchored candidate boxes, thereby reducing computational complexity and improving detection accuracy.
It enables rapid and accurate identification of minute defects in high-voltage power facilities, effectively preventing major accidents, improving detection speed and accuracy, and reducing computational costs.
Smart Images

Figure CN118968179B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the fields of computer vision, image processing, and object detection in artificial intelligence, and specifically relates to a method for detecting small objects based on multi-scale global feature enhancement. Background Technology
[0002] With the continuous expansion of power systems and the increasing demands for power supply stability, ensuring the safe operation of high-voltage transmission lines and substation equipment has become a crucial task for the power industry. The normal operation of high-voltage power facilities not only affects the stability and reliability of the power system but also directly impacts public safety and the normal functioning of socio-economic activities. Therefore, timely detection and handling of potential safety hazards in power facilities are of paramount importance.
[0003] Traditional power facility inspection methods primarily rely on manual on-site checks, which are not only inefficient and costly but also fail to cover all potential risk points. In recent years, with the development of computer vision and artificial intelligence technologies, image analysis-based target detection technology has gradually become an efficient and feasible solution. In particular, detection technology for minute targets, capable of accurately identifying potentially small defects or abnormal components (such as detached parts) in high-voltage power facilities, has demonstrated enormous application potential in the field of power facility safety monitoring, effectively preventing major accidents caused by these minor defects.
[0004] Tiny target detection technology typically involves the application of deep learning methods, including but not limited to convolutional neural networks (CNNs), region convolutional neural networks (R-CNNs), and their various variants. These algorithms can automatically learn feature representations from large datasets of labeled images and achieve effective identification and localization of specific tiny targets through an end-to-end training process. Furthermore, to adapt to the complex and ever-changing working environment of power facilities, this technology also needs to be combined with advanced image enhancement and post-processing algorithms to improve the robustness and accuracy of detection.
[0005] Small object detection is mainly divided into traditional detection methods and deep learning-based methods. Traditional detection methods rely primarily on manually designed features and traditional machine learning models for object detection. These traditional methods typically employ classic feature extraction techniques and machine learning classifiers to achieve object detection. While they perform well in some simple scenarios and specific tasks, they have limitations in complex scenarios, occlusion, and scale variations. However, with the rise of deep learning, deep learning-based object detection methods have achieved better performance and generalization ability, gradually becoming the mainstream in the field of object detection.
[0006] Deep learning-based dense crowd detection is currently divided into single-stage and two-stage detection. R-CNN is a representative two-stage detection algorithm, subsequently giving rise to Fast-CNN, Faster-RCNN, and others. The characteristic of two-stage detection is that the algorithm needs to acquire candidate regions and extract features from them before performing classification and prediction tasks. Two-stage detection algorithms achieve good detection accuracy but are slow. In contrast, single-stage detection uses candidate boxes of different sizes to cover the entire image pixel by pixel, eliminating the step of searching for candidate regions separately, thus achieving considerable detection accuracy while meeting real-time requirements. Among these, end-to-end algorithms are machine learning methods that directly map input to output, without requiring manually designed feature extraction steps. The DETR series of algorithms is a popular end-to-end algorithm for dense crowd detection. It requires no manual component design and achieves performance comparable to optimized classic detectors such as faster region convolutional neural networks. Unlike previous detectors, DETR models object detection as an ensemble prediction task and assigns labels through bipartite graph matching. Summary of the Invention
[0007] To address the shortcomings of existing technologies, this invention aims to provide a method for detecting small targets based on multi-scale global feature enhancement. This method takes 2D scene data to be detected as input and feeds it into a multi-scale feature extraction network model to obtain image features of different sizes. The multi-scale feature extraction network model uses ResNet50, which provides stable and comprehensive feature extraction with low computational cost and high speed. The last three layers of ResNet50 are used as the output multi-scale features. This approach effectively prevents major accidents caused by these small defects.
[0008] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is as follows:
[0009] A method for detecting small targets based on multi-scale global feature enhancement, the method comprising the following steps:
[0010] Step 1: Input the 2D scene data to be detected; feed the 2D scene data into a multi-scale feature extraction network model to obtain image features of different sizes.
[0011] Step 2 applies a fast sampling algorithm to the high-level image features, combining highly correlated features into aggregated feature blocks and learning the relationship between the aggregated feature blocks and the original features. Self-attention is then performed on the aggregated feature blocks to learn long-distance feature relationships. The aggregated feature blocks are then restored to their original form with long-distance feature relationships based on the previously learned relationships with the original features. The flattened one-dimensional features are then fed into the Transformer encoder for multi-head self-attention. In Step 2, the higher-level features from these three output layers are fed into the long-distance feature enhancement module. First, the number of aggregation tokens must be determined, given tokens... (in (This refers to the number of tokens), assuming each token... Belonging to m aggregate tokens One of them, thus requiring calculation Association Mapping First, the initial aggregated label is sampled by averaging the labels within a regular grid area. If the grid size is The number of aggregate tokens is Then, the sampling algorithm is run iteratively through the following two steps:
[0012] (1) Aggregated Token Sampling: Compared to the traditional K-means clustering algorithm, we use the better PAM clustering algorithm for token aggregation. First, we select k objects as the initial tokens. Compared to the mean selected by the K-means algorithm, the PAM algorithm selects the median as the initial value. This makes the algorithm more robust as it is less susceptible to outliers. Starting from the current token center, we construct an optimal aggregated token by minimizing the sum of similarities from all tokens to their nearest token center. We try to replace the current aggregated token center to reduce the total cost function (the sum of similarities from all tokens to their nearest token center) until no better aggregated token can be found. To obtain the association between the original tokens and the aggregated tokens, we apply a more attention-like approach to calculate the association graph. Defined as:
[0013]
[0014] Where d is the channel number C, X is the original token, and S is the aggregate token.
[0015] (2) Aggregate Token Update: The aggregate token update is a weighted sum of tokens, defined as:
[0016]
[0017] in This is a graph showing the relationship between the original token and the aggregated token, where X represents the original token and S represents the aggregated token.
[0018] This approach incorporates a multi-scale linear attention optimization strategy. In the aggregated feature multi-head attention network, the ReLU linear activation function is used for feature fusion, adding long-distance feature relationships to the high-level semantic features of the multi-scale features. Traditional self-attention mechanisms typically involve calculating query, key, and value vectors, using dot products to calculate attention weights, and then summing these weighted value vectors to obtain the final attention output. In small object detection environments, this reduces the weight of the detected target features and incurs significant computational costs. The linear attention mechanism replaces the traditional Softmax function with the ReLU function, simplifying weight calculation while preserving attention features and reducing computational costs, enabling the model to effectively handle high-information images.
[0019] Step 3: Add learnable coordinates and width / height anchored candidate boxes to the decoder. Combine the coordinates of the learnable candidate boxes with positional encoding, and include them along with the width / height of the candidate boxes in the multi-head attention module that controls the width and height. This allows the query to select more precise and specific features during attention processing. In Step 3, the decoder with learnable anchored candidate boxes records... For the q-th anchor point, , and For its corresponding content query and location query, where D is the dimension of the decoder embedding and location query, given an anchor point. Location query Depend on:
[0020]
[0021] Here, PE represents positional encoding, which generates a sinusoidal embedding from floating-point numbers. The parameters of the MLP are shared across all layers.
[0022] In the self-attention module, all three queries, keys, and values have the same content items, while the queries and keys contain additional positional items:
[0023]
[0024] Learn one To obtain a scale vector based on content information, and then use it for element-wise multiplication with the position embedding:
[0025]
[0026]
[0027] in represents the image features at position x, y, and · represents element-wise multiplication. The position embeddings in the query and key are generated based on 2D coordinates.
[0028] Step 4: When the selected features are fed into the binary matching process to be paired with the ground truth, an optimized denoising task is performed simultaneously. This makes it easier for the features to lock onto the same ground truth target during multiple binary matching training sessions, thereby accelerating the convergence speed and improving accuracy. Finally, the selected features are fed into the classifier to obtain the category and location box.
[0029] The present invention aims to provide a method for detecting small targets based on multi-scale global feature enhancement, comprising:
[0030] The input is 2D scene data to be detected. This data is then fed into a multi-scale feature extraction network model to obtain image features of different sizes. The multi-scale feature extraction network model uses ResNet50, which provides stable and comprehensive feature extraction with relatively low computational cost and fast speed. The last three layers of ResNet50 are used as the output multi-scale features.
[0031] A new optimization strategy is incorporated, comprising two parts: a long-range feature enhancement module and a multi-scale linear attention optimization strategy. The long-range feature enhancement module applies a fast sampling algorithm to high-level image features, combining highly correlated features into aggregated feature blocks and learning the relationship between the aggregated feature blocks and the original features. Specifically, the input features first pass through a DWConv depthwise separable convolution to reduce the number of parameters and computational complexity. After layer normalization, the input features are fed into the aggregated feature sampling module, which aggregates features using a fast algorithm, learning and recording the relationship between the original features and the aggregated feature blocks. The aggregated feature blocks are then fed into a multi-head self-attention network to learn long-range features, followed by upsampling to restore the feature size, thus completing the aggregated feature attention module.
[0032] This paper incorporates a multi-scale linear attention optimization strategy. In multi-head attention networks that aggregate features, traditional methods use the softmax activation function after projecting features into Q / K / V tokens. This can lead to excessive influence from irrelevant features in small object detection and also results in high computational complexity. The proposed optimization strategy first performs a depth-variable convolution (DWConv) on the output token, then applies the ReLU linear activation function, and finally performs feature fusion.
[0033] Compared to existing technologies, the advantages of this invention are as follows: This invention improves the overall accuracy by designing a new optimization strategy to optimize the neural network for detecting small targets in power transmission lines, thereby accurately identifying potential minor defects or abnormal components (such as detached parts) in high-voltage power facilities and effectively preventing major accidents caused by these minor defects; by putting 2D scene data into a multi-scale feature extraction network model, image features of different sizes are obtained; a long-distance feature enhancement module makes the features have distance feature relationships; compared to traditional methods, this method has been improved: for the traditional K-means clustering algorithm, we use the better PAM clustering algorithm for token aggregation. First, we select k objects as initial tokens. Compared to the mean selected by the K-means algorithm, the PAM algorithm selects the median as the initial value, which is less susceptible to outliers and more robust; starting from the current token center, an optimal aggregated token is constructed by minimizing the sum of similarities of all tokens to their nearest token center. We try to replace the current aggregated token center to reduce the total cost function (the sum of similarities of all tokens to their nearest token center) until no better aggregated token can be found. Simultaneously, a multi-scale linear attention optimization strategy is incorporated. In the multi-head attention network for aggregated features, the ReLU linear activation function is used for feature fusion, adding long-distance feature relationships to the high-level feature semantics of multi-scale features. Traditional self-attention mechanisms typically involve calculating query, key, and value vectors, using dot products to calculate attention weights, and then summing the value vectors based on these weights to obtain the final attention output. In small object detection environments, this reduces the proportion of detected target features and incurs significant computational costs. By adopting a linear attention mechanism that uses the ReLU function instead of the traditional Softmax function, the computation of weights is simplified while preserving attention features, and the computational cost is reduced, enabling the model to effectively handle high-information images. Subsequently, the flattened one-dimensional features are fed into the Transformer encoder for multi-head self-attention operations; in the decoder, anchored candidate boxes with learnable coordinates and dimensions are added. The coordinates and positional encodings of the learnable candidate boxes are combined and included in the multi-head attention module that controls the dimensions, allowing the query to select features. When the selected features are fed into binary matching to be paired with the ground truth, an optimized denoising task is performed simultaneously. Finally, the selected features are fed into the classifier to obtain the category and location box. Attached Figure Description
[0034] To more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0035] Figure 1 This is a flowchart of the small target detection method based on multi-scale global feature enhancement of the present invention;
[0036] Figure 2 This is a structural diagram of the long-range feature enhancement module of the micro-target detection method based on multi-scale global feature enhancement of the present invention;
[0037] Figure 3 This is a structural diagram of the multi-scale linear attention optimization strategy for the small target detection method based on multi-scale global feature enhancement in this invention. Detailed Implementation
[0038] The present invention will be further described below with reference to specific embodiments. The following embodiments are only used to illustrate the technical solution of the present invention more clearly, and are not intended to limit the scope of protection of the present invention.
[0039] The term "comprising" and other similar expressions used in the specification, claims, and accompanying drawings of this invention are intended to cover a non-exclusive inclusion, such as a process, method, system, or apparatus that includes a series of steps or units but is not limited to the steps or units listed.
[0040] The terms "comprising" and other similar expressions used in the specification, claims, and accompanying drawings of this invention are intended to cover a non-exclusive inclusion, such as a process, method, system, or apparatus that includes a series of steps or units but is not limited to the listed steps or units. Furthermore, "first" and "second" are used to distinguish different objects and are not intended to describe a specific order.
[0041] Example: As attached Figure 1 As shown, a small target detection method based on multi-scale global feature enhancement is presented, and the specific steps are as follows:
[0042] First, the 2D scene data to be detected is input and fed into a multi-scale feature extraction network model. This model uses ResNet50, with the last three layers of ResNet50 as the output multi-scale features. Then, the higher-level features from these three output layers are fed into the long-range feature enhancement module. First, the number of aggregation tokens must be determined, given the aggregation tokens... (in (This refers to the number of tokens), assuming each token... Belonging to m aggregate tokens One of them, thus requiring calculation Association Mapping First, we sample the initial aggregated labels by averaging the labels within a regular grid area. If the grid size is The number of aggregate tokens is Then, the sampling algorithm is run iteratively through the following two steps:
[0043] 1. Aggregate Token Sampling: Applying a more attention-like approach to compute the association graph. Defined as:
[0044]
[0045] Where d is the channel number C, X is the original token, and S is the aggregate token.
[0046] (2) Aggregate Token Update: The aggregate token update is a weighted sum of tokens, defined as:
[0047]
[0048] in This is a graph showing the relationship between the original token and the aggregated token, where X represents the original token and S represents the aggregated token.
[0049] This approach incorporates a multi-scale linear attention optimization strategy. In multi-head attention networks that aggregate features, traditional methods, after projecting features into Q / K / V tokens, first perform a DWConv depth-variable convolution on the output tokens and then use the ReLU linear activation function for feature fusion. This adds long-distance feature relationships to the high-level feature semantics of multi-scale features.
[0050] Next is the decoder with learnable anchored candidate boxes, let's call it... For the q-th anchor point, , and For its corresponding content query and location query, where D is the dimension of the decoder embedding and location query. Given an anchor point Location query Depend on:
[0051]
[0052] Here, PE represents positional encoding, which generates a sinusoidal embedding from floating-point numbers, and the parameters of the MLP are shared across all layers.
[0053] In the self-attention module, the three queries, keys, and values all have the same content items, while the queries and keys contain additional positional items:
[0054]
[0055] To readjust the positional embedding, conditional space queries were also utilized. Specifically, we learn a... To obtain a scale vector based on content information, and then use it for element-wise multiplication with the position embedding:
[0056]
[0057]
[0058] in denoted as , where x represents the image feature at position x, y, and · represents element-wise multiplication. The position embeddings in both the query and the key are generated based on 2D coordinates, which makes the comparison of positional similarity more consistent.
[0059] The features selected by the decoder's cross-attention mechanism need to be binary matched, and a denoising task is performed simultaneously to accelerate the matching process.
[0060] Noise is added to the box in two ways: center offset and box scaling. Definition and These are the noise scales for these two types of noise. For center offset, a random noise is added to the center of the box. and ensure and ,in This ensures that the center of the noise box remains within the original bounding box. For box scaling, set a hyperparameter. The width and height of the box are respectively at... and Random sampling is conducted.
[0061] To address label noise, we employ label flipping, which randomly flips some real labels onto other labels. Label flipping forces the model to predict real labels based on noisy bounding boxes, thus better capturing label box relationships. The proportion of label flipping is controlled by a hyperparameter γ. Note that denoising is only considered during training; during inference, the denoised part is removed, leaving only the matching part.
[0062] The trained network model was used for prediction, and the results, shown in the test sections of the COCO and CrowdHuman datasets, demonstrate that the model trained with the optimized strategy achieves higher accuracy in object detection.
[0063] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0064] In another embodiment, the present invention provides a computing device including: one or more processors, one or more memories, and one or more programs, wherein the one or more programs are stored in the one or more memories and configured to be executed by the one or more processors, the one or more programs including methods for performing the aforementioned local optimization-based multi-view human pose estimation method.
[0065] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0066] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0067] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0068] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for detecting small targets in transmission lines based on multi-scale global feature enhancement, characterized in that, The method includes the following steps: Step 1: Feed the 2D scene data to be detected into a multi-scale feature extraction network model to obtain image features of different sizes. Step 2: Apply a fast sampling algorithm to the high-level image features to combine highly correlated features into aggregated feature blocks, and learn the relationship between the aggregated feature blocks and the original features; perform a self-attention operation on the aggregated feature blocks to learn long-distance feature relationships; then, restore the aggregated feature blocks to the original features with long-distance feature relationships based on the previously learned relationships with the original features, and feed the flattened one-dimensional features into the Transformer encoder for multi-head self-attention operation. Step 3: Add learnable coordinates and width / height anchored candidate boxes to the decoder section. Combine the coordinates and positional encoding of the learnable candidate boxes with their width and height, and place them together in the multi-head attention module that controls the width and height. This allows the query to select more precise and specific features during attention mechanism processing. Step 4: When the selected features are fed into the binary matching and paired with the ground truth, an optimized denoising task is performed simultaneously. Finally, the selected features are fed into the classifier to obtain the category and location box. In step 2, the higher-level features from these three output feature layers are fed into the long-range feature enhancement module; first, the number of aggregation tokens must be determined, given the tokens. ,in This represents the number of tokens, where C is the channel number. Assume each token... Belonging to m aggregate tokens One of them, thus requiring calculation Association Mapping First, the initial aggregated label is sampled by averaging the labels within a regular grid area. If the grid size is The number of aggregate tokens is Then, the sampling algorithm is run iteratively through the following two steps: (1) Aggregate token sampling: In order to obtain the association between the original token and the aggregate token, we apply a more attention-like approach to compute the association graph. Defined as: Where d is the channel number C, X is the original token, and S is the aggregate token. (2) Aggregate Token Update: The aggregate token update is a weighted sum of tokens, defined as: in The graph shows the relationship between the original token and the aggregated token, where X represents the original token and S represents the aggregated token. In step 3, the decoder with learnable anchored candidate boxes records... For the q-th anchor point, , and For its corresponding content query and location query, where D is the dimension of the decoder embedding and location query, given an anchor point. Location query Depend on: Here, PE represents positional encoding, which generates a sinusoidal embedding from floating-point numbers. The parameters of the MLP are shared across all layers. In the self-attention module, all three queries, keys, and values have the same content items, while the queries and keys contain additional positional items: Learn one To obtain a scale vector based on content information, and then use it for element-wise multiplication with the position embedding: in represents the image features at position x, y, and · represents element-wise multiplication. The position embeddings in the query and key are generated based on 2D coordinates.
2. The method for detecting small targets in transmission lines based on multi-scale global feature enhancement according to claim 1, characterized in that, In step 1, the 2D scene data is put into a multi-scale feature extraction network model. The multi-scale feature extraction network model uses ResNet50, and the last three layers of ResNet50 are used as the output multi-scale features.
3. The method for detecting small targets in transmission lines based on multi-scale global feature enhancement according to claim 2, characterized in that, In step 4, the features selected by the decoder's cross-attention mechanism are subjected to binary matching. During this process, a denoising task is performed simultaneously to accelerate the matching. Noise is added to the boxes in two ways: center offset and box scaling. and For the noise scales of these two types of noise, for center offset, add a random noise at the center of the box. and ensure and ,in In this way, the center of the noise box remains within the original bounding box. For box scaling, a hyperparameter is set. The width and height of the box are respectively at and Random sampling is conducted.
Citation Information
Patent Citations
Target tracking method and system based on dual attention feature fusion network
CN116030097A
Target tracking method and system based on multi-head attention optimization feature fusion network
CN117274883A
