Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf ·...

143
Probabilistic Scene Grammars: A General-Purpose Framework for Scene Understanding Jeroen Chua Advisor: Pedro Felzenszwalb

Transcript of Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf ·...

Page 1: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

Probabilistic Scene Grammars:A General-Purpose Framework for

Scene Understanding

Jeroen Chua

Advisor: Pedro Felzenszwalb

Page 2: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:
Page 3: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

Why a general-purpose framework?

• Improvements can boost performance on many scene understanding tasks simultaneously

• Less engineering/research work for future scene understanding tasks

• Scene understanding tasks inform each other

• Scientifically interesting: can all (most) of scene understanding be understood as the same fundamental problem?

Page 4: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

This thesis• Motivation for a general scene understanding framework

• Background/related work

• Representation for general scene understanding tasks

• Efficient approximate inference algorithm

• Notes on other possible inference algorithms

• Connections to related work

• Learning algorithm to estimate model parameters

• Experimental evaluation

• Extensions for larger/more complex tasks

• Directions for future research

Page 5: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

• Motivation for a general scene understanding framework

• Background/related work

• Representation for general scene understanding tasks

• Efficient approximate inference algorithm

• Notes on other possible inference algorithms

• Connections to related work

• Learning algorithm to estimate model parameters

• Experimental evaluation

• Extensions for larger/more complex tasks

• Directions for future research

This talk

Page 6: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

• Motivation for a general scene understanding framework

• Background/related work

• Representation for general scene understanding tasks

• Efficient approximate inference algorithm

• Learning algorithm to estimate model parameters

• Experimental evaluation

• Extensions for larger/more complex tasks

• Directions for future research

This talk

Page 7: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

Contextual information is often useful

Page 8: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

Context helps for _______________

Page 9: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

Context helps for object recognition

Page 10: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

Context helps for object recognition

Page 11: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

Context helps for contour detection

Page 12: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

Context helps for image segmentation

Page 13: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

Related work• Contextual information

• Oliva and Torralba[1,2], Efros [3]

• Empirical studies [4]

• Gestalt Theory [5]

• Motivation• Probabilistic Programming Languages

[6,7,8]

[1] “Modelling the shape of the scene: a holistic representation of the spatial envelope”, IJCV 2001

[2] “The role of context in object recognition”, Trends in Cognitive Sciences, 2007

[3] “Unsupervised visual representation learning by context prediction”, ICCV 2015

[4] “An empirical study of context in object detection”, CVPR 2009

[5] Vision science: Photons to phenomenology, volume 1. MIT press, 1999

• Modelling• Pictorial Structures [8]

• DPM [9]

• “Markov backbone” model [10]

• Probabilistic inference for compositional models• Markov-chain Monte Carlo

• Heuristics

[6] “Picture: A probabilistic programming language for scene perception”, CVPR 2015

[7] “Edward: A library for probabilistic modeling, inference, and criticism”, arXiv 2016

[8] “The design and Implementation of Probabilisitic Programming Languages”, http://dippl.org 2014

[9] “Pictorial Structures for object recognition”, IJCV 2005

[10] “Object detection with grammar models”, NIPS 2011

[11] “Context and hierarchy in a probabilistic image model”, CVPR 2006

Page 14: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

• Motivation for a general scene understanding framework

• Background/related work

• Representation for general scene understanding tasks

• Efficient approximate inference algorithm

• Learning algorithm to estimate model parameters

• Experimental evaluation

• Extensions for larger/more complex tasks

• Directions for future research

This talk

Page 15: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

• Motivation for a general scene understanding framework

• Background/related work

• Representation for general scene understanding tasks

• Efficient approximate inference algorithm

• Learning algorithm to estimate model parameters

• Experimental evaluation

• Extensions for larger/more complex tasks

• Directions for future research

This talk

PSG

Page 16: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

The Probabilistic Scene Grammar Framework

Probabilistic SceneGrammar Learning

Approximate EM Algorithm

Factor graph

f1

f2

X

Inference

f1

f2

X

Page 17: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

The Probabilistic Scene Grammar Framework

Factor graph Inference Learning

Approximate EM Algorithm

