Power transmission line tiny target detection method based on multi-scale global feature enhancement

By adopting a multi-scale global feature enhancement method in micro-object detection, using the ResNet50 model and long-distance feature enhancement module, combined with a multi-scale linear attention optimization strategy, the shortcomings of traditional methods in complex scenarios and computational costs are solved, and efficient , accurate micro-object detection.

CN118968179APending Publication Date: 2024-11-15BENGBU POWER SUPPLY COMPANY STATE GRID ANHUI ELECTRIC POWER
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411138993.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-19
Publication Date
2024-11-15

AI Technical Summary

Technical Problem

The traditional micro-object detection method performs poorly in complex scenarios, occlusion and scale changes, and has high computational costs, making it difficult to meet the needs of efficient real-time detection.

Method used

Using a micro-object detection method based on multi-scale global feature enhancement, image features of different sizes are extracted using ResNet50 model, and the long-distance feature enhancement module and multi-scale linear attention optimization strategy are simplified by combining fast sampling algorithms and self-attention mechanisms. Calculate weights, reduce calculation costs, and improve detection speed and accuracy.

Benefits of technology

It realizes accurate identification of tiny defects and abnormal components in high-voltage power facilities, effectively prevents major accidents, improves the accuracy and speed of detection, and reduces calculation costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118968179A_ABST
    Figure CN118968179A_ABST
Patent Text Reader

Abstract

The invention relates to a power transmission line tiny target detection method based on multi-scale global feature enhancement, and the method specifically comprises the following steps: putting a 2D image into a multi-scale feature extraction network model, obtaining image features of different sizes, employing a rapid sampling algorithm for the high-level image features, enabling the high-correlation features to be combined into an aggregation feature block, and carrying out the detection of a tiny target of a power transmission line. The relation between the aggregated feature block and the original feature is learned; carrying out self-attention operation on the aggregated feature block, and learning a long-distance feature relationship; restoring the aggregated feature block into an original feature according to a previously learned relation between the original feature and the aggregated feature block, and performing multi-scale feature fusion; the multi-scale features are flattened into one dimension and sent to a Transform encoder to be subjected to multi-head self-attention processing, anchoring candidate frames capable of learning coordinates and width and height are added to a decoder part, and finally output feature results are input into a classifier to obtain a detection frame and classification. And an optimized denoising task is synchronously carried out in the two-way matching link, so that the convergence speed is accelerated, and the accuracy is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of computer vision, image processing and target detection of artificial intelligence, and specifically relates to a small target detection method based on multi-scale global feature enhancement. Background Art

[0002] With the continuous expansion of the scale of power systems and the increasing requirements for the stability of power supply, ensuring the safe operation of high-voltage transmission lines and substation equipment has become an important task facing the power industry. The normal operation of high-voltage power facilities is not only related to the stability and reliability of the power system, but also directly affects public safety and the normal progress of social and economic activities. Therefore, it is crucial to promptly discover and deal with potential safety hazards in power facilities.

[0003] The traditional inspection method of power facilities mainly relies on manual on-site inspection, which is not only inefficient and costly, but also difficult to cover all potential risk points. In recent years, with the development of computer vision and artificial intelligence technology, target detection technology based on image analysis has gradually become an efficient and feasible solution. In particular, the detection technology for small targets has shown great application potential in the field of power facility safety monitoring because it can accurately identify small defects or abnormal components (such as detached parts, etc.) that may exist in high-voltage power facilities, thereby effectively preventing major accidents caused by these small defects.

[0004] Small target detection technology usually involves the application of deep learning methods, including but not limited to convolutional neural networks (CNNs), regional convolutional neural networks (R-CNNs) and their various variants. These algorithms can automatically learn feature expressions from a large number of image data sets with annotated information, and achieve effective recognition and positioning of specific small targets through an end-to-end training process. In addition, in order to adapt to the complex and changeable 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 target detection is mainly divided into traditional detection methods and deep learning-based detection methods. Traditional detection methods rely mainly on manually designed features and use traditional machine learning models for target detection. These traditional methods usually use some classic feature extraction techniques and machine learning classifiers to achieve target detection. Although they perform well in some simple scenes and specific tasks, they have certain limitations in complex scenes, occlusion, scale changes and other issues. However, with the rise of deep learning, target detection methods based on deep learning have achieved better performance and generalization capabilities, and have gradually become the mainstream in the field of target detection.

