Graph Cut based Inference with Co-occurrence Statistics · Standard CRF Energy Pairwise CRF models...

52
Graph Cut based Inference with Co-occurrence Statistics Ľubor Ladický, Chris Russell, Pushmeet Kohli, Philip Torr

Transcript of Graph Cut based Inference with Co-occurrence Statistics · Standard CRF Energy Pairwise CRF models...

Page 1: Graph Cut based Inference with Co-occurrence Statistics · Standard CRF Energy Pairwise CRF models Data term Smoothness term . Standard CRF Energy Pairwise CRF models Restricted expressive

Graph Cut based Inference with Co-occurrence Statistics

Ľubor Ladický, Chris Russell, Pushmeet Kohli, Philip Torr

Page 2: Graph Cut based Inference with Co-occurrence Statistics · Standard CRF Energy Pairwise CRF models Data term Smoothness term . Standard CRF Energy Pairwise CRF models Restricted expressive

Image labelling Problems

Image Denoising Geometry Estimation Object Segmentation

Assign a label to each image pixel

Building

Sky

Tree Grass

Page 3: Graph Cut based Inference with Co-occurrence Statistics · Standard CRF Energy Pairwise CRF models Data term Smoothness term . Standard CRF Energy Pairwise CRF models Restricted expressive

Standard CRF Energy

Pairwise CRF models

Data term Smoothness term

Page 4: Graph Cut based Inference with Co-occurrence Statistics · Standard CRF Energy Pairwise CRF models Data term Smoothness term . Standard CRF Energy Pairwise CRF models Restricted expressive

Standard CRF Energy

Pairwise CRF models

Restricted expressive power

Data term Smoothness term

Page 5: Graph Cut based Inference with Co-occurrence Statistics · Standard CRF Energy Pairwise CRF models Data term Smoothness term . Standard CRF Energy Pairwise CRF models Restricted expressive

Structures in CRF

Taskar et al. 02 – associative potentials Kohli et al. 08 – segment consistency Woodford et al. 08 – planarity constraint Vicente et al. 08 – connectivity constraint Nowozin & Lampert 09 – connectivity constraint Roth & Black 09 – field of experts Ladický et al. 09 – consistency over several scales Woodford et al. 09 – marginal probability Delong et al. 10 – label occurrence costs

Page 6: Graph Cut based Inference with Co-occurrence Statistics · Standard CRF Energy Pairwise CRF models Data term Smoothness term . Standard CRF Energy Pairwise CRF models Restricted expressive

Pairwise CRF models

Standard CRF Energy for Object Segmentation

Cannot encode global consistency of labels!!

Local context

Page 7: Graph Cut based Inference with Co-occurrence Statistics · Standard CRF Energy Pairwise CRF models Data term Smoothness term . Standard CRF Energy Pairwise CRF models Restricted expressive

Image from Torralba et al. 10

Detection Suppression

roadtablechair

keyboardtablecar

road

If we have 1000 categories (detectors), and each detector produces 1 fp every 10 images, we will have 100 false alarms per image… pretty much garbage…

[Torralba et al. 10, Leibe & Schiele 09, Barinova et al. 10]

Page 8: Graph Cut based Inference with Co-occurrence Statistics · Standard CRF Energy Pairwise CRF models Data term Smoothness term . Standard CRF Energy Pairwise CRF models Restricted expressive

• Thing – Thing • Stuff - Stuff • Stuff - Thing

[ Images from Rabinovich et al. 07 ]

Encoding Co-occurrence

