Template updating target tracking algorithm based on multi-layer features of fully convolutional twin networks

Through the template update algorithm of multi-layer features of the fully convolutional twin network, combined with mutual information judgment and 3D convolution module, the problem of poor object appearance deformation robustness and template pollution in target tracking is solved, and the performance and accuracy of the tracking algorithm are improved. .

CN114581486BActive Publication Date: 2024-10-29XIAN UNIV OF TECH
View PDF 1 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Existing target tracking algorithms based on twin neural networks are less robust to deformation outside objects and template updates can easily lead to template contamination.

Method used

The template update target tracking algorithm uses multi-layer features of the fully convolutional twin network. Through end-to-end training of the overall network structure, combined with standard mutual information template update condition judgment and 3D convolution update module, different layer features and historical tracking results are integrated. , to update the template.

Benefits of technology

The robustness and accuracy of the target tracking algorithm are improved, template pollution is reduced, and the adaptability to target appearance deformation is enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114581486B_ABST
    Figure CN114581486B_ABST
Patent Text Reader

Abstract

The present invention discloses a template updating target tracking algorithm based on multi-layer features of a fully convolutional twin network, which is specifically as follows: constructing an overall network and training it; using the trained network to initialize tracking settings for a video image sequence to be tracked, and obtaining an initial target template and initial position information of the target; entering a normal tracking process, and obtaining a tracking result response diagram of the current frame; using a template updating condition judgment method based on standard mutual information to determine whether the current tracking result is reliable, if it is reliable, updating the template, if it is unreliable, not updating the template, if two reliable tracking results are retained, replacing the oldest result with the latest result, and using the latest template to continue normal tracking of subsequent video image sequences of the currently tracked video frame; repeating steps 3 to 5 until all video image sequences are tracked, thereby obtaining the position of the target in each frame of the video, and the tracking task is completed.
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 of videos, and relates to a template updating target tracking algorithm based on multi-layer features of a fully convolutional twin network. Background Art

[0002] Object tracking is an important topic in the field of computer vision. It has extremely far-reaching research significance and is widely used in intelligent video surveillance, unmanned driving, human-computer interaction and other fields.

[0003] The single target tracking task refers to the process of locating the position of the target in the subsequent frames according to the target tracking algorithm, given the size and position information of the target in the first frame of the video. With the maturity of deep learning technology, researchers have begun to apply it to target tracking. The target tracking algorithm based on the twin neural network based on deep learning has gradually become a mainstream research direction, and its results play an important role in both scientific research and life applications.

[0004] In recent years, deep learning algorithms have developed rapidly, and the combination of deep learning and target tracking algorithms has attracted more and more attention. Among them, the algorithm based on the twin neural network structure is a mainstream direction. By using the target image given in the first frame to generate a template, the subsequent images are cross-correlated, and the position of the maximum value in the response map is mapped to the original image, which is the most likely location of the target. Usually, the target template used by the target tracking algorithm based on the twin neural network remains unchanged, and many current methods involving template updates lack a good template update judgment condition, which can easily pollute the template. On the other hand, these algorithms usually use the highest-level features extracted by the twin network, and do not give full play to the characteristics of each layer of features. Summary of the invention

[0005] The purpose of the present invention is to provide a template updating target tracking algorithm based on the multi-layer features of a fully convolutional twin network, which solves the problems of poor robustness to the deformation of the surface of the object being tracked and the problem of template contamination caused by template updating in the prior art.

[0006] The technical solution adopted by the present invention is a template updating target tracking algorithm based on multi-layer features of a fully convolutional twin network, which is specifically implemented in the following steps:

[0007] Step 1: Build the overall network and perform end-to-end training on the overall network structure;

[0008] Step 2: Use the network trained in step 1 to initialize the tracking settings for the video image sequence to be tracked, and obtain the initial target template and initial position information of the target for this tracking task;

[0009] Step 3, enter the normal tracking process, the position of a target in the image will be calculated for each frame of the video image sequence, and displayed at the corresponding position in the image to obtain the tracking result response map of the current frame;

[0010] Step 4: After obtaining the tracking result response graph of step 3, use the template update condition judgment method based on standard mutual information to determine whether the current tracking result is reliable. If it is reliable, update the template; if it is unreliable, do not update the template. If there are two reliable tracking results retained in step 3, replace the oldest result with the latest one.

[0011] Step 5, using the latest template obtained in step 4 to continue normal tracking of step 3 for the subsequent video image sequence of the currently tracked video frame;

[0012] Step 6: Repeat steps 3 to 5 until all video image sequences are tracked, thereby obtaining the position of the target in each frame of the video, and the tracking task is completed.

[0013] The present invention is also characterized in that

[0014] In step 1, the overall network structure is divided into three parts: the first part is a twin neural network for deep feature extraction, the second part is a 3D convolutional neural network for template update, that is, a 3D template update module. The first and second parts constitute a feature extraction network, and the third part contains a classification branch and a regression branch.

[0015] The twin neural network is divided into four layers: the first two layers are composed of a convolutional layer, a maximum pooling layer, and an activation function layer; the last two layers each contain a convolutional layer and an activation function layer; the 3D template update module is composed of a 3D convolutional layer.

