Large-Scale Object Recognition using Label Relation Graphs

37
Large-Scale Object Recognition using Label Relation Graphs Jia Deng 1,2 , Nan Ding 2 , Yangqing Jia 2 , Andrea Frome 2 Kevin Murphy 2 , Samy Bengio 2 , Yuan Li 2 , Hartmut Neven 2 , Hartwig Ada University of Michigan 1 , Google 2

description

Large-Scale Object Recognition using Label Relation Graphs. Jia Deng 1,2 , Nan Ding 2 , Yangqing Jia 2 , Andrea Frome 2 , Kevin Murphy 2 , Samy Bengio 2 , Yuan Li 2 , Hartmut Neven 2 , Hartwig Adam 2. University of Michigan 1 , Google 2. Object Classification. - PowerPoint PPT Presentation

Transcript of Large-Scale Object Recognition using Label Relation Graphs

Page 1: Large-Scale Object Recognition using Label Relation Graphs

Large-Scale Object Recognition using Label Relation Graphs

Jia Deng1,2, Nan Ding2, Yangqing Jia2, Andrea Frome2, Kevin Murphy2, Samy Bengio2, Yuan Li2, Hartmut Neven2, Hartwig Adam2

University of Michigan1, Google2

Page 2: Large-Scale Object Recognition using Label Relation Graphs

Object Classification

• Assign semantic labels to objects

CorgiPuppy

Dog

Cat

Page 3: Large-Scale Object Recognition using Label Relation Graphs

Object Classification

• Assign semantic labels to objects

Probabilities

0.9

0.8

0.9

0.1

CorgiPuppy

Dog

Cat

Page 4: Large-Scale Object Recognition using Label Relation Graphs

Object Classification

• Assign semantic labels to objects

Feature Extractor

Features Classifier Probabilities

0.9

0.8

0.9

0.1

CorgiPuppy

Dog

Cat

Page 5: Large-Scale Object Recognition using Label Relation Graphs

Object Classification

• Multiclass classifier: Softmax

CorgiPuppy

Dog

Cat

/

/

/

/

+

Assumes mutual exclusive labels.

0.2

0.4

0.3

0.1

• Independent binary classifiers: Logistic Regression

CorgiPuppy

Dog

Cat

0.2

0.8

0.6

0.4

No assumptions about relations.

Page 6: Large-Scale Object Recognition using Label Relation Graphs

Object labels have rich relations

Corgi Puppy

Dog Cat

ExclusionHierarchical

Dog

CatCorgi Puppy

OverlapSoftmax: all labels are mutually exclusive Logistic Regression: all labels overlap

Page 7: Large-Scale Object Recognition using Label Relation Graphs

Goal: A new classification model

Respects real world label relations

CorgiPuppy

Dog

Cat

0.9

0.8

0.9

0.1Corgi Puppy

Dog Cat

Page 8: Large-Scale Object Recognition using Label Relation Graphs

Visual Model + Knowledge Graph

CorgiPuppy

Dog

Cat

Visual Model

0.9

0.8

0.9

0.1

Knowledge Graph

Joint Inference

Assumption in this work:Knowledge graph is given and fixed.

Page 9: Large-Scale Object Recognition using Label Relation Graphs

Agenda

• Encoding prior knowledge (HEX graph)• Classification model• Efficient Exact Inference• Experiments• Conclusion and Future Work

Page 10: Large-Scale Object Recognition using Label Relation Graphs

Agenda

• Encoding prior knowledge (HEX graph)• Classification model• Efficient Exact Inference• Experiments• Conclusion and Future Work

Page 11: Large-Scale Object Recognition using Label Relation Graphs

Hierarchy and Exclusion (HEX) Graph

Corgi Puppy

Dog Cat

ExclusionHierarchical

• Hierarchical edges (directed)• Exclusion edges (undirected)

Page 12: Large-Scale Object Recognition using Label Relation Graphs

Examples of HEX graphs

Car Bird

Dog Cat

Male Female

Person

Child

BoyRound

Red Shiny

Thick

Mutually exclusive All overlapping Combination

Girl

Page 13: Large-Scale Object Recognition using Label Relation Graphs

State Space: Legal label configurations

Dog Cat Corgi Puppy

0 0 0 0

0 0 0 1

0 0 1 0