[0006] Dense crowd detection based on deep learning is currently divided into single-stage detection and two-stage detection. Among them, RCNN is the representative of the two-stage detection algorithm, and then Fast-CNN, Faster-RCNN, etc. were derived on this basis. The characteristic of two-stage detection is that the algorithm needs to obtain candidate regions and extract features from candidate regions before performing classification and prediction tasks. The two-stage detection algorithm has achieved good detection accuracy but slow detection speed. In contrast, single-stage detection uses candidate boxes of different sizes to cover the entire image pixel by pixel, removing the step of searching for candidate regions separately, so that it has considerable detection accuracy while the detection speed can meet real-time requirements. Among them, the end-to-end algorithm is a machine learning method that directly maps input to output, without manually designed feature extraction steps in the middle. The DETR series of algorithms are popular end-to-end algorithms for dense crowd detection. It does not require manual design of components and achieves performance comparable to optimized classic detectors such as faster regional convolutional neural networks. Unlike previous detectors, DETR models object detection as a set prediction task and assigns labels through bipartite graph matching. Summary of the invention

[0007] In view of the shortcomings of the prior art, the present invention aims to provide a method for detecting small targets based on multi-scale global feature enhancement. The scheme inputs the 2D scene data to be detected, puts the 2D scene data into a multi-scale feature extraction network model, and obtains image features of different sizes. The multi-scale feature extraction network model uses ResNet50, and the obtained feature extraction is stable and comprehensive, with a small amount of calculation and a fast speed. The last three layers of ResNet50 are used as the multi-scale features of the output; the scheme effectively prevents major accidents caused by these small defects.

[0008] In order to solve the above technical problems, the technical solution adopted by the present invention is:

