nwojke / deep_sort

Simple Online Realtime Tracking with a Deep Association Metric
GNU General Public License v3.0
5.31k stars 1.49k forks source link

Intuition for adjusting _std_weight_position #228

Open mazatov opened 4 years ago

mazatov commented 4 years ago

I want to tune _std_weight_position and _std_weight_velocity for my problem. Wonder if someone can provide some intuition for adjusting these parameters.

I tried to change the values from the original 1/20 to 1/2 and to 10 and really haven't noticed difference in the resutls.

Thanks!

mazatov commented 4 years ago

As I understand larget std should result in larger covariance and hence smaller gating_distance but they don't seem to have much of an impact.

studentbrad commented 3 years ago

_std_weight_position and _std_weight_velocity are scalars multiplied with the height of the bounding box, a solid way to initialize the covariance matrix given that images have no depth information. Making these values larger will increase uncertainty and therefore decrease the gating distance. However, be aware that during the update step:

new_covariance = covariance - np.linalg.multi_dot((
            kalman_gain, projected_cov, kalman_gain.T))

it is likely that the covariance matrix is significantly reduced due to the small innovation. This will not change the gating distance since the gating distance is computed before the update step, but it is worth noting. However, you have the right intuition. What you are doing should work.