Co-occurrence is a powerful cue [Heitz et al. '08] [Rabinovich et al. ‘07]

Page 9: Graph Cut based Inference with Co-occurrence Statistics · Standard CRF Energy Pairwise CRF models Data term Smoothness term . Standard CRF Energy Pairwise CRF models Restricted expressive

• Thing – Thing • Stuff - Stuff • Stuff - Thing

[ Images from Rabinovich et al. 07 ]

Encoding Co-occurrence

Co-occurrence is a powerful cue [Heitz et al. '08] [Rabinovich et al. ‘07]

Proposed solutions : 1. Csurka et al. 08 - Hard decision for label estimation 2. Torralba et al. 03 - GIST based unary potential 3. Rabinovich et al. 07 - Full-connected CRF

Page 10: Graph Cut based Inference with Co-occurrence Statistics · Standard CRF Energy Pairwise CRF models Data term Smoothness term . Standard CRF Energy Pairwise CRF models Restricted expressive

So...

What properties should these global co-occurence potentials have ?

Page 11: Graph Cut based Inference with Co-occurrence Statistics · Standard CRF Energy Pairwise CRF models Data term Smoothness term . Standard CRF Energy Pairwise CRF models Restricted expressive

Desired properties

1. No hard decisions

Page 12: Graph Cut based Inference with Co-occurrence Statistics · Standard CRF Energy Pairwise CRF models Data term Smoothness term . Standard CRF Energy Pairwise CRF models Restricted expressive

Desired properties

1. No hard decisions

Incorporation in probabilistic framework

Unlikely possibilities are not completely ruled out

Page 13: Graph Cut based Inference with Co-occurrence Statistics · Standard CRF Energy Pairwise CRF models Data term Smoothness term . Standard CRF Energy Pairwise CRF models Restricted expressive

Desired properties

1. No hard decisions 2. Invariance to region size

Page 14: Graph Cut based Inference with Co-occurrence Statistics · Standard CRF Energy Pairwise CRF models Data term Smoothness term . Standard CRF Energy Pairwise CRF models Restricted expressive

Desired properties

1. No hard decisions 2. Invariance to region size

Cost for occurrence of {people, house, road etc .. } invariant to image area

Page 15: Graph Cut based Inference with Co-occurrence Statistics · Standard CRF Energy Pairwise CRF models Data term Smoothness term . Standard CRF Energy Pairwise CRF models Restricted expressive

Desired properties

1. No hard decisions 2. Invariance to region size

The only possible solution :

Local context Global context

Cost defined over the assigned labels L(x)

L(x)={ , , }

Page 16: Graph Cut based Inference with Co-occurrence Statistics · Standard CRF Energy Pairwise CRF models Data term Smoothness term . Standard CRF Energy Pairwise CRF models Restricted expressive

Desired properties

1. No hard decisions 2. Invariance to region size 3. Parsimony – simple solutions preferred

L(x)={ building, tree, grass, sky }

L(x)={ aeroplane, tree, flower, building, boat, grass, sky }

Page 17: Graph Cut based Inference with Co-occurrence Statistics · Standard CRF Energy Pairwise CRF models Data term Smoothness term . Standard CRF Energy Pairwise CRF models Restricted expressive

Desired properties

1. No hard decisions 2. Invariance to region size 3. Parsimony – simple solutions preferred 4. Efficiency

Page 18: Graph Cut based Inference with Co-occurrence Statistics · Standard CRF Energy Pairwise CRF models Data term Smoothness term . Standard CRF Energy Pairwise CRF models Restricted expressive

Desired properties

1. No hard decisions 2. Invariance to region size 3. Parsimony – simple solutions preferred 4. Efficiency

a) Memory requirements as O(n) with the image size and number or labels b) Inference tractable

Page 19: Graph Cut based Inference with Co-occurrence Statistics · Standard CRF Energy Pairwise CRF models Data term Smoothness term . Standard CRF Energy Pairwise CRF models Restricted expressive

• Torralba et al.(2003) – Gist-based unary potentials

• Rabinovich et al.(2007) - complete pairwise graphs

• Csurka et al.(2008) - hard estimation of labels present

Previous work

Page 20: Graph Cut based Inference with Co-occurrence Statistics · Standard CRF Energy Pairwise CRF models Data term Smoothness term . Standard CRF Energy Pairwise CRF models Restricted expressive

Zhu & Yuille 1996 – MDL prior Bleyer et al. 2010 – Surface Stereo MDL prior Hoiem et al. 2007 – 3D Layout CRF MDL Prior • Delong et al. 2010 – label occurence cost

Related work

C(x) = K |L(x)|

C(x) = ΣLKLδL(x)

Page 21: Graph Cut based Inference with Co-occurrence Statistics · Standard CRF Energy Pairwise CRF models Data term Smoothness term . Standard CRF Energy Pairwise CRF models Restricted expressive

Zhu & Yuille 1996 – MDL prior Bleyer et al. 2010 – Surface Stereo MDL prior Hoiem et al. 2007 – 3D Layout CRF MDL Prior • Delong et al. 2010 – label occurence cost

Related work

C(x) = K |L(x)|

C(x) = ΣLKLδL(x)

All special cases of our model

Page 22: Graph Cut based Inference with Co-occurrence Statistics · Standard CRF Energy Pairwise CRF models Data term Smoothness term . Standard CRF Energy Pairwise CRF models Restricted expressive

Inference

Pairwise CRF Energy

Page 23: Graph Cut based Inference with Co-occurrence Statistics · Standard CRF Energy Pairwise CRF models Data term Smoothness term . Standard CRF Energy Pairwise CRF models Restricted expressive

Inference

IP formulation (Schlesinger 73)

Page 24: Graph Cut based Inference with Co-occurrence Statistics · Standard CRF Energy Pairwise CRF models Data term Smoothness term . Standard CRF Energy Pairwise CRF models Restricted expressive

Inference

Pairwise CRF Energy with co-occurence