[0016] In step 1, 10 image pairs are selected for each video, each image pair contains four video frames, the first video frame is the first frame of the video, and the following three video frames are randomly selected from the video. The distance between the second video frame and the third video frame is no more than 15 frames, and the distance between the third video frame and the fourth video frame is no more than 10 frames. The first three video frames are used as target images for synthesizing tracking templates, and the last video frame is used as a search image. In the search image processing, the three images imported into the 3D convolution update module are the same, which are all the last video frames of the image pair. Training is performed 50 times, and the loss function adopts the same Logistic loss function as the SiamFC algorithm.

[0017] In step 1, the image pairs are generated. The selected images need to be enhanced. The data enhancement is implemented according to the following steps:

[0018] Step 1.1, firstly, perform a random stretching operation on the samples selected from the training set, and set the size multiple after stretching to between 0.095 and 1.005. The part that needs to be filled after enlargement is filled using linear interpolation; then perform a CenterCrop operation, i.e., crop a 263*263 area from the center of the training image pair, and then perform a random cropping operation, crop a 255*255 area from a random position in the training image pair, and finally perform a cropping conversion, taking the BOX of the original image in the GOT-10K dataset as the target position box, which is given in the form of (left, top, weight, height), that is, the distance between the target position box and the left border and the top border of the image and the width and height of the target position box itself. The target position box coordinate form is converted into (n, m, h, w) through the cropping conversion operation, i.e., the coordinates of the center point of the target position box and the height and width of the target position box;

[0019] Step 1.2, calculate LOSS

[0020] During the training process, the loss function of the classification branch uses focal loss, and the loss function of the regression branch uses IoU loss. The calculation formula of the total loss L is:

[0021]

[0022] In formula (1), {} is an indicator function, which takes 1 if the condition in the subscript is met, otherwise it takes 0; L cls Represents the focal loss of the classification result; L quality represents the binary cross entropy loss for quality assessment; L reg represents the IoU loss of the bounding box regression result; p x,y ,q x,y ,t x,y Represent the labels of the classification branch, the quality assessment label, and the regression branch label respectively; They represent classification branch prediction results, quality assessment results, and regression branch prediction results respectively; λ is a constant;

[0023] Step 1.3, use the gradient descent method to optimize the parameters. The calculation formula of the stochastic gradient descent method SGD is as follows:

[0024] argmin θ E (z,x,y) L (y,f(z,x,θ)) (2)

[0025] In formula (2), θ is the optimal parameter; z is the input target image; x is the search image; y is the label; f(z, x; 0) is the prediction result;

[0026] After 50 rounds of training, the final total loss L of the network stabilizes below 0.1, and the training process ends.

[0027] Step 2 is implemented as follows:

[0028] Step 2.1, specify the position of the target on the first frame of the video image sequence, cut the target from the image and scale it to obtain a target image of size 127*127*3, then pass the target image into the twin neural network in the overall network to obtain four layers of features, pass the last layer of features as high-level features into the regression branch as the regression branch initial template, pass the first layer of features as low-level features into the classification branch as the classification branch initial template, the size of the regression branch initial template and the classification branch initial template are both 6*6*256, in pixels, and the calculation formulas for the regression branch initial template and the classification branch initial template are as follows:

[0029] φ z(cls) φ z(reg) =φ(z) (3)

[0030] In formula (3), z is the input target image, function φ() represents the feature extraction network, φ z(cls) represents the target template of the classification branch output by the feature extraction network, φ z(reg) The target template of the regression branch representing the output of the feature extraction network;

[0031] Step 2.2, initialize the parameters:

[0032] In the first frame of the video image sequence, the target position information given by manual calibration is called BOX. BOX has four pieces of information, namely the horizontal coordinate, vertical coordinate, width, and height of the target. Therefore, the first frame does not require tracking operation. It only needs to set the initial center coordinates and initial width and height of the target corresponding to the manually calibrated BOX to the values ​​in BOX. This completes the target initialization process and obtains the target's initial position information.

[0033] Step 3 is implemented as follows:

[0034] Step 3.1, target search

[0035] Adopting the anchor-free target search strategy, taking the target coordinates in the previous frame tracking result of the image video sequence as the center, the search area is cut out and cropped into a patch image to obtain a search image with a size of 255*255. The patch image is passed into the feature extraction network to extract the multi-layer deep features of the search area. The formula is as follows:

[0036] φ x(cls) ,φ x(reg) =φ(x) (4)

[0037] In formula (4), x is the search graph; function φ() represents the feature extraction network, φ x(cls) represents the search feature of the classification branch output by the feature extraction network, φ x(reg) The search features of the regression branch representing the output of the feature extraction network;

[0038] Step 3.2, target position prediction based on classification branch and regression branch;

[0039] Step 3.2.1, calculate the regression branch results:

[0040] For the regression branch, the target template φ is first extracted by the feature extraction network z(reg) and search feature φ x(reg) Mapped to the same feature space, the calculation formula is as follows:

[0041] g(z,x)=φ z(reg) *φ x(reg) +b (5)

