# "Bi Directional" Kalman Filter - Kalman Filter for Smoothing

I am working on a project in Object Tracking, i.e. need to predict the location of next bounding box.

I used a Hungarian algorithm with a Kalman Filter (which is a common method in this domain) which produced decent results. However, lots of the times detector has False Positive or False Negative detections (i.e. noise in the sensor) which limits Kalman's predictions.

I was thinking to apply Kalman filter in the backward time direction, similar to bidirectional recurrent neural networks. This way it would utilize information in the future, of course compromising on some latency.

This way we would have 2 filters, one in forward direction and another in backward both of which would predict a current location and two results will be merged using another simple method. From my understanding of Kalman filters it would only be possible to have a backward filter only if I were to recompute the full state at every sequence step given next n states.

• What do FP and FN mean?
– Ben
Sep 5, 2018 at 20:24
• Curious about how you’re using the Hungarian algorithm. I’ve seen it most often used in multi-target hard assignments. If you are only tracking one object, Bar Shalom’s PDA Filter is worth looking at.
– user28715
Sep 6, 2018 at 16:49
• Take a look at sciencedirect.com/science/article/pii/S0005109800001588
– user28715
Sep 6, 2018 at 16:53
• @Ben FP and FN mean False Positive and False Negative, respectively. Sep 7, 2018 at 3:22
• @StanleyPawlukiewicz Thanks! I wanted to look into PDA, will do it! Hungarian algorithm is actually still actively used in assignment of detections (bounding boxes of objects) to tracks in order to match them across frames. You can have a look at this simple and efficient method here: arxiv.org/abs/1602.00763 Sep 7, 2018 at 3:24

Anuar Y, Welcome to the DSP community.

What you're talking about is called smoothing.
Let me explain, assume we have samples ${\left\{ x \left[ n \right] \right\}}_{n = 0}^{N - 1}$ and we want to build estimator for $x \left[ k \right]$ which we will define as $\hat{x} \left[ k \right]$.

Now, we have 3 types of estimation:

1. The case $k > N - 1$ is called prediction.
This is usually what we employ Kalman Filter for.
2. The case $k = N - 1$ is called filtration.
This is easy as we basically filter data we have.
3. The case $k < N - 1$ is called smoothing.
This is basically what you're after.

So, there is plenty of information about the Kalman Filter in the Smoothing framework:

If there is something specific you need, let us know and we'll assist you.

• It would seem a fixed lag smoother would be a better answer given the problem description
– user28715
Sep 6, 2018 at 16:52
• @StanleyPawlukiewicz, I agree. Hence I linked to Fixed Leg Smoother. But there are not enough details to actually build a more deep answer.
– Royi
Sep 6, 2018 at 16:58
• @Royi Thank you for a great introduction! I appreciate a warm welcome from this community :) I indeed looked into Fixed-lag Smoother (and also into RTS smoother), however my problem is more complicated due to the fact that each individual detection has to associated to a track between every frame, i.e. we don't know which sensor our observations are coming from at every timestep. For that I simply use a Hungarian algorithm to get hard matches. It seems like due to this fact there is no trivial solution to directly use a fixed-leg smoother. Sep 7, 2018 at 3:29