Page 25: Graph Cut based Inference with Co-occurrence Statistics · Standard CRF Energy Pairwise CRF models Data term Smoothness term . Standard CRF Energy Pairwise CRF models Restricted expressive

Inference

IP formulation with co-occurence

Page 26: Graph Cut based Inference with Co-occurrence Statistics · Standard CRF Energy Pairwise CRF models Data term Smoothness term . Standard CRF Energy Pairwise CRF models Restricted expressive

Inference

IP formulation with co-occurence

Pairwise CRF cost Pairwise CRF constaints

Page 27: Graph Cut based Inference with Co-occurrence Statistics · Standard CRF Energy Pairwise CRF models Data term Smoothness term . Standard CRF Energy Pairwise CRF models Restricted expressive

Inference

IP formulation with co-occurence

Co-occurence cost

Page 28: Graph Cut based Inference with Co-occurrence Statistics · Standard CRF Energy Pairwise CRF models Data term Smoothness term . Standard CRF Energy Pairwise CRF models Restricted expressive

Inference

IP formulation with co-occurence

Inclusion constraints

Page 29: Graph Cut based Inference with Co-occurrence Statistics · Standard CRF Energy Pairwise CRF models Data term Smoothness term . Standard CRF Energy Pairwise CRF models Restricted expressive

Inference

IP formulation with co-occurence

Exclusion constraints

Page 30: Graph Cut based Inference with Co-occurrence Statistics · Standard CRF Energy Pairwise CRF models Data term Smoothness term . Standard CRF Energy Pairwise CRF models Restricted expressive

Inference

LP relaxation

Relaxed constraints

Page 31: Graph Cut based Inference with Co-occurrence Statistics · Standard CRF Energy Pairwise CRF models Data term Smoothness term . Standard CRF Energy Pairwise CRF models Restricted expressive

Inference

LP relaxation

Very Slow! 80 x 50 subsampled image takes 20 minutes

Page 32: Graph Cut based Inference with Co-occurrence Statistics · Standard CRF Energy Pairwise CRF models Data term Smoothness term . Standard CRF Energy Pairwise CRF models Restricted expressive

Inference: Our Contribution

Pairwise representation • One auxiliary variable Z 2 L

• Infinite pairwise costs if xi Z [see technical report] *Solvable using standard methods: BP, TRW etc.

Page 33: Graph Cut based Inference with Co-occurrence Statistics · Standard CRF Energy Pairwise CRF models Data term Smoothness term . Standard CRF Energy Pairwise CRF models Restricted expressive

Inference: Our Contribution

Pairwise representation • One auxiliary variable Z 2 L

• Infinite pairwise costs if xi Z [see technical report] *Solvable using standard methods: BP, TRW etc.

Relatively faster but still computationally expensive!

Page 34: Graph Cut based Inference with Co-occurrence Statistics · Standard CRF Energy Pairwise CRF models Data term Smoothness term . Standard CRF Energy Pairwise CRF models Restricted expressive

Inference using Moves

Graph Cut based move making algorithms [Boykov et al. 01]

α-expansion transformation function

• Series of locally optimal moves

• Each move reduces energy

• Optimal move by minimizing submodular function

Space of Solutions (x) : LN

Move Space (t) : 2N

Search Neighbourhood

Current Solution

N Number of Variables

L Number of Labels

Page 35: Graph Cut based Inference with Co-occurrence Statistics · Standard CRF Energy Pairwise CRF models Data term Smoothness term . Standard CRF Energy Pairwise CRF models Restricted expressive

Inference using Moves

Graph Cut based move making algorithms [Boykov, Veksler, Zabih. 01]

α-expansion transformation function

Page 36: Graph Cut based Inference with Co-occurrence Statistics · Standard CRF Energy Pairwise CRF models Data term Smoothness term . Standard CRF Energy Pairwise CRF models Restricted expressive

Inference using Moves

Label indicator functions

Co-occurence representation

Page 37: Graph Cut based Inference with Co-occurrence Statistics · Standard CRF Energy Pairwise CRF models Data term Smoothness term . Standard CRF Energy Pairwise CRF models Restricted expressive

Inference using Moves

Move Energy

Cost of current label set

Page 38: Graph Cut based Inference with Co-occurrence Statistics · Standard CRF Energy Pairwise CRF models Data term Smoothness term . Standard CRF Energy Pairwise CRF models Restricted expressive

Inference using Moves

Move Energy

Decomposition to α-dependent and α-independent part

α-independent α-dependent

Page 39: Graph Cut based Inference with Co-occurrence Statistics · Standard CRF Energy Pairwise CRF models Data term Smoothness term . Standard CRF Energy Pairwise CRF models Restricted expressive

Inference using Moves

Move Energy

Decomposition to α-dependent and α-independent part