[0042] In formula (5), b represents the offset;

[0043] If the point (m,n) on the feature map g(z,x) corresponds to the point on the original image The regression branch will output the GT prediction value at the point (m, n), which is represented by a 4-dimensional vector t = (l * , t * , r * , b * ), then the calculation process of each GT component is:

[0044]

[0045]

[0046] In formula (6), (x0, y0) and (x1, y1) represent the upper left and lower right corners of the ground truth (GT), respectively; s is the stride of AlexNet, s = 8; l * , t * , r* , b * Respectively represent the distance from the corresponding position of the point (m, n) on the feature map to the left, top, right, and bottom borders of GT;

[0047] Step 3.2.2, calculate the classification branch results

[0048] For the classification branch, the target template φ is first extracted by the feature extraction network z(cls) and search feature φ x(cls) Mapped to the same feature space, the calculation formula is as follows:

[0049] f(z,x)=φ z(cls) *φ x(cls) +b (7)

[0050] The point (m, n) on the obtained feature map f(z, x) is distinguished as a positive sample point and a negative sample point by searching the ground truth of the image. If the point (m, n) on the feature map f(z, x) is at the corresponding position on the patch image If it is within the ground truth, it is considered a positive sample and its classification score is recorded as 1; the rest are negative samples and their classification scores are recorded as 0;

[0051] In order to better balance the relationship between the point (m, n) and the target position, the quality score PSS is introduced * , the predicted PSS * Multiply it with the corresponding classification score to calculate the final score as the result of the classification branch. The quality score calculation formula is as follows:

[0052]

[0053] Step 3.2.3, add the result of the classification branch and the result of the regression branch to obtain the tracking result response map of the current frame.

[0054] Step 4 is implemented according to the following steps:

[0055] Step 4.1: Template update condition judgment based on mutual information

[0056] During the tracking process, the first frame of the video is used as the Template Frame, and the first frame is also used as the DetectionFrame, which is input into the network to obtain the heat map of the classification branch, recorded as X, and the heat map of the classification branch of the tth frame, recorded as Y. Then X and Y are used as two variables to calculate their mutual information values;

[0057] The mutual information calculation formula is as follows:

[0058]

[0059] In formula (9), X and Y represent the classification branch heat map of the first frame and the classification branch heat map of the t-th frame respectively, p(x) and p(y) are the marginal distributions of X and Y respectively, and p(x, y) is the joint distribution of X and Y;

[0060] The obtained mutual information value is standardized and converted as follows:

[0061]

[0062] In formula (10), H(X) and H(Y) are the entropies of X and Y respectively;

[0063] If the mutual information obtained is greater than the set threshold V threshold , the target area image of the current frame can be used for template update, otherwise the template update mechanism is not entered, and the template update process of the next frame is started directly after the template update result of the current frame is obtained;

[0064] The threshold adopts a dynamic threshold, which is set to the local maximum value. The threshold dynamic update formula is:

[0065]

[0066] In formula (11), t represents the t-th frame, I(t) represents the mutual information value between the classification branch heat map of the t-th frame and the classification branch heat map of the first frame; mean(I(t-1), I(t-2)) represents the average value of the mutual information over a period of time; it reflects that the matching degree of the t-th frame is good; I′(t)=0 and I″(t)>0 represent the local maximum point of mutual information; since the mutual information value between the classification branch heat map of each search graph and the classification branch heat map of the first frame is discrete, formula (11) can be expressed as:

[0067]

[0068] Since the mutual information value of three consecutive search frames is required, but the search frames of the first and second frames do not meet the conditions required by the formula during the search, the thresholds of the first and second frames are set separately. threshold Set to a fixed value of 0.75;

[0069] Step 4.2, template update based on 3D convolution:

[0070] The template update method conforms to the nature of the queue, first-in-first-out, that is, when a new template enters, the old template is eliminated. The templates are always maintained at three, which are recorded as the initial target template, the historical template and the current template respectively. The feature maps obtained after the three templates pass through the feature extraction network are convolved with 3*3*3 to obtain the latest fused template.

[0071] The specific process of step 5 is: after obtaining the latest template, the latest template obtained this time is used unchanged before the next template update. The specific tracking process is the same as step 3. The depth features obtained by reliable tracking results are still continuously saved during the tracking process. Once a new depth feature is obtained, the longest-standing depth feature will be deleted, and the template will be updated, and the operation will be carried out according to step 4.

[0072] The beneficial effects of the present invention are:

[0073] (1) The template updating target tracking algorithm based on the multi-layer features of the fully convolutional twin network of the present invention uses SiamFC+FPN as the backbone to obtain features of different layers, and the classification branch and the regression branch use features of different layers to finally predict the target position, giving full play to the characteristics of different layers of features extracted by the neural network, greatly improving the performance and robustness of the classification network and the regression network;

[0074] (2) The template update target tracking algorithm based on the multi-layer features of the fully convolutional twin network of the present invention uses a template update condition judgment method based on mutual information, which filters out most of the harmful template updates and effectively solves the template contamination problem caused by template updates;

