probabilistic graphical models - cvlibs · probabilistic graphical models andreas geiger autonomous...

36
Probabilistic Graphical Models Andreas Geiger Autonomous Vision Group MPI T¨ ubingen Computer Vision and Geometry Lab ETH Z¨ urich January 13, 2017

Upload: others

Post on 07-Jun-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Probabilistic Graphical Models - Cvlibs · Probabilistic Graphical Models Andreas Geiger Autonomous Vision Group MPI Tubingen Computer Vision and Geometry Lab ETH Zurich January 13,

Probabilistic Graphical Models

Andreas Geiger

Autonomous Vision GroupMPI Tubingen

Computer Vision and Geometry LabETH Zurich

January 13, 2017

Page 2: Probabilistic Graphical Models - Cvlibs · Probabilistic Graphical Models Andreas Geiger Autonomous Vision Group MPI Tubingen Computer Vision and Geometry Lab ETH Zurich January 13,

Autonomous Vision GroupResearch

Dr. Andreas GeigerGroup Leader

Dr. Osman UlusoyPostdoc

Fatma GüneyPhD Student

Aseem BehlPhD Student

Lars MeschederPhD Student

Joel JanaiPhD Student

Benjamin CoorsPhD Student

Yiyi LiaoVisiting PhD Student

Gernot RieglerVisiting PhD Student

2

Page 3: Probabilistic Graphical Models - Cvlibs · Probabilistic Graphical Models Andreas Geiger Autonomous Vision Group MPI Tubingen Computer Vision and Geometry Lab ETH Zurich January 13,

Autonomous Vision GroupResearch

Computer Vision Robotics

Machine LearningGraphical Models Deep Learning

2

Page 4: Probabilistic Graphical Models - Cvlibs · Probabilistic Graphical Models Andreas Geiger Autonomous Vision Group MPI Tubingen Computer Vision and Geometry Lab ETH Zurich January 13,

Class Requirements & Materials

Requirements:

� Linear Algebra (matrices, vectors)

� Probability Theory (marginals, conditionals)

Materials: www.cvlibs.net/learn

3

Page 5: Probabilistic Graphical Models - Cvlibs · Probabilistic Graphical Models Andreas Geiger Autonomous Vision Group MPI Tubingen Computer Vision and Geometry Lab ETH Zurich January 13,

Machine Learning

“Field of study that gives computers the ability to learn without beingexplicitly programmed.” Arthur Samuel, 1959

4

Page 6: Probabilistic Graphical Models - Cvlibs · Probabilistic Graphical Models Andreas Geiger Autonomous Vision Group MPI Tubingen Computer Vision and Geometry Lab ETH Zurich January 13,

Machine Learning

5

Page 7: Probabilistic Graphical Models - Cvlibs · Probabilistic Graphical Models Andreas Geiger Autonomous Vision Group MPI Tubingen Computer Vision and Geometry Lab ETH Zurich January 13,

Machine Learning

5

Page 8: Probabilistic Graphical Models - Cvlibs · Probabilistic Graphical Models Andreas Geiger Autonomous Vision Group MPI Tubingen Computer Vision and Geometry Lab ETH Zurich January 13,

Machine Learning

5

Page 9: Probabilistic Graphical Models - Cvlibs · Probabilistic Graphical Models Andreas Geiger Autonomous Vision Group MPI Tubingen Computer Vision and Geometry Lab ETH Zurich January 13,

Machine Learning

5

Page 10: Probabilistic Graphical Models - Cvlibs · Probabilistic Graphical Models Andreas Geiger Autonomous Vision Group MPI Tubingen Computer Vision and Geometry Lab ETH Zurich January 13,

Graphical Models

6

Page 11: Probabilistic Graphical Models - Cvlibs · Probabilistic Graphical Models Andreas Geiger Autonomous Vision Group MPI Tubingen Computer Vision and Geometry Lab ETH Zurich January 13,

Supervised Learning

fθInput Output

Model

� Learning: Estimate parameters θ from training data

� Inference: Make novel predictions fθ(·)

7

Page 12: Probabilistic Graphical Models - Cvlibs · Probabilistic Graphical Models Andreas Geiger Autonomous Vision Group MPI Tubingen Computer Vision and Geometry Lab ETH Zurich January 13,

Classification

Input

"Beach"

Model Output

7

