AI Glossary / Computer vision and multimodal AI / Intermediate
Bayesian filtering
Definition
Bayesian filtering is a recursive method for estimating a changing hidden state from noisy observations. It combines a prediction based on the previous state estimate with new measurement evidence, maintaining a probability distribution that represents uncertainty about the current state.
What it means
A camera may observe an object's location imperfectly, while a motion model predicts where the object should move next. Neither source is certain. Bayesian filtering combines them using an explicit probabilistic model rather than accepting either one unconditionally.
The hidden state can include position, velocity, orientation or another quantity of interest. Observations might be image features, sensor readings or detections. The estimate is a belief distribution over possible states, not necessarily one exact answer.
Filtering estimates the current state using information available up to now. Smoothing is a related task that can use later observations to revise estimates of earlier states. The distinction matters when a system must operate in real time.
How it works
The prediction step propagates the previous belief through a state-transition model, including uncertainty about motion or other changes. This produces a prior distribution for the current state.
The correction step evaluates how likely the new observation would be under each candidate state. It multiplies the predicted probabilities by these measurement likelihoods and normalizes the result. The posterior then becomes the starting belief for the next cycle.
Different implementations represent the distribution differently. A Kalman filter provides an exact Gaussian solution under linear-Gaussian assumptions. Extended or unscented variants approximate nonlinear cases, while particle filters represent possibilities using weighted samples. Their accuracy depends on both model assumptions and numerical approximation, not merely on applying Bayes' rule.
Three practical examples
- A visual tracker combines predicted object motion with uncertain image detections to estimate current position.
- A mobile robot combines movement estimates and sensor observations to maintain a distribution over its location.
- A machine-monitoring system combines a state-transition model with noisy readings to estimate an underlying operating condition.
Think of it this way
Think of updating a weather expectation throughout the day: an earlier forecast provides a starting point, and each new observation changes what seems plausible. The analogy is limited because a Bayesian filter requires specified state and measurement models, and its probabilities are only as reliable as those assumptions and their calibration.
Worked example
Suppose a tracker has two possible locations, Left and Right. After its prediction step, it assigns probabilities 0.6 to Left and 0.4 to Right. A new observation is four times as likely at Right: its likelihood is 0.2 under Left and 0.8 under Right.
The unnormalized updated weights are 0.6 × 0.2 = 0.12 and 0.4 × 0.8 = 0.32. Their sum is 0.44. Normalizing gives approximately 0.273 for Left and 0.727 for Right.
The observation shifts the belief towards Right without treating it as certain. These numbers demonstrate the correction step after a prediction has already occurred. They do not specify how the transition model produced the initial 0.6 and 0.4.
Illustrative case study
Fictional example: Trackwell Lab follows a colored component across a conveyor image. Reflections sometimes move the detected center away from the true component position, so the team combines detections with a motion model.
When a measurement disagrees sharply with the prediction, engineers inspect the residual and the assumed noise levels. They test missed detections, temporary occlusion and changes in conveyor speed. A filter that looks smooth but consistently lags the object is not accepted merely because its path is visually tidy.
The team retains detection logs and uncertainty estimates for review. This fictional case illustrates model evaluation, not a guarantee that probabilistic filtering prevents all tracking failures.
Common misconceptions and mistakes
A Bayesian filter is not automatically a simple moving average. Its update depends on a model of how states change and how observations arise. A small uncertainty value is also not proof of accuracy: a badly specified filter can become confidently wrong.
Repeatedly counting correlated observations as independent can overstate the evidence. Incorrect process noise can make the filter resist real motion changes or follow measurement noise too readily. Particle filters need enough representative samples, and Gaussian approximations can struggle when the true belief has several distinct possibilities.
Business use
Bayesian filtering supports systems that must act on uncertain, changing information. Its value comes from combining evidence consistently and exposing uncertainty that a single point estimate may hide.
Define the state variables, transition assumptions and measurement likelihoods clearly. Evaluate estimation error, responsiveness and uncertainty calibration using representative sequences. Include temporary sensor failure and unexpected motion. Record model changes and check whether reported confidence matches observed errors. Smooth outputs alone do not establish that the filter is suitable for a control, monitoring or inspection task.
People also ask
Does Bayesian filtering require labeled training data?
Not necessarily. Models can be specified from physical reasoning or calibration, although learned components can also supply transitions or likelihoods.
What happens if a measurement is missing?
The filter can continue predicting, but uncertainty generally grows according to its model until informative evidence returns.
Is a Kalman filter the same as every Bayesian filter?
No. It is a particular solution for a linear-Gaussian setting. Other representations handle different assumptions or approximations.
Check your understanding
Why are the updated weights 0.12 and 0.32 divided by 0.44 in the worked example?
Answer: The division normalizes the posterior so its probabilities sum to one, while preserving their relative support after combining prediction and measurement evidence.
Related terms
- Posterior probability
- Kalman filter
- Prediction
- Smoothing
- Bayes filter
- state estimation
- measurement likelihood
- particle filter
- correction
Learn next
Repeat the two-state update with a less informative observation whose likelihood is the same in both states. Observe that it leaves the predicted probabilities unchanged after normalization. Then add a simple transition table and perform several prediction-correction cycles, keeping model uncertainty distinct from measurement uncertainty.
More in Computer vision and multimodal AI
- Banding - Banding is the appearance of visible steps or stripes in a region that should change smoothly in brightness or color.
- Barycentric coordinates - Barycentric coordinates describe a point as a weighted combination of reference vertices.
- Bayer pattern - A Bayer pattern is a repeating arrangement of red, green and blue color filters over a single image sensor.
- Beier - Neely field warping - Beier - Neely field warping is an image-deformation method controlled by corresponding line segments.
- Belief revision - Belief revision is the systematic change of a set of accepted statements when new information arrives, especially when that information conflicts with...
- Bessel's correction - Bessel's correction replaces division by n with division by n − 1 when estimating a population variance from n observations using their sample mean.
Sources
Thrun, Burgard and Fox, Probabilistic Robotics, Bayes-filter teaching material: https://www.cs.utexas.edu/~pstone/Courses/393Rfall15/resources/week5-book.pdf Book authors' companion site: http://www.probabilistic-robotics.org/ The two-state calculation and conveyor case are original illustrations. The source check covered accessible teaching material, not a full audit of every filter variant.
Previous: Bayesian experimental design Next: Bayesian game