f1

f2

X

f1

f2

X

Probabilistic SceneGrammar

Page 18: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

Probabilistic Scene Grammars

•Context-free stochastic grammar• Symbols, eg. {Face, eye, conversation}• Pose space, eg. {location, orientation, scale}• Production rules, eg. Face{Eye,Eye,Nose,Mouth}• Production rule probabilities

•Geometric relationships between objects/parts

• “Self-rooting” parameter

Page 19: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

Generative example: FacesSymbols: Face (F), Eye (E), Nose (N), Mouth (M), Eyelashes (L)

Rule P(rule) Spatial distribution type

Page 20: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

Generative example: Faces

Rule P(rule) Spatial distribution type

Symbols: Face (F), Eye (E), Nose (N), Mouth (M), Eyelashes (L)

Page 21: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

Generative example: Faces

Rule P(rule) Spatial distribution type

Symbols: Face (F), Eye (E), Nose (N), Mouth (M), Eyelashes (L)

Page 22: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

Generative example: Faces

Rule P(rule) Spatial distribution type

Symbols: Face (F), Eye (E), Nose (N), Mouth (M), Eyelashes (L)

Page 23: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

Generative example: Faces

Rule P(rule) Spatial distribution type

FE,E,N,M 1.0 Uniform

Symbols: Face (F), Eye (E), Nose (N), Mouth (M), Eyelashes (L)

Page 24: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

Generative example: Faces

Rule P(rule) Spatial distribution type

FE,E,N,M 1.0 Uniform

Symbols: Face (F), Eye (E), Nose (N), Mouth (M), Eyelashes (L)

Page 25: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

Generative example: Faces

Rule P(rule) Spatial distribution type

FE,E,N,M 1.0 Uniform

Symbols: Face (F), Eye (E), Nose (N), Mouth (M), Eyelashes (L)

Page 26: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

Generative example: Faces

Rule P(rule) Spatial distribution type

FE,E,N,M 1.0 Uniform

Symbols: Face (F), Eye (E), Nose (N), Mouth (M), Eyelashes (L)

Page 27: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

Generative example: Faces

Rule P(rule) Spatial distribution type

FE,E,N,M 1.0 Uniform

Symbols: Face (F), Eye (E), Nose (N), Mouth (M), Eyelashes (L)

Page 28: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

Generative example: Faces

Rule P(rule) Spatial distribution type

FE,E,N,M 1.0 Uniform

Symbols: Face (F), Eye (E), Nose (N), Mouth (M), Eyelashes (L)

Page 29: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

Generative example: Faces

Rule P(rule) Spatial distribution type

FE,E,N,M 1.0 Uniform

Symbols: Face (F), Eye (E), Nose (N), Mouth (M), Eyelashes (L)

Page 30: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

Generative example: Faces

Rule P(rule) Spatial distribution type

FE,E,N,M 1.0 Uniform

Symbols: Face (F), Eye (E), Nose (N), Mouth (M), Eyelashes (L)

Page 31: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

Generative example: Faces

Rule P(rule) Spatial distribution type

FE,E,N,M 1.0 Uniform

Symbols: Face (F), Eye (E), Nose (N), Mouth (M), Eyelashes (L)

Page 32: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

Generative example: Faces

Rule P(rule) Spatial distribution type

FE,E,N,M 1.0 Uniform

Symbols: Face (F), Eye (E), Nose (N), Mouth (M), Eyelashes (L)

Page 33: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

Generative example: Faces

Rule P(rule) Spatial distribution type

FE,E,N,M 1.0 Uniform

Symbols: Face (F), Eye (E), Nose (N), Mouth (M), Eyelashes (L)

Page 34: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

Generative example: Faces

Rule P(rule) Spatial distribution type

FE,E,N,M 1.0 Uniform

Symbols: Face (F), Eye (E), Nose (N), Mouth (M), Eyelashes (L)

Page 35: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

Generative example: Faces

Rule P(rule) Spatial distribution type

FE,E,N,M 1.0 Uniform

Symbols: Face (F), Eye (E), Nose (N), Mouth (M), Eyelashes (L)

Page 36: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

