60
Andrew Harp Andrew Harp

Andrew HarpAndrew Harp - University of Texas at Austingrauman/courses/spring...understand a word in a sentence. `Determining what objects are, even if the ... Conditional dependence

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Andrew HarpAndrew Harp - University of Texas at Austingrauman/courses/spring...understand a word in a sentence. `Determining what objects are, even if the ... Conditional dependence

Andrew HarpAndrew Harp

Page 2: Andrew HarpAndrew Harp - University of Texas at Austingrauman/courses/spring...understand a word in a sentence. `Determining what objects are, even if the ... Conditional dependence

What is context?

Learning Spatial Context: Using Stuff to Find ThiThings◦ Geremy Heitz and Daphne Koller

Putting Objects in Perspective◦ Derek Hoiem, Alexei A. Efros and Martial Hebert,

Page 3: Andrew HarpAndrew Harp - University of Texas at Austingrauman/courses/spring...understand a word in a sentence. `Determining what objects are, even if the ... Conditional dependence

Linguistically, Context refers to the conditions in which something exists or occurs.

Context can be recursive!

Page 4: Andrew HarpAndrew Harp - University of Texas at Austingrauman/courses/spring...understand a word in a sentence. `Determining what objects are, even if the ... Conditional dependence

What does “compound” mean in these examples?

Th ill i ’ d i h il d dThe villain’s compound is heavily guarded.

She suffered a compound fracture from theShe suffered a compound fracture from the fall.

Page 5: Andrew HarpAndrew Harp - University of Texas at Austingrauman/courses/spring...understand a word in a sentence. `Determining what objects are, even if the ... Conditional dependence

What does “compound” mean in these examples?

Th ill i ’ d i h il d dThe villain’s compound is heavily guarded.

She suffered a compound fracture from theShe suffered a compound fracture from the fall.

Page 6: Andrew HarpAndrew Harp - University of Texas at Austingrauman/courses/spring...understand a word in a sentence. `Determining what objects are, even if the ... Conditional dependence
Page 7: Andrew HarpAndrew Harp - University of Texas at Austingrauman/courses/spring...understand a word in a sentence. `Determining what objects are, even if the ... Conditional dependence
Page 8: Andrew HarpAndrew Harp - University of Texas at Austingrauman/courses/spring...understand a word in a sentence. `Determining what objects are, even if the ... Conditional dependence

Lets computers understand an object or scene in the same way it can help humans understand a word in a sentence.

Determining what objects are, even if the object can exist separately of the contextobject can exist separately of the context.

Generally, context determines priors onGenerally, context determines priors on object interpretations.

Page 9: Andrew HarpAndrew Harp - University of Texas at Austingrauman/courses/spring...understand a word in a sentence. `Determining what objects are, even if the ... Conditional dependence

What is context?

Learning Spatial Context: Using Stuff to Find ThiThings◦ Geremy Heitz and Daphne Koller

Putting Objects in Perspective◦ Derek Hoiem, Alexei A. Efros and Martial Hebert,

Page 10: Andrew HarpAndrew Harp - University of Texas at Austingrauman/courses/spring...understand a word in a sentence. `Determining what objects are, even if the ... Conditional dependence

Scene-Thing◦ scale◦ “gist”◦ Determines priors for objects◦ Determines priors for objectsThing-Thing◦ Object cooccurrenceStuff-Stuff◦ E.g. beach, water

ff hStuff-Thing◦ Texture regions relative to objects

Page 11: Andrew HarpAndrew Harp - University of Texas at Austingrauman/courses/spring...understand a word in a sentence. `Determining what objects are, even if the ... Conditional dependence

Scene-gist car “likely”

Thing:

Stuff Stuff:

keyboard “unlikely”