Either α or all labels in the image after the move

Page 40: Graph Cut based Inference with Co-occurrence Statistics · Standard CRF Energy Pairwise CRF models Data term Smoothness term . Standard CRF Energy Pairwise CRF models Restricted expressive

Inference using Moves

Move Energy

submodular non-submodular

Page 41: Graph Cut based Inference with Co-occurrence Statistics · Standard CRF Energy Pairwise CRF models Data term Smoothness term . Standard CRF Energy Pairwise CRF models Restricted expressive

Inference

Move Energy

non-submodular

Non-submodular energy overestimated by E'(t) – E'(t) = E(t) for current solution – E'(t) E(t) for any other labelling

Page 42: Graph Cut based Inference with Co-occurrence Statistics · Standard CRF Energy Pairwise CRF models Data term Smoothness term . Standard CRF Energy Pairwise CRF models Restricted expressive

Inference

Move Energy

non-submodular

Non-submodular energy overestimated by E'(t) – E'(t) = E(t) for current solution – E'(t) E(t) for any other labelling

Occurrence - tight

Page 43: Graph Cut based Inference with Co-occurrence Statistics · Standard CRF Energy Pairwise CRF models Data term Smoothness term . Standard CRF Energy Pairwise CRF models Restricted expressive

Inference

Move Energy

non-submodular

Non-submodular energy overestimated by E'(t) – E'(t) = E(t) for current solution – E'(t) E(t) for any other labelling

Co-occurrence overestimation

Page 44: Graph Cut based Inference with Co-occurrence Statistics · Standard CRF Energy Pairwise CRF models Data term Smoothness term . Standard CRF Energy Pairwise CRF models Restricted expressive

Inference

Move Energy

non-submodular

Non-submodular energy overestimated by E'(t) – E'(t) = E(t) for current solution – E'(t) E(t) for any other labelling

General case [See the paper]

Page 45: Graph Cut based Inference with Co-occurrence Statistics · Standard CRF Energy Pairwise CRF models Data term Smoothness term . Standard CRF Energy Pairwise CRF models Restricted expressive

Inference

Move Energy

non-submodular

Non-submodular energy overestimated by E'(t) – E'(t) = E(t) for current solution – E'(t) E(t) for any other labelling

Quadratic representation

Page 46: Graph Cut based Inference with Co-occurrence Statistics · Standard CRF Energy Pairwise CRF models Data term Smoothness term . Standard CRF Energy Pairwise CRF models Restricted expressive

Application: Object Segmentation

Standard MRF model for Object Segmentation

Label based Costs

Cost defined over the assigned labels L(x)

Page 47: Graph Cut based Inference with Co-occurrence Statistics · Standard CRF Energy Pairwise CRF models Data term Smoothness term . Standard CRF Energy Pairwise CRF models Restricted expressive

Training of label based potentials

Indicator variables for occurrence of each label

Label set costs

Approximated by 2nd order representation

Page 48: Graph Cut based Inference with Co-occurrence Statistics · Standard CRF Energy Pairwise CRF models Data term Smoothness term . Standard CRF Energy Pairwise CRF models Restricted expressive

Experiments

• Methods – Segment CRF

– Segment CRF + Co-occurrence Potential

– Associative HCRF [Ladický et al. ‘09]

– Associative HCRF + Co-occurrence Potential

• Datasets

MSRC-21

• Number of Images: 591

• Number of Classes: 21

• Training Set: 50%

• Test Set: 50%

PASCAL VOC 2009

• Number of Images: 1499

• Number of Classes: 21

• Training Set: 50%

• Test Set: 50%

Page 49: Graph Cut based Inference with Co-occurrence Statistics · Standard CRF Energy Pairwise CRF models Data term Smoothness term . Standard CRF Energy Pairwise CRF models Restricted expressive

MSRC - Qualitative

Page 50: Graph Cut based Inference with Co-occurrence Statistics · Standard CRF Energy Pairwise CRF models Data term Smoothness term . Standard CRF Energy Pairwise CRF models Restricted expressive

VOC 2010-Qualitative

Page 51: Graph Cut based Inference with Co-occurrence Statistics · Standard CRF Energy Pairwise CRF models Data term Smoothness term . Standard CRF Energy Pairwise CRF models Restricted expressive

Quantitative Results

MSRC-21

PASCAL VOC 2009

Page 52: Graph Cut based Inference with Co-occurrence Statistics · Standard CRF Energy Pairwise CRF models Data term Smoothness term . Standard CRF Energy Pairwise CRF models Restricted expressive

• Incorporated label based potentials in CRFs

• Proposed feasible inference

• Open questions

– Optimal training method for co-occurence

– Bounds of graph cut based inference

• Questions ?

Summary and further work