Docsity

Hidden Variables, EM Algorithm, and Mixtures of Gaussians in Computer Vision, Lecture notes of Computer Science

Partial preview of the text

Download Hidden Variables, EM Algorithm, and Mixtures of Gaussians in Computer Vision and more Lecture notes Computer Science in PDF only on Docsity!

Hidden Variables, the EM Algorithm,

and Mixtures of Gaussians

Computer Vision

Docsity.com

Today’s Class

• Examples of Missing Data Problems

  • Detecting outliers

• Background

  • Maximum Likelihood Estimation
  • Probabilistic Inference

• Dealing with “Hidden” Variables

  • EM algorithm, Mixture of Gaussians
  • Hard EM

Missing Data Problems: Object Discovery

You have a collection of images and have extracted regions from them. Each is represented by a histogram of “visual words”.

Challenge: Discover frequently occurring object categories, without pre-trained appearance models.

http://www.robots.ox.ac.uk/~vgg/publications/papers/russell06.pdf Docsity.com

Missing Data Problems: Segmentation

You are given an image and want to assign

foreground/background pixels.

Challenge: Segment the image into figure and

ground without knowing what the foreground

looks like in advance.

Foreground

Background

Maximum Likelihood Estimation

  1. If we had labels, how could we model the appearance of foreground and background?

Foreground

Background

Maximum Likelihood Estimation

n

n

N

p x

p

x x

ˆ argmax ( | )

ˆ argmax ( | )

x

x

data (^) parameters

Maximum Likelihood Estimation

n

n

N

p x

p

x x

ˆ argmax ( | )

ˆ argmax ( | )

x

x

2

2

2

2

2

exp 2

1 ( | , )

n n

x p x

Gaussian Distribution

n

xn N

1 ˆ

n

xn N

2 2 ˆ

1 ˆ

Example: MLE

mu_fg = mean(im(labels))

mu_fg = 0.

sigma_fg = sqrt(mean((im(labels)-mu_fg).^2))

sigma_fg = 0.

mu_bg = mean(im(~labels))

mu_bg = 0.

sigma_bg = sqrt(mean((im(~labels)-mu_bg).^2))

sigma_bg = 0.

pfg = mean(labels(:));

im labels

fg: mu=0.6, sigma=0. bg: mu=0.4, sigma=0.

Parameters used to Generate

Probabilistic Inference

Compute the likelihood that a particular

model generated a sample

component or label

p( zn m| xn, )

Probabilistic Inference

Compute the likelihood that a particular

model generated a sample

component or label

n

n n m n n p x

p z m x p z m x

Probabilistic Inference

Compute the likelihood that a particular

model generated a sample

component or label

n

n n m n n p x

p z m x p z m x

k

n n k n k

n n m n m

p x z k p z k

p x z m p z m

k

n n k

n n m

p z k x

p z m x

Example: Inference

pfg = 0.5;

px_fg = normpdf(im, mu_fg, sigma_fg);

px_bg = normpdf(im, mu_bg, sigma_bg);

pfg_x = px_fgpfg ./ (px_fgpfg + px_bg*(1-pfg));

fg: mu=0.6, sigma=0.1 im bg: mu=0.4, sigma=0.

Learned Parameters

p(fg | im)

Mixture of Gaussian* Example: Matting

Result from “Bayesian Matting”, Chuang et al. 2001Docsity.com

Dealing with Hidden Variables

  1. How can we get both labels and appearance models at once?

Foreground

Background