mikel-brostrom/boxmot

Question about the initialization of the process uncertainty matrix (`Q`) in `ocsort.py`

edblu1 opened this issue · 2 comments

Search before asking

  • I have searched the Yolo Tracking issues and found no similar bug report.

Question

Hi Mikel!
I have a question regarding the specific initialization of the process uncertainty matrix (Q) in ocsort.py.
Inside the KalmanBoxTracker class, Q is updated as follows:

self.kf.Q[-1, -1] *= 0.01
self.kf.Q[4:, 4:] *= 0.01

Is there a specific reason why Q is initialized this way, particularly with such low uncertainty values fot those entries?

The reason behind this question is that we've been using the OC-SORT tracker on traffic scenarios with a stable, mounted camera. Due to the perspective of the camera the sizes of the objects bounding boxes can sometimes change drastically over time. Meanwhile the specific traffic setup leads to continuous variations in object speeds and directions. We noticed that resetting the uncertainty values in the covariance matrix (Q) to their original settings (np.eye(dim_x)) significantly improved tracker performance in some scenarios without reducing performance in others.

I haven't had a chance yet to validate this setup against other official MOT benchmarks to ensure it doesn't hurt performance. If I find the time, I'll also give that a try.

We'd love to understand the reasoning behind this specific initialization in the repository.

Thanks a lot for your help!

Not sure. This comes straight from the original implementation. Maybe there is something in the paper about this?

https://github.com/noahcao/OC_SORT/blob/7a390a5f35dbbb45df6cd584588c216aea527248/trackers/ocsort_tracker/ocsort.py#L83-L84

Okay, thanks for the fast reply!