[0075] (3) The present invention is based on a template-updating target tracking algorithm with multi-layer features of a fully convolutional twin network. It uses a 3D convolution update module to fuse the two most recent and most reliable tracking results retained in history and the target information manually annotated when the tracking task is started to fuse and update the template. The new template obtained in this way can capture the target's recent appearance information and have the most accurate target appearance information in the first frame, thereby improving the robustness of the template to target appearance deformation, improving the performance and tracking speed of the target tracking algorithm, and also improving the accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0076] Figure 1 It is a schematic diagram of the overall framework of the method for template updating target tracking based on multi-layer features of a fully convolutional twin network of the present invention;

[0077] Figure 2 A schematic diagram of network training for a template updating target tracking method based on multi-layer features of a fully convolutional twin network according to the present invention;

[0078] Figure 3It is a schematic diagram of the SiamFC+FPN network model of the template updating target tracking method based on the multi-layer features of the fully convolutional twin network of the present invention;

[0079] Figure 4 It is a schematic diagram of the tracking initialization phase of the template updating target tracking method based on the multi-layer features of the fully convolutional twin network of the present invention;

[0080] Figure 5 It is a schematic diagram of standard mutual information template update condition judgment of the template update target tracking method based on the multi-layer features of the fully convolutional twin network of the present invention;

[0081] Figure 6 It is a schematic diagram of template updating of the template updating target tracking method based on the multi-layer features of the fully convolutional twin network of the present invention;

[0082] Figure 7 It is a tracking accuracy curve diagram of the template updating target tracking method based on the multi-layer features of the fully convolutional twin network of the present invention;

[0083] Figure 8 This is a tracking success rate curve of the template updating target tracking method based on the multi-layer features of the fully convolutional twin network of the present invention. DETAILED DESCRIPTION

[0084] The present invention is described in detail below with reference to the accompanying drawings and specific embodiments.

[0085] The present invention provides a template updating target tracking algorithm based on multi-layer features of a fully convolutional twin network, such as Figure 1 As shown, the specific implementation steps are as follows:

[0086] Step 1: Build the overall network and perform end-to-end training on the overall network structure;

[0087] The overall network structure is divided into three parts: the first part is a twin neural network for deep feature extraction, the second part is a 3D convolutional neural network for template update, that is, a 3D template update module. The first and second parts constitute a feature extraction network, and the third part contains a classification branch and a regression branch.

[0088] The twin neural network is divided into four layers (P2, P3, P4, P5): the first two layers are composed of convolutional layers, maximum pooling layers, and activation function layers; the last two layers each contain convolutional layers and activation function layers; the 3D template update module is composed of a 3D convolutional layer; the twin neural network extracts features from the three images, and then merges the features extracted from the three images into one image through the 3D template update module, which is the tracking template; the classification branch and the regression branch are used to predict the results.

[0089] Ten image pairs are selected for each video, and each image pair contains four video frames. The first video frame is the first frame of the video, and the following three video frames are randomly selected from the video. The distance between the second video frame and the third video frame does not exceed 15 frames, and the distance between the third video frame and the fourth video frame does not exceed 10 frames. The first three video frames are used as target images for synthesizing tracking templates, and the last video frame is used as a search image. In the search image processing, the three images imported into the 3D convolution update module are the same, which are all the last video frames of the image pair. Training is performed 50 times, and the loss function uses the same Logistic loss function as the SiamFC algorithm, such as Figure 2 As shown;

[0090] To generate image pairs, you need to perform data enhancement on the selected images. Data enhancement is implemented in the following steps:

[0091] Step 1.1, firstly, perform a random stretching operation on the samples selected from the training set (GOT-10K data set), and set the size multiple after stretching to between 0.095 and 1.005. The part that needs to be filled after enlargement is filled using linear interpolation; then perform a center cropping operation, i.e., crop a region of size 263*263 from the center of the training image pair, and then perform a random cropping operation, crop a region of size 255*255 from a random position in the training image pair, and finally perform a cropping conversion, and use the BOX of the original image in the GOT-10K data set as the target position box, which is given in the form of (left, top, weight, height), that is, the distance between the target position box and the left border and the top border of the image and the width and height of the target position box itself. The target position box coordinate form is converted into (n, m, h, w) through the cropping conversion operation, i.e., the coordinates of the center point of the target position box and the height and width of the target position box;

[0092] Step 1.2, calculate LOSS

[0093] During the training process, the loss function of the classification branch uses focal loss, and the loss function of the regression branch uses IoU loss. The calculation formula of the total loss L is:

[0094]

[0095] In formula (1), {} is an indicator function, which takes 1 if the condition in the subscript is met, otherwise it takes 0; L cls Represents the focal loss of the classification result; L quality represents the binary cross entropy loss for quality assessment; L reg represents the IoU loss of the bounding box regression result; p x,y,q x,y ,t x,y Represent the labels of the classification branch, the quality assessment label, and the regression branch label respectively; They represent classification branch prediction results, quality assessment results, and regression branch prediction results respectively; λ is a constant;

[0096] Step 1.3, use the gradient descent method to optimize the parameters. The calculation formula of the stochastic gradient descent method SGD is as follows:

[0097] argmin θ E (z,x,y) L (y,f(z,x,θ)) (2)

