Single target tracking method, device and storage medium

By using a transformer-based IoU prediction method and combining target prior boxes to optimize the predicted bounding boxes, the accuracy and speed issues of single-target trackers in complex environments are solved, achieving efficient target tracking.

CN114708306BActive Publication Date: 2024-10-29NANJING UNIV OF POSTS & TELECOMM
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210240068.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-10
Publication Date
2024-10-29
Estimated Expiration
2042-03-10

AI Technical Summary

Technical Problem

Existing single-target trackers struggle to effectively track targets in complex environments, such as those with blurriness, scale variations, and rapid motion.

Method used

A transformer-based IoU prediction method is adopted. By combining the target prior box with the transformer backbone network and decoder, the predicted box is optimized to improve tracking accuracy and speed.

Benefits of technology

It improves the accuracy and speed of single-target tracking, avoids the complex parameter design and cumbersome post-processing steps in traditional methods, and meets real-time requirements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114708306B_ABST
    Figure CN114708306B_ABST
Patent Text Reader

Abstract

The present invention discloses a single target tracking method, device and storage medium, the method comprising: using a transformer backbone network to extract the features of the target area and the search area; using a transformer-based encoding and decoding architecture to fuse the target area features and the search area features to serve subsequent prediction tasks, and adding M (100) target pre-selection boxes based on the target position of the previous frame while the target area feature code and the search area feature code are jointly sent to the transformer decoder. IoU prediction module: The target prediction box output by the Transformer decoder structure is iteratively optimized N times to obtain an optimized prediction box, and then the IoU between the box and the annotated box is calculated, and the top three optimized prediction boxes with IoU are selected and averaged as the final prediction result. The speed is guaranteed while improving the accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of target tracking, and relates to a single target tracking method, a device and a storage medium, and specifically to a single target tracking method, a device and a storage medium for IoU prediction based on transformer. Background Art

[0002] Single target tracking is a very challenging task in computer vision. The purpose of the target tracking task is that when the target information of the first frame is given, the tracker needs to automatically determine the target state in the subsequent frames. Unlike the target detection task, the target features can only be obtained in the inference stage, which means that there is no prior information about the target, such as category and surrounding environment. Thanks to the rapid development of deep learning in recent years, many research results have been achieved in the field of target tracking.

[0003] The existing technology has the following shortcomings: However, facing a complex environment (e.g., blur, scale change, color shift, and fast motion, etc.), most existing trackers still cannot handle these scenes well. Summary of the invention

[0004] Objective: In order to overcome the shortcomings of the prior art, the present invention provides a single target tracking method, device and storage medium; IoU prediction is performed based on transformer, which makes full use of the transformer's powerful ability to integrate local and global information, while also avoiding the complex parameter design and post-processing of traditional trackers, making the extraction of target features more efficient.

[0005] Technical solution: To solve the above technical problems, the technical solution adopted by the present invention is:

[0006] In a first aspect, a single target tracking method is provided, comprising:

[0007] Get video data;

[0008] Determine the target area of ​​the first frame of the video data, extract features of the target area through the transformer backbone network, and encode the target area through the transformer encoder to obtain the feature encoding of the target area;

[0009] Generate M target prior frames using a Gaussian function according to the target area of ​​the first frame of the video data, where M is an integer greater than 3;

[0010] Determine a search area according to a target area of ​​a first frame of video data;

[0011] Perform transformer backbone network feature extraction and transformer encoder encoding on the search area to obtain the search area feature encoding;

[0012] The target region feature code, search region feature code and M target prior boxes are input into the transformer decoder for decoding, and the intersection over union (IoU) values ​​between the output M target prediction boxes and the labeled boxes are obtained;

[0013] IoU loss optimizes network parameters and uses the gradient descent method to iteratively optimize the target prediction box N times to obtain the optimized prediction box;

[0014] Select the optimized prediction box with the top three IoU values ​​after optimization and take the average as the final target tracking box.

[0015] In some embodiments, determining the target area of ​​the first frame of video data includes:

[0016] In the first frame of the video data, the target is marked by a rectangular frame, and the target area includes a target position and a size, which are determined by the rectangular frame position and the size, respectively.

[0017] In some embodiments, determining the search area according to the target area of ​​the first frame of the video data includes:

[0018]

[0019] Among them, crop_sz represents the size of the search area cropped in the current frame, w represents the width of the target box in the previous frame, h represents the height of the target box in the previous frame, and s represents the search factor.

[0020] In some embodiments, Figure 2 and Figure 3 As shown, the target area feature code, the search area feature code and the M target prior boxes are input into the transformer decoder for decoding, and the intersection over union (IoU) values ​​between the output M target prediction boxes and the labeled boxes are obtained, including: concatenating the target area feature code and the search area feature code in the channel dimension to obtain a feature map, obtaining M target prediction boxes according to the feature map and the M target prior boxes, and then obtaining the IoU values ​​between the M target prediction boxes and the labeled boxes through a feedforward neural network (FFN).