0 0 1 1

1 0 0 0

1 1 0 0

1 1 0 1

Corgi Puppy

Dog Cat

Each edge defines a constraint.

Page 14: Large-Scale Object Recognition using Label Relation Graphs

State Space: Legal label configurations

Corgi Puppy

Dog Cat Dog Cat Corgi Puppy

0 0 0 0

0 0 0 1

0 0 1 0

0 0 1 1

1 0 0 0

1 1 0 0

1 1 0 1

Hierarchy: (dog, corgi) can’t be (0,1)

Each edge defines a constraint.

Page 15: Large-Scale Object Recognition using Label Relation Graphs

State Space: Legal label configurations

Corgi Puppy

Dog Cat Dog Cat Corgi Puppy

0 0 0 0

0 0 0 1

0 0 1 0

0 0 1 1

1 0 0 0

1 1 0 0

1 1 0 1

…Exclusion: (dog, cat) can’t be (1,1)

Hierarchy: (dog, corgi) can’t be (0,1)

Each edge defines a constraint.

Page 16: Large-Scale Object Recognition using Label Relation Graphs

Agenda

• Encoding prior knowledge (HEX graph)• Classification model• Efficient Exact Inference• Experiments• Conclusion and Future Work

Page 17: Large-Scale Object Recognition using Label Relation Graphs

HEX Classification Model• Pairwise Conditional Random Field (CRF)

Input scores Binary Label vector

Page 18: Large-Scale Object Recognition using Label Relation Graphs

HEX Classification Model• Pairwise Conditional Random Field (CRF)

Binary Label vector

Unary: same as logistic regression

Input scores

Page 19: Large-Scale Object Recognition using Label Relation Graphs

HEX Classification Model• Pairwise Conditional Random Field (CRF)

Binary Label vector

All illegal configurations have probability zero.

Unary: same as logistic regression

If violates constraints

Otherwise

0

Pairwise: set illegal configuration to zero

Input scores

Page 20: Large-Scale Object Recognition using Label Relation Graphs

HEX Classification Model• Pairwise Conditional Random Field (CRF)

Binary Label vector

Partition function: Sum over all (legal) configurations

Input scores

Page 21: Large-Scale Object Recognition using Label Relation Graphs

HEX Classification Model• Pairwise Conditional Random Field (CRF)

Binary Label vector

Probability of a single label: marginalize all other labels.

Input scores

Page 22: Large-Scale Object Recognition using Label Relation Graphs

Special Case of HEX Model

• Softmax

Car Bird

Dog Cat

Round

Red Shiny

Mutually exclusive All overlapping

Thick

• Logistic Regressions

Page 23: Large-Scale Object Recognition using Label Relation Graphs

Learning

CorgiPuppy

Dog

CatDNN

Label: Dog

Maximize marginal probability of observed labels

Back Propagation

DogCorgi

Puppy

Cat

1?

?

?

Page 24: Large-Scale Object Recognition using Label Relation Graphs

Agenda

• Encoding prior knowledge (HEX graph)• Classification model• Efficient Exact Inference• Experiments• Conclusion

Page 25: Large-Scale Object Recognition using Label Relation Graphs

Naïve Exact Inference is Intractable• Inference: – Computing partition function– Perform marginalization

• HEX-CRF can be densely connected (large treewidth)

Page 26: Large-Scale Object Recognition using Label Relation Graphs

Observation 1: Exclusions are good

Car Bird

Dog Cat

• Lots of exclusions Small state space Efficient inference• Realistic graphs have lots of exclusions.• Rigorous analysis in paper.

Number of legal states is O(n), not O(2n).

Page 27: Large-Scale Object Recognition using Label Relation Graphs

Observation 2: Equivalent graphs

Dog Cat

Corgi

PuppyPembroke Welsh Corgi

Cardigan Welsh Corgi

Dog Cat

Corgi

PuppyPembroke Welsh Corgi

Cardigan Welsh Corgi

Page 28: Large-Scale Object Recognition using Label Relation Graphs

Observation 2: Equivalent graphs

Sparse equivalent• Small Treewidth • Dynamic programming

Dog Cat

Corgi

PuppyPembroke Welsh Corgi

Cardigan Welsh Corgi

Dog Cat

Corgi

PuppyPembroke Welsh Corgi