[0098] In formula (2), θ is the optimal parameter; z is the input target image; x is the search image; y is the label; f(z, x; θ) is the prediction result;

[0099] After 50 rounds of training, the final total loss L of the network stabilizes below 0.1, and the training process ends;

[0100] Step 2: Use the network trained in step 1 to initialize the tracking settings for the video image sequence to be tracked, and obtain the initial target template and initial position information of the target for this tracking task;

[0101] Step 2.1, specify the position of the target on the first frame of the video image sequence, cut the target from the image and scale it to obtain a target image with a size of 127*127*3, such as Figure 3 As shown, the target image is then passed into the twin neural network in the overall network to obtain four layers of features. The last layer (P5) features are passed into the regression branch as high-level features as the regression branch initial template, and the first layer (P2) features are passed into the classification branch as the low-level features as the classification branch initial template. The size of the regression branch initial template and the classification branch initial template are both 6*6*256, in pixels. The calculation formulas for the regression branch initial template and the classification branch initial template are as follows:

[0102] φ z(cls) ,φ z(reg) =φ(z) (3)

[0103] In formula (3), z is the input target image, function φ() represents the feature extraction network, φ z(cls) represents the target template of the classification branch output by the feature extraction network, φ z(reg) The target template of the regression branch representing the output of the feature extraction network;

[0104] Step 2.2, initialize the parameters:

[0105] like Figure 4 As shown in the figure, in the first frame of the video image sequence, the target position information given by manual calibration is called BOX. BOX has four pieces of information, namely the horizontal coordinate, vertical coordinate, width and height of the target. Therefore, the first frame does not need to be tracked. It only needs to set the initial center coordinates and initial width and height of the target corresponding to the manually calibrated BOX to the values ​​in BOX, thus completing the target initialization process and obtaining the target's initial position information.

[0106] Step 3, enter the normal tracking process, the position of a target in the image will be calculated for each frame of the video image sequence and displayed at the corresponding position in the image;

[0107] Step 3.1, target search

[0108] Adopting the anchor-free target search strategy, taking the target coordinates in the previous frame tracking result of the image video sequence as the center, the search area is cut out and cropped into a patch image to obtain a search image with a size of 255*255. The patch image is passed into the feature extraction network to extract the multi-layer deep features of the search area. The formula is as follows:

[0109] φ x(cls) ,φ x(reg) =φ(x) (4)

[0110] In formula (4), x is the search graph; function φ() represents the feature extraction network, φ x(cls) represents the search feature of the classification branch output by the feature extraction network, φ x(reg) The search features of the regression branch representing the output of the feature extraction network;

[0111] Step 3.2: Target position prediction based on classification branch and regression branch

[0112] Step 3.2.1, calculate the regression branch results:

[0113] For the regression branch, the target template φ is first extracted by the feature extraction network z(reg) and search feature φ x(reg) Mapped to the same feature space, the calculation formula is as follows:

[0114] g(z,x)=φ z(reg) *φ x(reg) +b (5)

[0115] In formula (5), b represents the offset;

[0116] If the point (m,n) on the feature map g(z,x) corresponds to the point on the original image The regression branch will output the GT prediction value at the point (m, n), which is represented by a 4-dimensional vector t = (l * , t * , r * , b * ), then the calculation process of each GT component is:

[0117]

[0118]

[0119] In formula (6), (x0, y0) and (x1, x1) represent the upper left and lower right corners of the ground truth (GT), respectively; s is the stride of AlexNet, s = 8; l * , t * , r * , b * Respectively represent the distance from the corresponding position of the point (m, n) on the feature map to the left, top, right, and bottom borders of GT;

[0120] Step 3.2.2, calculate the classification branch results

[0121] For the classification branch, the target template φ is first extracted by the feature extraction network z(cls) and search feature φ x(cls) Mapped to the same feature space, the calculation formula is as follows:

[0122] f(z,x)=φ z(cls) *φ x(cls) +b (7)

[0123] The point (m, n) on the obtained feature map f(z, x) is distinguished as a positive sample point and a negative sample point by searching the ground truth of the image. If the point (m, n) on the feature map f(z, x) is at the corresponding position on the patch image If it is within the ground truth, it is considered a positive sample and its classification score is recorded as 1; the rest are negative samples and their classification scores are recorded as 0;

[0124] In order to better balance the relationship between the point (m, n) and the target position, the quality score PSS is introduced * , the predicted PSS * Multiply it with the corresponding classification score to calculate the final score as the result of the classification branch. The quality score calculation formula is as follows:

[0125]

[0126] Step 3.2.3, add the result of the classification branch and the result of the regression branch to obtain the tracking result response map of the current frame;

[0127] Step 4: After obtaining the tracking result response graph of step 3, use the template update condition judgment method based on standard mutual information to determine whether the current tracking result is reliable. If it is reliable, update the template; if it is unreliable, do not update the template. If there are two reliable tracking results retained in step 3, replace the oldest result with the latest one.

[0128] Step 4.1: Template update condition judgment based on mutual information