Generative example: Faces

Rule P(rule) Spatial distribution type

FE,E,N,M 1.0 Uniform

Symbols: Face (F), Eye (E), Nose (N), Mouth (M), Eyelashes (L)

Page 37: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

Generative example: Faces

Rule P(rule) Spatial distribution type

FE,E,N,M 1.0 Uniform

EL 0.5

E∅ 0.5 -

Symbols: Face (F), Eye (E), Nose (N), Mouth (M), Eyelashes (L)

Page 38: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

Generative example: Faces

?Rule P(rule) Spatial distribution

type

FE,E,N,M 1.0 Uniform

EL 0.5

E∅ 0.5 -

Symbols: Face (F), Eye (E), Nose (N), Mouth (M), Eyelashes (L)

Page 39: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

Generative example: Faces

?Rule P(rule) Spatial distribution

type

FE,E,N,M 1.0 Uniform

EL 0.5

E∅ 0.5 -

Symbols: Face (F), Eye (E), Nose (N), Mouth (M), Eyelashes (L)

Page 40: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

Generative example: Faces

?

Rule P(rule) Spatial distribution type

FE,E,N,M 1.0 Uniform

EL 0.5

E∅ 0.5 -

Symbols: Face (F), Eye (E), Nose (N), Mouth (M), Eyelashes (L)

Page 41: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

Generative example: Faces

?

Rule P(rule) Spatial distribution type

FE,E,N,M 1.0 Uniform

EL 0.5

E∅ 0.5 -

Symbols: Face (F), Eye (E), Nose (N), Mouth (M), Eyelashes (L)

Page 42: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

Generative example: Faces

?Rule P(rule) Spatial distribution

type

FE,E,N,M 1.0 Uniform

EL 0.5

E∅ 0.5 -

Symbols: Face (F), Eye (E), Nose (N), Mouth (M), Eyelashes (L)

Page 43: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

Generative example: Faces

?Rule P(rule) Spatial distribution

type

FE,E,N,M 1.0 Uniform

EL 0.5

E∅ 0.5 -

Symbols: Face (F), Eye (E), Nose (N), Mouth (M), Eyelashes (L)

Page 44: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

Generative example: Faces

?Rule P(rule) Spatial distribution

type

FE,E,N,M 1.0 Uniform

EL 0.5

E∅ 0.5 -

Symbols: Face (F), Eye (E), Nose (N), Mouth (M), Eyelashes (L)

Page 45: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

Generative example: Faces

?Rule P(rule) Spatial distribution

type

FE,E,N,M 1.0 Uniform

EL 0.5 Indep. Bernoullis, 50%

E∅ 0.5 -

Symbols: Face (F), Eye (E), Nose (N), Mouth (M), Eyelashes (L)

Page 46: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

Generative example: Faces

?Rule P(rule) Spatial distribution

type

FE,E,N,M 1.0 Uniform

EL 0.5 Indep. Bernoullis, 50%

E∅ 0.5 -

Symbols: Face (F), Eye (E), Nose (N), Mouth (M), Eyelashes (L)

Page 47: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

Generative example: Faces

Rule P(rule) Spatial distribution type

FE,E,N,M 1.0 Uniform

EL 0.5 Indep. Bernoullis, 50%

E∅ 0.5 -

N∅ 1.0 -

M∅ 1.0 -

L∅ 1.0 -

Symbols: Face (F), Eye (E), Nose (N), Mouth (M), Eyelashes (L)

Page 48: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

Generative example: FacesSymbols: Face (F), eye (E), nose (N), mouth (M), eyelashes (L)

Page 49: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

Generative example: FacesSymbols: Face (F), eye (E), nose (N), mouth (M), eyelashes (L)

Page 50: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

Probabilistic Scene Grammar SpecificationContour detection grammarFace localization grammar

Binary image segmentation grammar

Page 51: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

Probabilistic Scene Grammar SamplesContour detection grammarFace localization grammar

Binary image segmentation grammar

Page 52: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

The Probabilistic Scene Grammar Framework

Factor graph Inference Learning

Approximate EM Algorithm

f1

f2

X

f1

f2

X

