Bayesian Inference — playing with Kalman filters

Raoul De Kezel
1 min readDec 26, 2020

This play builds upond

  • Home Assistant as the Home Automation fundation
  • The Deepstack Home Assistant integration by Rob Marc Cole
  • A cool Jupyter tutorial on Bayesian filters from Roger Labbe

The general idea is to shoot a sequence of camera pictures when movement is detected (or no longer undetected); stream pictures to deepstack deep neural net for classification, then use bayesian filtering to estimate where people end up and — most importantly — whether they end up still in the living / eating room.

The Process

The core idea of Bayesian filtering is:

  • Start with (1) some some estimate of the state of the world (2) a statistical model on how the world will evolve.
  • Apply (2) to (1) to have a new estimate of the state of the world. Given uncertainties in both initial estimate and in the accuracy of the model, confidence tends to degrade.
  • Do a measure on the new state of things. Even though measures are themselves uncertain, they tend to pretty much narrow down things and improve our confidence on what the new state of the world is.

Building the Model

--

--