[0129] like Figure 5 As shown in the figure, during the tracking process, the first frame of the video is used as the Template Frame, and the first frame is used as the Detection Frame, which is input into the network to obtain the heat map of the classification branch, denoted as X, and the heat map of the classification branch of the tth frame, denoted as Y. Then X and Y are used as two variables to calculate their mutual information values;

[0130] The mutual information calculation formula is as follows:

[0131]

[0132] In formula (9), X and Y represent the classification branch heat map of the first frame and the classification branch heat map of the t-th frame respectively, p(y) and p(y) are the marginal distributions of X and Y respectively, and p(x, y) is the joint distribution of X and Y;

[0133] The obtained mutual information value is standardized and converted as follows:

[0134]

[0135] In formula (10), H(X) and H(Y) are the entropies of X and Y respectively;

[0136] If the mutual information obtained is greater than the threshold V set in this paper threshold , it means that the target area image of the current frame can be used for template update, otherwise the template update mechanism will not be entered, and the template update process of the next frame will be started directly after the template update result of the current frame is obtained;

[0137] In order to make the mutual information judgment more accurate, this paper uses a dynamic threshold. Since the larger the mutual information value, the better, the dynamic threshold is set to the local maximum value in this paper. The dynamic update formula of the threshold is:

[0138]

[0139] In formula (11), t represents the t-th frame, I(t) represents the mutual information value between the classification branch heat map of the t-th frame and the classification branch heat map of the first frame; mean(I(t-1), I(t-2)) represents the average value of the mutual information over a period of time; it reflects that the matching degree of the t-th frame is good; I′(t)=0 and I″(t)>0 represent the local maximum point of mutual information; since the mutual information value between the classification branch heat map of each search graph and the classification branch heat map of the first frame is discrete, formula (11) can be expressed as:

[0140]

[0141] Because this paper requires the mutual information value of three consecutive frames of search graphs, but the search graphs of the first and second frames do not meet the conditions required by the formula during the search, the thresholds of the first and second frames are set separately. Because the target area obtained by the search graph of the first frame is generally not much different from the template graph of the first frame of the video, it can be used for direct update, but because there are very few video second frame search graphs that will be blocked, the V of the search graphs of the first and second frames is threshold Set to a fixed value of 0.75;

[0142] Step 4.2, template update based on 3D convolution:

[0143] like Figure 6 As shown in the figure, the template update method conforms to the queue nature, first-in-first-out, that is, when a new template enters, the old template is eliminated. The templates are always maintained at three, which are recorded as the initial target template, the historical template and the current template respectively. The feature maps obtained by the three templates after passing through the feature extraction network are convolved with 3*3*3 to obtain the latest fused template;

[0144] Step 5, using the latest template obtained after fusion in step 4.2 to continue normal tracking in step 3 for the subsequent video image sequence of the currently tracked video frame;

[0145] Step 5 is as follows:

[0146] After obtaining the latest template, the latest template will be used unchanged until the next template update. The specific tracking process is the same as step 3. The depth features obtained by reliable tracking results are still saved during the tracking process. Once a new depth feature is obtained, the longest-standing depth feature will be deleted, and the template will be updated, and the operation will be carried out according to step 4.

[0147] Step 6: Repeat steps 3 to 5 until all video image sequences are tracked, thereby obtaining the position of the target in each frame of the video, and the tracking task is completed.

[0148] Step 6 is as follows:

[0149] For a tracking task, the overall process after initialization is as follows: Steps 3 to 5, which are repeated between template update and tracking calculation. In this process, the target position of each frame in the video sequence is calculated and a BOX is obtained for representation. For a video as a whole, the target's motion trajectory is obtained until the target position of all images in the entire video image sequence is obtained, and the tracking task is completed. The accuracy and success rate of this method on the test set are shown in Figure 2. Figure 7 and Figure 8 shown.

[0150] The present invention innovatively uses SiamFC+FPN as the backbone to obtain features of different layers, and the classification branch and the regression branch use features of different layers to finally predict the target position, giving full play to the characteristics of different layers of features extracted by the neural network, greatly improving the performance and robustness of the classification network and the regression network. Then, a template update condition judgment method based on mutual information is used to filter out most of the harmful template updates, effectively solving the template contamination problem caused by template updates. Finally, a 3D convolution update module is used to fuse the two most recent and most reliable tracking results retained in history and the target information manually annotated when the tracking task is started to fuse and update the template. The new template obtained in this way can capture the target's recent appearance information and have the most accurate target appearance information in the first frame, thereby improving the robustness of the template to target appearance deformation.

Claims