[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; put the 2D scene data into the multi-scale feature extraction network model to obtain image features of different sizes

[0011] Step 2 applies a fast sampling algorithm to high-level image features to combine highly correlated features into aggregated feature blocks, and learns the relationship between aggregated feature blocks and original features; performs self-attention operations on aggregated feature blocks to learn long-range feature relationships; restores aggregated feature blocks to original features with long-range feature relationships based on the previously learned relationship with original features, and sends the flattened one-dimensional features to the Transformer encoder for multi-head self-attention operations; in step 2, the high-level features of the three-layer output features are sent to the long-range feature enhancement module; first, the number of aggregated tokens must be determined. Given a token X∈R N×C (where N = H × C is the number of tokens), assuming that each token X i ∈R 1×C Belongs to m aggregate tokens S∈R m×C One of them, so we need to calculate the XS association map Q∈R N×m First, an initial aggregated marker D is sampled by averaging the markers over a regular grid area. 0 , if the grid size is h×w, then the number of aggregate tokens is The sampling algorithm is then iterated through the following two steps:

[0012] (1) Aggregate token sampling: Compared with the traditional K-means clustering algorithm, we use a better PAM clustering algorithm for token aggregation. First, we select k objects as the initial tokens. Compared with the average selected by the K-means algorithm, the PAM algorithm selects the median as the initial value. This algorithm is less susceptible to outliers and will be more robust. Starting from the current token center, an optimal aggregate token is constructed by minimizing the sum of the similarities of all tokens to their nearest token center. Try to replace the current aggregate token center to reduce the total cost function (the sum of the similarities of all tokens to their nearest token center) until no better aggregate token is found. In order to obtain the association between the original token and the aggregate token, we apply a more attention-like approach to calculate the association graph Q. t , 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 is updated to the weighted sum of tokens, defined as:

[0016] S=(Q t ) T X

[0017] Where Q tIt is the association graph of original tokens and aggregated tokens, X is the original token and S is the aggregated token.

[0018] A multi-scale linear attention optimization strategy is added. In the multi-head attention network with aggregated features, the RELU linear activation function is used to perform feature fusion, adding long-distance feature relationships to the high-level feature semantics of multi-scale features. The traditional self-attention mechanism usually involves calculating query, key, and value vectors, using dot products to calculate attention weights, and weighting and summing the value vectors according to these weights to obtain the final attention output. This will reduce the proportion of the detected target features in the environment of small target detection, and will also bring huge computational costs. The linear attention mechanism uses the RELU function to replace the traditional Softmax function, which can simplify the calculation weights while retaining the attention features and reduce the computational cost, so that the model can effectively process high-information images.

[0019] Step 3: Add learnable coordinates and width and height anchor candidate boxes to the decoder part, combine the learnable candidate box coordinates with the position encoding, and put them into the multi-head attention module controlled by width and height together with the candidate box width and height, so that the query can select more accurate and more specific features when the attention mechanism is processed. In step 3, the decoder with learnable anchor candidate boxes is recorded as A q =(x q ,y q ,w q ,h q ) is the qth anchor point, x q ,y q ,w q ,h q ∈R,C q ∈R D and P q ∈R D For its corresponding content query and location query, where D is the dimension of decoder embedding and location query, given an anchor point A q , its location query P q Depend on:

[0020] P Q =MLP(PE(A q ))

[0021] Among them, PE represents position encoding, sine embedding is generated by floating point numbers, and the parameters of MLP are shared in all layers.

[0022] In the self-attention module, the three queries, keys, and values ​​all have the same content items, and the queries and keys contain additional position items:

[0023] Self-Attn:Q q =Cq +P q ,K q =C q +P q ,V q =C q

[0024] Learning an MLP (csq) :R D →R D To obtain a content-based scale vector, and use it to perform element-wise multiplication with the position embedding:

[0025] Cross-Attn:Q q =Cat(C q ,PE(x q ,y q )·MLP (csq) (C q )),

[0026] K x,y =Cat(F x,y ,PE(x,y)),V x,y =F x,y

[0027] where F x,y ∈R D is the image feature at position x, y, is the element-wise multiplication, and the position embeddings in both the query and the key are generated based on the 2D coordinates.

[0028] Step 4: When the selected features are sent to the binary matching to be paired with the true value, an optimized denoising task is performed simultaneously, so that the features can more easily lock the same true value target during multiple training binary matching, thereby accelerating the convergence speed and improving the accuracy. Finally, the selected features are sent to the classifier to obtain the category and position box.

[0029] The present invention aims to provide a small target detection method based on multi-scale global feature enhancement, comprising:

[0030] Input the 2D scene data to be detected, put the 2D scene data into the multi-scale feature extraction network model, and obtain image features of different sizes. The multi-scale feature extraction network model uses ResNet50, and the obtained feature extraction is stable and comprehensive, with a small amount of calculation and a fast speed. The last three layers of ResNet50 are used as the output multi-scale features.

[0031] A new optimization strategy is added, which consists of two parts. The first part is the long-distance feature enhancement module, and the other is the multi-scale linear attention optimization strategy. The long-distance feature enhancement module applies a fast sampling algorithm to high-level image features, so that high-correlation features are combined into aggregated feature blocks, and the connection between the aggregated feature blocks and the original features is learned. The specific network structure is that the input features first pass through the DWConv deep separable convolution to reduce the number of parameters and reduce the computational complexity, and then are sent to the aggregated feature sampling module after layer normalization. The features are aggregated by quickly adopting the algorithm, and the connection between the original features and the aggregated feature blocks is learned and recorded; then the aggregated feature blocks are sent to the multi-head self-attention network to learn long-distance features, and then up-sampled to restore the feature size, thus completing the aggregated feature attention module;

[0032] A multi-scale linear attention optimization strategy is added. In the multi-head attention network with aggregated features, the traditional method uses a softmax activation function after projecting the features into Q / K / V tokens. This will cause irrelevant features to have too much influence in small target detection and has a large computational complexity. The proposed optimization strategy first performs DWConv deep variable convolution on the output token, then uses the RELU linear activation function, and finally performs feature fusion.

[0033] Compared with the prior art, the advantages of the present invention are as follows: the present invention optimizes the neural network by designing a new optimization strategy to detect small targets on the transmission line, thereby improving the overall accuracy, so that the small defects or abnormal components (such as detached components, etc.) that may exist in the high-voltage power facilities can be accurately identified, and major accidents caused by these small defects can be effectively prevented; by putting the 2D scene data into the multi-scale feature extraction network model, image features of different sizes are obtained; the long-distance feature enhancement module makes the features have a distance feature relationship; compared with the traditional method, this method is improved: for the traditional K-means clustering algorithm, we use a better PAM clustering algorithm for token aggregation. First, we select k objects as the initial tokens. Compared with the average selected by the K-means algorithm, the PAM algorithm selects the median as the initial value. This algorithm is easily affected by outliers and will be more robust; starting from the current token center, an optimal aggregate token is constructed by minimizing the sum of the similarities of all tokens to their nearest token centers. Try to replace the current aggregate token center to reduce the total cost function (the sum of the similarities of all tokens to their nearest token centers) until no better aggregate token is found. At the same time, a multi-scale linear attention optimization strategy is also added. In the multi-head attention network with aggregated features, the RELU linear activation function is used to perform feature fusion, and long-distance feature relations are added to the high-level feature semantics of multi-scale features. The traditional self-attention mechanism usually involves calculating the query, key and value vectors, using dot product to calculate the attention weights, and weighted summing the value vectors according to these weights to obtain the final attention output. This will reduce the proportion of the detected target features in the small target detection environment, and will also bring huge computational costs. The linear attention mechanism uses the RELU function to replace the traditional Softmax function, which can simplify the calculation weights while retaining the attention features and reduce the computational cost, so that the model can effectively process high-information images. The flattened one-dimensional features are then sent to the Transformer encoder for multi-head self-attention operations; in the decoder part, anchor candidate boxes with learnable coordinates and width and height are added, the coordinates of the learnable candidate boxes are combined with the position encoding, and are placed in the multi-head attention module with width and height control together with the width and height of the candidate boxes, so that the query selects features. When the selected features are sent to the binary matching to be paired with the true value, an optimized denoising task is performed simultaneously, and finally the selected features are sent to the classifier to obtain the category and position box. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0035] Figure 1 It is a flow chart of a small target detection method based on multi-scale global feature enhancement of the present invention;