Page 13: Probabilistic Graphical Models - Cvlibs · Probabilistic Graphical Models Andreas Geiger Autonomous Vision Group MPI Tubingen Computer Vision and Geometry Lab ETH Zurich January 13,

Structured Prediction

Input Model Outputt=1

t=2

t=3t=1 t=2 t=3x1 x2 x3

7

Page 14: Probabilistic Graphical Models - Cvlibs · Probabilistic Graphical Models Andreas Geiger Autonomous Vision Group MPI Tubingen Computer Vision and Geometry Lab ETH Zurich January 13,

Vehicle Localization

lane 1lane 2lane 3

x1=? x2=? x3=? x4=? x5=? x6=? x7=? x8=? x9=? x10=?

� Goal: Estimate vehicle location at time t = 1, . . . , 10

� Variables: x = {x1, . . . , x10} xi ∈ {1, 2, 3}� Observations: y = {y1, . . . , y10} yi ∈ R3

8

Page 15: Probabilistic Graphical Models - Cvlibs · Probabilistic Graphical Models Andreas Geiger Autonomous Vision Group MPI Tubingen Computer Vision and Geometry Lab ETH Zurich January 13,

Markov Random Field

f1 f2 f3g gx1 x2 x3

f10gx10

g

9

Page 16: Probabilistic Graphical Models - Cvlibs · Probabilistic Graphical Models Andreas Geiger Autonomous Vision Group MPI Tubingen Computer Vision and Geometry Lab ETH Zurich January 13,

Markov Random Field

f1 f2 f3g gx1 x2 x3

f10gx10

g

pθ(x|y) =1

Z

10∏i=1

fi (xi )9∏

i=1

gθ(xi , xi+1)

9

Page 17: Probabilistic Graphical Models - Cvlibs · Probabilistic Graphical Models Andreas Geiger Autonomous Vision Group MPI Tubingen Computer Vision and Geometry Lab ETH Zurich January 13,

Markov Random Field

f1 f2 f3g gx1 x2 x3

f10gx10

g

pθ(x|y) =1

Z

10∏i=1

fi (xi )9∏

i=1

gθ(xi , xi+1)

Unary Factors:

� f1(x1) =

0.70.20.1

, f2(x2) =

0.70.10.2

, f3(x3) =

0.20.10.7

, . . .

9

Page 18: Probabilistic Graphical Models - Cvlibs · Probabilistic Graphical Models Andreas Geiger Autonomous Vision Group MPI Tubingen Computer Vision and Geometry Lab ETH Zurich January 13,

Markov Random Field

f1 f2 f3g gx1 x2 x3

f10gx10

g

pθ(x|y) =1

Z

10∏i=1

fi (xi )9∏

i=1

gθ(xi , xi+1)

Pairwise Factors:

� gθ(xi , xi+1) =

θ11 θ12 θ13θ21 θ22 θ23θ31 θ32 θ33

9

Page 19: Probabilistic Graphical Models - Cvlibs · Probabilistic Graphical Models Andreas Geiger Autonomous Vision Group MPI Tubingen Computer Vision and Geometry Lab ETH Zurich January 13,

Markov Random Field

f1 f2 f3g gx1 x2 x3

f10gx10

g

pθ(x|y) =1

Z

10∏i=1

fi (xi )9∏

i=1

gθ(xi , xi+1)

Pairwise Factors:

� gθ(xi , xi+1) =

θ11 θ12 θ13θ21 θ22 θ23θ31 θ32 θ33

� Learning Problem:

θ∗ = argmaxθ

∏n

pθ(xn|yn)

9

Page 20: Probabilistic Graphical Models - Cvlibs · Probabilistic Graphical Models Andreas Geiger Autonomous Vision Group MPI Tubingen Computer Vision and Geometry Lab ETH Zurich January 13,

Markov Random Field

f1 f2 f3g gx1 x2 x3

f10gx10

g

pθ(x|y) =1

Z

10∏i=1

fi (xi )9∏

i=1

gθ(xi , xi+1)

Pairwise Factors:

� gθ(xi , xi+1) =

0.8 0.2 0.00.2 0.6 0.20.0 0.2 0.8

� Change 2 lanes: 0%

� Change 1 lane: 20%

� Otherwise: stay on lane

9

Page 21: Probabilistic Graphical Models - Cvlibs · Probabilistic Graphical Models Andreas Geiger Autonomous Vision Group MPI Tubingen Computer Vision and Geometry Lab ETH Zurich January 13,