1. A template-updated target tracking algorithm based on multi-layer features of a fully convolutional twin network, characterized in that: Follow the steps below to implement it: Step 1: Build the overall network and perform end-to-end training on the overall network structure; In step 1, the overall network structure is divided into three parts: the first part is a twin neural network for deep feature extraction, the second part is a 3D convolutional neural network for template update, that is, a 3D template update module. The first and second parts constitute a feature extraction network, and the third part contains a classification branch and a regression branch. The twin neural network is divided into four layers: the first two layers are composed of convolutional layers, maximum pooling layers, and activation function layers; the last two layers each contain convolutional layers and activation function layers; the 3D template update module is composed of a 3D convolutional layer; Step 2: Use the network trained in step 1 to initialize the tracking settings for the video image sequence to be tracked, and obtain the initial target template and initial position information of the target for this tracking task; Step 3, enter the normal tracking process, the position of a target in the image will be calculated for each frame of the video image sequence, and displayed at the corresponding position in the image to obtain the tracking result response map of the current frame; Step 4: After obtaining the tracking result response graph of step 3, use the template update condition judgment method based on standard mutual information to determine whether the current tracking result is reliable. If it is reliable, update the template; if it is unreliable, do not update the template. If there are two reliable tracking results retained in step 3, replace the oldest result with the latest one. Step 4 is implemented according to the following steps: Step 4.1: Template update condition judgment based on mutual information During the tracking process, the first frame of the video is used as the Template Frame and the first frame is used as the Detection Frame, which is input into the network to obtain the heat map of the classification branch, denoted as X, and the heat map of the classification branch of the tth frame, denoted as Y. Then X and Y are used as two variables to calculate their mutual information values. The mutual information calculation formula is as follows: In formula (9), X and Y represent the classification branch heat map of the first frame and the classification branch heat map of the t-th frame respectively, p(x) and p(y) are the marginal distributions of X and Y respectively, and p(x, y) is the joint distribution of X and Y; The obtained mutual information value is standardized and converted as follows: In formula (10), H(X) and H(Y) are the entropies of X and Y respectively; If the mutual information obtained is greater than the set threshold V threshold , the target area image of the current frame can be used for template update, otherwise the template update mechanism is not entered, and the template update process of the next frame is started directly after the template update result of the current frame is obtained; The threshold adopts a dynamic threshold, which is set to the local maximum value. The threshold dynamic update formula is: In formula (11), t represents the t-th frame, I(t) represents the mutual information value between the classification branch heat map of the t-th frame and the classification branch heat map of the first frame; I′(t)=0 and I″(t)>0 represent the local maximum point of mutual information; since the mutual information value between the classification branch heat map of each search graph and the classification branch heat map of the first frame is discrete, formula (11) can be expressed as: Since the mutual information value of three consecutive search frames is required, but the search frames of the first and second frames do not meet the conditions required by the formula during the search, the thresholds of the first and second frames are set separately. threshold Set to a fixed value of 0.75; Step 4.2, template update based on 3D convolution: The template update method conforms to the nature of the queue, first in first out, that is, when a new template enters, the old template is eliminated. The templates are always maintained at three, which are recorded as the initial target template, the historical template and the current template. The feature maps obtained by the three templates after passing through the feature extraction network are convolved with 3*3*3 to obtain the latest fused template; Step 5, using the latest template obtained in step 4 to continue normal tracking of step 3 for the subsequent video image sequence of the currently tracked video frame; Step 6: Repeat steps 3 to 5 until all video image sequences are tracked, thereby obtaining the position of the target in each frame of the video, and the tracking task is completed.

2. According to claim 1, the template updating target tracking algorithm based on the multi-layer features of the fully convolutional twin network is characterized in that: In step 1, 10 image pairs are selected for each video, each image pair contains four video frames, the first video frame is the first frame of the video, and the following three video frames are randomly selected from the video. The distance between the second video frame and the third video frame is no more than 15 frames, and the distance between the third video frame and the fourth video frame is no more than 10 frames. The first three video frames are used as target images for synthesizing tracking templates, and the last video frame is used as a search image. In the search image processing, the three images imported into the 3D convolution update module are the same, which are all the last video frames of the image pair. Training is performed 50 times, and the loss function adopts the same Logistic loss function as the SiamFC algorithm.

3. The template updating target tracking algorithm based on multi-layer features of a fully convolutional twin network according to claim 2 is characterized in that: In step 1, the image pairs are generated. It is necessary to perform data enhancement on the selected images. The data enhancement is implemented according to the following steps: Step 1.1, firstly, perform a random stretching operation on the samples selected from the training set, and set the size multiple after stretching to between 0.095 and 1.

005. The part that needs to be filled after enlargement is filled using linear interpolation; then perform a center cropping operation, i.e. cropping an area of ​​263*263 from the center of the training image pair, and then perform a random cropping operation, cropping an area of ​​255*255 from a random position in the training image pair, and finally perform a cropping conversion, taking the BOX of the original image in the GOT-10K dataset as the target position box, which is given in the form of (left, top, weight, height), that is, the distance between the target position box and the left border and the top border of the image and the width and height of the target position box itself. The target position box coordinate form is converted into (n, m, h, w) through the cropping conversion operation, i.e., the coordinates of the center point of the target position box and the height and width of the target position box; Step 1.2, calculate LOSS During the training process, the loss function of the classification branch uses focal loss, and the loss function of the regression branch uses IoU loss. The calculation formula of the total loss L is: In formula (1), {} is an indicator function, which takes 1 if the condition in the subscript is met, otherwise it takes 0; L cls Represents the focal loss of the classification result; L quality represents the binary cross entropy loss for quality assessment; L reg represents the IoU loss of the bounding box regression result; p x,y ,q x,y ,t x,y Represent the labels of the classification branch, the quality assessment label, and the regression branch label respectively; They represent classification branch prediction results, quality assessment results, and regression branch prediction results respectively; λ is a constant; Step 1.3, use the gradient descent method to optimize the parameters. The calculation formula of the stochastic gradient descent method SGD is as follows: argmin θ ITS (z,x,y) L (y,f(z,x,θ)) (2) In formula (2), θ is the optimal parameter; z is the input target image; x is the search image; y is the label; f(z, x; θ) is the prediction result; After 50 rounds of training, the final total loss L of the network stabilizes below 0.1, and the training process ends.

