High-dynamic small target tracking method for real-time dynamic template updating, medium and equipment
Through Swin-Transformer and cross-attention network enhancement features, combining quality scoring heads and dynamic template update networks, the template update problems caused by target occlusion and deformation are solved, and efficient target tracking effect is achieved.
Patent Information
- Application Number
- CN202510516530.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-23
- Publication Date
- 2025-09-02
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing target tracking technologies cannot effectively update templates when facing target occlusion and deformation, resulting in tracking failure, and fixed update frequency may lead to computational burden and performance degradation.
The real-time dynamic template update method based on Swin-Transformer is adopted, and the network is updated through cross-attention network enhancement and fusion characteristics, combined with quality scoring heads and dynamic templates, and the template is dynamically adjusted to adapt to target changes.
It improves the stability and accuracy of target tracking, can effectively obtain target features in complex scenarios, and enhances the expression ability and tracking performance of templates.
Smart Images

Figure CN120580460A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of dynamic tracking technology, and in particular to a high-dynamic small target tracking method, medium and device with real-time dynamic template updating. Background Art
[0002] To address the time-varying appearance of targets due to occlusion and deformation, most tracking techniques emphasize the importance of the target's position in the first frame for future localization. These techniques typically rely solely on the target's position in the first frame as a template, which is then used to search and locate the target in subsequent videos. However, over time, the target may move rapidly and become severely occluded and deformed. The original target information no longer accurately reflects its current appearance, and target tracking techniques are unable to capture the similarity between the initial template and the current video frame, resulting in tracking failure. To adapt to target changes, most tracking techniques update the target template using either simple linear interpolation for each frame or updating the initial template across all frames. This update strategy has significant shortcomings in most tracking scenarios. Furthermore, a fixed update frequency can cause the target template to overly rely on the latest frame and ignore historical target appearance information, resulting in reduced tracking performance. To address this issue, Danelljan et al. proposed taking a subset of historical frames into account when computing the correlation filter for the current frame, using these as training samples. This approach achieves superior tracking results compared to traditional linear frame-by-frame updating strategies. However, introducing too many templates increases the algorithm's computational burden and can lead to slower execution. To address this issue, ECO assumes that the distribution of training samples follows a Gaussian model, effectively reducing computational costs. This assumption simplifies the computational tasks during tracking while maintaining effective target tracking. SiamRCR adds a quality assessment branch to assist with classification. The output of the quality score branch determines whether to update the dynamic template. The template with the highest score is used to update the dynamic template, which contains the latest shape and position information of the current target.
[0003] Early Siamese tracking techniques often ignored model updates, maintaining a fixed template once it was determined in the first frame. This worked well in general scenarios, but when the target's appearance drastically changed, the template tended to drift and was difficult to recover. Therefore, adapting the model to the target's current appearance is crucial for effective tracking.
[0004] (1) Simple linear update strategies are adopted in multiple tracking techniques, such as GOTURN, SINT, and SiamRPN, which assume that the rate of change of the target appearance is constant between video frames. However, this assumption ignores the impact of external factors such as motion, blur, and background clutter on the update requirements during the tracking process, resulting in linear updates that may not be effective in dealing with changing tracking scenarios. In addition, linear updates are uniform in the spatial dimension and do not support local updates, which may lead to inaccurate template updates when the target is partially occluded.
[0005] (2) Memory networks are introduced to improve the adaptability of tracking technology. RFL uses long-short-term memory networks to refresh the target's appearance model, while MemTrack uses an LSTM architecture to dynamically mine and update information from past frames. STMTrack uses a spatiotemporal memory network to extract cross-frame memory, enhancing model adaptability and tracking accuracy. These technologies improve the performance of tracking technology in the face of changes in target appearance by leveraging historical information and spatiotemporal context.
[0006] (3) The template update strategy used to improve target recognition and suppress background interference is crucial in twin tracking technology. DSiam uses a dynamic twin network to effectively update the template and suppress interference. DaSiamRPN introduces an interference perception mechanism that enables the model to identify and adapt to external factors that may interfere with target tracking. UpdateNe develops a special network that uses historical template data to improve the accuracy of feature prediction. GradNet uses the gradient information of the image to dynamically update the template, which can effectively reduce the interference of background noise on target tracking. MLT achieves fast and effective extraction of target features by integrating the principles of meta-learning and the twin network structure. GCT uses a spatiotemporal graph convolutional network to model target features. Wang et al. use the Transformer architecture to capture the temporal relationship between video frames, enhance the target template, and process appearance changes and noise through the decoder. The STARK architecture proposed by Yan et al. integrates the encoder, decoder and prediction head, captures the spatial and temporal information of the target through the self-attention module and query embedding, and achieves accurate tracking.
[0007] (4) The real-time update strategy can effectively deal with the adverse effects of changes in target appearance. Ocean uses online update functions and fast conjugate gradient technology to dynamically adjust branches during the derivation process to accurately capture the changes in the target. The classification subnet of RPT improves resolution through online training and integrates multiple convolutional layers to provide accurate target positioning and structural information. The deep discriminative correlation filter combines the efficiency of traditional correlation filters with the strong discriminative ability of deep learning. CFNet regards correlation filters as differentiable layers to achieve end-to-end training with CNN. Subsequent research optimizes the deep correlation filter framework through methods such as gradient descent. CREST uses the SGD method to optimize the loss function and trains convolution kernels to distinguish foreground and background. RTINet integrates CNN and correlation filter tracking, while FlowTrack uses optical flow information to enhance feature representation and adaptively aggregate information through a spatiotemporal attention mechanism. ATOM applies a conjugate gradient strategy for fast optimization, and DiMP extends it to end-to-end learning. PrDiMP enhances tracking performance through probabilistic regression, while ROAM uses variable-size filters to deal with target shape changes and uses meta-learning for model updates. ROAM++ focuses on using tracking box regression to estimate target position. Since Vaswani et al. first proposed the Transformer in 2017 and successfully applied it to text translation, its advantages in extracting contextual information and global modeling have made it widely used in the field of computer vision. Transformer-based target tracking technology usually consists of three parts: a deep feature extraction network, a Transformer fusion network, and a prediction module. Yu et al. proposed DTT in 2021. This technology uses scene information to generate discriminative features through end-to-end learning, and updates the template by the moving average method every 10 frames, achieving excellent tracking performance. In the same year, Wang et al. applied the improved Transformer to the Siamese and DiMP tracking frameworks to create TrSiam and TrDiMP, which capture temporal relationships by updating the template set T every 5 frames. The template set stores up to 20 templates, and the earliest template is automatically removed if it exceeds the limit. The TrTr model of Zhao et al. combines a Transformer-based offline model with an online updated classification model, obtains contextual relevance through self-attention and cross-attention mechanisms, and improves tracking accuracy and stability. In 2022, Lu Huchuan's team proposed TransT-M based on TransT. This technology records changes in target appearance through multi-template input and designs a dynamic template update system to cope with changes in target appearance, thereby improving tracking stability and accuracy.Given that existing technologies focus primarily on the spatial information of video images while neglecting temporal information, Lu Huchuan's team proposed StarK, a technique that updates a dynamic template when the update interval and confidence threshold are met. By cropping a new template from the original image to replace the old one, it fully exploits the spatiotemporal data of the video to enhance tracking efficiency. However, because the updated template is predicted by the model rather than the actual target location, if the updated template itself cannot accurately locate or effectively represent the target category information, it may mislead the tracking technology to obtain the true target. Therefore, the initial appearance information of all tracked targets in the first frame and the appearance information of the target changing between video frames play a crucial role.
[0008] To obtain higher-quality updated target templates, this chapter proposes a real-time dynamic template updating object tracking technology based on on-board images (TransTRDT). First, the first three layers of the Swin-Transformer extract features of the dynamic template, initial template, and search region. These features are then enhanced using a cross-attention network and concatenated into the encoder and decoder modules for feature fusion. Finally, the output features are processed through regression and classification heads for target localization. A real-time dynamic template updating branch is designed within the prediction head. This branch first updates the dynamic template using a quality scoring head to determine whether it meets a specified threshold. The cropped current frame prediction template, the previous frame dynamic template, and the initial template are then fed into the real-time dynamic template updating network. This network is trained to generate a dynamic template that captures the target's characteristics from the initial, current, and previous frames. This allows for stable acquisition of high-quality target appearance features in subsequent video frames, even when facing various challenges. This ensures the timeliness of the dynamic template during target tracking. In summary, this chapter proposes the TransTRDT technique to address the challenges of surface information changes caused by target transformations and occlusions. By designing a real-time dynamic template update branch, including a quality scoring head, this technique fully leverages the available target information from the initial, current, and historical frames. This allows the dynamic template to contain more comprehensive target information, enhancing its expressiveness and improving tracking performance. Compared to similar techniques, this technique achieves leading results in experiments on image datasets. Summary of the Invention
[0009] The present invention proposes a high-dynamic small target tracking method with real-time dynamic template updating, which can solve at least one of the technical problems in the background technology.
[0010] To achieve the above object, the present invention adopts the following technical solutions: A highly dynamic small target tracking method with real-time dynamic template updating, comprising: S100: Build a real-time dynamic template update target tracking system TransTRDT, and use the feature extractor in the system to extract the features of the dynamic template, initial template, and search area; S200, enhance, splice and fuse the features of the dynamic template, initial template and search area through the cross attention network; S300, the features output after enhancement, splicing and fusion are used by a predictor to determine a dynamic template to complete target tracking.
[0011] Furthermore, the real-time dynamic template updating target tracking system TransTRDT in step S100 of the present invention includes: a feature extractor, a feature enhancer, a feature fusion device and a predictor; The feature extractor is composed of a three-stage Swin Transformer network module, which extracts feature maps of the search area, initial template, and dynamic template, and outputs the feature maps to the feature enhancement module; The feature enhancer consists of a cross-attention module, which is used to perform feature fusion enhancement on the feature map output by the feature extractor; The feature fusion unit consists of an encoder and a decoder, which generates the final feature map of the search image from the feature map output by the feature enhancer; The predictor is used to output the final feature map, and the template features are updated using the dynamic template update network.
[0012] Furthermore, in step S100 of the present invention, the feature extractor extracts features of the dynamic template, the initial template, and the search area by: The TransTRDT system uses the Swin Transformer feature extraction network to extract dynamic templates , initial template and search area Features, respectively get the corresponding feature identification token as the dynamic template feature of K and V , initial template features and search area characteristics ; Among them, s is the stride of the backbone network. Since there is no dimensionality projection in the model, C is the hidden dimension of the entire model.
[0013] Furthermore, the method of enhancing, splicing, and fusing the features of the dynamic template, the initial template, and the search area through a cross attention network in step S200 of the present invention includes: Initial template features As Q, respectively as K, V dynamic template features and search area characteristics Perform cross-attention operation to enhance the dynamic template and valuable foreground target information in the search area; then, in the feature fuser, the enhanced features are connected through connection-based fusion, and then sent to the Transformer encoder and decoder for feature fusion processing; the encoder network uses the attention mechanism to enhance the merged features layer by layer, while the decoder network is responsible for generating the final feature map of the search image; finally, the final feature Figure 1 On the one hand, it is provided to the classification prediction head and the regression prediction head to locate the position of the target; on the other hand, it is further input into the quality evaluation prediction head, which decides whether to use the current frame prediction value to update the dynamic template according to the quality score.
[0014] Furthermore, in step S300 of the present invention, the method for determining a dynamic template by a predictor for the features output after enhancement, splicing, and fusion includes: During the tracking process, the new dynamic template is required to contain the initial template and the dynamic template message of the previous frame; the dynamic template update model uses the function F express, T Indicates the target presentation template. i is the current frame number, then the dynamic template update formula is as follows: (1) in, is the initial truth template, is the dynamic template of the previous frame, is the current frame prediction template, is the dynamic template of the current frame; The update formula of the dynamic template reveals the dynamic template characteristics of the current frame Should be consistent with the ground truth template of the next frame Very close, because It is the most suitable template when predicting the target in the next frame. In order to train the dynamic template update network, the Huber loss function is used to minimize the dynamic template of the current frame. and the ground truth template of the next frame , the loss function formula is as follows: (2) Among them, the hyperparameter δ is set to 0.8 after experiments; The quality scoring head consists of a three-layer perceptron with activation functions between each layer. The search area information obtained by the decoder and encoder will be sent to the quality scoring head to determine whether the quality of the predicted target of the current frame meets the requirements of serving as a dynamic template. If the score is higher than the set threshold τ, the target prediction of the current frame is considered credible, and the dynamic template is updated accordingly. The corresponding loss function formula is as follows: (3) in, is the number of positive samples, is an indicator function, when 1 when , 0 otherwise; is the binary cross entropy loss, The feature map generated for the quality scoring head, represents the true target box, Represents the predicted target box. The CIoU loss function integrates three factors: overlap area size, center distance, and aspect ratio, effectively improving the accuracy of the matching score between the predicted template and the actual target. The pixels near the center of the target are defined as foreground positive samples, and the formula is as follows: (4) in, represents the center coordinates of the real frame, (x, y) represents the center coordinates of the predicted frame, R is the radius used to distinguish positive and negative samples.
[0015] In another aspect, the present invention further discloses a computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, the processor executes the steps of the above method.
[0016] On the other hand, the present invention further discloses a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the above method.
[0017] As can be seen from the above technical solution, traditional single-target tracking technology begins with target detection in the first frame of the image and uses feature extraction to capture the target's appearance features. The temporal correlation of these features in the sequence is then used to continuously locate the same target. This tracking technology can significantly reduce system deviation, thereby significantly improving the strike accuracy of image-guided terminal projectiles. However, during actual strikes, image targets will undergo nonlinear changes in scale and angle due to changes in distance and posture, making it difficult to stably represent target features. In addition, complex battlefield environments such as rain, snow, fog, obstructions, and projectile motion can also affect imaging quality, leading to the loss of the target template during tracking and reducing positioning accuracy. Therefore, in order to accurately strike targets, it is crucial to develop high-precision real-time tracking technology that can stably acquire target features in dynamic changes. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 This is a schematic diagram of the overall architecture of TransTRDT. DETAILED DESCRIPTION
[0019] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments.
[0020] like Figure 1 As shown, the high-dynamic small target tracking method with real-time dynamic template update described in this embodiment includes: S100: Build a real-time dynamic template update target tracking system TransTRDT, and use the feature extractor in the system to extract the features of the dynamic template, initial template, and search area; S200, enhance, splice and fuse the features of the dynamic template, initial template and search area through the cross attention network; S300, the features output after enhancement, splicing and fusion are used by a predictor to determine a dynamic template to complete target tracking.
[0021] The following is a detailed description of each step: S100: Build a real-time dynamic template update target tracking system TransTRDT, and use the feature extractor in the system to extract the features of the dynamic template, initial template, and search area; like Figure 1 As shown in Figure 3, the real-time dynamic template update target tracking system TransTRDT consists of four key modules: feature extractor, feature enhancer, feature fusion and predictor.
[0022] The feature extractor is composed of three stages of the novel visual Swin Transformer network module. It extracts feature maps of the search area, initial template, and dynamic template, and outputs feature maps to the feature enhancement module. The blue module represents the feature map of the dynamic template, the green module represents the feature map of the initial template, and the pink module represents the feature map of the exploration area. The feature enhancer consists of a cross-attention module, which is used to perform feature fusion enhancement on the feature map output by the feature extractor; The feature fusion unit consists of an encoder and a decoder, which generates the final feature map of the search image from the feature map output by the feature enhancer; The predictor is used to output the final feature map, and the template features are updated using the dynamic template update network.
[0023] At the initial stage of target tracking, the dynamic template With the initial template The TransTRDT system uses the Swin Transformer feature extraction network to extract dynamic templates , initial template and search area Features, respectively get the corresponding feature identification token as the dynamic template feature of K and V , initial template features and search area characteristics ; Among them, s is the stride of the backbone network. Since there is no dimensionality projection in the model, C is also the hidden dimension of the entire model.
[0024] S200, enhance, splice and fuse the features of the dynamic template, initial template and search area through the cross attention network; Initial template features As Q, respectively as K, V dynamic template features and search area characteristics Perform cross-attention operations to enhance the dynamic template and valuable foreground target information in the search area. Then, in the feature fusion unit, the enhanced features are connected through connection-based fusion and then sent to the Transformer encoder and decoder for feature fusion processing. The encoder network uses the attention mechanism to enhance the merged features layer by layer, while the decoder network is responsible for generating the final feature map of the search image. Finally, the final feature map is Figure 1 On the one hand, it is provided to the classification prediction head and the regression prediction head to locate the position of the target. On the other hand, it is further input into the quality assessment prediction head, which decides whether to use the current frame prediction value to update the dynamic template based on the quality score.
[0025] S300, the features output after enhancement, splicing and fusion are used by a predictor to determine a dynamic template and complete target tracking; The dynamic template update network input includes the initial template, the previous frame dynamic template and the current frame prediction template, which gives the template more comprehensive target features and improves its adaptability to complex scenes.
[0026] During the target tracking process, when the target information changes due to target transformation and occlusion, the original template information of the target has been destroyed and the target template needs to be replaced in a timely and effective manner. However, the initial template and the dynamic template of the previous frame still contain important information about the target, so the new dynamic template needs to include this information.
[0027] The dynamic template update problem is solved by learning a model of adaptive template update strategy. The dynamic template update model uses the function F express, T Indicates the target presentation template. i is the current frame number, then the dynamic template update formula is expressed as follows: (1) in, is the initial truth template, is the dynamic template of the previous frame, is the current frame prediction template, It is the dynamic template of the current frame.
[0028] The update formula of the dynamic template reveals the dynamic template characteristics of the current frame Should be consistent with the ground truth template of the next frame Very close, because It is the most suitable template when predicting the target in the next frame. Therefore, in order to train the dynamic template update network, this method uses the Huber loss function to minimize the dynamic template of the current frame. and the ground truth template of the next frame , the loss function formula is as follows: (2) Among them, the hyperparameter δ is set to 0.8 after experiments.
[0029] The quality scoring head consists of a three-layer perceptron neural network with activation functions between layers. The search area information obtained by the decoder and encoder is fed into the quality scoring head to determine whether the quality of the predicted target for the current frame meets the requirements for use as a dynamic template. If the score exceeds a set threshold τ, the target prediction for the current frame is deemed reliable, and the dynamic template is updated accordingly. This means that the predicted template, cropped from the predicted image to the size of the target template, is fed into the dynamic template update network.
[0030] The corresponding loss function L sco As shown in formula 3: (3) in, is the number of positive samples, is an indicator function, when It is 1 when , and 0 in other cases. is the binary cross entropy loss, The feature map generated for the quality scoring head, represents the true target box, Represents the predicted target box. The CIoU loss function integrates three factors: overlap area size, center distance, and aspect ratio, effectively improving the accuracy of the matching score between the predicted template and the actual target.
[0031] Its loss function is shown in formula (3), which is mainly used to output the quality score of the current frame prediction target. If the quality score is greater than the threshold, the current frame prediction target is considered to be able to be used as a dynamic template.
[0032] To improve efficiency, this method sets the update interval to Tu The score of the quality scoring head represents the reliability of the current prediction and reflects the positioning quality of the target in the current image. Better positioning quality can ensure that the cut template has richer target information.
[0033] The pixels near the center of the target are defined as foreground positive samples, as shown in Equation 4 below: (4) in, represents the center coordinates of the real frame, (x, y) represents the center coordinates of the predicted frame, R is the radius used to distinguish positive and negative samples.
[0034] The classification prediction head is used to evaluate whether the corresponding coordinate position falls within the target center radius R This chapter believes that the feature pixels around the target center have better classification estimation quality than the edge pixels, so the pixels near the target center are identified as positive samples. The classification prediction head generates a feature map ,In this chapter, in order to perform the classification task, the widely recognized focal loss function is adopted. The classification prediction loss function is shown in Equation 5: (5) in, Represents the classification results The corresponding focus loss.
[0035] Different from the quality scoring head and classification prediction head, the output dimension of the three-layer perceptron of the bounding box positioning head is 4, representing the coordinates of the upper left and lower right corners ( x 0, y 0, x 1, y 1). The bounding box localization head loss function is shown in Equation 6 below: (6) in, Represents the tracking result predicted by the bounding box localization head The corresponding CIoU loss.
[0036] The total loss function of TransTRDT is shown in Equation 7: (7) in, λ 1 and λ 2 are the hyperparameter weight coefficients of the bounding box positioning head loss function and the quality score head loss function.
[0037] In summary, the method proposed in this paper addresses the challenge of apparent information changes caused by target transformation and occlusion by proposing the TransTRDT technique. This technique designs a real-time dynamic template update branch, including a quality scoring header. This branch fully utilizes the effective target information in the initial frame, the current frame, and historical frames. This allows the dynamic template to contain more comprehensive target information, enhancing its expressiveness and improving tracking performance. Compared with traditional techniques, this technique has achieved leading results in experiments on image datasets.
[0038] In another aspect, the present invention further discloses a computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, the processor executes the steps of the above method.
[0039] On the other hand, the present invention further discloses a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the above method.
[0040] In another embodiment provided in the present application, a computer program product comprising instructions is also provided, which, when executed on a computer, enables the computer to execute any high-dynamic small target tracking method with real-time dynamic template update in the above embodiments.
[0041] It is understandable that the system, device and storage medium provided in the embodiments of the present invention correspond to the method provided in the embodiments of the present invention, and the explanation, examples and beneficial effects of the relevant contents can refer to the corresponding parts of the above methods.
[0042] In the above embodiments, all or part of the embodiments can be implemented using software, hardware, firmware, or any combination thereof. When implemented using software, all or part of the embodiments can be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more available media. The available medium can be a magnetic medium (e.g., a floppy disk, hard disk, tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)).
[0043] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply the existence of any such actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or device comprising the element.
[0044] Each embodiment in this specification is described in a related manner. Similar parts between the various embodiments can be referred to in conjunction with each other. Each embodiment focuses on the differences between the other embodiments. In particular, the system embodiment is generally similar to the method embodiment, so the description is relatively simple. For related parts, refer to the description of the method embodiment.
[0045] 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 they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. 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 various embodiments of the present invention.
Claims
1. A high-dynamic small target tracking method with real-time dynamic template update, characterized in that: include: S100: Build a real-time dynamic template update target tracking system TransTRDT, and use the feature extractor in the system to extract the features of the dynamic template, initial template, and search area; S200, enhance, splice and fuse the features of the dynamic template, initial template and search area through the cross attention network; S300, the features output after enhancement, splicing and fusion are used by a predictor to determine a dynamic template to complete target tracking.
2. The high-dynamic small target tracking method with real-time dynamic template update according to claim 1 is characterized in that: The real-time dynamic template updating target tracking system TransTRDT in step S100 includes: a feature extractor, a feature enhancer, a feature fusion device and a predictor; The feature extractor is composed of a three-stage Swin Transformer network module, which extracts feature maps of the search area, initial template, and dynamic template, and outputs the feature maps to the feature enhancement module; The feature enhancer consists of a cross-attention module, which is used to perform feature fusion enhancement on the feature map output by the feature extractor; The feature fusion unit consists of an encoder and a decoder, which generates the final feature map of the search image from the feature map output by the feature enhancer; The predictor is used to output the final feature map, and the template features are updated using the dynamic template update network.
3. The high-dynamic small target tracking method with real-time dynamic template update according to claim 1 is characterized in that: In step S100, the feature extractor extracts features of the dynamic template, the initial template, and the search area by: The TransTRDT system uses the Swin Transformer feature extraction network to extract dynamic templates , initial template and search area Features, respectively get the corresponding feature identification token as the dynamic template feature of K and V , initial template features and search area characteristics ; Among them, s is the stride of the backbone network. Since there is no dimensionality projection in the model, C is the hidden dimension of the entire model.
4. The high-dynamic small target tracking method with real-time dynamic template update according to claim 2 is characterized in that: Step S200 enhances, splices, and fuses the features of the dynamic template, the initial template, and the search area through a cross-attention network. The method includes: Initial template features As Q, respectively as K, V dynamic template features and search area characteristics A cross-attention operation is performed to directionally enhance the dynamic template and valuable foreground target information in the search area; then, in the feature fuser, the enhanced features are connected through connection-based fusion, and then sent to the Transformer encoder and decoder for feature fusion processing; the encoder network uses the attention mechanism to enhance the merged features layer by layer, while the decoder network is responsible for generating the final feature map of the search image; finally, the final feature map is provided to the classification prediction head and the regression prediction head on the one hand to locate the position of the target; on the other hand, it is further input into the quality evaluation prediction head, and the quality score is used to decide whether to use the current frame prediction value to update the dynamic template.
5. The high-dynamic small target tracking method with real-time dynamic template update according to claim 2 is characterized in that: In step S300, the method for determining a dynamic template by using a predictor for the features output after enhancement, splicing, and fusion includes: During the tracking process, the new dynamic template is required to contain the initial template and the dynamic template message of the previous frame; the dynamic template update model uses the function F express, T Indicates the target presentation template. i is the current frame number, then the dynamic template update formula is as follows: (1) in, is the initial truth template, is the dynamic template of the previous frame, is the prediction template for the current frame, is the dynamic template of the current frame; The update formula of the dynamic template reveals the dynamic template characteristics of the current frame Should be consistent with the ground truth template of the next frame Very close, because It is the most suitable template when predicting the target in the next frame. In order to train the dynamic template update network, the Huber loss function is used to minimize the dynamic template of the current frame. and the ground truth template of the next frame , the loss function formula is as follows: (2) Among them, the hyperparameter δ is set to 0.8 after experiments; The quality scoring head consists of a three-layer perceptron with activation functions between each layer. The search area information obtained by the decoder and encoder will be sent to the quality scoring head to determine whether the quality of the predicted target of the current frame meets the requirements of serving as a dynamic template. If the score is higher than the set threshold τ, the target prediction of the current frame is considered credible, and the dynamic template is updated accordingly. The corresponding loss function formula is as follows: (3) in, is the number of positive samples, is an indicator function, when 1 when , 0 otherwise; is the binary cross entropy loss, The feature map generated for the quality scoring head, represents the true target box, Represents the predicted target box. The CIoU loss function integrates three factors: overlap area size, center distance, and aspect ratio, effectively improving the accuracy of the matching score between the predicted template and the actual target. The pixels near the center of the target are defined as foreground positive samples, and the formula is as follows: (4) in, represents the center coordinates of the real frame, (x, y) represents the center coordinates of the predicted frame, R is the radius used to distinguish positive and negative samples.
6. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the processor is caused to perform the method according to any one of claims 1 to 5.
7. A computer device comprising a memory and a processor, characterized in that: The memory stores a computer program, and when the computer program is executed by the processor, the processor is caused to perform the method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Multi-scale Transform target tracking method based on space-time template updating
CN117036417A
Single-target tracking method and system, electronic equipment and medium
CN119741339A
Cited By
Target real-time tracking method and device based on periodic segmentation, equipment and medium
CN121391922A