Background
The method used to estimate the most hot of the a posteriori state in target tracking is the particle filter algorithm (PF). The PF algorithm uses a sequential monte carlo method (SMC) to approximate the posterior distribution of a nonlinear system using a set of samples (i.e., particles), which is then used to estimate the state of the system. Compared with other algorithms, the PF algorithm is more suitable for a nonlinear system, has a wider application range and has a better actual effect. In the current mainstream visual tracking algorithms, such as CNT algorithm and IOPNMF algorithm, all use particle filter as the framework of tracking algorithm. However, the particle filter algorithm cannot avoid the particle degradation phenomenon because the variance of the particle weight value gradually increases with the accumulation of time. To solve the particle degradation phenomenon, a method of increasing the number of particles or resampling is generally adopted. However, increasing the number of particles leads to an increase in the number of calculations, which doubles the running time and makes the algorithm appear to be real-time. The resampling method is to take out the particles with smaller weight and copy only the particles with larger weight, but as the resampling is carried out, the particles with larger weight are continuously copied, and finally the types of the particles are sharply reduced, which leads to the problem of sample depletion.
Another problem to be solved by the particle filter algorithm is that in the state transition process of the particles, the particles after transition can appear at all possible positions of the target, otherwise, the tracking may gradually get away from the tracking target, and finally the tracking target is lost. Increasing the number of particles can also solve this problem, but obviously increasing the number of particles will lead to an increase in the amount of computation, multiplying the running time, and making the algorithm real-time.
Disclosure of Invention
The invention aims to provide an intelligent mixed population optimization filtering tracking method, which overcomes the defects in the prior art, can more accurately estimate the posterior state in a nonlinear system, and shows higher tracking accuracy in a complex and changeable scene environment.
In order to achieve the purpose, the invention adopts the following technical scheme:
an intelligent mixed population optimization filtering tracking method comprises the following steps:
step 1: particle delamination:
by a set threshold τh,τlDividing the particles in the particle sample into a high weight particle set, a medium weight particle set and a low weight particle set according to the weight, and updating the positions of the particles according to the number of the particles in different layers;
step 2: status update
Finding out the most possible state of the target by using the position and weight information of the particles at the current moment, namely generating proper suggested distribution, thereby accurately estimating the position of the target at the current moment, and selecting whether to carry out cohesive motion on the particles of the high weight particle set, the medium weight particle set and the low weight particle set according to the number of the particles of different layers;
and step 3: state estimation
Performing state estimation according to a minimum mean square error criterion or a maximum posterior criterion, taking a condition mean value or a state with a maximum posterior probability density as an estimated value of a system state, namely recalculating the particles after the aggregation motion, correcting the state, and updating the estimated position of a target, and outputting the position as a real position of the target;
and 4, step 4: state prediction
And designing a prior distribution function, and predicting the state of an estimation target at the next moment, namely performing arrangement motion or separation motion on particles according to the number of the particles in different layers.
Further, the layering of the particles in step 1 is achieved as follows:
wherein the content of the first and second substances,
is the weight, τ, of the ith particle in the particle sample at time k
h,τ
lUpper and lower thresholds, psi, for particle stratification respectively
h,ψ
m,ψ
lRespectively, the high weight particle set, the medium weight particle set and the low weight particle set.
Further, the cohesive movement of the particles in step 2 and the alignment movement and the separation movement of the particles in step 4 are as follows:
(1) cohesive movement
According to the weight of the existing particles, the particles with lower weight value are moved to the area with higher weight value, and the moving method of the particles is as follows:
coh(xk):xk=xk-1+(a+(b-a)*rand)*(xk-1-xc)
wherein xkIs the position state of the particle at time k, xk-1Position state, x, at the previous momentcThe average central position is, rand is a random number from 0 to 1, a and b are preset constants, wherein a is not less than 1 and not more than b, the smaller the value of b-a, the faster the cohesion speed but the poorer the particle diversity, and conversely, the larger the value of b-a, the slower the cohesion speed but the better the particle diversity;
(2) separate movement
When the target position cannot be accurately determined at the current moment, all the particles are subjected to separation motion, and the particle moving method comprises the following steps:
spa(xk):xk=xk-1+λ*rand(xc-xk-1)
wherein x
kIs the position of the particle at time k, x
k-1Position state, x, at the previous moment
cIs the position of the center of the average,
taking the average displacement of the target, rand is a random number from 0 to 1, lambda is a preset constant, lambda is not more than 1, the larger the lambda value is, the larger the separation degree is, and the global situation isThe stronger the search capability is, but the weaker the local search capability is, on the contrary, the smaller the lambda is, the smaller the separation degree is, the poorer the global search capability is, but the stronger the local search capability is;
(3) array movement
In order to predict the target position at the next moment under the condition that the target position can be accurately estimated at the current moment, a uniform motion model is adopted and expressed as follows:
further, the state update in step 3 follows the following 4 criteria:
criterion 3.1: when high weight particle set psihThe larger number of medium particles, i.e. length (psi)h) If the position state of the target is determined to be an ideal tracking effect, the central position is calculated according to the global minimum mean square error criterion, and when the suggested distribution is generated, the position states of high-weight particles and medium-weight particles are reserved in consideration of particle diversity, and only the low-weight particle set psi is subjected tolThe particles in (a) are subjected to cohesive motion;
criterion 3.2: when high weight particle set psihIs less than a threshold value, i.e., threshold > length (psi)h) Mpts, the threshold mpts > 0, and a medium weight particle set ψmHas a large number of particles, i.e., length (ψ)m) If threshold, it shows that the tracking effect is good in the current state, but the surrounding of the high-weight particles has higher weight, then according to the local minimum mean square error criterion, the high-weight particle set psihThe particles in the distribution are locally weighted, the central position is calculated, when the suggested distribution is generated, the position state of the particles with the middle weight is kept, and only the low weight particle set psi is usedlThe particles in (a) are subjected to cohesive motion;
criterion 3.3: when high weight particle set psihHas a smaller number of particles but is larger than a threshold value, i.e., threshold > length (psi)h) Mpts, the threshold mpts > 0, and medium weight particlesIntegrated psimThe number of particles in (1) is small, i.e. threshold > length (psi)m) According to the local minimum mean square error criterion, locally weighting the particles in the high weight particle set, calculating the central position, and when generating the proposed distribution, centering the weight particle set psimAnd a low weight particle set psilThe particles in (a) simultaneously perform cohesive motion;
criterion 3.4: when high weight particle set psihThe number of particles in (2) is very small, i.e., mpts > length (psi)h) And the medium weight particle set ψmHas a large number of particles, i.e., length (ψ)m) If the tracking effect is normal at this time, but the position state of the target can still be approximately represented by a larger number of medium weight particles, the medium weight particle set psi is centered according to the local minimum mean square error criterionmThe particles therein are locally weighted, the center position is calculated, and only the low weight particle set psi is used when generating the proposed distributionlThe particles in (a) move cohesively.
Further, the calculation formula of the maximum posterior criterion in step 3 is as follows:
wherein w
k(x
k) For each particle in the set of particles, x
kIs the sample of the particles at time k,
to satisfy maxw
k(x
k) All x of the conditions
kA set of constructs.
Further, the minimum mean square error criterion in step 3 is divided into the following two categories:
(1) local minimum mean square error criterion
The particle number M in R is counted by setting a range R, and when the target posterior state is estimated, only the particle samples in R are summed according to the weight, and the calculation formula is as follows:
wherein
As a result of weight normalization of the ith particle in the particle sample at time k,
the ith particle in the particle sample at the time k;
(2) global minimum mean square error criterion
And carrying out overall weighted summation on all particles in the particle set with the total number of N, wherein the calculation formula is as follows:
wherein
As a result of weight normalization of the ith particle in the particle sample at time k,
is the ith particle in the sample of particles at time k.
Further, the state prediction in step 4 follows the following 2 criteria:
criterion 5.1: if the current time meets the condition of the updating criterion, the current time can judge the position state of the target, the posterior state of the target is estimated according to the global minimum mean square error criterion, and then the particle set is subjected to permutation motion to predict the prior state of the next time;
criterion 5.2: if the current time does not satisfy any condition in the updating criteria, the high-weight particle set psihVery few particles in (i.e., mpts > length (ψ)h) And the number of the medium weight particles is also less, namely, threshold > length (psi)m) Then estimating the posterior state of the target according to the maximum posterior criterionAnd determining the central position according to the maximum posterior criterion, and then performing separation motion on all particles to predict the prior state at the next moment.
Compared with the prior art, the invention has the following beneficial technical effects:
according to the method, on the basis of Bayes filtering, three motion models optimized by an intelligent group are used for estimating the posterior state of the target, wherein cohesive motion increases the weight of a sample under the condition of keeping particle diversity, the prior state of the target at the next moment can be more accurately predicted by coordinating separation motion and arrangement motion, and experimental results show that compared with standard particle filtering, the posterior state in a nonlinear system can be more accurately estimated, and higher tracking accuracy is shown in a complex and changeable scene environment.
Detailed Description
The invention is described in further detail below with reference to the accompanying drawings:
referring to fig. 1 and fig. 2, the invention provides an intelligent mixed population optimization filtering tracking method, which estimates the posterior state of a target by using three motion models optimized by an intelligent population on the basis of bayesian filtering. The method combines the thought of an intelligent group, correspondingly moves the particles according to specific conditions, and well avoids the problem of particle degradation under the condition of ensuring that the number of the particles is not increased, wherein the weight of a sample is increased under the condition that the diversity of the particles is kept by cohesive motion, the prior state of a target at the next moment can be more accurately predicted by coordinating separation motion and arrangement motion, the posterior state in a nonlinear system can be more accurately estimated compared with the traditional particle filtering, and higher tracking accuracy is shown in a complex and variable scene environment.
The method comprises the following specific steps:
step 1, passing a set threshold value tauh,τlAnd layering the particles in the particle sample according to the weight value, so that the positions of the particles can be updated according to the number of the particles in different layers. Can be expressed as:
wherein the content of the first and second substances,
is the weight, τ, of the ith particle in the particle sample at time k
h,τ
lUpper and lower thresholds, psi, for particle stratification respectively
h,ψ
m,ψ
lRespectively, the high weight particle set, the medium weight particle set and the low weight particle set.
Step 2, finding out the most possible state of the target by using the position and weight information of the particles at the current moment, namely generating proper suggested distribution, thereby accurately estimating the position of the target at the current moment, selecting whether to carry out cohesive motion on the middle-layer particles according to the number of the particles in different layers, and finally carrying out cohesive motion on the particles in the lower layer; in the SIF algorithm, the following 4 criteria are followed:
criterion 1
When high weight particle set psihLarge number of middle particles (length (psi)h) > threshold), indicating that the particle collection can sufficiently confirm the position state of the target at the current moment, and the tracking effect is ideal. The center position is calculated according to the GMMSE criterion.
When generating the proposed distribution, the position states of the high-weight particles and the medium-weight particles are kept in consideration of the diversity of the particles, and only the low-weight particle set psi is usedlThe particles in (a) move cohesively.
Criterion 2
When high weight particle set psihHas a small number of particles but is larger than a threshold value (mpts > 0, threshold > length (psi)h) Mps), and a subset of intermediate weight particles ψmHas a large number of particles (length (psi)m) > threshold). It shows that in the current state, the tracking effect is good, but the periphery of the high-weight particle may have higher weight. Then the high weight particle set psi is processed according to the LMMSE criterionhThe particles therein are locally weighted, and the central position is calculated. The reason why the threshold mpts is larger than 0 is to prevent the extracted Feature (Feature Extractor) from not sufficiently representing the state of the target, i.e. the extreme particles may not represent the state of the target position, but the weight calculated according to the observation model is larger.
When generating the proposed distribution, the position state of the medium-weight particles is kept, and only the low-weight particle set psilThe particles in (a) move cohesively.
Criterion 3
When high weight particle set psihThe number of particles in (B) is less than a certain threshold value (mpts > 0, threshold > length (psi)h) Mps), and a subset of intermediate weight particles ψmHas a small number of particles (threshold > length (psi)m)). And according to the LMMSE criterion, locally weighting the particles in the high-weight particle set to calculate the central position.
Centering weight particle subset psi in generating a proposed distributionmAnd a low weight particle set psilThe particles in (a) simultaneously undergo cohesive motion.
Criterion 4
When high weight particle set psihThe number of particles in (mpts > length (psi))h) And the set of medium weight particles ψ)mHas a large number of particles (length (psi)m) > threshold). Watch (A)Obviously, the tracking effect is general, but the position state of the target can still be approximately represented by a large number of medium weight particles. Centering the weight particle set psi according to the LMMSE criterionmThe particles therein are locally weighted and the center position is calculated.
In generating the proposed distribution, psi is applied only to the low-weight particle setlThe particles in (a) move cohesively.
And step 3: state estimation
Generally, state estimation can be performed according to a Minimum Mean Square Error (MMSE) criterion or a Maximum A Posteriori (MAP) criterion, and a condition mean value or a state with a maximum a posteriori probability density is used as an estimated value of a system state, that is, the position of a target for updating and estimating a correction state is recalculated for particles after the aggregation motion and is used as a real position of the target for output;
the MAP criterion calculation formula is:
wherein w
k(x
k) For each particle in the set of particles, x
kIs the sample of the particles at time k,
to satisfy maxw
k(x
k) All x of the conditions
kA set of constructs. The MMSE criterion is subdivided into the following two categories:
the Local Minimum Mean Square Error (LMMSE) criterion is used to count the number of particles M in R by setting a range R. When the target posterior state is estimated, only the particle samples in R are summed according to the weight, and the calculation formula is as follows:
wherein
As a result of weight normalization of the ith particle in the particle sample at time k,
is the ith particle in the sample of particles at time k.
The Global Minimum Mean Square Error (GMMSE) criterion is used for weighting and summing the whole particles in the particle set with the total number of N, and the calculation formula is as follows:
wherein
As a result of weight normalization of the ith particle in the particle sample at time k,
is the ith particle in the sample of particles at time k.
And 4, step 4: state prediction
And designing a prior distribution function, and predicting the state of an estimation target at the next moment, namely performing arrangement motion or separation motion on the particles according to the number of the particles in different layers. In the method of the invention (SIF algorithm), the following 2 criteria are followed:
criterion 5
And if the current time meets the condition of the updating criterion, the current time can judge the position state of the target. And estimating the posterior state of the target according to the GMMSE criterion, and predicting the prior state of the next moment by the permutation motion of the particle set.
Criterion 6
If the current time does not satisfy any condition in the updating criteria, the high-weight particle set psihVery few particles in (mpts > length (psi)h) And the number of medium weight particles is also small (threshold > length (ψ)m)). Estimating the posterior state of the target according to the maximum posterior criterion, determining the central position according to the MAP criterion, and predicting the next moment by the separation motion of all the particlesA priori.
The three movement modes are as follows:
(1) cohesive movement
According to the weight values of the existing particles, the particles with lower weight values are moved to the region with higher weight values, so that a more reliable importance density function is generated. In order to improve robustness, the method of moving the particles is as follows:
coh(xk):xk=xk-1+(a+(b-a)*rand)*(xk-1-xc)
wherein xkIs the position state of the particle at time k, xk-1Position state, x, at the previous momentcThe average center position is determined by the corresponding updating criterion. rand is a random number from 0 to 1, a and b are preset constants, wherein a is less than or equal to 1 and less than or equal to b, the smaller the value of b-a, the faster the cohesion speed, but the poorer the particle diversity, and conversely, the larger the value of b-a, the slower the cohesion speed, but the better the particle diversity.
(2) Separate movement
When the target position cannot be accurately determined at the current moment, all the particles are subjected to separation motion, so that the possible states of the target can be covered as much as possible at the next moment. The movement method of the particles is as follows:
spa(xk):xk=xk-1+λ*rand(xc-xk-1)
wherein x
kIs the position of the particle at time k, x
k-1Position state, x, at the previous moment
cThe average center position is determined by the corresponding updating criterion.
And for the average displacement of the target, rand is a random number from 0 to 1, wherein lambda is a preset constant, lambda is not more than 1, the larger the lambda value is, the larger the separation degree is, the stronger the global search capability is, but the weaker the local search capability is, and conversely, the smaller lambda is, the smaller the separation degree is, the poorer the global search capability is, but the stronger the local search capability is.
(3) Array movement
The purpose of the permutation movement is to predict the target position at the next time under the condition that the target position can be accurately estimated at the current time. We use the state transition probability density as a motion model for ranking motions, i.e.:
xk~p(xk|xk-1)
in practical application to target tracking, there are many physical motion models for system state transition, such as variable acceleration motion, variable deceleration motion, acceleration motion, and the like. For computational convenience, a uniform motion model is used in the algorithm of the present invention.
Fig. 2 (a) shows a function distribution of the state function and the observation function. It can be known from the figure that, at time 5 to time 20, the peak value of the observation model z of the target overlaps with the peak value of the state transition model x, and at this time, the likelihood function is at the tail of the prior distribution, and the measurement accuracy is high, so the weight values of the particles are concentrated in a few particles, and the weight values of a majority of the particles tend to zero, and thus the particle filter has a serious particle degradation phenomenon. Although the PF-SIR algorithm can reduce the degradation phenomenon by resampling, the particle diversity is correspondingly reduced, and the tracking effect is obviously reduced as can be seen from (b) in fig. 2. The SIF algorithm of the invention fully utilizes the observation information at the current moment, moves the particles with lower weight to the region with higher weight through cohesive motion, and has better particle diversity while increasing the weight of the particles, so the state estimation effect is obviously better than that of the PF-SIR algorithm. Fig. 2 (c) (d) (e) (f) lists the intelligent population optimization algorithm in the basitball video set experimental results section frame screenshots. In a Basketball video sequence, partial occlusion of a target occurs in 12 frames; in 16 frames, the target is greatly shielded, and the SIF carries out local weighting on the particles in the high-weight particle set through the criterion 3, so that the shielding problem is effectively processed. Around 107 frames, the target appears to move rapidly; after 186 frames, the target rotates outside the large-scale plane, the target is not lost by the SIF algorithm, and the target tracking speed is about 10 frames per second.