Target tracking method and system based on dual-path attention and channel feature optimization
By introducing dual-path attention and channel feature optimization modules into the Transformer network, the problems of large amount of computing and redundant calculations in high-resolution video processing are solved, and more efficient feature representation and video tracking performance are achieved.
Patent Information
- Application Number
- CN202510059022.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-15
- Publication Date
- 2025-04-29
- Estimated Expiration
- 2045-01-15
AI Technical Summary
Existing video tracking technology has a large amount of calculation when processing high-resolution videos, increasing noise interference, and having problems with redundant computing.
A target tracking method based on dual-path attention and channel feature optimization is proposed. By introducing efficient self-attention branches and comprehensive self-attention branches in the Transformer network, combining channel feature optimization module, it reduces the computational amount and eliminates redundant features.
It effectively reduces the calculation amount, reduces noise interference, improves the efficiency of feature representation, reduces parameters and calculation overhead, thereby improving the performance of video tracking.
Smart Images

Figure CN119478616B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer vision and image processing technology, and in particular to a target tracking method and system based on dual-path attention and channel feature optimization. Background Art
[0002] Video tracking is an important part of computer vision and has a wide range of applications in many fields, such as autonomous driving, video surveillance, traffic monitoring, high-speed photography, etc. Video tracking is to accurately predict and locate the target in subsequent frames after determining the target object in the first frame, thereby achieving tracking. At present, with the continuous improvement of the practicality and real-time performance of video tracking, related applications can be seen everywhere in our daily lives, and the research of this technology has become more valuable. At the same time, due to the influence of many factors such as object deformation, rapid motion, occlusion, etc., video tracking will still be a challenging task for some time to come.
[0003] In recent years, the emergence of Transformer has led to rapid development in the field of computer vision. The self-attention feature in Transformer is used to explore the relationship between consecutive frames to obtain rich contextual information, thereby achieving good tracking performance. Due to the nature of the self-attention mechanism, all input features need to be processed. With the continuous improvement of video image resolution, more arduous calculations are also coming, which will invisibly increase some additional noise interference. In addition, the extensive use of self-attention will also generate a lot of redundant calculations. Summary of the invention
[0004] In view of the above situation, the main purpose of the present invention is to propose a target tracking method and system based on dual-path attention and channel feature optimization to solve the above technical problems.
[0005] The present invention proposes a target tracking method based on dual-path attention and channel feature optimization, the method comprising the following steps:
[0006] Step 1: Based on the Transformer network framework, an adaptive dual-path attention feature fusion network is constructed. The adaptive dual-path attention feature fusion network includes an efficient self-attention branch and a comprehensive self-attention branch. A feature fusion network model and a channel feature optimization module are constructed based on the efficient self-attention branch and the comprehensive self-attention branch.
[0007] Step 2: Segment the template image and the search image to obtain a preset number of template image blocks and search image blocks, perform a linear transformation operation on each image block, and then input the blocks into the encoder in the Transformer network for asynchronous phase feature extraction to obtain template image features extracted by asynchronous phase features and search image features extracted by asynchronous phase features;
[0008] Input the template image features extracted from the asynchronous stage and the search image features extracted from the asynchronous stage into the adaptive dual-path attention feature fusion network;
[0009] In the efficient self-attention branch, the template image features extracted from the asynchronous stage and the search image features extracted from the asynchronous stage are processed by the efficient self-attention mechanism to obtain an efficient self-attention score.
[0010] Perform activation function processing on the efficient self-attention score to obtain the efficient self-attention score after activation processing;
[0011] In the full attention branch, the template image features extracted from the asynchronous phase and the search image features extracted from the asynchronous phase are normalized to obtain a full self-attention score.
[0012] Weights are assigned to the efficient self-attention scores and the comprehensive self-attention scores to obtain the attention output matrix;
[0013] Step 3: Based on the attention output matrix, perform weighted fusion on the template image features and the search image features to obtain weighted fused features;
[0014] The weighted fused features are input into the channel feature optimization module to eliminate feature redundancy, thereby obtaining features that eliminate redundancy, and the feature fusion network model is optimized using the features that eliminate redundancy, thereby obtaining an optimized feature fusion network model;
[0015] Step 4: Use large-scale data to train the optimized feature fusion network model and channel feature optimization module to obtain a trained feature fusion network model and a trained channel feature optimization module;
[0016] Step 5: Input the template image and the search image into the trained feature fusion network model, extract target features from the template image and the search image respectively, and obtain the target features of the template image extracted by the trained model and the target features of the search image extracted by the trained model;
[0017] Step 6: Repeat step 2 in an iterative manner for the search image target features extracted after model training and the template image target features extracted after model training to obtain an updated attention output matrix;
[0018] The updated attention output matrix is used to weightedly fuse the search image target features extracted after model training and the template image target features extracted after model training to obtain an updated target feature weighted fusion result;
[0019] The updated target feature weighted fusion result is input into the channel feature optimization module for normalization, separable convolution and nonlinear processing in sequence to obtain a processed feature map, and the processed feature map is subjected to channel feature optimization operation to obtain channel optimized features;
[0020] The channel optimized features are processed by linear mapping mechanism and activation function feature optimization in turn to obtain an optimized feature map, and the optimized feature map is convolved to obtain an output feature map;
[0021] The output feature map is processed by the channel information aggregation mechanism to obtain a further optimized feature fusion network model;
[0022] Step 7: The template image features and the search image features are subjected to asynchronous stage feature fusion through the trained channel feature optimization module to obtain fused features of the asynchronous interaction stage, and the fused features of the asynchronous interaction stage are input into the prediction head to obtain the prediction results;
[0023] The target is tracked based on the prediction results.
[0024] The present invention also proposes a target tracking system based on dual-path attention and channel feature optimization, the system comprising:
[0025] Building blocks for:
[0026] An adaptive dual-path attention feature fusion network is constructed based on the Transformer network framework. The adaptive dual-path attention feature fusion network includes an efficient self-attention branch and a comprehensive self-attention branch. A feature fusion network model and a channel feature optimization module are constructed based on the efficient self-attention branch and the comprehensive self-attention branch.
[0027] Learning Module A is for:
[0028] The template image and the search image are segmented to obtain a preset number of template image blocks and search image blocks, respectively. A linear transformation operation is performed on each image block, and then the blocks are input into the encoder in the Transformer network for asynchronous stage feature extraction to obtain template image features extracted by asynchronous stage features and search image features extracted by asynchronous stage features;
[0029] Input the template image features extracted from the asynchronous stage and the search image features extracted from the asynchronous stage into the adaptive dual-path attention feature fusion network;
[0030] In the efficient self-attention branch, the template image features extracted from the asynchronous stage and the search image features extracted from the asynchronous stage are processed by the efficient self-attention mechanism to obtain an efficient self-attention score.
[0031] Perform activation function processing on the efficient self-attention score to obtain the efficient self-attention score after activation processing;
[0032] In the full attention branch, the template image features extracted from the asynchronous phase and the search image features extracted from the asynchronous phase are normalized to obtain a full self-attention score.
[0033] Weights are assigned to the efficient self-attention scores and the comprehensive self-attention scores to obtain the attention output matrix;
[0034] Learning Module B is for:
[0035] Based on the attention output matrix, the template image features and the search image features are weighted fused to obtain the weighted fused features;
[0036] The weighted fused features are input into the channel feature optimization module to eliminate feature redundancy, thereby obtaining features that eliminate redundancy, and the feature fusion network model is optimized using the features that eliminate redundancy, thereby obtaining an optimized feature fusion network model;
[0037] Pre-trained modules for:
[0038] Using large-scale data to train the optimized feature fusion network model and channel feature optimization module, and obtaining the trained feature fusion network model and the trained channel feature optimization module;
[0039] Extraction module for:
[0040] Input the template image and the search image into the trained feature fusion network model, extract target features from the template image and the search image respectively, and obtain target features of the template image extracted by the trained model and target features of the search image extracted by the trained model;
[0041] Compute module for:
[0042] The search image target features extracted after model training and the template image target features extracted after model training are used as the input of learning module A and iteratively processed to obtain an updated attention output matrix;
[0043] The updated attention output matrix is used to weightedly fuse the search image target features extracted after model training and the template image target features extracted after model training to obtain an updated target feature weighted fusion result;
[0044] The updated target feature weighted fusion result is input into the channel feature optimization module for normalization, separable convolution and nonlinear processing in sequence to obtain a processed feature map, and the processed feature map is subjected to channel feature optimization operation to obtain channel optimized features;
[0045] The channel optimized features are processed by linear mapping mechanism and activation function feature optimization in turn to obtain an optimized feature map, and the optimized feature map is convolved to obtain an output feature map;
[0046] The output feature map is processed by the channel information aggregation mechanism to obtain a further optimized feature fusion network model;
[0047] Tracking module for:
[0048] The template image features and the search image features are fused with the features of the asynchronous stage through the trained channel feature optimization module to obtain the fused features of the asynchronous interaction stage, and the fused features of the asynchronous interaction stage are input into the prediction head to obtain the prediction results;
[0049] The target is tracked based on the prediction results.
[0050] Compared with the prior art, the present invention has the following beneficial effects:
[0051] 1. The present invention filters out the influence of low query-key scores through the efficient self-attention branch, which can effectively reduce the amount of calculation when processing large-scale data;
[0052] 2. The present invention dynamically adjusts weight fusion through efficient self-attention and comprehensive self-attention to adapt to the needs of different scenarios;
[0053] 3. The present invention adaptively allocates channel features in high-dimensional space through a channel feature optimization module, effectively reduces information redundancy between channels, improves the efficiency of feature representation, and reduces parameters and computational overhead.
[0054] Additional aspects and advantages of the present invention will be given in part in the following description and in part will be obvious from the following description or learned through embodiments of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] Figure 1 This is a flowchart of the steps of the target tracking method based on dual-path attention and channel feature optimization proposed in the present invention.
[0056] Figure 2 This is a structural diagram of the target tracking framework of the target tracking method based on dual-path attention and channel feature optimization proposed in the present invention.
[0057] Figure 3 This is a schematic diagram of the adaptive dual-path feature fusion module of the target tracking method based on dual-path attention and channel feature optimization proposed in the present invention.
[0058] Figure 4 This is a schematic diagram of the channel feature optimization module of the target tracking method based on dual-path attention and channel feature optimization proposed in the present invention.
[0059] Figure 5 This is a structural diagram of the target tracking system based on dual-path attention and channel feature optimization proposed in the present invention. DETAILED DESCRIPTION
[0060] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout are the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be understood as limiting the present invention.
[0061] These and other aspects of the embodiments of the present invention will be apparent with reference to the following description and accompanying drawings. In these descriptions and accompanying drawings, some specific implementations of the embodiments of the present invention are specifically disclosed to provide some ways to implement the principles of the embodiments of the present invention, but it should be understood that the scope of the embodiments of the present invention is not limited thereto.
[0062] See also Figure 1 The embodiment of the present invention proposes a target tracking method based on dual-path attention and channel feature optimization, the method comprising the following steps:
[0063] Step 1. Construct an adaptive dual-path attention feature fusion network based on the Transformer network framework. The adaptive dual-path attention feature fusion network includes an efficient self-attention branch and a comprehensive self-attention branch. A feature fusion network model and a channel feature optimization module are constructed based on the efficient self-attention branch and the comprehensive self-attention branch.
[0064] Step 2: Segment the template image and the search image to obtain a preset number of template image blocks and search image blocks, perform a linear transformation operation on each image block, and then input the blocks into the encoder in the Transformer network for asynchronous phase feature extraction to obtain template image features extracted by asynchronous phase features and search image features extracted by asynchronous phase features;
[0065] Input the template image features extracted from the asynchronous stage and the search image features extracted from the asynchronous stage into the adaptive dual-path attention feature fusion network;
[0066] In the efficient self-attention branch, the template image features extracted from the asynchronous stage and the search image features extracted from the asynchronous stage are processed by the efficient self-attention mechanism to obtain an efficient self-attention score.
[0067] Perform activation function processing on the efficient self-attention score to obtain the efficient self-attention score after activation processing;
[0068] In the full attention branch, the template image features extracted from the asynchronous phase and the search image features extracted from the asynchronous phase are normalized to obtain a full self-attention score.
[0069] The efficient self-attention scores and the comprehensive self-attention scores are weighted to obtain the attention output matrix.
[0070] See also Figure 3 In step 2, the efficient self-attention score is processed by the activation function to obtain the efficient self-attention score after activation processing. The corresponding relationship of the process is as follows:
[0071] ;
[0072] in, represents the efficient self-attention score, It means that it has been processed by the activation function. represents the query matrix, represents the key matrix, Represents the dimension, represents the similarity between the query and the corresponding key, represents the learnable relative position deviation, Represents the transpose of a matrix.
[0073] In the comprehensive attention branch, the template image features extracted from the asynchronous stage and the search image features extracted from the asynchronous stage are normalized to obtain the comprehensive self-attention score. The corresponding relationship in the process is as follows:
[0074] ;
[0075] in, represents the overall self-attention score, Indicates that it has been processed by the activation function.
[0076] In the step of weighting the efficient self-attention score and the comprehensive self-attention score to obtain the attention output matrix, the corresponding relationship in the process is as follows:
[0077] ;
[0078] in, represents the attention output matrix, represents the value matrix, represents the multiplication operation, and Represents two different learnable weight parameters.
[0079] Step 3: Based on the attention output matrix, perform weighted fusion on the template image features and the search image features to obtain weighted fused features;
[0080] The weighted fused features are input into the channel feature optimization module to eliminate feature redundancy and obtain redundant features. The feature fusion network model is optimized using the redundant features to obtain an optimized feature fusion network model.
[0081] Furthermore, a Transformer-based feature fusion network model is constructed through the efficient self-attention branch and the comprehensive self-attention branch. The efficient self-attention calculates the similarity between the query and the key to obtain the attention score, and the attention score is processed by the activation function to filter out the similarity of the negative score to achieve high efficiency; the comprehensive self-attention calculates the similarity between all queries and keys to ensure that key information is not lost during the efficient processing process; the outputs of the two attention branches are weightedly fused to combine the advantages of both in an adaptive manner; the fused features are sent to the channel feature optimization module to further eliminate redundant features and improve model performance and efficiency.
[0082] Step 4: Use large-scale data to train the optimized feature fusion network model and channel feature optimization module to obtain the trained feature fusion network model and the trained channel feature optimization module.
[0083] Step 5: Input the template image and the search image into the trained feature fusion network model, extract target features from the template image and the search image respectively, and obtain the target features of the template image extracted by the trained model and the target features of the search image extracted by the trained model;
[0084] Step 6: Repeat step 2 in an iterative manner for the search image target features extracted after model training and the template image target features extracted after model training to obtain an updated attention output matrix;
[0085] The updated attention output matrix is used to weightedly fuse the search image target features extracted after model training and the template image target features extracted after model training to obtain an updated target feature weighted fusion result;
[0086] The updated target feature weighted fusion result is input into the channel feature optimization module for normalization, separable convolution and nonlinear processing in sequence to obtain a processed feature map, and the processed feature map is subjected to channel feature optimization operation to obtain channel optimized features;
[0087] The channel optimized features are processed by linear mapping mechanism and activation function feature optimization in turn to obtain an optimized feature map, and the optimized feature map is convolved to obtain an output feature map;
[0088] The output feature map is processed by the channel information aggregation mechanism to obtain a further optimized feature fusion network model.
[0089] See also Figure 4 In step 6, the updated target feature weighted fusion result is input into the channel feature optimization module for normalization, separable convolution and nonlinear processing to obtain a processed feature map. The corresponding relationship of the process is as follows:
[0090] ;
[0091] in, represents the feature map after the activation function, It means that it has been processed by the activation function. It means that after the depth-separable convolution of size 3×3, It means that after normalization layer processing, Represents the updated weighted fusion result of the target features.
[0092] In the step of performing channel feature optimization on the processed feature map to obtain channel optimized features, the corresponding relationship in the process is as follows:
[0093] ;
[0094] in, Indicates that after channel feature optimization operation, represents the channel scaling factor, represents element-wise product, Represents a linear map.
[0095] In the step of performing convolution processing on the optimized feature map to obtain the output feature map, the corresponding relationship between the process is as follows:
[0096] ;
[0097] in, represents the output feature map, Indicates that it has been processed by a convolution of size 1×1.
[0098] Furthermore, the efficient self-attention and comprehensive self-attention in the feature fusion network are used to reduce the interaction between irrelevant regions and remove redundant features. Among them, the efficient self-attention calculates the attention score by squaring the activation function, retains only positive correlations, and filters out negative correlations, thereby achieving high efficiency; the comprehensive self-attention ensures the flow of necessary information in the network, and obtains the attention score by calculating all queries and keys; the outputs of the efficient self-attention and comprehensive self-attention are weighted fused through dynamically adjustable weights, and the fused features are sent to the channel feature optimization module, and the channel information is aggregated through channel redistribution, so that the model pays more attention to information-rich channels, thereby capturing richer feature relationships.
[0099] Step 7: The template image features and the search image features are subjected to asynchronous stage feature fusion through the trained channel feature optimization module to obtain fused features of the asynchronous interaction stage, and the fused features of the asynchronous interaction stage are input into the prediction head to obtain the prediction results;
[0100] The target is tracked based on the prediction results.
[0101] For further information, see Figure 2 The features of the template image and the search image are fused by using the features extracted in the asynchronous stage. After passing through the channel feature optimization module, they are sent to the multi-head self-attention in the asynchronous interaction stage to fuse the features of the template image and the search image to obtain rich contextual information. The fused features are then sent to the classification regression prediction head to achieve tracking.
[0102] See also Figure 5 The present invention also proposes a target tracking system based on dual-path attention and channel feature optimization, the system comprising:
[0103] Building blocks for:
[0104] An adaptive dual-path attention feature fusion network is constructed based on the Transformer network framework. The adaptive dual-path attention feature fusion network includes an efficient self-attention branch and a comprehensive self-attention branch. A feature fusion network model and a channel feature optimization module are constructed based on the efficient self-attention branch and the comprehensive self-attention branch.
[0105] Learning Module A is for:
[0106] The template image and the search image are segmented to obtain a preset number of template image blocks and search image blocks, respectively. A linear transformation operation is performed on each image block, and then the blocks are input into the encoder in the Transformer network for asynchronous stage feature extraction to obtain template image features extracted by asynchronous stage features and search image features extracted by asynchronous stage features;
[0107] Input the template image features extracted from the asynchronous stage and the search image features extracted from the asynchronous stage into the adaptive dual-path attention feature fusion network;
[0108] In the efficient self-attention branch, the template image features extracted from the asynchronous stage and the search image features extracted from the asynchronous stage are processed by the efficient self-attention mechanism to obtain an efficient self-attention score.
[0109] Perform activation function processing on the efficient self-attention score to obtain the efficient self-attention score after activation processing;
[0110] In the full attention branch, the template image features extracted from the asynchronous phase and the search image features extracted from the asynchronous phase are normalized to obtain a full self-attention score.
[0111] Weights are assigned to the efficient self-attention scores and the comprehensive self-attention scores to obtain the attention output matrix;
[0112] Learning Module B is for:
[0113] Based on the attention output matrix, the template image features and the search image features are weighted fused to obtain the weighted fused features;
[0114] The weighted fused features are input into the channel feature optimization module to eliminate feature redundancy, thereby obtaining features that eliminate redundancy, and the feature fusion network model is optimized using the features that eliminate redundancy, thereby obtaining an optimized feature fusion network model;
[0115] Pre-trained modules for:
[0116] Using large-scale data to train the optimized feature fusion network model and channel feature optimization module, and obtaining the trained feature fusion network model and the trained channel feature optimization module;
[0117] Extraction module for:
[0118] Input the template image and the search image into the trained feature fusion network model, extract target features from the template image and the search image respectively, and obtain target features of the template image extracted by the trained model and target features of the search image extracted by the trained model;
[0119] Compute module for:
[0120] The search image target features extracted after model training and the template image target features extracted after model training are used as the input of learning module A and iteratively processed to obtain an updated attention output matrix;
[0121] The updated attention output matrix is used to weightedly fuse the target features extracted from the search image after model training and the target features extracted from the template image after model training to obtain an updated target feature weighted fusion result;
[0122] The updated target feature weighted fusion result is input into the channel feature optimization module for normalization, separable convolution and nonlinear processing in sequence to obtain a processed feature map, and the processed feature map is subjected to channel feature optimization operation to obtain channel optimized features;
[0123] The channel optimized features are processed by linear mapping mechanism and activation function feature optimization in turn to obtain an optimized feature map, and the optimized feature map is convolved to obtain an output feature map;
[0124] The output feature map is processed by the channel information aggregation mechanism to obtain a further optimized feature fusion network model;
[0125] Tracking module for:
[0126] The template image features and the search image features are fused with the features of the asynchronous stage through the trained channel feature optimization module to obtain the fused features of the asynchronous interaction stage, and the fused features of the asynchronous interaction stage are input into the prediction head to obtain the prediction results;
[0127] The target is tracked based on the prediction results.
[0128] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0129] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.
[0130] The above-mentioned embodiments only express several implementation methods of the present invention, and the description thereof is relatively specific and detailed, but it cannot be understood as limiting the scope of the patent of the present invention. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.
Claims
1. A target tracking method based on dual-path attention and channel feature optimization, characterized in that: The method comprises the following steps: Step 1: Based on the Transformer network framework, an adaptive dual-path attention feature fusion network is constructed. The adaptive dual-path attention feature fusion network includes an efficient self-attention branch and a comprehensive self-attention branch. A feature fusion network model and a channel feature optimization module are constructed based on the efficient self-attention branch and the comprehensive self-attention branch. Step 2: Segment the template image and the search image to obtain a preset number of template image blocks and search image blocks, perform a linear transformation operation on each image block, and then input the blocks into the encoder in the Transformer network for asynchronous phase feature extraction to obtain template image features extracted by asynchronous phase features and search image features extracted by asynchronous phase features; Input the template image features extracted from the asynchronous stage and the search image features extracted from the asynchronous stage into the adaptive dual-path attention feature fusion network; In the efficient self-attention branch, the template image features extracted from the asynchronous stage and the search image features extracted from the asynchronous stage are processed by the efficient self-attention mechanism to obtain an efficient self-attention score. Perform activation function processing on the efficient self-attention score to obtain the efficient self-attention score after activation processing; In the full attention branch, the template image features extracted from the asynchronous phase and the search image features extracted from the asynchronous phase are normalized to obtain a full self-attention score. Weights are assigned to the efficient self-attention scores and the comprehensive self-attention scores to obtain the attention output matrix; Step 3: Based on the attention output matrix, perform weighted fusion on the template image features and the search image features to obtain weighted fused features; The weighted fused features are input into the channel feature optimization module to eliminate feature redundancy, thereby obtaining features that eliminate redundancy, and the feature fusion network model is optimized using the features that eliminate redundancy, thereby obtaining an optimized feature fusion network model; Step 4: Use large-scale data to train the optimized feature fusion network model and channel feature optimization module to obtain a trained feature fusion network model and a trained channel feature optimization module; Step 5: Input the template image and the search image into the trained feature fusion network model, extract target features from the template image and the search image respectively, and obtain the target features of the template image extracted by the trained model and the target features of the search image extracted by the trained model; Step 6: Repeat step 2 in an iterative manner for the search image target features extracted after model training and the template image target features extracted after model training to obtain an updated attention output matrix; The updated attention output matrix is used to weightedly fuse the search image target features extracted after model training and the template image target features extracted after model training to obtain an updated target feature weighted fusion result; The updated target feature weighted fusion result is input into the channel feature optimization module for normalization, separable convolution and nonlinear processing in sequence to obtain a processed feature map, and the processed feature map is subjected to channel feature optimization operation to obtain channel optimized features; The channel optimized features are processed by linear mapping mechanism and activation function feature optimization in turn to obtain an optimized feature map, and the optimized feature map is convolved to obtain an output feature map; The output feature map is processed by the channel information aggregation mechanism to obtain a further optimized feature fusion network model; Step 7: The template image features and the search image features are subjected to asynchronous stage feature fusion through the trained channel feature optimization module to obtain fused features of the asynchronous interaction stage, and the fused features of the asynchronous interaction stage are input into the prediction head to obtain the prediction results; Tracking the target based on the prediction results; Among them, in the step of performing channel feature optimization operation on the processed feature map to obtain channel optimized features, the corresponding relationship of the process is as follows: ; in, It means that after the channel feature optimization operation, represents the channel scaling factor, represents element-wise product, Represents a linear map.
2. The target tracking method based on dual-path attention and channel feature optimization according to claim 1, characterized in that: In step 2, the efficient self-attention score is processed by an activation function to obtain the efficient self-attention score after activation processing. The corresponding relationship of the process is as follows: ; in, represents the efficient self-attention score, It means that it has been processed by the activation function. represents the query matrix, represents the key matrix, Represents the dimension, represents the similarity between the query and the corresponding key, represents the learnable relative position deviation, Represents the transpose of a matrix.
3. The target tracking method based on dual-path attention and channel feature optimization according to claim 2, characterized in that: In the comprehensive attention branch, the template image features extracted from the asynchronous stage and the search image features extracted from the asynchronous stage are normalized to obtain the comprehensive self-attention score. The corresponding relationship in the process is as follows: ; in, represents the overall self-attention score, Indicates that it has been normalized.
4. The target tracking method based on dual-path attention and channel feature optimization according to claim 3 is characterized in that: In the step of weighting the efficient self-attention score and the comprehensive self-attention score to obtain the attention output matrix, the corresponding relationship in the process is as follows: ; in, represents the attention output matrix, represents the value matrix, represents the multiplication operation, and Represents two different learnable weight parameters.
5. The target tracking method based on dual-path attention and channel feature optimization according to claim 4, characterized in that: In step 6, the updated target feature weighted fusion result is input into the channel feature optimization module for normalization, separable convolution and nonlinear processing in sequence to obtain a processed feature map. The corresponding relationship of the process is as follows: ; in, represents the feature map after the activation function, It means that it has been processed by the activation function. Indicates that the size is 3 3-depth separable convolution processing, It means that after normalization layer processing, Represents the updated weighted fusion result of the target features.
6. The target tracking method based on dual-path attention and channel feature optimization according to claim 1, characterized in that: In the step of performing convolution processing on the optimized feature map to obtain the output feature map, the corresponding relationship between the process is as follows: ; in, represents the output feature map, Indicates that the size is 1 1 convolution processing.
7. A target tracking system based on dual-path attention and channel feature optimization, characterized in that: The system applies any one of the target tracking methods based on dual-path attention and channel feature optimization as claimed in claims 1 to 6 above, and the system comprises: Building blocks for: An adaptive dual-path attention feature fusion network is constructed based on the Transformer network framework. The adaptive dual-path attention feature fusion network includes an efficient self-attention branch and a comprehensive self-attention branch. A feature fusion network model and a channel feature optimization module are constructed based on the efficient self-attention branch and the comprehensive self-attention branch. Learning Module A is for: The template image and the search image are segmented to obtain a preset number of template image blocks and search image blocks, respectively. A linear transformation operation is performed on each image block, and then the blocks are input into the encoder in the Transformer network for asynchronous stage feature extraction to obtain template image features extracted by asynchronous stage features and search image features extracted by asynchronous stage features; Input the template image features extracted from the asynchronous stage and the search image features extracted from the asynchronous stage into the adaptive dual-path attention feature fusion network; In the efficient self-attention branch, the template image features extracted from the asynchronous stage and the search image features extracted from the asynchronous stage are processed by the efficient self-attention mechanism to obtain an efficient self-attention score. Perform activation function processing on the efficient self-attention score to obtain the efficient self-attention score after activation processing; In the full attention branch, the template image features extracted from the asynchronous phase and the search image features extracted from the asynchronous phase are normalized to obtain a full self-attention score. Weights are assigned to the efficient self-attention scores and the comprehensive self-attention scores to obtain the attention output matrix; Learning Module B is used to: Based on the attention output matrix, the template image features and the search image features are weighted fused to obtain the weighted fused features; The weighted fused features are input into the channel feature optimization module to eliminate feature redundancy, thereby obtaining features that eliminate redundancy, and the feature fusion network model is optimized using the features that eliminate redundancy, thereby obtaining an optimized feature fusion network model; Pre-trained modules for: Using large-scale data to train the optimized feature fusion network model and channel feature optimization module, and obtaining the trained feature fusion network model and the trained channel feature optimization module; Extraction module for: Input the template image and the search image into the trained feature fusion network model, extract target features from the template image and the search image respectively, and obtain target features of the template image extracted by the trained model and target features of the search image extracted by the trained model; Compute module for: The search image target features extracted after model training and the template image target features extracted after model training are used as the input of learning module A and iteratively processed to obtain an updated attention output matrix; The updated attention output matrix is used to weightedly fuse the search image target features extracted after model training and the template image target features extracted after model training to obtain an updated target feature weighted fusion result; The updated target feature weighted fusion result is input into the channel feature optimization module for normalization, separable convolution and nonlinear processing in sequence to obtain a processed feature map, and the processed feature map is subjected to channel feature optimization operation to obtain channel optimized features; The channel optimized features are processed by linear mapping mechanism and activation function feature optimization in turn to obtain an optimized feature map, and the optimized feature map is convolved to obtain an output feature map; The output feature map is processed by the channel information aggregation mechanism to obtain a further optimized feature fusion network model; Tracking module for: The template image features and the search image features are fused with the features of the asynchronous stage through the trained channel feature optimization module to obtain the fused features of the asynchronous interaction stage, and the fused features of the asynchronous interaction stage are input into the prediction head to obtain the prediction results; The target is tracked based on the prediction results.
Citation Information
Patent Citations
Medical image segmentation method based on efficient self-attention mechanism hybrid neural network
CN117830632A
SE module lightweight network-based strip steel surface defect detection method
CN119251170A