Cardigan Welsh Corgi

Dog Cat

Corgi

PuppyPembroke Welsh Corgi

Cardigan Welsh Corgi

Dense equivalent• Prune states • Can brute force

Page 29: Large-Scale Object Recognition using Label Relation Graphs

A

BF

B

ED

C

G

F

BC

F

HEX Graph Inference

A

B

E

D

C

G

F

A

B

E

D

C

G

F

A

B

E

D

C

G

F

A

BF

B

ED

C

G

F

BC

F

1. Sparsify

(offline)

3.Densify(offline)

2.Build Junction Tree(offline)

4.Prune Clique States

(offline)

5. Message Passing on

legal states (online)

Page 30: Large-Scale Object Recognition using Label Relation Graphs

Agenda

• Encoding prior knowledge (HEX graph)• Classification model• Efficient Exact Inference• Experiments• Conclusion and Future Work

Page 31: Large-Scale Object Recognition using Label Relation Graphs

Exp 1: Learning with weak labels• Many basic category labels• Few fine-grained labels

Dog

Corgi

Animal

……

Weak labels:No information on subcategories.

Page 32: Large-Scale Object Recognition using Label Relation Graphs

CorgiPuppy

Dog

CatDNN

Label: Dog

DogCorgi

Puppy

Cat

1?

?

?

Hypothesis: HEX models can improve fine-grained recognition using basic level labels.

Exp 1: Learning with weak labels

Page 33: Large-Scale Object Recognition using Label Relation Graphs

• ILSVRC 2012: “relabel” or “weaken” a portion of fine-grained leaf labels to basic level labels.

• Evaluate on fine-grained recognition

Exp 1: Learning with weak labels

Dog

Corgi

Animal

Husky

Dog

Corgi

Animal…

Husky

Relabel

Training(“weakened” labels)

Test

Dog

Corgi

Animal

Husky

Original ILSVRC 2012 (leaf labels)

Page 34: Large-Scale Object Recognition using Label Relation Graphs

• ILSVRC 2012: “relabel” or “weaken” a portion of fine-grained leaf labels to basic level labels.

• Evaluate on fine-grained recognition.• Consistently outperforms baselines.

Exp 1: Learning with weak labels

Top 1 accuracy (top 5 accuracy)

Page 35: Large-Scale Object Recognition using Label Relation Graphs

Exp 2: Zero-Shot Recognition using Object-Attribute Knowledge

• Animals with Attribute (AwA) dataset (Lampert et al. 2009)• Training: • Observe only a subset of animal labels. • Given all animal-attribute relations • Indirectly learns attributes.

• Test: predict new classes with no images in training.

DAP (Lampert et al.) IAP (Lampert et al.) Ours

40.5% 27.8% 38.5%

polar bear

black: nowhite: yesbrown: nostripes: no

polar bearblack

white

zebrabrown

stripes

zebra

black: yeswhite: yesbrown: nostripes: yes … …

Page 36: Large-Scale Object Recognition using Label Relation Graphs

Related Work• Multilabel Annotation & Hierarchy

[Lampert et al. NIPS’11][Chen et al. ICCV’11][Bi & Kwok, NIPS’12][Bucak et al. CVPR’11]Ours: Unifies hierarchy and exclusion.

• Transfer learning & Attributes[Rohrbach et al. CVPR’10][Lampert et al. CVPR’09][Kuettel et al. ECCV’12][Akata et al. CVPR’13]Ours: A classification model that allows transferring.

• Extracting Common Sense Knowledge[Chen et al. ICCV’13][Zitnick & Parikh CVPR’13]Ours: Assumes knowledge is given.

[Hwang et al. CVPR’11][Kang et al. CVPR’06][Marszalek & Schmid CVPR’07][Zweig & Weinshall CVPR’07]

[Farhadi et al. CVPR’10][Lim et al. NIPS’11][Yu et al. CVPR’13][Fergus et al. ECCV’10]

[Zhu et al. ECCV’14][Fouhey & Zitnick CVPR’14]

Visual Model

External Knowledge

Page 37: Large-Scale Object Recognition using Label Relation Graphs

Conclusions

• A unified framework for single object classification– Generalizes standard classification models– Leverages a knowledge graph– Efficient exact inference

• Future work– Non-absolute relations– Spatial relations between object instances