[0036] Figure 2 It is a structural diagram of a long-distance feature enhancement module of a small target detection method based on multi-scale global feature enhancement of the present invention;

[0037] Figure 3 It is a structural diagram of the multi-scale linear attention optimization strategy of the tiny target detection method based on multi-scale global feature enhancement of the present invention. DETAILED DESCRIPTION

[0038] The present invention will be further described below in conjunction with specific embodiments. The following embodiments are only used to more clearly illustrate the technical solutions of the present invention, rather than to limit the protection scope of the present invention.

[0039] The terms "including" and other expressions with similar meanings in the specification or claims of the present invention and the above-mentioned drawings are intended to cover non-exclusive inclusions, such as a process, method or system, or device comprising a series of steps or units is not limited to the listed steps or units.

[0040] The term "including" and other similar expressions in the specification or claims of the present invention and the above-mentioned drawings are intended to cover non-exclusive inclusions, such as a process, method, system, or device including a series of steps or units is not limited to the listed steps or units. In addition, "first" and "second" are used to distinguish different objects, not to describe a specific order.

[0041] Example: As shown in the attached Figure 1 As shown in FIG. 1 , a small target detection method based on multi-scale global feature enhancement is shown in FIG. 1 . The specific steps are as follows:

[0042] First, input the 2D scene data to be detected, and put the 2D scene data into the 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. Then the high-level features in the three-layer output features are sent to the long-distance feature enhancement module; First, determine the number of aggregate tokens. Given an aggregate token X∈R N×C (where N = H × C is the number of tokens), assuming that each token X i ∈R1×C Belongs to m aggregate tokens S∈R m×C One of them, so we need to calculate the XS association map Q∈R N×m First, we sample the initial aggregated markers S by averaging the markers over a regular grid region. 0 If the grid size is h×w, the number of aggregate tokens is The sampling algorithm is then iterated through the following two steps:

