The application claims priority to Chinese patent application No. 2022106926728, filed on Jun. 17, 2022, the entire contents of which are incorporated herein by reference.
The present invention relates to the field of image recognition technology, and more specifically, to a target tracking method, system, device and storage medium.
With the development of computer technology, the theory and technology of artificial intelligence are increasingly mature, and its application fields are also expanding. The fields involved include robots, language recognition, image recognition, natural language processing, expert systems, etc. Target tracking is one of the hot spots in the field of computer vision research. Target tracking refers to the detection, extraction, recognition and tracking of moving targets in image sequences to obtain the motion parameters of moving targets and achieve behavioral understanding of moving targets. It has a wide range of applications in military guidance, video surveillance, robot visual navigation, human-machine interaction, and medical diagnosis.
The current visual target tracking algorithms can be further classified into two categories, generative and discriminative, according to their observation models. The generative tracking algorithm is to model the target area in the current frame, and to find the most similar area to the model in the next frame is to predict the position. In contrast to the generative algorithm, the discriminant tracking algorithm regards the tracking task as a classification problem in target detection, trains the classifier through the appearance representation of foreground and background, and then determines the target state according to the response of the classifier.
However, in existing visual target tracking algorithms for targets, there are often boundary effects in the samples after the cyclic displacement of the relevant filtering center image block. Therefore, how to weaken the boundary effects is an urgent problem to be solved.
The present invention provides a target tracking method, system, electronic device and storage medium for solving the problem of weakening boundary effects in the existing technology.
According to the first aspect of the present invention, a target tracking method is provided, comprising:
On the basis of the above technical scheme, the following improvements can also be made to the present invention.
Optionally, the step of determining the target function according to the target template and spatial regularization weight factor includes:
The loss function after introducing weight factor θ is:
Where, ⊙ is the dot product operation, ψi is the training error of the classifier at the t-th frame, t is the sequence number of the current frame, i is the sequence number of the history frame, xi is the input sample of the i-th frame, f(xi) is the response score after the input sample of the i-th frame, yi is the expected response of the sample of the i-th frame, ω is the trained filter coefficient, j is the number of channels of the filter, d is the dimension of the classifier, and the regularization weight is defined as:
θ(m,n)=θbase+θshift(m,n);
Where, m,n represents the offset of cyclic samples, θbase represents the basic weight of spatial regularization as a constant, and θshift represents the regularization weight offset of training samples;
θshift is defined as:
Where, m,n represents the offset of the cyclic sample, ρwidth an ρheight represent the width and height of the search image, θwidth an θheight represent the weight factors of the horizontal and vertical methods, respectively. The farther the training sample is from the target center, the greater the θshift value is, that is, the greater the regularization weight of the background area and the smaller the weight of the target area.
Optionally, the steps of introducing the Sherman-Morrison formula into the alternating direction method of multipliers (ADMM) to accelerate the solution of the target function and obtain the response value include:
Optionally, the steps of introducing Sherman-Morrison formula into the alternating direction method of multipliers (ADMM) to accelerate the solution of the Lagrange function include:
Optionally, substituting the auxiliary variable β into the loss function of the filter to obtain the converted loss function, which is:
Where, ⊙ is the point multiplication operation, ω is the trained filter coefficient, β is the auxiliary variable, t represents the sequence number of the current frame, i represents the sequence number of the historical frame, d is the dimension of the classifier, j is the number of channels for the filter, xi is the input sample of the i-th frame, yi represents the expected response of the sample of frame i, and θ is the weight factor;
The corresponding frequency domain formula obtained by Fourier transformation of the loss function:
Where, {circumflex over ( )} represents the Fourier transform of the variable, ω is the trained filter coefficient, β is the auxiliary variable, θ is the weight factor, the discrete Fourier transform of a one-dimensional signal a is represented as â=√{square root over (t)}Fa, wherein, F is the orthogonal Fourier transform matrix of size t×t, ŷ=[ŷ(1), ŷ(2), . . . , ŷ(t)], {circumflex over (X)}=[diag({circumflex over (x)}1)T, . . . , diag({circumflex over (x)}d)T], in size t×dt; which is a matrix composed of multi-channel cyclic samples, {circumflex over (β)}=[{circumflex over (β)}1T, . . . , {circumflex over (β)}dT], h=[h1T, . . . , hdT], in size dt×1;
The augmented Lagrangian function constructed based on the frequency domain formula is:
Where, μ is the penalty factor, =[
1T, . . . ,
KT]T is the Lagrangian vector in the Fourier domain of size dt×1, {circumflex over ( )} represents the Fourier transform of the variable, ω is the trained filter coefficient, β is the auxiliary variable, θ is the weight factor, the discrete Fourier transform of a one-dimensional signal a is represented as â=√{square root over (t)}Fa, wherein, F is the orthogonal Fourier transform matrix of size t×t, ŷ=[ŷ(1), ŷ(2), . . . , ŷ(t)], {circumflex over (X)}=[diag({circumflex over (x)}1)T, . . . , diag({circumflex over (x)}d)T], in size t×dt, which is a matrix composed of multi-channel cyclic samples, {circumflex over (β)}=[{circumflex over (β)}1T, . . . , {circumflex over (β)}dT], h=[h1T, . . . , hdT], in size dt×1.
Using the alternating direction method of multipliers (ADMM) to decompose the augmented Lagrange function into multiple subproblems;
Where, μ is the penalty factor, ×[
1T, . . . ,
KT]T is the Lagrangian vector in the Fourier domain of size dt×1, {circumflex over ( )} represents the Fourier transform of the variable, ω is the trained filter coefficient, β is the auxiliary variable, θ is the weight factor, the discrete Fourier transform of a one-dimensional signal a is represented as â=√{square root over (t)}Fa, wherein, F is the orthogonal Fourier transform matrix of size t×t, ŷ=[ŷ(1), ŷ(2), . . . , ŷ(t)], {circumflex over (X)}=[diag({circumflex over (x)}1)T, . . . , diag({circumflex over (x)}d)T], in size dt×1, which is a matrix composed of multi-channel cyclic samples, {circumflex over (β)}=[{circumflex over (β)}1T, . . . , {circumflex over (β)}dT], h=[h1T, . . . , hdT], in size dt×1, sample {circumflex over (X)} is a banded sparse matrix, so each element in ŷ(s)=[ŷ(1), ŷ(2), . . . , ŷ(t)] is only related to k in {circumflex over (x)}(s)=[{circumflex over (x)}1(t), . . . , {circumflex over (x)}k(t)]T and {circumflex over (β)}(s)=[conj({circumflex over (β)}1(t)), . . . , conj({circumflex over (β)}k(t))]T, operator conj applies complex conjugate to complex vector. Therefore, {circumflex over (β)} in the above equation can be equivalent to t independent small targets {circumflex over (β)}(s), s=[1, . . . , t];
Decomposing each subproblem into preset multiple independent small targets based on the banded sparse matrix of the samples:
Where, {circumflex over (ω)}(s)=[{circumflex over (ω)}1(s), . . . , {circumflex over (ω)}k(s)] and {circumflex over (ω)}k=√{square root over (t)}Fωk solved as follows:
Accelerating the solution of each independent small target according to the Sherman-Morrison:
Where, Ŝx(s)={circumflex over (x)}(s)T{circumflex over (x)}, Ŝ(s)={circumflex over (x)}(s)T
, Ŝω(s)={circumflex over (x)}(s)T{circumflex over (ω)}, b=Ŝx(s)+μt.
Optionally, including the steps of scale adaptation:
Optionally, the steps of iterating a target tracking model when the response value meets a preset confidence threshold include:
According to the second aspect of the present invention, a target tracking system is provided, comprising:
According to the third aspect of the present invention, an electronic device is provided, comprising a memory and a processor, which are used to execute computer management programs stored in the memory and implement the steps of any target tracking method in the first aspect mentioned above.
According to the fourth aspect of the present invention, a computer-readable storage medium is provided, on which a computer management program is stored, and the computer management program, when executed by the processor, implements the steps of any target tracking method in the first aspect mentioned above.
The present invention provides a target tracking method, system, electronic device and storage medium, wherein the steps of the method include determining a target area based on the current frame of a training sample, extracting and fusing histogram of oriented gradient (HOG), color naming (CN), and color space HSV features of the target area to obtain a target template; determining a target function based on the target template and a spatial regularization weight factor; introducing the Sherman-Morrison formula into the alternating direction method of multipliers (ADMM) to accelerate the solution of the target function and obtain the response value; iterating the target tracking model when the response value meets the preset confidence threshold until training is completed to obtain a trained target tracking model, and tracking the target in the video to be observed by using the trained target tracking model. The present invention enhances the discriminability of feature response, improves the discrimination of targets, and enhances the stability of targets in deformation and light changes by extracting and fusing the features of histogram of oriented gradient (HOG), color naming (CN), and color space HSV in the target area, additionally, the present invention determines the target function through the spatial regularization based on the alternating direction method of multipliers (ADMM), so that while introducing the spatial regularization penalty boundary, the ADMM algorithm is used to reduce the iteration complexity, weaken the boundary effect, improve the operation efficiency of the algorithm, thus greatly improving the stability and tracking speed of the correlation filter tracking algorithm in target tracking.
The following will provide a further detailed description of the specific embodiments of the present invention in conjunction with the accompanying drawings and embodiments. The following embodiments are used to illustrate the present invention, but are not intended to limit its scope.
Step S100: Determining a target area based on the current frame of a training sample, extracting and fusing histogram of oriented gradient (HOG), color naming (CN), and color space HSV features of the target area to obtain a target template;
It should be noted that the execution subject of the method in this embodiment may be a computer terminal device with data processing, network communication, and program running functions, such as a computer, tablet computer, etc; it may also be a server device with similar functions, or a cloud server with similar functions, which is not limited by this embodiment. For ease of understanding, this and the following embodiments will be illustrated with a server device as an example.
It will also be appreciated that the above training sample may be a training sample using the OTB50 dataset, or a training sample using the OTB100 dataset, or a training sample using the data collected by itself according to the actual needs, which is not limited by this embodiment.
It should be understood that the above histogram of oriented gradient (HOG) is a feature descriptor applied in the field of computer vision and image processing for target detection, and the above histogram of oriented gradient (HOG) technique is a statistical value used to calculate the orientation information of local image gradients. The HOG descriptor is computed on a grid-dense cell of uniform size, and an overlapping local contrast normalization technique is also used to improve performance.
It will also be appreciated that the above process of feature fusion may be to fuse the above three features to obtain the corresponding 45-dimensional integrated features, as shown in
Refer to
Step S200: Determining a target function according to the target template and a spatial regularization weight factor;
In specific implementation, in the existing KCF correlation filtering algorithm, the regularization factor is a constant. During the training process, the regularization factor treats the samples in the background area as the same as the samples in the target area. However, in actual tracking, the target area is more weighted than the background area. Therefore, the regularization weight of the samples in the target area should be less than the regularization weight of the background part. For this reason, we introduce the spatial regularization weight factor and construct the spatial regularization correlation filter to weaken the interference of the background area and improve the classification ability of the classifier in the cluttered background. At the same time, we can also use this feature to expand the search area and solve the problem of target loss due to rapid movement.
Step S300: Introducing the Sherman-Morrison formula into the alternating direction method of multipliers (ADMM) to accelerate the solution of the target function and obtain the response value;
In the specific implementation, after determining the target function, it is necessary to solve the filter coefficients, which is the core problem in related filtering algorithms. With the continuous research and improvement of related filter trackers, algorithms such as CFLB and BACF have introduced spatial constraints in the training of filters to handle boundary effects, it makes the filter model more complex and the calculation speed slower, and the advantage of correlation filtering algorithms in computational speed is becoming increasingly unclear, although the algorithm solves the problem of boundary effects. To solve this problem, we introduced the alternating direction method of multipliers (ADMM) to solve the relevant filters. ADMM divides a large optimization problem into multiple subproblems that can be solved simultaneously in a distributed manner, and the approximate solution of the filter can be obtained quickly by iterating over the subproblems, thus greatly improving the computational efficiency.
Step S400: Iterating the target tracking model when the response value meets the preset confidence threshold until training is completed to obtain a trained target tracking model, and tracking the target in the video to be observed by using the trained target tracking model.
It should be noted that the preset confidence threshold mentioned above may be set by the administrator based on experience or updated after confirming experimental results, which is not limited by this embodiment. Satisfying the preset confidence level above can mean that the model is updated only when the part of the target frame in the current frame has a high confidence level (the target is not obscured or blurred).
In the specific implementation, when the response value meets the preset confidence threshold, the target tracking model is iteratively updated based on the current frame until the trained target tracking model is obtained after the target tracking is completed, and the above target tracking model is used to track the targets in the observed video.
It will be appreciated that, based on the shortcomings in the background art, the embodiment of the present invention proposes a target tracking method. The steps of the method include determining a target area based on the current frame of a training sample, extracting and fusing histogram of oriented gradient (HOG), color naming (CN), and color space HSV features of the target area to obtain a target template; determining a target function based on the target template and a spatial regularization weight factor; introducing the Sherman-Morrison formula into the alternating direction method of multipliers (ADMM) to accelerate the solution of the target function and obtain the response value; iterating the target tracking model when the response value meets the preset confidence threshold until training is completed to obtain a trained target tracking model, and tracking the target in the video to be observed by using the trained target tracking model. The present invention enhances the discriminability of feature response, improves the discrimination of targets, and enhances the stability of targets in deformation and light changes by extracting and fusing the features of histogram of oriented gradient (HOG), color naming (CN), and color space HSV in the target area, additionally, the present invention determines the target function through the spatial regularization based on the alternating direction method of multipliers (ADMM), so that while introducing the spatial regularization penalty boundary, the ADMM algorithm is used to reduce the iteration complexity, weaken the boundary effect, improve the operation efficiency of the algorithm, thus greatly improving the stability and tracking speed of the correlation filter tracking algorithm in target tracking.
In one possible embodiment, the step of determining the target function according to the target template and spatial regularization weight factor includes: The loss function after introducing weight factor θ is:
Where, ⊙ is the dot product operation, ψt is the training error of the classifier at the t-th frame, t is the sequence number of the current frame, i is the sequence number of the history frame, xi is the input sample of the i-th frame, f(xi) is the response score after the input sample of the i-th frame, yi is the expected response of the sample of the i-th frame, ω is the trained filter coefficient, j is the number of channels of the filter, d is the dimension of the classifier, and the regularization weight is defined as:
θ(m,n)=θbase+θshift(m,n);
Where, m,n represents the offset of cyclic samples, θbase represents the basic weight of spatial regularization as a constant, and θshift represents the regularization weight offset of training samples;
θshift is defined as:
Where, m,n represents the offset of the cyclic sample, ρwidth and ρheight represent the width and height of the search image, θwidth and θheight represent the weight factors of the horizontal and vertical methods, respectively. The farther the training sample is from the target center, the greater the θshift value is, that is, the greater the regularization weight of the background area and the smaller the weight of the target area.
In the method of this embodiment, space regularization penalty boundary is introduced into the target tracking algorithm, and the corresponding regularization weight is set according to the position information of training samples and target space, thus the purpose of weakening the boundary effect is achieved.
In one possible embodiment, the steps of introducing the Sherman-Morrison formula into the alternating direction method of multipliers (ADMM) to accelerate the solution of the target function and obtain the response value include:
In the method of this embodiment, the iteration complexity is reduced and the operation efficiency of the target tracking algorithm is improved by introducing the Sherman-Morrison formula to accelerate the solution of the target function in the solution process of the target tracking algorithm.
In one possible embodiment, the steps of introducing Sherman-Morrison formula into the alternating direction method of multipliers (ADMM) to accelerate the solution of the Lagrange function include:
In the method of this embodiment, the iteration complexity is reduced and the operation efficiency of the target tracking algorithm is improved by introducing the Sherman-Morrison formula to accelerate the solution of the target function in the solution process of the target tracking algorithm.
In one possible embodiment, the process of accelerated solution of spatial regularization based on ADMM can be:
In the KCF correlation filtering algorithm, the classifier is trained with cyclic shift samples to obtain the optimal classifier under the minimum mean square error. The loss function in the training process is defined as
Where, ψt is the training error of the classifier at the t-th frame, t is the sequence number of the current frame, i is the sequence number of the history frame, xi is the input sample of the i-th frame, f (xi) is the response score after the input sample of the i-th frame, yi is the expected response of the sample of the i-th frame, ω is the trained filter coefficient, j is the number of channels of the filter, ai is the classifier learning weight factor for the i-th frame, d is the dimension of the classifier, λ is the regularization factor to prevent over-fitting, which is a constant.
It can be seen from the above formula that the regularization factor λ is a constant. During the training process, it treats the samples in the background area as the same as the samples in the target area. However, in actual tracking, the target area is more weighted than the background area. Therefore, the regularization weight of the samples in the target area should be less than the regularization weight of the background part. For this reason, we introduce the spatial regularization weight factor θ and construct the spatial regularization correlation filter to weaken the interference of the background area and improve the classification ability of the classifier in the cluttered background. At the same time, we can also use this feature to expand the search area and solve the problem of target loss due to rapid movement.
After introducing the weight factor θ, the original formula can be changed to
Where, ⊙ is a dot product operation, and when θ=√{square root over (λ)}, equations (3-1) and (3-2) are the same. We define the regularization weight as
θ(m,n)=θbase+θshift(m,n) (3-3)
Where, m,n represents the offset of the cyclic sample, and θbase represents the basic weight of spatial regularization, which is a constant,
Where, ρwidth and ρheight represent the width and height of the search image, while θwidth and θheight represent the weight factors in the horizontal and vertical directions, respectively. It can be seen from Formula (3-4) that the farther the training sample is from the target center, the greater the value of θshift, that is, the greater the regularization weight of the background area, and the smaller the weight of the target area.
The next main task, like the KCF tracker, is to solve the filter coefficient ω, which is the core problem in related filtering algorithms. With the continuous research and improvement of related filter trackers, algorithms such as CFLB and BACF have introduced spatial constraints in the training of filters to handle boundary effects, it makes the filter model more complex and the calculation speed slower, and the advantage of correlation filtering algorithms in computational speed is becoming increasingly unclear, although the algorithm solves the problem of boundary effects.
To solve this problem, we introduced the alternating direction method of multipliers (ADMM) to solve the relevant filters. ADMM divides a large optimization problem into multiple subproblems that can be solved simultaneously in a distributed manner, and the approximate solution of the filter can be obtained quickly by iterating over the subproblems.
The ADMM algorithm is typically used to solve minimization problems in the following forms:
The augmented Lagrangian function for this problem is defined as
The classic ADMM algorithm framework is as follows:
Initialize y0, 0, μ>0, and set k>0;
The iteration steps are:k+1:=
k+μ(Axk+1+Byk+1−c) (3-7)
If the termination condition is met, stop the iteration and output the result. Otherwise, return to continue the iteration.
Therefore, we can transform equation (3-2) into the form of an augmented Lagrangian function. Since ADMM iteration requires two variables, we construct auxiliary variable β and let β=ω.
Then Equation (3-2) is converted to
Convert it to the frequency domain to obtain
Where, {circumflex over ( )} represents the Fourier transform of the variable, the discrete Fourier transform of a one-dimensional signal a is represented as â=√{square root over (t)}Fa, wherein, F is the orthogonal Fourier transform matrix of size t×t, ŷ=[ŷ(1), ŷ(2), . . . , ŷ(t)], {circumflex over (X)}=[diag({circumflex over (x)}1)T, . . . , diag({circumflex over (x)}d)T], in size t×dt, which is a matrix composed of multi-channel cyclic samples, {circumflex over (β)}=[{circumflex over (β)}1T, . . . , {circumflex over (β)}dT], h=[h1T, . . . , hdT], in size dt×1.
The augmented Lagrangian expression is:
Where, μ is the penalty factor and =[
1T, . . . ,
KT]T is the Lagrangian vector in the Fourier domain of size dt×1. We can iteratively solve the above equation using the ADMM algorithm according to formula (3-7), and each subproblem ω and {circumflex over (β)} have a closed form solution.
For subproblem {circumflex over (β)}:
The complexity of directly solving this equation is O(t3d3), because every ADMM iteration requires solving {circumflex over (β)}, which greatly affects the real-time performance of the algorithm. However, sample {circumflex over (X)} is a banded sparse matrix, so each element in ŷ(s)=[ŷ(1), ŷ(2), . . . , ŷ(t))]T, is only related to k in {circumflex over (x)}(s)=[{circumflex over (x)}1(t), . . . , {circumflex over (x)}k(t)]T and {circumflex over (β)}(s)=[conj({circumflex over (β)}1(t)), . . . , conj({circumflex over (β)}k(t))]T, and operator conj applies complex conjugate to complex vectors. Therefore, {circumflex over (β)} in the above equation can be equivalent to t independent small targets {circumflex over (β)}(s), s=[1, . . . , t].
Where, {circumflex over (ω)}(s)=[{circumflex over (ω)}1(s), . . . , {circumflex over (ω)}k(s)] and {circumflex over (ω)}k=√{square root over (t)}Fωk are solved as follows
The computational complexity of formula (3-13) is O(td3). This process still needs to deal with t independent linear system of K×K. Here, because the variables on the denominator are all d-dimensional, we introduce the Sherman-Morrison formula ((uvT+A)−1=A−1−(vTA−1u)−1A−1uvTA−1) to accelerate the operation. We set A=μtIk and u=v={circumflex over (x)}(s). The original formula can be simplified as
Where, Ŝx(s)={circumflex over (x)}(s)T{circumflex over (x)}, Ŝ(s)={circumflex over (x)}(s)T
, Ŝω(s)={circumflex over (x)}(s)T{circumflex over (ω)}, b=Ŝx(s)+μt. At this point, the computational complexity of the formula decreases to O(td).
Iterative update:k+1:=
k+μ({circumflex over (β)}k+1−{circumflex over (ω)}k+1) (3-16)
Where {circumflex over (β)}k+1 and ωk+1 represent the current solution of the above subproblem by iterating step k+1 in ADMM. {circumflex over (ω)}k+1=√{square root over (t)}Fωk+1, μk+1=min(μmax,αμk).
In this embodiment, the alternating direction method of multipliers (ADMM) and Sherman-Morrison formula are used to simplify the computational complexity and greatly improve the solving speed of target tracking algorithm.
In one possible embodiment, the steps of scale adaptation also include:
Refer to
Refer to
In the implementation example of the present invention, by adding an adaptive scale pool to the target tracking algorithm, a scale pool containing 7 scale sizes is proposed, which enables the target tracking algorithm to adapt well to changes in scale. This solves the problem of the previous target scale being unable to adaptively adjust according to the target size, which affects tracking accuracy. During the target tracking process, when the target scale is reduced, it causes a large amount of background information to be included in the selected image block; when the target scale is expanded, it will cause the selected image block to only contain local information of the target, improving the adaptability of the target tracking algorithm.
In one possible embodiment, the steps of iterating a target tracking model when the response value meets a preset confidence threshold include:
In the current existing target tracking algorithms, the model is almost updated every frame, without considering the accuracy of target detection. If the new tracking results are not accurate, the obtained results will still update the model, which will contaminate the model and cause target tracking drift. Therefore, the embodiment of the invention proposes to update the model only when the part in the target frame of the current frame has high confidence (the target is not occluded or blurred), so that the model update strategy based on high confidence can not only solve the problem of model contamination, improve the robustness of the tracking algorithm to occlusion and other problems, but also improve the tracking speed and prevent over-fitting.
From a large number of experiments on KCF, it can be found that when accurately tracking, the response distribution graph of KCF has and only has a very obvious peak, and its overall distribution is approximately a two-dimensional Gaussian distribution. However, when complex situations occur during the tracking process (especially occlusion, loss, blurring, etc.), the response graph will experience severe oscillations. The peak and fluctuation of the response graph can reflect the confidence level of the tracking results to a certain extent. When the detected target matches the correct target very well, the ideal response graph should only have one peak, and other areas will tend to be smooth. The higher the correlation peak, the better the positioning accuracy. If the positioning is not accurate enough, the response graph will oscillate violently, and its shape will differ significantly from the shape when correctly matched. Based on this, we adopt a judgment formula, the correlation peak mean difference ratio (CPMDR):
Where, fmax represents the maximum value in the response graph, fmin represents the minimum value in the response graph, fm,n represents the value at (m,n) in the response graph, and M, N represent the peak value.
The correlation peak mean difference ratio (CPMDR) can reflect the fluctuation of the response graph. When it is less than a certain threshold, it can be determined that the target was lost, obstructed or left the field of view during the target tracking process. In traditional KCF tracking, a simple model update method is used:
{circumflex over (x)}model(f)=(1=η){circumflex over (x)}model(f-1)+η{circumflex over (x)}model(f);
Where, η is the model update rate. According to this method, each frame of the classifier needs to be updated, and once the tracking fails, it cannot continue tracking. To solve this problem, we use an update strategy of a high confidence model with adaptive learning rate. To prevent model contamination, when the target area is obstructed, the target model should not be updated again. It can only be updated when the CPMDR value exceeds a certain threshold. We set the model update rate to be positively correlated with the CPMDR value. Let
If we set η1 to 0.02, the adaptive update model is:
We use this updated model to calculate {circumflex over (β)}(s), Ŝx(s), Ŝ(s) and Ŝω(s).
According to experimental measurements, when the CPMDR value is greater than 50, it can be considered as accurate tracking, so we set the threshold to 0.0196.
Referring to
Refer to
In the embodiment of the present invention, the use of correlation peak mean difference ratio (CPMDR) to determine the occlusion state achieves adaptive updating of the model, addresses the model pollution problem caused by target occlusion, and improves the stability of the algorithm.
A construction template module 100, for determining a target area based on the current frame of a training sample, extracting and fusing histogram of oriented gradient (HOG), color naming (CN), and color space HSV features of the target area to obtain a target template; a target function module 200, for determining a target function based on the target template and a spatial regularization weight factor; a model training module 300, for introducing the Sherman-Morrison formula into the alternating direction method of multipliers (ADMM) to accelerate the solution of the target function and obtain the response value; and a target tracking module 400, for iterating the target tracking model when the response value meets the preset confidence threshold until training is completed to obtain a trained target tracking model, and tracking the target in the video to be observed by using the trained target tracking model.
It will be appreciated that the target tracking system provided by the present invention corresponds to the target tracking methods provided in the aforementioned embodiments. The relevant technical features of the target tracking system can refer to the relevant technical features of the target tracking method, and will not be repeated herein.
Please refer to
Determining a target area based on the current frame of a training sample, extracting and fusing histogram of oriented gradient (HOG), color naming (CN), and color space HSV features of the target area to obtain a target template; determining a target function based on the target template and a spatial regularization weight factor; introducing the Sherman-Morrison formula into the alternating direction method of multipliers (ADMM) to accelerate the solution of the target function and obtain the response value; iterating the target tracking model when the response value meets the preset confidence threshold until training is completed to obtain a trained target tracking model, and tracking the target in the video to be observed by using the trained target tracking model.
Please refer to
Determining a target area based on the current frame of a training sample, extracting and fusing histogram of oriented gradient (HOG), color naming (CN), and color space HSV features of the target area to obtain a target template; determining a target function based on the target template and a spatial regularization weight factor; introducing the Sherman-Morrison formula into the alternating direction method of multipliers (ADMM) to accelerate the solution of the target function and obtain the response value; iterating the target tracking model when the response value meets the preset confidence threshold until training is completed to obtain a trained target tracking model, and tracking the target in the video to be observed by using the trained target tracking model.
The present invention provides a target tracking method, system, electronic device and storage medium, wherein the steps of the method include determining a target area based on the current frame of a training sample, extracting and fusing histogram of oriented gradient (HOG), color naming (CN), and color space HSV features of the target area to obtain a target template; determining a target function based on the target template and a spatial regularization weight factor; introducing the Sherman-Morrison formula into the alternating direction method of multipliers (ADMM) to accelerate the solution of the target function and obtain the response value; iterating the target tracking model when the response value meets the preset confidence threshold until training is completed to obtain a trained target tracking model, and tracking the target in the video to be observed by using the trained target tracking model. The present invention enhances the discriminability of feature response, improves the discrimination of targets, and enhances the stability of targets in deformation and light changes by extracting and fusing the features of histogram of oriented gradient (HOG), color naming (CN), and color space HSV in the target area, additionally, the present invention determines the target function through the spatial regularization based on the alternating direction method of multipliers (ADMM), so that while introducing the spatial regularization penalty boundary, the ADMM algorithm is used to reduce the iteration complexity, weaken the boundary effect, improve the operation efficiency of the algorithm, thus greatly improving the stability and tracking speed of the correlation filter tracking algorithm in target tracking.
It should be noted that in the above embodiments, the descriptions of each embodiment have their own emphasis. For the parts that are not described in detail in one embodiment, please refer to the relevant descriptions of other embodiments.
Those skilled in the art should understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention may be in the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention may be in the form of a computer program product implemented on one or more computer available storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer available program code.
The present invention is described with reference to the flowchart and/or block diagram of the method, device (system), and computer program product according to the embodiments of the present invention. It should be understood that each process and/or box in a flowchart and/or block diagram can be implemented by computer program instructions, as well as the combination of processes and/or boxes in the flowchart and/or block diagram. These computer program instructions can be provided to processors of general-purpose computers, specialized computers, embedded computers, or other programmable data processing devices to generate a machine that generates instructions executed by processors of computers or other programmable data processing devices for implementing functions specified in a flowchart or multiple flows and/or a block diagram or multiple boxes.
These computer program instructions can also be stored in computer readable memory that can guide a computer or other programmable data processing device to work in a specific way, causing the instructions stored in the computer readable memory to generate a manufacturing product including instruction devices, which implement the functions specified in one or more processes and/or blocks of a flowchart.
These computer program instructions can also be loaded onto a computer or other programmable data processing device to perform a series of operational steps on the computer or other programmable device to generate computer-implemented processing. The instructions executed on the computer or other programmable device provide steps for implementing the functions specified in a flowchart or multiple processes and/or a block diagram or multiple boxes.
Although preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have knowledge of the basic creative concepts. Therefore, the attached claims are intended to be interpreted as including preferred embodiments and all changes and modifications falling within the scope of the present invention.
Obviously, technicians in this field can make various modifications and variations to the present invention without departing from the spirit and scope of the present invention. In this way, if these modifications and variations of the present invention fall within the scope of the claims and their equivalents, the present invention is also intended to include these modifications and variations.
Number | Name | Date | Kind |
---|---|---|---|
20210166402 | Ricco | Jun 2021 | A1 |
Number | Date | Country |
---|---|---|
113344973 | Sep 2021 | CN |
110555864 | Apr 2022 | CN |
114359347 | Apr 2022 | CN |
115239760 | Oct 2022 | CN |
Entry |
---|
Machine Translation of CN-115239760-A from STIC (Year: 2022). |
Machine Translation of CN-110555864-B from STIC (Year: 2022). |
Title of the Item: Acta Optica Sinica Publication Date: Feb. 29, 2020 Name of the Author: Hu Zhaohua et al. Article Title: Correlation Filter Tracking Algorithm Based on Temporal Awareness and Adaptive Spatial Regularization pp. 0315003-1-0315003-10. |
Title of the Item: Acta Optica Sinica Publication Date: Apr. 30, 2019 Name of the Author: Mao Ning et al. Article Title: Spatial Regularization Correlation Filtering Tracking via Deformable Diversity Similarity pp. 0415002-1-0415002-11. |