[0021] In some embodiments, the IoU loss optimizes network parameters and uses a gradient descent method to perform N iterative optimizations on the target prediction box, including:

[0022]

[0023] Among them, A is the prediction box and B is the annotation box.

[0024] In some embodiments, M is 100.

[0025] In a second aspect, the present invention provides a single target tracking device, including a processor and a storage medium;

[0026] The storage medium is used to store instructions;

[0027] The processor is used to operate according to the instructions to execute the steps of the method according to the first aspect.

[0028] In a third aspect, the present invention provides a storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the method described in the first aspect.

[0029] Beneficial effect: Compared with other transformer-based target tracking algorithms, the single target tracking method and system provided by the present invention adds 100 target prior frames based on the target position of the previous frame when the template and the search image are sent to the transformer decoder together. This is proposed considering that the state change of the target between each frame in the target tracking task is not very large. Therefore, the 100 target prior frames are equivalent to providing the network with a priori information of the target position, thereby improving the accuracy while also ensuring the speed. Effectively utilize the template frame information to give the model appropriate prior information to ensure tracking performance. In addition, it can not only effectively avoid the situation in which the traditional anchor frame-based method needs to carefully design the anchor frame, but also eliminate the cumbersome post-processing steps in most target tracking algorithms, improving the tracking accuracy of the model while also meeting the real-time performance. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] Figure 1 is a flow chart of a single target tracking method according to an embodiment of the present invention;

[0031] Figure 2 and Figure 3 FIG. 4 is a network diagram of a single target tracking system according to an embodiment of the present invention. DETAILED DESCRIPTION

[0032] The present invention will be further described below in conjunction with the accompanying drawings and embodiments. The following embodiments are only used to more clearly illustrate the technical solution of the present invention, and cannot be used to limit the protection scope of the present invention.

[0033] In the description of the present invention, "several" means more than one, "many" means more than two, "greater than", "less than", "exceed", etc. are understood to exclude the number itself, and "above", "below", "within", etc. are understood to include the number itself. If there is a description of "first" or "second", it is only used for the purpose of distinguishing the technical features, and cannot be understood as indicating or implying the relative importance or implicitly indicating the number of the indicated technical features or implicitly indicating the order of the indicated technical features.

[0034] In the description of the present invention, the description with reference to the terms "one embodiment", "some embodiments", "illustrative embodiments", "examples", "specific examples", 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 may be combined in any one or more embodiments or examples in a suitable manner.

[0035] Example 1

[0036] A single target tracking method, comprising:

[0037] Get video data;

[0038] Determine the target area of ​​the first frame of the video data, extract features of the target area through the transformer backbone network, and encode the target area through the transformer encoder to obtain the feature encoding of the target area;

[0039] Generate M target prior frames using a Gaussian function according to the target area of ​​the first frame of the video data, where M is an integer greater than 3;

[0040] Determine a search area according to a target area of ​​a first frame of video data;

[0041] Perform feature extraction and transformer encoder encoding on the search area using the transformer backbone network to obtain the search area feature encoding;

[0042] The target region feature code, search region feature code and M target prior boxes are input into the transformer decoder for decoding, and the intersection over union (IoU) values ​​between the output M target prediction boxes and the labeled boxes are obtained;

[0043] IoU loss optimizes network parameters and uses the gradient descent method to iteratively optimize the target prediction box N times to obtain the optimized prediction box;

[0044] Select the average of the top three optimized prediction boxes with the IoU value calculated by the network forward as the final target tracking box.

[0045] In some embodiments, determining the target area of ​​the first frame of video data includes:

[0046] In the first frame of the video data, the target is marked by a rectangular frame, and the target area includes a target position and a size, which are determined by the rectangular frame position and the size, respectively.

[0047] The initial frame image needs to pass through the position encoding (Position Embedding) module while passing through the backbone network to save the relative or absolute position of a single pixel in the sequence. The position calculation formula is as follows:

[0048] PE (pos,2i) =sin(pos / 10000 2i / d )

[0049] PE (pos,2i+1 )=cos(pos / 10000 2i / d )

[0050] The transformer encoder structure specifically includes six identical encoders. Each encoder consists of Multi-Head Self-Attention, Norm layer and Feed-Forward Network. The structural formulas are as follows: Self-Attention formula:

[0051]

[0052] Multi-Head Self-Attention:

[0053] MultiHead(Q,K,V)=Concat(head1,...,head h )W

[0054] Among them, head refers to the result of each Self-Attention, h refers to the number of heads, and W is the weighted matrix.

[0055] Feed-Forward Network:

[0056] FFW(x)=max(0,xW1+b1)W2+b2.

[0057] In some embodiments, M target prior frames are generated using a Gaussian function according to the target area of ​​the first frame of the video data, including: the Gaussian function used is as follows:

[0058]

[0059] Wherein, μ=0, σ is 0.05 and 0.5 respectively. In some specific embodiments, M is 100. 100 target prior frames are generated relative to the target frame of the previous frame.