Probabilistic SceneGrammar

Page 53: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

Factor Graphs

Encodes a distribution over random variables

f1f2

X1

X2

X3

Page 54: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

Which child to choose ?

Which production rule?

EL 0.5 -

E∅ 0.5 -

Three types of distributions: 1) Categorical

Distributions of the PSG

Page 55: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

Three types of distributions: 2) Independent Bernoullis

Distributions of the PSG

Page 56: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

Three types of distributions: 2) Independent Bernoullis

Which children to choose ?

Distributions of the PSG

Page 57: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

Three types of distributions: 3) Leaky-or

Distributions of the PSG

Page 58: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

Object present?

Three types of distributions: 3) Leaky-or

?

?

Distributions of the PSG

Page 59: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

Object present?

Three types of distributions: 3) Leaky-or

Distributions of the PSG

Page 60: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

Framework: As a Factor Graph

Binary random variables: Factors:

=

Page 61: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

Framework: As a Factor Graph

Binary random variables:X: Presence/absence of object

Factors:f1: Leaky-or factor

Connections with super-parts

f1 X

=

Page 62: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

Framework: As a Factor Graph

Binary random variables:X: Presence/absence of objectRi: Choose rule i

Factors:f1: Leaky-or factorf2: Selection factor

Connections with super-parts

Xf1

f2

R1

R2

=

Page 63: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

Framework: As a Factor Graph

Binary random variables:X: Presence/absence of objectRi: Choose rule iCj: Create child j

Factors:f1: Leaky-or factorf2: Selection factorf3: Bernoullis factor

Connections with super-parts

f1

f2

Connections with subparts

X

R1

R2 f3

C3

C1

C2

=

Page 64: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

Framework: As a Factor Graph

Binary random variables:X: Presence/absence of objectRi: Choose rule iCj: Create child j

Factors:f1: Leaky-or factorf2: Selection factorf3: Bernoullis factorfd: Data model factor

=

Connections with super-parts

f1

f2

Connections with subparts

X

R1

R2 f3

C3

C1

C2

fd

Page 65: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

• Symbols: Face, Eye, Eyelashes

• 1D pose spaces

• Spatial neighbourhoods:• Face(y) Eye(y’), y’ = {y-1,y,y+1}

• Eye(y) EyeLashes(y’), y’ = {y-1,y,y+1}

Framework: As a Factor Graph

=

Page 66: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

• Symbols: Face, Eye, Eyelashes

• 1D pose spaces

• Spatial neighbourhoods:• Face(y) Eye(y’), y’ = {y-1,y,y+1}

• Eye(y) EyeLashes(y’), y’ = {y-1,y,y+1}

Framework: As a Factor Graph

=

Page 67: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

The Probabilistic Scene Grammar Framework

Factor graph Inference Learning

Approximate EM Algorithm

f1

f2

X

f1

f2

X

Probabilistic SceneGrammar

Page 68: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

•Given an image, what objects are in the image and what are their parts?

•Run Loopy Belief Propagation on the factor graph• Compute (approximate) posterior quantities, p(·|Image)

• In general: exponential time. Our case: linear time.

Approximate Inference

…X1 X2 XN

f

^

Page 69: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

The Probabilistic Scene Grammar Framework

Factor graph Inference Learning

Approximate EM Algorithm

f1

f2

X

f1

f2

X

Probabilistic SceneGrammar

Page 70: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

• Goal: Estimate model parameters• Rule probabilities

• Geometric relationships

• Leaky-or parameter

• Maximization-step: sums involving posterior quantities

• Exact posterior quantities are intractable to compute

• Expectation-step: use approximate posteriors computed by Loopy Belief Propagation

Learning: Approximate EM algorithm

Page 71: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

Learning: Approximate EM algorithm

Page 72: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

• Motivation for a general scene understanding framework

• Background/related work

• Representation for general scene understanding tasks

• Efficient approximate inference algorithm

• Learning algorithm to estimate model parameters

• Experimental evaluation

• Extensions for larger/more complex tasks

• Directions for future research

This talk

PSG

Page 73: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

• Motivation for a general scene understanding framework

• Background/related work