4. The template updating target tracking algorithm based on multi-layer features of a fully convolutional twin network according to claim 1 is characterized in that: Step 2 is implemented as follows: Step 2.1, specify the position of the target on the first frame of the video image sequence, cut the target from the image and scale it to obtain a target image of size 127*127*3, then pass the target image into the twin neural network in the overall network to obtain four layers of features, pass the last layer of features as high-level features into the regression branch as the regression branch initial template, pass the first layer of features as low-level features into the classification branch as the classification branch initial template, the size of the regression branch initial template and the classification branch initial template are both 6*6*256, in pixels, and the calculation formulas for the regression branch initial template and the classification branch initial template are as follows: f z(cls) f z(reg) =φ(z) (3) In formula (3), z is the input target image, function φ() represents the feature extraction network, φ z(cls) represents the target template of the classification branch output by the feature extraction network, φ z(reg) The target template of the regression branch representing the output of the feature extraction network; Step 2.2, initialize the parameters: In the first frame of the video image sequence, the target position information given by manual calibration is called BOX. BOX has four pieces of information, namely the horizontal coordinate, vertical coordinate, width, and height of the target. Therefore, the first frame does not require tracking operation. It only needs to set the initial center coordinates and initial width and height of the target corresponding to the manually calibrated BOX to the values ​​in BOX. This completes the target initialization process and obtains the target's initial position information.

5. The template updating target tracking algorithm based on multi-layer features of a fully convolutional twin network according to claim 1 is characterized in that: Step 3 is implemented as follows: Step 3.1, target search Adopting the anchor-free target search strategy, taking the target coordinates in the previous frame tracking result of the image video sequence as the center, the search area is cut out and cropped into a patch image to obtain a search image with a size of 255*255. The patch image is passed into the feature extraction network to extract the multi-layer deep features of the search area. The formula is as follows: f x(cls) ,f x(reg) =φ(x) (4) In formula (4), x is the search graph; function φ() represents the feature extraction network, φ x(cls) represents the search feature of the classification branch output by the feature extraction network, φ x(reg) The search features of the regression branch representing the output of the feature extraction network; Step 3.2, target position prediction based on classification branch and regression branch; Step 3.2.1, calculate the regression branch results: For the regression branch, the target template φ is first extracted by the feature extraction network z(reg) and search feature φ x(reg) Mapped to the same feature space, the calculation formula is as follows: g(z,x)=φ z(reg) *f x(reg) +b (5) In formula (5), b represents the offset; If the point (m,n) on the feature map g(z,x) corresponds to the point on the original image The regression branch will output the GT prediction value at the point (m, n), which is represented by a 4-dimensional vector t = (l * , t * , r * , b * ), then the calculation process of each GT component is: In formula (6), (x0, y0) and (x1, y1) represent the top left and bottom right corners of GT respectively; s is the stride of AlexNet, s = 8; l * , t * , r * , b * Respectively represent the distance from the corresponding position of the point (m, n) on the feature map to the left, top, right, and bottom borders of GT; Step 3.2.2, calculate the classification branch results For the classification branch, the target template φ is first extracted by the feature extraction network z(cls) and search feature φ x(cls) Mapped to the same feature space, the calculation formula is as follows: f(z,x)=φ z(cls) *φ x(cls) +b (7) The point (m, n) on the obtained feature map f(z, x) is distinguished as a positive sample point and a negative sample point by searching the ground truth of the image. If the point (m, n) on the feature map f(z, x) is at the corresponding position on the patch image If it is within the ground truth, it is considered a positive sample and its classification score is recorded as 1; the rest are negative samples and their classification scores are recorded as 0; In order to better balance the relationship between the point (m, n) and the target position, the quality score PSS is introduced * , the predicted PSS * Multiply it with the corresponding classification score to calculate the final score as the result of the classification branch. The quality score calculation formula is as follows: Step 3.2.3, add the result of the classification branch and the result of the regression branch to obtain the tracking result response map of the current frame.

6. The template updating target tracking algorithm based on multi-layer features of a fully convolutional twin network according to claim 1 is characterized in that: The specific process of step 5 is: after obtaining the latest template, the latest template obtained this time is used unchanged before the next template update. The specific tracking process is the same as step 3. The depth features obtained by reliable tracking results are still continuously saved during the tracking process. Once a new depth feature is obtained, the longest-standing depth feature will be deleted, and the template will be updated, and the operation will be carried out according to step 4.

Citation Information

Patent Citations

  • Twin network target tracking method based on 3D convolution template updating

    CN113628246A