Inference

f1 f2 f3g gx1 x2 x3

f10gx10

g

� Maximum-A-Posteriori State:

x1, . . . , x10 = argmaxx1,...,x10

pθ(x1, . . . , x10|y)

� Marginal Distribution:

p(x1) =∑x2

∑x3

· · ·∑x10

pθ(x1, . . . , x10|y)

� Complexity?

10

Page 22: Probabilistic Graphical Models - Cvlibs · Probabilistic Graphical Models Andreas Geiger Autonomous Vision Group MPI Tubingen Computer Vision and Geometry Lab ETH Zurich January 13,

Inference

f1 f2 f3g gx1 x2 x3

f10gx10

g

� Maximum-A-Posteriori State:

x1, . . . , x10 = argmaxx1,...,x10

pθ(x1, . . . , x10|y)

� Marginal Distribution:

p(x1) =∑x2

∑x3

· · ·∑x10

pθ(x1, . . . , x10|y)

� Complexity?

10

Page 23: Probabilistic Graphical Models - Cvlibs · Probabilistic Graphical Models Andreas Geiger Autonomous Vision Group MPI Tubingen Computer Vision and Geometry Lab ETH Zurich January 13,

Inference

f1 f2 f3g gx1 x2 x3

f10gx10

g

� Maximum-A-Posteriori State:

x1, . . . , x10 = argmaxx1,...,x10

pθ(x1, . . . , x10|y)

� Marginal Distribution:

p(x1) =∑x2

∑x3

· · ·∑x10

pθ(x1, . . . , x10|y)

� Complexity?

10

Page 24: Probabilistic Graphical Models - Cvlibs · Probabilistic Graphical Models Andreas Geiger Autonomous Vision Group MPI Tubingen Computer Vision and Geometry Lab ETH Zurich January 13,

Inference

f1 f2 f3g gx1 x2 x3

f10gx10

g

� Maximum-A-Posteriori State:

x1, . . . , x10 = argmaxx1,...,x10

pθ(x1, . . . , x10|y)

� Marginal Distribution:

p(x1) =∑x2

∑x3

· · ·∑x10

pθ(x1, . . . , x10|y)