Thi Thi[ Gould et al [ Rabinovich etStuff-Stuff: Thing-Thing:[ Gould et al.,IJCV 2008 ]

[ Rabinovich et al., ICCV 2007 ]

[Heitz 2008]

Page 12: Andrew HarpAndrew Harp - University of Texas at Austingrauman/courses/spring...understand a word in a sentence. `Determining what objects are, even if the ... Conditional dependence

Things in the context of stuff, and vice versa.

Components:h ( )◦ Things (T)

◦ Feature descriptors for windows (W)◦ Feature descriptor for regions (F)Feature descriptor for regions (F)◦ Stuff classes for regions (S)◦ Relationship indicator variables (R)

Page 13: Andrew HarpAndrew Harp - University of Texas at Austingrauman/courses/spring...understand a word in a sentence. `Determining what objects are, even if the ... Conditional dependence

Discrete ObjectsHave specific size and shape.Generally mobile

Examples:p◦ Car◦ Person ◦ Bicycle

In TAS:◦ Detected with local window detectors [Heitz 2008]

Page 14: Andrew HarpAndrew Harp - University of Texas at Austingrauman/courses/spring...understand a word in a sentence. `Determining what objects are, even if the ... Conditional dependence

Generally immobileShapelessExamples:◦ Road◦ Buildings

In TAS:◦ Labeled regions defined by

superpixelssuperpixels◦ Assumed to be independent of each

other.◦ Labeled by the homogeneous or

Satellite Regions [Heitz 2008]

repetitive pattern of fine-scale properties

Page 15: Andrew HarpAndrew Harp - University of Texas at Austingrauman/courses/spring...understand a word in a sentence. `Determining what objects are, even if the ... Conditional dependence

Describes a possible relation between a Stuff and a ThingThing

Large number of candidate relations are generated, best are picked algorithmicallybest are picked algorithmically

Examples:◦ Thing Above Stuffg◦ Thing Right of Stuff◦ Thing In Stuff

K ibl l ti hi d t ll I * JK possible relationships are mapped to all I * J Thing/Stuff combinations, for a total of I*J*K relationship indicator variables.

Page 16: Andrew HarpAndrew Harp - University of Texas at Austingrauman/courses/spring...understand a word in a sentence. `Determining what objects are, even if the ... Conditional dependence

R1 1 left = 1 Stuff

T1

S1

R1,1,left 1Thing Class

R1,1,near = 0T1

S3Candidate

Window (W)

.

.

.

R1,3,left = 1

R1,3,near = 0Image Regions (F)

ActiveActive Relationships

[Heitz 2008]

Page 17: Andrew HarpAndrew Harp - University of Texas at Austingrauman/courses/spring...understand a word in a sentence. `Determining what objects are, even if the ... Conditional dependence

Keeps complexity down◦ Things only depend on Stuff, not other things.◦ Stuff only depends on things.

◦ All probabilities are drawn from simple table conditional probability distributions (CPDs).

In reality thing/things and stuff/stuff are notIn reality, thing/things and stuff/stuff are not independent, but the probability distribution becomes modular.

Page 18: Andrew HarpAndrew Harp - University of Texas at Austingrauman/courses/spring...understand a word in a sentence. `Determining what objects are, even if the ... Conditional dependence

Stuff◦ Clustered based on detected features from

Superpixel regions

Things◦ Local object detector is trained from annotated

training set

RelationshipsRelationships◦ Potential relationships manually defined◦ All are initially inactive

Page 19: Andrew HarpAndrew Harp - University of Texas at Austingrauman/courses/spring...understand a word in a sentence. `Determining what objects are, even if the ... Conditional dependence

[Heitz 2008]

Page 20: Andrew HarpAndrew Harp - University of Texas at Austingrauman/courses/spring...understand a word in a sentence. `Determining what objects are, even if the ... Conditional dependence

Candidate relationships arbitrarily generated.Priors for Stuff given Features generated from clustering.

Page 21: Andrew HarpAndrew Harp - University of Texas at Austingrauman/courses/spring...understand a word in a sentence. `Determining what objects are, even if the ... Conditional dependence

All relationships begin inactive.There is a likelihood on how many relationships can become active.

Page 22: Andrew HarpAndrew Harp - University of Texas at Austingrauman/courses/spring...understand a word in a sentence. `Determining what objects are, even if the ... Conditional dependence

Use model and Ground Truth to estimate most likely Stuff classifications.Q is the probability of the Stuff classes.m is set of training images.

Page 23: Andrew HarpAndrew Harp - University of Texas at Austingrauman/courses/spring...understand a word in a sentence. `Determining what objects are, even if the ... Conditional dependence

Pick model (collection of CPDs) that makes observed data (Things) and estimated data (Stuff) most probable.

Page 24: Andrew HarpAndrew Harp - University of Texas at Austingrauman/courses/spring...understand a word in a sentence. `Determining what objects are, even if the ... Conditional dependence

Greedy structural search over all possible relationships. Add one or subtract one, and figure out which change helped the most.

Page 25: Andrew HarpAndrew Harp - University of Texas at Austingrauman/courses/spring...understand a word in a sentence. `Determining what objects are, even if the ... Conditional dependence

Return the complete model!

Page 26: Andrew HarpAndrew Harp - University of Texas at Austingrauman/courses/spring...understand a word in a sentence. `Determining what objects are, even if the ... Conditional dependence

Now that we have our model, we want to use it to classify things:

But, this is different from training because now Thing classes are unobserved as well as Stuff classes.

So finding this involves computing all possible combinations of Things and Stuff in the entire image!

Page 27: Andrew HarpAndrew Harp - University of Texas at Austingrauman/courses/spring...understand a word in a sentence. `Determining what objects are, even if the ... Conditional dependence

ffStuff

T1W1

S1 F1

FeaturesWindows Things

11

S2 F2

R1, J,K

T2W2S3 F3

R2,J,K

T3W3

S4

S5

F4

F5

Conditional dependence of things on things and stuff on stuff k it t ti ll i t t bl !

33 5 5

R3,J,K

makes it computationally intractable!

Page 28: Andrew HarpAndrew Harp - University of Texas at Austingrauman/courses/spring...understand a word in a sentence. `Determining what objects are, even if the ... Conditional dependence

Try Gibbs sampling:◦ Variant of Markov Chain Monte Carlo (MCMC)◦ Variant of Markov Chain Monte Carlo (MCMC)◦ Assume all but one parameters, estimate that

parameter from others given data.

With Gibbs:Before:

◦ Repeat until convergence

Stuff ThingsStuff Things

Page 29: Andrew HarpAndrew Harp - University of Texas at Austingrauman/courses/spring...understand a word in a sentence. `Determining what objects are, even if the ... Conditional dependence

becomes

iterated until convergenceiterated until convergence

Page 30: Andrew HarpAndrew Harp - University of Texas at Austingrauman/courses/spring...understand a word in a sentence. `Determining what objects are, even if the ... Conditional dependence

ffStuff

T1W1

S1 F1

FeaturesWindows Things

11

S2 F2

R1, J,K

T2W2S3 F3

R2,J,K

T3W3

S4

S5

F4

F5

Conditional dependence of things on things and stuff on stuff k it t ti ll i t t bl !

33 5 5

R3,J,K

makes it computationally intractable!

Page 31: Andrew HarpAndrew Harp - University of Texas at Austingrauman/courses/spring...understand a word in a sentence. `Determining what objects are, even if the ... Conditional dependence

ffStuff

T1W1

S1 F1

FeaturesWindows Things

11

S2 F2

R1, J,K

T2W2S3 F3

R2,J,K

T3W3

S4

S5

F4

F5

Computing Thing probabilities becomes linear on the number of

33 5 5

R3,J,K

Thing candidates!

Page 32: Andrew HarpAndrew Harp - University of Texas at Austingrauman/courses/spring...understand a word in a sentence. `Determining what objects are, even if the ... Conditional dependence

ffStuff

T1W1

S1 F1

FeaturesWindows Things

11

S2 F2

R1, J,K

T2W2S3 F3

R2,J,K

T3W3

S4

S5

F4

F5

Computing stuff probabilities becomes linear

33 5 5

R3,J,K

Computing stuff probabilities becomes linear on the number of regions!

Page 33: Andrew HarpAndrew Harp - University of Texas at Austingrauman/courses/spring...understand a word in a sentence. `Determining what objects are, even if the ... Conditional dependence

VOC2005 dataset:◦ 2232 images◦ manually annotated bounding boxes for:

CarsPeopleMotorbikesBicyclesBicycles

VOC2006 dataset:◦ 2686 images◦ manually annotated bounding boxes for:

CowsSheep

Bonus feature: Satellite Imagery

Source code available◦ Website: http://ai.stanford.edu/~gaheitz/Research/TAS/◦ Includes all data from experiments

Page 34: Andrew HarpAndrew Harp - University of Texas at Austingrauman/courses/spring...understand a word in a sentence. `Determining what objects are, even if the ... Conditional dependence

[Heitz 2008]

Page 35: Andrew HarpAndrew Harp - University of Texas at Austingrauman/courses/spring...understand a word in a sentence. `Determining what objects are, even if the ... Conditional dependence

[Heitz 2008]

Page 36: Andrew HarpAndrew Harp - University of Texas at Austingrauman/courses/spring...understand a word in a sentence. `Determining what objects are, even if the ... Conditional dependence

Training/Test Data:30 i ll d f G l E th f i◦ 30 raw images pulled from Google Earth of size 792×636

◦ Contain 1319 Hand-tagged cars

Tested with 5-fold cross-validation

Note that orthographic projection of plane aligned objects means objects are: ◦ scale invariantscale invariant◦ viewpoint invariant◦ but not rotationally invariant

Page 37: Andrew HarpAndrew Harp - University of Texas at Austingrauman/courses/spring...understand a word in a sentence. `Determining what objects are, even if the ... Conditional dependence

Prior: Posterior:D i

Posterior:Detector Only DetectionsRegion Labels

[Heitz 2008]

Page 38: Andrew HarpAndrew Harp - University of Texas at Austingrauman/courses/spring...understand a word in a sentence. `Determining what objects are, even if the ... Conditional dependence

[Heitz 2008]

Page 39: Andrew HarpAndrew Harp - University of Texas at Austingrauman/courses/spring...understand a word in a sentence. `Determining what objects are, even if the ... Conditional dependence

( 44 Cars(~44 Cars per image)

[Heitz 2008]

Page 40: Andrew HarpAndrew Harp - University of Texas at Austingrauman/courses/spring...understand a word in a sentence. `Determining what objects are, even if the ... Conditional dependence

What is context?

Learning Spatial Context: Using Stuff to Find ThiThings◦ Geremy Heitz and Daphne Koller

Putting Objects in Perspective◦ Derek Hoiem, Alexei A. Efros and Martial Hebert,

Page 41: Andrew HarpAndrew Harp - University of Texas at Austingrauman/courses/spring...understand a word in a sentence. `Determining what objects are, even if the ... Conditional dependence

Without Perspective With Perspective

Computer’s Understanding of Scene:

Without Perspective With Perspective

(well, almost)

Paper Mario,(c) Nintendo

Page 42: Andrew HarpAndrew Harp - University of Texas at Austingrauman/courses/spring...understand a word in a sentence. `Determining what objects are, even if the ... Conditional dependence

Image plane

(Horizon)

Page 43: Andrew HarpAndrew Harp - University of Texas at Austingrauman/courses/spring...understand a word in a sentence. `Determining what objects are, even if the ... Conditional dependence

Statistical Framework that allows simultaneous inference between:◦ Camera viewpoint◦ Object identities (Things)◦ Object identities (Things)◦ Surface orientations (Geometry)

Page 44: Andrew HarpAndrew Harp - University of Texas at Austingrauman/courses/spring...understand a word in a sentence. `Determining what objects are, even if the ... Conditional dependence

Denoted by

Only two parameters:h b d◦ : Height above ground

planeA priori height of 1.67mp g

◦ : Vertical position of horizon linehorizon line.

Initialized at 0.5

[Hoiem 2006]

Page 45: Andrew HarpAndrew Harp - University of Texas at Austingrauman/courses/spring...understand a word in a sentence. `Determining what objects are, even if the ... Conditional dependence

Detected by local object detectorBased off of gist based object-detector of Murphy, Torralba, and Freeman

[Hoiem 2006]

Page 46: Andrew HarpAndrew Harp - University of Texas at Austingrauman/courses/spring...understand a word in a sentence. `Determining what objects are, even if the ... Conditional dependence

Based on the previous work Geometric Context from a Single Image, also by Hoiemet al

[Hoiem 2006]

Page 47: Andrew HarpAndrew Harp - University of Texas at Austingrauman/courses/spring...understand a word in a sentence. `Determining what objects are, even if the ... Conditional dependence

[Hoiem 2006]

Page 48: Andrew HarpAndrew Harp - University of Texas at Austingrauman/courses/spring...understand a word in a sentence. `Determining what objects are, even if the ... Conditional dependence

Test set consists of 422 random outdoor images from the LabelMe dataset. The images contain 923 cars and 720 pedestrianspedestrians.

60 images have no cars or pedestrians60 images have no cars or pedestrians44 have only pedestrians94 have only cars94 have only cars224 have both cars and pedestrians

Page 49: Andrew HarpAndrew Harp - University of Texas at Austingrauman/courses/spring...understand a word in a sentence. `Determining what objects are, even if the ... Conditional dependence

[Hoiem 2006]

Page 50: Andrew HarpAndrew Harp - University of Texas at Austingrauman/courses/spring...understand a word in a sentence. `Determining what objects are, even if the ... Conditional dependence

[Hoiem 2006]

Page 51: Andrew HarpAndrew Harp - University of Texas at Austingrauman/courses/spring...understand a word in a sentence. `Determining what objects are, even if the ... Conditional dependence

[Hoiem 2006]

Page 52: Andrew HarpAndrew Harp - University of Texas at Austingrauman/courses/spring...understand a word in a sentence. `Determining what objects are, even if the ... Conditional dependence

[Hoiem 2006]

Page 53: Andrew HarpAndrew Harp - University of Texas at Austingrauman/courses/spring...understand a word in a sentence. `Determining what objects are, even if the ... Conditional dependence

[Hoiem 2006]

Page 54: Andrew HarpAndrew Harp - University of Texas at Austingrauman/courses/spring...understand a word in a sentence. `Determining what objects are, even if the ... Conditional dependence

[Hoiem 2006]

Page 55: Andrew HarpAndrew Harp - University of Texas at Austingrauman/courses/spring...understand a word in a sentence. `Determining what objects are, even if the ... Conditional dependence

Including viewpoint and surface geometry estimates nets 20% reduction in false negativesnegatives.

Reduces horizon estimation error by 3%Reduces horizon estimation error by 3%.

Including more object types improvesIncluding more object types improves performance.

Page 56: Andrew HarpAndrew Harp - University of Texas at Austingrauman/courses/spring...understand a word in a sentence. `Determining what objects are, even if the ... Conditional dependence

Elevation:◦ Has trouble with unusual object◦ Has trouble with unusual object

placement, because it assumes everything is on the ground plane.

Kill Bill, Miramax Films

Page 57: Andrew HarpAndrew Harp - University of Texas at Austingrauman/courses/spring...understand a word in a sentence. `Determining what objects are, even if the ... Conditional dependence

Ground Slope:◦ “If the ground is sloped, as in Figure 2, the

coordinates and parameters are computedcoordinates and parameters are computed with respect to that slope, and the relationship between viewpoint and objects in the image still holds.”

M b f b t l t dMaybe for cars, but people stand upright regardless of local slope!

Assumes things are 2DAssumes things are 2D billboards.

Figure 2(a) [Hoiem 2006]

Page 58: Andrew HarpAndrew Harp - University of Texas at Austingrauman/courses/spring...understand a word in a sentence. `Determining what objects are, even if the ... Conditional dependence

Combine perspective context and stuff context?

E i l f b d bj f bEstimate angle of observed object for better viewpoint estimation?

Page 59: Andrew HarpAndrew Harp - University of Texas at Austingrauman/courses/spring...understand a word in a sentence. `Determining what objects are, even if the ... Conditional dependence

Learning Spatial Context: Using Stuff to Find Things, by G. Heitz and D. Koller, ECCV 2008.

P i Obj i P i b D H iPutting Objects in Perspective, by D. Hoiem, A. Efros, and M. Hebert, CVPR 2006.

Page 60: Andrew HarpAndrew Harp - University of Texas at Austingrauman/courses/spring...understand a word in a sentence. `Determining what objects are, even if the ... Conditional dependence

Thanks!