[0043] 1. Aggregate Token Sampling: Apply a more attention-like approach to compute the relevance graph Q t , 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 is updated to the weighted sum of tokens, defined as:

[0047] S=(Q t ) T X

[0048] Where Q t It is the association graph of original tokens and aggregated tokens, X is the original token and S is the aggregated token.

[0049] A multi-scale linear attention optimization strategy is added. In the multi-head attention network with aggregated features, the traditional method first performs DWConv deep variable convolution on the output token after projecting the features into Q / K / V tokens, and uses the RELU linear activation function for feature fusion. So far, we have added long-distance feature relationships to the high-level feature semantics of multi-scale features.

[0050] Next is the decoder with learnable anchor candidate boxes, denoted by A q =(x q ,y q ,w q ,h q ) is the qth anchor point, x q ,y q ,w q ,h q ∈R,C q ∈R D and P q ∈R D For its corresponding content query and location query, where D is the dimension of decoder embedding and location query. Given an anchor point A q , its location query P q Depend on:

[0051] P Q =MLP(PE(A q ))

[0052] Among them, PE represents position encoding, sine embedding is generated by floating-point numbers, and the parameters of MLP are shared in all layers.

[0053] In the self-attention module, the three queries, keys, and values ​​all have the same content items, while queries and keys contain additional position items:

[0054] Self-Attn:Q q =C q +P q ,K q =C q +P q ,V q =C q

[0055] To rescale the position embeddings, we also exploit conditional spatial queries. Specifically, we learn an MLP (csq) :R D →R D To obtain a content-based scale vector, and use it to perform element-wise multiplication with the position embedding:

[0056] Cross-Attn:Q q =Cat(C q ,PE(x q ,y q )·MLP (csq) (C q )),

[0057] K x,y =Cat(F x,y ,PE(x,y)),V x,y =F x,y

[0058] Where Fx ,y ∈R D is the image feature at position x,y, and · is the element-wise multiplication. The position embeddings in both the query and the key are generated based on 2D coordinates, which makes the comparison of position similarity more consistent.

[0059] The features selected by the decoder's cross-attention mechanism are subjected to binary matching, and a denoising task is performed simultaneously during this process to accelerate the matching.

[0060] Noise is added to the box in two ways: center offset and box scaling. Define λ1 and λ2 as the noise scales of these two noises. For center offset, add a random noise Δx, Δy at the center of the box and ensure and where λ1∈(0,1) so that the center of the noise box is still inside the original bounding box. For box scaling, a hyperparameter λ2∈(0,1) is set. The width and height of the box are randomly sampled from [(1-λ2)w,(1+λ2)w] and [(1-λ2)h,(1+λ2)h] respectively.

[0061] For label noise, we use label flipping, that is, randomly flipping some real labels to other labels. Label flipping forces the model to predict the real label based on the noise box to better capture the label box relationship. There is a hyperparameter γ to control the proportion of label flipping. Note that denoising is only considered during training. The denoised part is removed during inference, leaving only the matching part.

[0062] We use the network model obtained after training for prediction, and show it in the test part of the COCO dataset and the CrowdHuman dataset. The results show that the target detection accuracy of the model trained with the optimization strategy is higher.

[0063] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0064] In another embodiment, the present invention provides a computing device comprising: 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 are configured to be executed by the one or more processors, and the one or more programs include methods for executing the aforementioned multi-view and multi-person human body pose estimation method based on local optimization.