• Representation for general scene understanding tasks

• Efficient approximate inference algorithm

• Learning algorithm to estimate model parameters

• Experimental evaluation

• Extensions for larger/more complex tasks

• Directions for future research

This talk

Page 74: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

PSG framework is competitive with some specialized frameworks

Page 75: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

Application: contour detection

Page 76: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

• Dataset:• Ground truth: human-drawn object boundary contours from Berkeley

Segmentation Dataset [1]• B(x,y): Binary value of whether this pixel belongs to a contour • D(x,y): Pixel intensity• Data-model: D(x,y) ~ 𝑁(μB(x,y), σ)

Application: contour detection

[1] Arbelaez, Maire, Fowlkes, Malik. “Contour Detection and hierarchical image segmentation”, PAMI 2011.

Page 77: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

• Model:• Simple grammar model (next slides)• Factor graph contains ~50M edges

• Training:• Model parameters estimated using approximate EM algorithm• 200 train, 200 test

Application: contour detection

Page 78: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

Generating a curve

Page 79: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

Choose: continue contour, change orientation, or STOP

Generating a curve

Page 80: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

Generating a curve

Page 81: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

Generating a curve

Choose: continue contour, change orientation, or STOP

Page 82: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

Generating a curve

Page 83: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

Generating a curve

Choose: continue contour, change orientation, or STOP

Page 84: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

Generating a curve

Choose: continue contour, change orientation, or STOP

Page 85: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

Generating a curve

Choose: continue contour, change orientation, or STOP

Page 86: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

Generating a curve

Page 87: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

Generating a curve

Page 88: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

Generating a curve

Page 89: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

Ground truth

Image data

P(B = 1 | Image)

Inferred contours

Page 90: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

Contour detection: Comparison

1-level FOP and 4-level FOP from: “Multiscale Field of Patterns”, Felzenszwalb, Oberlin. NIPS 2014.

Context is important!

PSG framework competitive with Field-of-Patterns (FOP)

Page 91: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

Application: binary image segmentation

Page 92: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

• Dataset:• Ground truth: binary leaf masks [1]• B(x,y): Binary value of whether this pixel belongs to a leaf• D(x,y): Pixel intensity• Data-model: D(x,y) ~ 𝑁(μB(x,y), σ)

Application: binary image segmentation

[1] Soderkvist. “Computer vision classification of leaves from Swedish trees”, Master’s thesis 2011.

Page 93: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

Simple process to generate a binary mask“Grow” a foreground. Red/black pixels are part of foreground.

Page 94: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

Choose a pixel to be part of the foreground. Colour it red.

Simple process to generate a binary mask

Page 95: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

Choose a pixel to be part of the foreground. Colour it red.

Simple process to generate a binary mask

Page 96: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

Pick a red pixel and change its colour to black. Select some neighbours to be part of the foreground, if they are not already, and colour them red.

Simple process to generate a binary mask

Page 97: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

Simple process to generate a binary maskPick a red pixel and change its colour to black. Select some neighbours to be part of the foreground, if they are not already, and colour them red.

Page 98: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

Simple process to generate a binary maskPick a red pixel and change its colour to black. Select some neighbours to be part of the foreground, if they are not already, and colour them red.

Page 99: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

Simple process to generate a binary maskPick a red pixel and change its colour to black. Select some neighbours to be part of the foreground, if they are not already, and colour them red.

Page 100: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

Simple process to generate a binary maskPick a red pixel and change its colour to black. Select some neighbours to be part of the foreground, if they are not already, and colour them red.

Page 101: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

Simple process to generate a binary mask

Page 102: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

Simple process to generate a binary mask

Page 103: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

• Models:• Simple segmentation grammar (previous slides)• More complex segmentation grammar

• Training:• Model parameters estimated using approximate EM algorithm• 50 train, 25 test

Application: binary image segmentation

Page 104: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

Ground truth Image dataSimple grammar

Complex grammar

Page 105: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

Binary image segmentation: Comparison

1-level FOP and 4-level FOP from: “Multiscale Field of Patterns”, Felzenszwalb, Oberlin. NIPS 2014.

Context is important!

