A target tracking method based on online template updating based on quality and similarity evaluation
Through the online template update method based on quality and similarity evaluation and the fusion of atrous convolution features with different step lengths and aspect ratios, the accuracy and robustness problems of target tracking in complex scenes are solved, the speed and adaptability are improved, and the Information loss and template pool pollution are eliminated.
Patent Information
- Application Number
- CN202111476809.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-06
- Publication Date
- 2024-09-10
- Estimated Expiration
- 2041-12-06
AI Technical Summary
Existing target tracking technology is difficult to maintain tracking accuracy and robustness when dealing with drastic changes in target form, occlusion, and interference from similar objects, and the template update scheme based on the Siamese network results in a large number of parameters, reduced speed, and pollution of the template pool.
An online template update method based on quality and similarity evaluation is used to generate multiple incremental templates through data augmentation, perform feature extraction and convolution response, evaluate the quality and similarity of new templates, fuse templates in the template pool, and use asynchronous Length and aspect ratio atrous convolution for feature fusion.
It improves the speed and robustness of target tracking, reduces template pool pollution, enhances the accuracy and adaptability of the model, avoids information loss, and is suitable for real-time target tracking tasks in complex scenes.
Smart Images

Figure CN114372997B
Abstract
Description
Technical Field
[0001] The invention relates to video image processing technology, in particular to a target tracking method based on quality and similarity evaluation online template update. Background Art
[0002] At present, the application scope of artificial intelligence technology is becoming wider and wider, and it has attracted wide attention from all walks of life. As one of the most important branches of artificial intelligence technology, target tracking has also developed very rapidly. The main task of target tracking is to detect the initial position and size of the target position and lock the target so that it does not lose in the field of vision. With the continuous development of the field of computer vision, higher requirements are put forward for video processing technology, and target tracking technology is also highly valued. Target tracking has broad application prospects.
[0003] Target tracking refers to locating the position and size of the target in the subsequent frames given the position and size of the target in the first frame. With the continuous improvement of the algorithm, the performance of target tracking has been greatly improved. However, target tracking has also been subject to some challenges, such as drastic changes in target shape, motion blur, interference from similar objects, occlusion, etc. These challenges make the tracked target prone to drift, resulting in tracking failure.
[0004] Target tracking is mainly evaluated by indicators such as accuracy, robustness, average overlap rate, and speed. Accuracy refers to the degree of overlap between the predicted target frame and the real target frame. If the overlap is higher, the accuracy is better and the performance of the tracker is better. Conversely, the performance of the tracker is worse. Robustness refers to the ability to recover after a tracking result fails. It can also be said to be able to recognize unfamiliar sequence image targets. The lower the robustness value, the better the tracker's adaptability and the better the performance. Real-time performance refers to the minimum rate at which the tracker needs to play the video without pauses. The rate must reach at least 24FPS to be considered real-time.
[0005] Target tracking is essentially a continuous image target detector. The result of the previous frame affects the result of the next frame. The tracker is mainly divided into three steps: extracting features, matching target features, and determining the target position and size. Feature extraction is to process the target. The original image cannot be directly applied and matched without preprocessing, so the original image needs to be cropped and modeled to obtain some features of the target. These features are the basis for determining the target; matching target features is to compare the features extracted from the target with the features of the current frame, and find the area that meets the characteristics of the target. As long as the difference between the features of this area and the target features is the smallest, it is generally considered that this area is the tracking target we are looking for; determining the target position and size is to match the target area features, including the size and position of the target, which is the result of the tracker output. The current tracking algorithms are mainly divided into two categories: traditional target tracking algorithms and tracking algorithms based on deep learning. Traditional target tracking algorithms usually use generative models, and representative ones are Kalman filters and particle filters, which are tracking algorithms based on correlation filters. Deep learning tracking algorithms are mainly discriminant, which has high accuracy and strong robustness.
[0006] Traditional target tracking algorithms run fast, require less data, and are suitable for simple application scenarios, but have poor accuracy and robustness and cannot adapt to complex scenarios. Tracking algorithms based on deep learning have high accuracy and strong adaptability, and can handle tracking tasks in complex scenarios, but they require a lot of data, have large models, and run slowly. Currently, for twin network target tracking based on deep learning, the target is tracked over time, and the initial template alone cannot solve the problems of drastic deformation, occlusion, and similarity interference of the target during the tracking process. Therefore, the target template needs to be updated to adapt to challenges such as deformation and occlusion of the target.
[0007] The processing flow of a target tracking system solution based on a twin network updating template in the prior art is as follows: Figure 1 As shown, the specific steps include:
[0008] 1. Read the image frame by frame and perform preprocessing. Given the position and size of the target in the first frame, define the processed and cropped image as the template frame;
[0009] 2. Extract features from the template frame and search frame and perform cross-correlation operations to obtain the score map and regression map.
[0010] 3. Select the value with the largest score as the new position and size of the target;
[0011] 4. Take the current frame as a new template and store it in a fixed-size template pool. Then assign the weight of each template according to a convolution layer, and then cascade to form a new template.
[0012] 5. Display the tracking results of the current frame;
[0013] 6. Repeat steps 2 to 5 until the entire video sequence has been input;
[0014] The disadvantages of the target tracking system solution based on twin network in the above prior art are:
[0015] 1. The deep learning model is relatively large and has many parameters. The above update scheme requires updating every frame, which increases the number of parameters. The tracking speed will inevitably decrease. In addition, after a long period of accumulation, the weight of the initial template frame template will continue to decrease. In this way, when the target is lost, it will be difficult to find the target in subsequent frames because the initial template frame is definitely reliable.
[0016] 2. The above update scheme solves the problem of model degradation to a certain extent, but does not take into account the reliability of the templates added to the template pool. When unreliable templates are added to the template pool, the template pool will be contaminated, and it will be more difficult to locate the target in subsequent frames. The new template obtained is unreliable, and errors continue to accumulate in this process, making it easier to lose the target when locating it.
[0017] A target tracking process based on twin network feature fusion in the prior art is as follows: Figure 2 As shown in the figure, it mainly uses two layers of dilated convolution to expand the receptive field, thereby obtaining more multi-scale information.
[0018] The disadvantages of a target tracking process based on twin network feature fusion in the prior art are:
[0019] 1. While obtaining a larger receptive field through two layers of dilated convolution, some information will be lost. This part of information exists in the form of dilated points. It is inevitable that information will be lost when fusing features in this way.
[0020] 2. The above process is through the dilated convolution with the same aspect ratio. Such an aspect ratio of 1:1 makes the hole point always exist. No matter how many layers of dilated convolution are performed, the lost information cannot be obtained. Summary of the invention
[0021] The technical problem to be solved by the present invention is to provide a target tracking method based on online template updating based on quality and similarity evaluation, so as to overcome the problems of existing template updating and feature fusion.
[0022] In order to solve the above technical problems, the technical solution adopted by the present invention is: a target tracking method based on online template update of quality and similarity evaluation, comprising the following steps:
[0023] S1. Augment the initial template frame to generate N incremental templates Establish a template pool of size M;
[0024] S2, extract features from the template frame and search frame through the target tracking module, and then convolve the response to obtain the response score map, and evaluate the current new template according to the quality evaluation index. Conduct quality assessments;
[0025] S3. Templates that have passed quality assessment using cosine similarity The similarity between the new template and the template in the template pool is used to determine whether the new template needs to be added to the template pool;
[0026] S4. Through the different weights of the templates, the templates in the template pool are fused to obtain t i The ultimate template for moments;
[0027] S5. The feature map obtained by feature extraction of the template frame and the search frame is convolved with the hole convolution layer with different step lengths and aspect ratios and then feature fusion is performed.
[0028] A further improvement of the technical solution of the present invention is that: in the step S1, the video image at the initial time t0 is augmented with data by the target tracking module, and the given target is rotated, translated, scaled, and reversed according to the target tracking task to obtain templates of different target postures, and then the templates are stored in a template pool of size M.
[0029] A further improvement of the technical solution of the present invention is that in step S2, based on the provided image data, the backbone network of the target tracking module is used to extract features of the template frame and the search frame respectively, and the feature maps obtained are convolved to obtain a classification map and a regression map, and then quality assessment is performed through the classification score map.
[0030] The further improvement of the technical solution of the present invention is: the quality evaluation index calculation formula is:
[0031]
[0032]
[0033] Among them, A represents the quality evaluation value, α1 represents the weight parameter of the maximum score fluctuation degree, α2 represents the weight parameter of the multi-peak detection value fluctuation degree, and F max Indicates the maximum value of the current classification score, It indicates the degree of score fluctuation, mean(F max ) represents the mean of the maximum classification scores of historical frames, mean(APCE) represents the peak energy of historical frames, and APCE represents the current average peak correlation energy; F min Indicates the minimum classification score of the current frame, Fi Represents each score value of the classification score.
[0034] A further improvement of the technical solution of the present invention is that: in step S3, the current template The cosine similarity is compared with each template in the template pool, and the calculation formula is:
[0035]
[0036] in Represents the new template of the current frame, T i Represents the template in the template pool, S represents the set of cosine similarity metrics, COS represents cosine similarity, and i represents the template subscript in the template pool.
[0037] A further improvement of the technical solution of the present invention is that the templates in the template pool in step S4 all have different weights. Except for the initial template, the weights of other templates are assigned according to the distance of the current frame template. The specific weight assignment formula is as follows:
[0038]
[0039] Among them, Tgt n Represents the weight of each template in the template pool, N represents the number of templates stored in the template pool, β represents the weight of the initial template, represents the normalization of subsequent template weights;
[0040] The final output template is as follows:
[0041]
[0042] Where T new Represents the final matching template, n∈[1,N], Represented as a history frame.
[0043] A further improvement of the technical solution of the present invention is that in step S6, the atrous convolution layer is four 3x3 convolutions, and their expansion rates are (m,n)∈{(1,1), (1,2), (2,1), (2,2)}, respectively. The feature fusion process can be as follows:
[0044]
[0045] where f T represents the template frame, f S Indicates the search frame. represents a single dilated convolution and * represents cross-correlation.
[0046] Due to the adoption of the above technical solution, the technical progress achieved by the present invention is:
[0047] 1. The present invention performs data augmentation through the initial template frame, establishes a template pool of fixed size to store updated templates, and performs correlation fusion after the template frame and the search frame are subjected to hole convolution with different step lengths and aspect ratios, so as to obtain a classification score map and a regression map, performs multi-peak detection calculation according to the classification score, judges the reliability of the new template, and then compares the new template with the template in the template pool for similarity, so as to judge the necessity of updating the new template. By using these two indicators to judge whether the new template should be added to the template pool, it can avoid updating every frame and speed up the speed, and also ensure the reliability of the template in the template pool. The present invention can be applied to certain specific target real-time tracking tasks under natural conditions, such as video surveillance, unmanned driving, etc.
[0048] 2. The template updating method proposed in the present invention takes into account the reliability of the new template, reduces the pollution of the template pool, improves the robustness of the model, and also takes into account the necessity of template updating, reduces information redundancy, and improves the accuracy of the model. In addition, a dilated convolution feature fusion method with different step lengths and aspect ratios is proposed, which will not reduce information while obtaining a larger field of view and better perform multi-scale estimation of the target. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] Figure 1 A processing schematic diagram of a target tracking system solution based on a twin network updating template in the prior art;
[0050] Figure 2 It is a schematic diagram of a target tracking process based on twin network feature fusion in the prior art;
[0051] Figure 3 A process flow chart of target tracking based on quality and similarity evaluation online template update proposed in an embodiment of the present invention;
[0052] Figure 4 A schematic diagram of a dilated convolution provided in an embodiment of the present invention;
[0053] Figure 5 A schematic diagram of a processing process of a template update strategy provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0054] The present invention is further described in detail below in conjunction with embodiments:
[0055] like Figure 3 As shown, the present invention provides a target tracking method based on quality and similarity evaluation online template update, comprising the following steps:
[0056] S1. Augment the initial template frame to generate N incremental templates Create a template pool of size M as follows:
[0057] Current hardware can use GPU (graphics processing unit) for accelerated computing. The present invention uses computer hardware devices such as GPU to process images, performs data augmentation on the video image at the initial time t0 through the target tracking module, rotates, translates, scales, and inverts the given target according to the target tracking task, obtains templates of different target postures, and then stores the templates in a template pool of size M.
[0058] S2, extract features from the template frame and search frame through the target tracking module, and then convolve the response to obtain the response score map, and evaluate the current new template according to the quality evaluation index. Conduct a quality assessment as follows:
[0059] According to the provided image data, the template frame and the search frame are input into the twin network. The twin network has the characteristic of shared weights, which can reduce a lot of parameters to speed up the calculation. The backbone network of the target tracking module is used to extract features from the template frame and the search frame respectively. The feature maps obtained are convolved to obtain classification maps and regression maps, and then the quality is evaluated through the classification score map.
[0060] The present invention is described by the following specific embodiments:
[0061] S21. Image feature extraction:
[0062] At the initial moment, i.e., t=0, in the tracking task, the position information and scale information of the target are given. The template frame at this initial moment has generated N incremental templates through step S1. At this time, the information of the incremental templates is obtained through the initial template frame, and there is no information of subsequent frames. The new template T obtained by fusion in the template pool can be new Considered as the initial template frame
[0063] At the initial moment, i.e., t=0, the initial template frame (size is 127×127×3) and the search frame (size is 303×303×3), 3 means that they both have 3 color channels. After extraction by the backbone network, the feature matrices of 7×7×256 and 31×31×256 are obtained respectively. This backbone network consists of five convolutional layers and two pooling layers. The convolution kernel size of the first layer is 11×11 and the step size is 2; the second layer is the pooling layer, the size is 3×3, and the step size is 2; the third layer is the convolution layer, the convolution kernel size is 5×5, and the step size is 1; the fourth layer is the pooling layer, the size is 3×3, and the step size is 2; the fifth layer is the convolution layer, the convolution kernel size is 3×3, and the step size is 1; the sixth layer is the convolution layer, the convolution kernel size is 3×3, and the step size is 1, and the seventh layer is the convolution layer, the convolution kernel size is 3×3, and the step size is 1.
[0064] S22. Feature Fusion:
[0065] After the initial frame template is extracted by the above backbone network, a 7×7×256 feature matrix is obtained. Similarly, a 31×31×256 feature matrix is obtained for the search frame. Then, they are respectively passed through four layers of dilated convolutional layers. The specific process is as follows: the 7x7x256 feature matrix of the initial frame template is input into the first dilated convolutional layer, the convolution kernel is 3×3, and the dilation rate is (1, 1), which can be regarded as a 3×3 ordinary convolutional kernel. Similarly, the 31×31×256 feature matrix of the search frame is also input into the first dilated convolutional layer, with the same parameters as above. The feature maps obtained by each of them are related to each other to obtain a feature map of size 25×25×256; the 7×7×256 feature matrix of the initial frame template is input into the second dilated convolutional layer, the convolution kernel is 3×3, and the dilation rate is (1, 2). The search frame 31×31×256 feature matrix is processed in the same way, and the feature maps obtained from each of them are correlated to obtain a feature map of size 25×25×256; the initial frame template 7×7×256 feature matrix is input into the third layer of hole convolution layer, the convolution kernel is 3×3, and the expansion rate is (2, 1), and the search frame 31×31×256 feature matrix is processed in the same way, and the feature maps obtained from each of them are correlated to obtain a feature map of size 25×25×256; the initial frame template 7×7×256 feature matrix is input into the fourth layer of hole convolution layer, the convolution kernel is 3×3, and the expansion rate is (2, 2), and the search frame 31×31×256 feature matrix is processed in the same way, and the feature maps obtained from each of them are correlated to obtain a feature map of size 25×25×256. From the above process, we can see that the template frame and the search frame are subjected to four dilated convolutions respectively, and finally the 25×25×256 feature maps obtained by the four related operations are fused with equal weights. The advantage of this dilated convolution feature fusion is that it increases the receptive field without losing more information. The obtained multi-scale information plays a role in estimating the target scale and improves the accuracy of the tracker.
[0066] S23. Obtain classification branch and regression branch:
[0067] The obtained 25×25×256 feature map is convolved three times for channel compression to obtain the classification branch, quality assessment branch, and regression branch. The obtained classification branch feature map is 19×19×1, the quality assessment branch feature map is 19×19×1, and the regression branch feature map is 19×19×4. The classification branch feature map represents the equal score of each sample. The quality assessment branch feature map gives a higher weight to the important part of the score in the classification branch. The regression branch estimates the distance t=(l, t, r, b) from the target center to the target bounding box. These four values are the distances from the target center to the left border, upper border, right border, and lower border, respectively.
[0068] S24, according to the template The classification branch feature graph provided by the tracking results is used for quality assessment through the classification score graph. Quality assessment ensures the reliability of the template: Quality assessment indicator calculation formula:
[0069]
[0070]
[0071] Among them, A represents the quality evaluation value, α1 represents the weight parameter of the maximum score fluctuation degree, α2 represents the weight parameter of the multi-peak detection value fluctuation degree, and F max Indicates the maximum value of the current classification score, It indicates the degree of score fluctuation, mean(F max ) represents the mean of the maximum classification scores of historical frames, mean(APCE) represents the peak energy of historical frames, and APCE represents the current average peak correlation energy; F min Indicates the minimum classification score of the current frame, F i Represents each score value of the classification score.
[0072] After many experiments, this paper takes α1=1, α2=2, and the threshold of A is set to 1.8. If A is less than 1.8, it is considered that the current template quality is poor and the current template will not be added to the template pool for tracking the next frame.
[0073] S3. Templates that have passed quality assessment using cosine similarity The similarity between the templates in the template pool and the similarity evaluation detects the necessity of template update and determines whether the new template needs to be added to the template pool. Figure 5 As shown; through the current template The cosine similarity is compared with each template in the template pool, and the calculation formula is:
[0074]
[0075] in Represents the new template of the current frame, T i Represents the template in the template pool, S represents the set of cosine similarity metrics, COS represents cosine similarity, and i represents the template index in the template pool. After many experiments, S is set to 0.15.
[0076] S4. Through the different weights of the templates, the templates in the template pool are fused to obtain t iThe final template at the moment; the templates in the template pool have different weights. Except for the initial template, the weights of other templates are assigned according to the distance of the current frame template. This way of assigning template weights can not only retain the features of the initial template to the greatest extent, but also add the latest information of the target. The specific weight assignment formula is as follows:
[0077]
[0078] Among them, Tgt n Represents the weight of each template in the template pool, N represents the number of templates stored in the template pool, β represents the weight of the initial template, represents the normalization of subsequent template weights;
[0079] The final output template is as follows:
[0080]
[0081] Where T new Represents the final matching template, n∈[1,N], Represented as historical frames. After many experiments, the β value is set to 0.5.
[0082] S5. The feature map obtained by feature extraction of the template frame and the search frame is convolved with the hole convolution layer with different step lengths and aspect ratios and then feature fusion is performed.
[0083] A schematic diagram of a dilated convolution provided in an embodiment of the present invention is shown in Figure 4 As shown in the figure, the template frame and the search frame are prone to lack of information in the process of extracting features. Before correlating the template frame and the search frame, the dilated convolution layer is used to correlate them first. The dilated convolutions of different step lengths and aspect ratios expand the receptive field and obtain more scale information without losing other information. The dilated convolution layer is four 3x3 convolutions, and their expansion rates are (m,n)∈{(1,1),(1,2),(2,1),(2,2)}. The feature fusion process can be as follows:
[0084]
[0085] where f T represents the template frame, f S Indicates the search frame. represents a single dilated convolution and * represents cross-correlation.
[0086] The present invention performs data augmentation through an initial template frame, establishes a template pool of a fixed size to store updated templates, and performs correlation fusion after the template frame and the search frame are respectively subjected to hole convolution with different step lengths and aspect ratios to obtain a classification score map and a regression map. Multi-peak detection calculation is performed according to the classification score to judge the reliability of the new template, and then the new template is compared with the templates in the template pool for similarity, so that the necessity of updating the new template can be judged. Whether the new template should be added to the template pool can be judged based on these two indicators, which can avoid updating every frame and speed up the speed, and also ensure the reliability of the template in the template pool. The present invention can be applied to real-time tracking tasks of certain specific targets under natural conditions, such as video surveillance, unmanned driving, etc.
[0087] The template updating method proposed in the present invention takes into account the reliability of the new template, reduces the pollution problem of the template pool, improves the robustness of the model, and also takes into account the necessity of template updating, reduces information redundancy, and improves the accuracy of the template. In addition, a method for fusing atrous convolution features with different step lengths and aspect ratios is proposed, which will not reduce information while obtaining a larger field of view and better perform multi-scale target operations.
Claims
1. A target tracking method based on online template updating based on quality and similarity evaluation, characterized by: The steps include: S1. Augment the initial template frame to generate N incremental templates Establish a template pool of size M; S2, extract features from the template frame and search frame through the target tracking module, and then convolve the response to obtain the response score map, and evaluate the current new template according to the quality evaluation index. Conduct quality assessments; S3. Templates that have passed quality assessment using cosine similarity The similarity between the new template and the template in the template pool is used to determine whether the new template needs to be added to the template pool; Through the current template The cosine similarity is compared with each template in the template pool, and the calculation formula is: in Represents the new template of the current frame, T i Represents the template in the template pool, S represents the set of cosine similarity metrics, COS represents cosine similarity, and i represents the template subscript in the template pool; S4. Through the different weights of the templates, the templates in the template pool are fused to obtain t i The ultimate template for moments; The templates in the template pool have different weights. Except for the initial template, other templates are assigned weights based on the distance of the current frame template. The specific weight allocation formula is as follows: Among them, Tgt n represents the weight of each template in the template pool, N represents the number of templates stored in the template pool, β represents the weight of the initial template, represents the normalization of subsequent template weights; The final output template is as follows: Where T new Represents the final matching template, n∈[1,N], Represented as a historical frame; S5. The feature map obtained by feature extraction of the template frame and the search frame is convolved with the hole convolution layer with different step lengths and aspect ratios and then feature fusion is performed.
2. The target tracking method based on online template updating based on quality and similarity evaluation according to claim 1, characterized in that: In step S1, the target tracking module performs data augmentation on the video image at the initial time t0, rotates, translates, scales, and inverts the given target according to the target tracking task, obtains templates of different target postures, and then stores the templates in a template pool of size M.
3. The target tracking method based on online template updating based on quality and similarity evaluation according to claim 2 is characterized in that: In step S2, based on the provided image data, the backbone network of the target tracking module is used to extract features from the template frame and the search frame respectively, and the obtained feature maps are convolved to obtain a classification map and a regression map, and then the quality is evaluated through the classification score map.
4. The target tracking method based on online template updating based on quality and similarity evaluation according to claim 3 is characterized by: Quality assessment index calculation formula: Among them, A represents the quality evaluation value, α1 represents the weight parameter of the maximum score fluctuation degree, α2 represents the weight parameter of the multi-peak detection value fluctuation degree, and F max Indicates the maximum value of the current classification score, It indicates the degree of score fluctuation, mean(F max ) represents the mean of the maximum classification scores of historical frames, mean(APCE) represents the peak energy of historical frames, and APCE represents the current average peak correlation energy; F min Indicates the minimum classification score of the current frame, F i Represents each score value of the classification score.
5. The target tracking method based on online template updating based on quality and similarity evaluation according to claim 1, characterized in that: In step S6, the atrous convolution layers are four 3x3 convolutions, and their expansion rates are (m,n)∈{(1,1),(1,2),(2,1),(2,2)}, respectively. The feature fusion process can be as follows: where f T represents the template frame, f S Indicates the search frame. represents a single dilated convolution and * represents cross-correlation.
