24 CV
24 CV
Thomas Bayes
1702-1761
The Fish Problem
n Fisherman wants to
automatically classify
all his fish as
“salmon” or “bass”
Discrimination based on
length...
n Fully grown bass is, on average, longer
than salmon
Example:
Avg. length of Bass = 40
Avg. length of Salmon = 20
20 40
length
Histogram of length
20 40 20 40
salmon bass
Classification Strategy: We are going to mark a threshold
somewhere between 20 and 40. Every fish longer than
threshold will be classified as sea bass… every fish shorter
than it will be classified as salmon
20 40 20 40
salmon bass
For example
Bayes Classifier
n is the optimal classifier…
n Classification strategy:
n Given an observation x
n Find P(ci | x) for all i
n Classify as class which
returns highest probability
Application: Human Tracking
n Given the location of person in an
image, find the person in the next
image
Tracking
during
occlusion
A Person as a set of Classes
Approach
n Suppose there is a person visible in the
previous frame, consisting of 5 classes
n In the new frame this person is visible at a
different location
n For every pixel x in the new frame
n For every class i (i is from 1 to 5)
n Compute the probability of this pixel belonging to class i,
i.e. p(ci|x)
n Label the pixel as the class that returned the
highest probability
Approach
n We need to compute p(ci|x) at each
pixel and then label = arg maxi (p(ci|x))
n According to Bayes’ Rule, this is the
same as computing
label = arg maxi (p(x|ci) p(ci))
n Question:
n What is the property of each pixel that we
should measure, to set up our pdf p(x|ci)
Approach
n We chose to use the coordinate of the
pixel and the color at that pixel as our
features
n Feature vector [x, y, R, G, B]T
n The pdf was assumed to be Gaussian
n The prior term was assumed to be
equal for all classes
Algorithm
n For every pixel in the new frame
n compute probability of it belonging to each
class
http://www-white.media.mit.edu/vismod/demos/pfinder/
https://vismod.media.mit.edu/vismod/demos/pfinder/