[0060] In some embodiments, determining the search area according to the target area of ​​the first frame of the video data includes:

[0061]

[0062] Among them, crop_sz represents the size of the search area cropped in the current frame, w represents the width of the target box in the previous frame, h represents the height of the target box in the previous frame, and s represents the search factor.

[0063] Furthermore, in some embodiments, after determining the search area, the image is set to a fixed size of 320*320 using a function in pytorch; and then sent to the transformer backbone network for feature extraction.

[0064] In some embodiments, the target area feature code, the search area feature code and M predicted target prior boxes are input into a transformer decoder for decoding to obtain the intersection over union (IoU) values ​​between the output M predicted target boxes and the labeled boxes, including: concatenating the target area feature code and the search area feature code in the channel dimension to obtain a feature map, obtaining M target prediction boxes according to the feature map and the M target prior boxes, and then obtaining the IoU values ​​between the M target prediction boxes and the labeled boxes through a feedforward neural network (FFN).

[0065] In some embodiments, the IoU loss optimizes network parameters and uses a gradient descent method to perform N iterative optimizations on the target prediction box, including:

[0066]

[0067] Among them, A is the prediction box and B is the annotation box.

[0068] The target prediction box is optimized by N iterations using the gradient descent method. In some embodiments, N is 10. The specific process is as follows:

[0069] Step 1: IoU loss optimizes the network parameter θ0 and sets the step size α = 1;

[0070] Step 2: The M target prediction boxes are recorded as The IoU loss between the standard boxes is obtained through the feedforward neural network and is recorded as L IoU ;

[0071] Step 3: Calculation

[0072] Step 4: Update M target prediction boxes.

[0073] Step 5: Iterate N times to get

[0074] This optimization process only iteratively optimizes the target prediction box and does not update the network parameters.

[0075] Finally, the top three optimized prediction boxes with the highest IoU value after N optimizations are selected and averaged as the final prediction box A. final , for target tracking.

[0076] Example 2

[0077] In a second aspect, the present embodiment provides a single target tracking device, including a processor and a storage medium;

[0078] The storage medium is used to store instructions;

[0079] The processor is used to operate according to the instructions to execute the steps of the method according to embodiment 1.

[0080] Example 3

[0081] In a third aspect, this embodiment provides a storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the method described in Example 1 are implemented.

[0082] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0083] 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.

[0084] 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 including 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.

[0085] 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.

[0086] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A single target tracking method, It is characterized in that include: Get video data; Determine the target area of ​​the first frame of the video data, extract features of the target area through the transformer backbone network, and encode the target area through the transformer encoder to obtain the feature encoding of the target area; Generate M target prior frames using a Gaussian function according to the target area of ​​the first frame of the video data, where M is an integer greater than 3; Determining a search area according to a target area of ​​a first frame of video data includes: Among them, represents the size of the search area cropped in the current frame, represents the width of the target box in the previous frame, represents the height of the target box in the previous frame, and represents the search factor; Perform transformer backbone network feature extraction and transformer encoder encoding on the search area to obtain the search area feature encoding; The target region feature code, search region feature code and M target prior boxes are input into the transformer decoder for decoding, and the intersection over union (IoU) values ​​between the output M target prediction boxes and the labeled boxes are obtained; IoU loss optimizes network parameters and uses the gradient descent method to iteratively optimize the target prediction box N times to obtain the optimized prediction box; Select the optimized prediction box with the top three IoU values ​​after optimization and take the average as the final target tracking box.

2. The single target tracking method according to claim 1, It is characterized in that The step of determining the target area of ​​the first frame of the video data includes: In the first frame of the video data, the target is marked by a rectangular frame, and the target area includes a target position and a size, which are determined by the rectangular frame position and the size, respectively.

3. The single target tracking method according to claim 1, It is characterized in that The target area feature code, the search area feature code and the M target prior boxes are input into the transformer decoder for decoding to obtain the IoU values ​​between the output M target prediction boxes and the labeled boxes, including: concatenating the target area feature code and the search area feature code in the channel dimension to obtain a feature map, obtaining M target prediction boxes according to the feature map and the M target prior boxes, and then obtaining the IoU values ​​between the M target prediction boxes and the labeled boxes through a feedforward neural network.

4. The single target tracking method according to claim 1, It is characterized in that IoU loss optimizes network parameters and uses the gradient descent method to iterate and optimize the target prediction box N times, including: Among them, A is the prediction box and B is the annotation box.

5. The single target tracking method according to claim 4, It is characterized in that M is 100.

6. A single target tracking device, It is characterized in that include: including processor and storage medium; The storage medium is used to store instructions; The processor is configured to operate according to the instructions to execute the steps of the method according to any one of claims 1 to 5.

7. A storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Target tracking method based on cascade regression and twin network

    CN111192291A

  • Visual target tracking method and apparatus based on deep adversarial training

    US20200327680A1