� Complexity? O(#states#nodes) Here: 310 = 59049

10

Page 25: Probabilistic Graphical Models - Cvlibs · Probabilistic Graphical Models Andreas Geiger Autonomous Vision Group MPI Tubingen Computer Vision and Geometry Lab ETH Zurich January 13,

Inference

f1 f2 f3g gx1 x2 x3

p(x1, x2, x3) =1

Zf1(x1) f2(x2) f3(x3) g(x1, x2) g(x2, x3)

11

Page 26: Probabilistic Graphical Models - Cvlibs · Probabilistic Graphical Models Andreas Geiger Autonomous Vision Group MPI Tubingen Computer Vision and Geometry Lab ETH Zurich January 13,

Inference

f1 f2 f3g gx1 x2 x3

p(x1, x2, x3) =1

Zf1(x1) f2(x2) f3(x3) g(x1, x2) g(x2, x3)

p(x1) =∑x2,x3

1

Zf1(x1) f2(x2) f3(x3) g(x1, x2) g(x2, x3)

11

Page 27: Probabilistic Graphical Models - Cvlibs · Probabilistic Graphical Models Andreas Geiger Autonomous Vision Group MPI Tubingen Computer Vision and Geometry Lab ETH Zurich January 13,

Inference

f1 f2 f3g gx1 x2 x3

p(x1, x2, x3) =1

Zf1(x1) f2(x2) f3(x3) g(x1, x2) g(x2, x3)

p(x1) =∑x2,x3

1

Zf1(x1) f2(x2) f3(x3) g(x1, x2) g(x2, x3)

=1

Zf1(x1)

∑x2

f2(x2) g(x1, x2)∑x3

f3(x3) g(x2, x3)

11

Page 28: Probabilistic Graphical Models - Cvlibs · Probabilistic Graphical Models Andreas Geiger Autonomous Vision Group MPI Tubingen Computer Vision and Geometry Lab ETH Zurich January 13,

Inference

f1 f2 f3g gx1 x2 x3

μ(x2)

p(x1, x2, x3) =1

Zf1(x1) f2(x2) f3(x3) g(x1, x2) g(x2, x3)

p(x1) =∑x2,x3

1

Zf1(x1) f2(x2) f3(x3) g(x1, x2) g(x2, x3)

=1

Zf1(x1)

∑x2

f2(x2) g(x1, x2)∑x3

f3(x3) g(x2, x3)︸ ︷︷ ︸µ(x2)

11

Page 29: Probabilistic Graphical Models - Cvlibs · Probabilistic Graphical Models Andreas Geiger Autonomous Vision Group MPI Tubingen Computer Vision and Geometry Lab ETH Zurich January 13,

Inference

f1 f2 f3g gx1 x2 x3

μ(x2)

p(x1, x2, x3) =1

Zf1(x1) f2(x2) f3(x3) g(x1, x2) g(x2, x3)

p(x1) =∑x2,x3

1

Zf1(x1) f2(x2) f3(x3) g(x1, x2) g(x2, x3)

=1

Zf1(x1)

∑x2

f2(x2) g(x1, x2)µ(x2)

11

Page 30: Probabilistic Graphical Models - Cvlibs · Probabilistic Graphical Models Andreas Geiger Autonomous Vision Group MPI Tubingen Computer Vision and Geometry Lab ETH Zurich January 13,

Inference

f1 f2 f3g gx1 x2 x3

μ'(x1)

p(x1, x2, x3) =1

Zf1(x1) f2(x2) f3(x3) g(x1, x2) g(x2, x3)

p(x1) =∑x2,x3

1

Zf1(x1) f2(x2) f3(x3) g(x1, x2) g(x2, x3)

=1

Zf1(x1)

∑x2

f2(x2) g(x1, x2)µ(x2)︸ ︷︷ ︸µ′(x1)

11

Page 31: Probabilistic Graphical Models - Cvlibs · Probabilistic Graphical Models Andreas Geiger Autonomous Vision Group MPI Tubingen Computer Vision and Geometry Lab ETH Zurich January 13,

Inference

f1 f2 f3g gx1 x2 x3

μ'(x1)

p(x1, x2, x3) =1

Zf1(x1) f2(x2) f3(x3) g(x1, x2) g(x2, x3)

p(x1) =∑x2,x3

1

Zf1(x1) f2(x2) f3(x3) g(x1, x2) g(x2, x3)

=1

Zf1(x1)µ

′(x1)

11

Page 32: Probabilistic Graphical Models - Cvlibs · Probabilistic Graphical Models Andreas Geiger Autonomous Vision Group MPI Tubingen Computer Vision and Geometry Lab ETH Zurich January 13,

Inference

f1 f2 f3g gx1 x2 x3

μ'(x1)

p(x1, x2, x3) =1

Zf1(x1) f2(x2) f3(x3) g(x1, x2) g(x2, x3)

p(x1) =∑x2,x3

1

Zf1(x1) f2(x2) f3(x3) g(x1, x2) g(x2, x3)

=1

Zf1(x1)µ

′(x1)

Marginal = Product of Factor & Incoming Messages

11

Page 33: Probabilistic Graphical Models - Cvlibs · Probabilistic Graphical Models Andreas Geiger Autonomous Vision Group MPI Tubingen Computer Vision and Geometry Lab ETH Zurich January 13,

J. Pearl: Reverend Bayes on inference engines:A distributed hierarchical approach. AAAI, 1982.

12

Page 34: Probabilistic Graphical Models - Cvlibs · Probabilistic Graphical Models Andreas Geiger Autonomous Vision Group MPI Tubingen Computer Vision and Geometry Lab ETH Zurich January 13,

Inference

Observations

lane 1lane 2lane 3

Try yourself: www.cvlibs.net/learn

13

Page 35: Probabilistic Graphical Models - Cvlibs · Probabilistic Graphical Models Andreas Geiger Autonomous Vision Group MPI Tubingen Computer Vision and Geometry Lab ETH Zurich January 13,

Inference

Marginal Distributions

lane 1lane 2lane 3

Try yourself: www.cvlibs.net/learn

13

Page 36: Probabilistic Graphical Models - Cvlibs · Probabilistic Graphical Models Andreas Geiger Autonomous Vision Group MPI Tubingen Computer Vision and Geometry Lab ETH Zurich January 13,

Inference

Maximum-A-Posteriori State

lane 1lane 2lane 3

Try yourself: www.cvlibs.net/learn

13