[0065] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0066] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0067] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0068] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A small target detection method for power transmission lines based on multi-scale global feature enhancement, characterized in that: The method comprises the following steps: Step 1: Put the 2D scene data to be detected into the multi-scale feature extraction network model to obtain image features of different sizes. Step 2: Apply a fast sampling algorithm to 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 self-attention operations on the aggregated feature blocks to learn long-range feature relationships; then restore the aggregated feature blocks to original features with long-range feature relationships based on the previously learned relationship with the original features, and send the flattened one-dimensional features to the Transformer encoder for multi-head self-attention operations. Step 3: Add learnable coordinates and width and height anchor candidate boxes in the decoder part, combine the learnable candidate box coordinates with the position encoding, and put them into the multi-head attention module controlled by width and height together with the width and height of the candidate box, so that the query can select features with more precise positions and more specific sizes when the attention mechanism is processed. Step 4: When the selected features are sent to the binary matching to be paired with the true value, an optimized denoising task is performed simultaneously, and finally the selected features are sent to the classifier to obtain the category and position box.

2. The method for detecting small targets on power transmission lines based on multi-scale global feature enhancement according to claim 1 is characterized in that: In step 1, the 2D scene data is put into a multi-scale feature extraction network model, and 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 on power transmission lines based on multi-scale global feature enhancement according to claim 1 is characterized in that: In step 2, the high-level features of the three-layer output features are sent to the long-distance feature enhancement module; first, the number of aggregated tokens must be determined. Given a token X∈R N×C (where N = H × C is the number of tokens), assuming that each token X i ∈R 1×C Belongs to m aggregate tokens S∈R m×C One of them, so we need to calculate the XS association map Q∈R N×m First, an initial aggregated marker S is sampled by averaging the markers over a regular grid area. 0 , if the grid size is h×w, then the number of aggregate tokens is The sampling algorithm is then iterated through the following two steps: (1) Aggregate Token Sampling: To obtain the association between the original token and the aggregate token, we apply a more attention-like approach to compute the association graph Q t , defined as: Where d is the channel number C, X is the original token, S is the aggregate token, (2) Aggregate token update: The aggregate token is updated to the weighted sum of tokens, defined as: S=(Q t ) T X Where Q t It is the association graph of original tokens and aggregated tokens, X is the original token and S is the aggregated token.

4. The method for detecting small targets on power transmission lines based on multi-scale global feature enhancement according to claim 1, characterized in that: In step 3, the decoder with the learnable anchor candidate box is denoted by A q =(x q ,y q ,w q ,h q ) is the qth anchor point, x q ,y q ,w q ,h q ∈R,C q ∈R D and P q ∈R D For its corresponding content query and location query, where D is the dimension of decoder embedding and location query, given an anchor point A q , its location query P q Depend on: Q Q =MLP(PE(A q )) Among them, PE represents position encoding, sine embedding is generated by floating point numbers, and the parameters of MLP are shared in all layers. In the self-attention module, the three queries, keys, and values ​​all have the same content items, and the queries and keys contain additional position items: Self-Attn:Q q =C q +P q ,K q =C q +P q ,V q =C q Learning an MLP (csq) :R D →R D To obtain a content-based scale vector, and use it to perform element-wise multiplication with the position embedding: Cross-Attn:Q q =Cat(C q ,PE(x q ,y q )·MLP (csq) (C q )), K x,y =Cat(F x,y ,PE(x,y)),V x,y =F x,y Among them, F x,y ∈R D is the image feature at position x, y, is the element-wise multiplication, and the position embeddings in both the query and the key are generated based on the 2D coordinates.

5. The method for detecting small targets on power transmission lines based on multi-scale global feature enhancement according to claim 1, characterized in that: In step 4, the features selected by the decoder cross-attention mechanism are subjected to binary matching. In this process, a denoising task is performed synchronously to accelerate the matching. Noise is added to the box in two ways: center offset and box scaling. λ1 and λ2 are defined as the noise scales of the two noises. For center offset, a random noise Δx, Δy is added to the center of the box, and it is ensured that and Where λ1∈(0,1), so that the center of the noise box is still located inside the original bounding box. For box scaling, a hyperparameter λ2∈(0,1) is set, and the width and height of the box are randomly sampled in [(1-λ2)w, (1+λ2)w] and [(1-λ2)h, (1+λ2)h] respectively.

Citation Information

Cited By

  • Fault identification method for small parts of power transmission line

    CN119360253A