Complex segmentation grammar competitive with Field-of-Patterns (FOP)

Page 106: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

Application: Face localization

Page 107: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

Application: Face localization

Page 108: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

Face localization: Single-face Dataset• Labelled Faces in the Wild [1]

• Manually annotated 300 images with bounding box information for face, left eye, right eye, nose, mouth

• 200 training, 100 test

[1] Huang et al., “Labeled faces in the wild: A database for studying face recognition in unconstrained environments.”, Technical Report 07-49, University of Massachusetts, Amherst, October 2007.

Page 109: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

PSG Face Grammar

•Symbols: Face (F), Left eye (L), Right eye (R), Nose (N), Mouth (M)

•Pose space: (x,y,scale)

•Mechanism to handle help suppress false positives

•Geometric model learned from labelled data

•Data-model: calibrated HOG filter scores.

•Factor graph has ~3M edges

Page 110: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

Face localization: Baselines

•HOG Filter scores: calibrated HOG filter scores only

•“Pictorial Structures for object recognition”, IJCV 2005•Fast, exact inference•Assumes 1 object of each type per scene

Page 111: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

Ground truth HOG FiltersPSG Face Grammar

Pictorial Structures

Page 112: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

Face Localization: Performance comparison

Area under the precision-recall curve

Page 113: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

Face localization: Family Portraits Dataset• Dataset collected from the Internet

• Manually annotated 40 images with bounding box information

• Average of 5.9 faces per image

• Similar as trained model from LFW, but with more scales

• Use all 40 images for testing

Page 114: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

Ground truth

PSG Face Grammar

Pictorial Structures

Page 115: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

Face Localization: Performance Comparison

Area under the precision-recall curve

Page 116: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

• Motivation for a general scene understanding framework

• Background/related work

• Representation for general scene understanding tasks

• Efficient approximate inference algorithm

• Learning algorithm to estimate model parameters

• Experimental evaluation

• Extensions for larger/more complex tasks

• Directions for future research

This talk

Page 117: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

• Motivation for a general scene understanding framework

• Background/related work

• Representation for general scene understanding tasks

• Efficient approximate inference algorithm

• Learning algorithm to estimate model parameters

• Experimental evaluation

• Extensions for larger/more complex tasks

• Directions for future research

This talk

Page 118: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:
Page 119: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

Scaling up• Bigger images! More objects! Larger grammars!

Page 120: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

Binary random variables:X: Presence/absence of objectRi: Choose rule iCj: Create child j

Connections with super-parts

f1

f2

Connections with subparts

X

R1

R2 f3

C3

C1

C2

Not so fast …

fd

Factors:f1: Leaky-or factorf2: Selection factorf3: Bernoullis factorfd: Data model factor

Page 121: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

Graph has too many edges!•Most edges are inter-object

• Example: Eye of a particular face

Page 122: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

•Most edges are inter-object

• Example: Eye of a particular face

• (15 x 15)

Size of image region

Graph has too many edges!

Page 123: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

•Most edges are inter-object

• Example: Eye of a particular face

• (15 x 15) x 5

Size of image region

Graph has too many edges!

# orientations

Page 124: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

•Most edges are inter-object

• Example: Eye of a particular face

• (15 x 15) x 5 x 5

Size of image region

Graph has too many edges!

# orientations# scales

Page 125: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

•Most edges are inter-object

• Example: Eye of a particular face

• (15 x 15) x 5 x 5 x 5

Size of image region

# orientations# scales

# aspect ratios

Graph has too many edges!

Page 126: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

•Most edges are inter-object

• Example: Eye of a particular face

• (15 x 15) x 5 x 5 x 5 = 28125 edges

Size of image region

# orientations# scales

# aspect ratios

Graph has too many edges!

Page 127: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

•Most edges are inter-object

• Example: Eye of a particular face

• (15 x 15) x 5 x 5 x 5 = 28125 edges

Size of image region

# orientations# scales

# aspect ratios

This is for a single face, and a single eye!

Key issue: Size of distribution’s support

Graph has too many edges!

Page 128: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

Reducing the number of factor graph edges

•Reduce total support of probability distributions Reduce # of factor graph edges

• Approximate N-D distribution as N one-dimensional distributions

• Decompose 1-D Uniform distribution into a set of Categorical distributions

Page 129: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

Where to put eye? 1 of 25 choice x-coordinate of eye? 1 of 5 choice

y-coordinate of eye? 1 of 5 choice

Approximating an N-D distribution

Cost: 25 edges Cost: 10 edges

Page 130: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

Approximating an N-D distribution

Original distribution

Approximated distribution

Page 131: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

Decomposing a Uniform distribution

*

Page 132: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

Decomposing a Uniform distribution

? * ? …*

p

p2 pNp1

• Decomposition can be phrased as a series of convolutions• Find N and pi’s such that f=p and ∑|pi|0 is minimized.• Minimum value of ∑|pi|0 = sum of prime factorization of |f|0

• Construction algorithm for pi’s in thesis

=

f

Page 133: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

Decomposing a Uniform distribution on set {0,…,99}

Total support size: 14

Page 134: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

Applying edge reductionsRule Spatial distribution Size of region

FaceNose Uniform [25,25]

Rule Spatial distribution Size of region

FaceNose-Y Uniform [1,25]

Nose-YNose Uniform [25,1]

Rule Spatial distribution Size of region

FaceNose-Y1 Uniform [1,5]

Nose-Y1Nose-Y Uniform [1,5]

Nose-YNose-Y2 Uniform [5,1]

Nose-Y2Nose Uniform [5,1]

625 edges

50 edges

20 edges

Page 135: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

• Motivation for a general scene understanding framework

• Background/related work

• Representation for general scene understanding tasks

• Efficient approximate inference algorithm

• Learning algorithm to estimate model parameters

• Experimental evaluation

• Extensions for larger/more complex tasks

• Directions for future research

This talk

Page 136: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

• Motivation for a general scene understanding framework

• Background/related work

• Representation for general scene understanding tasks

• Efficient approximate inference algorithm

• Learning algorithm to estimate model parameters

• Experimental evaluation

• Extensions for larger/more complex tasks

• Directions for future research

This talk

Page 137: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

Directions for Future Research

•More scene understanding tasks

• Integration with Deep Learning

•Grammar learning

Page 138: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

This talk• Motivation for a general scene understanding framework

• Background/related work

• Representation for general scene understanding tasks

• Efficient approximate inference algorithm

• Learning algorithm to estimate model parameters

• Experimental evaluation

• Extensions for larger/more complex tasks

• Directions for future research

Thanks!

Page 139: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

Backup slides start

Page 140: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

Face localization without a face data model

Family Portraits: Area under the precision-recall curve

PSG Face Grammar

Faceless Grammar

Page 141: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

Face localization: 0-1 Face Dataset• Labelled Faces in the Wild [1] + images from VOC2012[2] without

faces

• 200 training, 200 test

• 100 test image have one face, 100 images have no faces.

[1] Huang et al., “Labeled faces in the wild: A database for studying face recognition in unconstrained environments.”, Technical Report 07-49, University of Massachusetts, Amherst, October 2007.

[2] Everingham, et al., “The PASCAL Visual Object Classes Challenge 2012 {(VOC2012)} Results”, 2012.

Page 142: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

Model Face Left eye Right eye Nose Mouth Average

Pictorial Structures 0.86 0.94 0.86 0.81 0.84 0.86

PSG Face Grammar 1.00 0.98 0.95 0.99 0.93 0.97

Face localization: 0-1 Face Dataset

Area under the precision-recall curve for the 0-1 Face Dataset

Model Face Left eye Right eye Nose Mouth Average

Pictorial Structures 1.00 0.97 0.93 0.98 0.90 0.96

PSG Face Grammar 1.00 0.98 0.92 0.98 0.92 0.96

Area under the precision-recall curve for the Single-Face Dataset

Page 143: Probabilistic Scene Grammars: A General-Purpose Framework ...jchua/ThesisDefense_slides.pdf · •Probabilistic Programming Languages [6,7,8] [1] “Modelling the shape of the scene:

Decomposing a Uniform distribution with prime support

Search over partitions. Dynamic programming?