From Pixels to Percepts
CS280: Computer Vision
From Images to Entities
"I stand at the window and see a house, trees, sky. Theoretically I might say there were 327 brightnesses and nuances of colour. Do I have "327"? No. I have sky, house, and trees.”
— Max Wertheimer, 1923
From Pixels to Perception
Tiger
Grass
Water
Sand
outdoor
wildlife
Tiger
tail
eye
legs
head
back
shadow
mouth
Need to handle complexity!
Ways of Reducing Complexity
Representation
(e.g. texture, blur, small scale)
Raw
Image
pixels
Segmentation
(partition the input)
Categorization
(partition the world)
Two aspects of object recognition
Attneave’s Cat (1954)�Line drawings convey most of the information
8
Modeling shape variation in a category
Matching� Example
model
target
Example Natural Materials
11
Terrycloth
Rough Plastic
Plaster-b
Sponge
Rug-a
Painted Spheres
Columbia-Utrecht Database (http://www.cs.columbia.edu/CAVE)
Texture Recognition
12
Felt?
Polyester?
Terrycloth?
Rough Plaster?
Leather?
Plaster?
Concrete?
Crumpled Paper?
Sponge?
Limestone?
Brick?
?
?
When are two textures similar?
14
Preattentive vs Attentive Vision (Julesz)
Human vision operates in two distinct modes:
1. Preattentive vision
parallel, instantaneous (~100--200ms), without scrutiny,
independent of the number of patterns, covering a large visual field.
2. Attentive vision
serial search by focal attention in 50ms steps limited to small aperture.
Evidence for Pre-attentive Recognition
Object
Bag of ‘words’
Clustered Image Patches (“Bag of Visual Words”)
Fei-Fei et al. 2005
Image representation
…..
frequency
codewords
Scene Classification (Renninger & Malik)
kitchen
livingroom
bedroom
bathroom
city
street
farm
beach
mountain
forest
Vision Science &
Computer Vision Groups
University of California �Berkeley
Texton Histogram Matching
Vision Science &
Computer Vision Groups
University of California �Berkeley
Discrimination of Basic Categories
texture model
Vision Science &
Computer Vision Groups
University of California �Berkeley
Discrimination of Basic Categories
texture model
chance
Vision Science &
Computer Vision Groups
University of California �Berkeley
Discrimination of Basic Categories
texture model
chance
37 ms
Vision Science &
Computer Vision Groups
University of California �Berkeley
Discrimination of Basic Categories
texture model
chance
50 ms
Vision Science &
Computer Vision Groups
University of California �Berkeley
Discrimination of Basic Categories
texture model
chance
69 ms
Vision Science &
Computer Vision Groups
University of California �Berkeley
Discrimination of Basic Categories
texture model
chance
37 ms
50 ms
69 ms
Vision Science &
Computer Vision Groups
University of California �Berkeley
When is Object Recognition �Just Texture Recognition?
“Collie”
image X
label Y
Convolutional Neural Network
When Object Recognition
is just Texture Recognition
“Collie”
image X
label Y
Convolutional Neural Network
When Object Recognition
is just Texture Recognition
From Images to Entities?
Is it even necessary?
Spatial Support
Surprising Result: second will get easier, if we make progress on the first
model
Does Spatial Support Matter?
Classify
Ground-Truth Segment
Bounding Box
Classify
vs.
Why segmentation/grouping is useful?
Separate image into objects
Improved spatial support for object detection
Help occlusion reasoning
Help reason about object shape
From Images to Entities
Some History
�Chickening out: �“Semantic Segmentation”
Input
Label
Input
Label
Each pixel has label, inc. background, and unknown
Usually visualized by colors.
Note: don’t distinguish between object instances
Image Credit: Everingham et al. Pascal VOC 2012.
Slide by David Fouhey
Structuralism
© Stephen E. Palmer, 2002
Structuralism:
Perception results from the association
of basic sensory atoms in memory via
repeated, prior joint occurrences.
Derived from philosophy of
British Empiricists (e.g., Locke,
Berkeley, Hume, and Mills).
Proposed by Wilhelm Wundt,
the father of modern Psychology.
Structuralism
© Stephen E. Palmer, 2002
Sensory Atoms
Retinal mosaic
Greenness
at (x3,y3)
Yellowness
at (x2,y2)
Redness
at (x1,y1)
Structuralism
© Stephen E. Palmer, 2002
Perceptual Complexes
Retinal mosaic
Structuralism
© Stephen E. Palmer, 2002
Perceptual Complexes
Retinal mosaic
Red apple
at (x0,y0)
Structuralism
© Stephen E. Palmer, 2002
Perceptual Complexes
Retinal mosaic
Red apple
at (x0,y0)
Association
Structuralism
© Stephen E. Palmer, 2002
Chemical Analogy
Perceptions are made of basic sensory experiences
just as molecules are made of basic atoms.
Gestaltism
© Stephen E. Palmer, 2002
Gestaltism:
Perception results from the interaction
between the intrinsic structure of the stimulus
and the intrinsic structure of the brain.
Max
Wertheimer
Wolfgang
Köhler
Kurt
Koffka
Gestaltism
© Stephen E. Palmer, 2002
The Gestalt movement in perceptual theory
was primarily a reaction against Structuralism:
Successful in arguing against Structuralism,
but less successful in promoting its own
theoretical agenda.
Rejected atomism
Rejected empiricism
Rejected associationism
Gestaltism
© Stephen E. Palmer, 2002
Holism: The whole is different from the sum of its parts.
Emergent properties:
Features of a configuration
that are not features of
its components, e.g.:
“The whole is different
from its parts”
-- Kurt Koffka
© Stephen E. Palmer, 2002
Wertheimer’s “laws” of grouping
Rows
Perceptual Grouping
Columns
© Stephen E. Palmer, 2002
14.20
Proximity
Rows
Columns
Perceptual Grouping
© Stephen E. Palmer, 2002
14.21
Color Similarity
Rows
Columns
Perceptual Grouping
© Stephen E. Palmer, 2002
14.22
Size Similarity
Rows
Columns
Perceptual Grouping
© Stephen E. Palmer, 2002
14.23
Orientation Similarity
Rows
Columns
Perceptual Grouping
© Stephen E. Palmer, 2002
14.24
Similarity of texture
Rows
Perceptual Grouping
Columns
© Stephen E. Palmer, 2002
14.26
Common Fate
Columns
Perceptual Grouping
Common fate
Image credit: Arthus-Bertrand (via F. Durand)
© Stephen E. Palmer, 2002
14.28
Closure
Columns
Rows
Perceptual Grouping
© Stephen E. Palmer, 2002
14.29
Common Region
Rows
Perceptual Grouping
Columns
© Stephen E. Palmer, 2002
14.30
Element Connectedness
Rows
Perceptual Grouping
Columns
© Stephen E. Palmer, 2002
14.27
Good Continuation
Columns
Rows
Perceptual Grouping
© Stephen E. Palmer, 2002
14.32
Past Experience
Perceptual Grouping
What’s wrong with classical clustering algorithms?
e.g. K-means or EM?
Similarity and dissimilarity
64
Similarity and dissimilarity
Image Segmentation
65
3/3/2003
Graph-based segmentation
wij
i
j
Source: S. Seitz
Ci
Cj
Don’t merge if:
σ = 0.8, k = 300
Mean shift clustering and segmentation
D. Comaniciu and P. Meer, Mean Shift: A Robust Approach toward Feature Space Analysis, PAMI 2002.
Mean shift algorithm
image
Feature space
(L*u*v* color values)
Mean shift
Search�window
Center of
mass
Mean Shift
vector
Slide by Y. Ukrainitz & B. Sarel
Mean shift
Search�window
Center of
mass
Mean Shift
vector
Slide by Y. Ukrainitz & B. Sarel
Mean shift
Search�window
Center of
mass
Mean Shift
vector
Slide by Y. Ukrainitz & B. Sarel
Mean shift
Search�window
Center of
mass
Mean Shift
vector
Slide by Y. Ukrainitz & B. Sarel
Mean shift
Search�window
Center of
mass
Mean Shift
vector
Slide by Y. Ukrainitz & B. Sarel
Mean shift
Search�window
Center of
mass
Mean Shift
vector
Slide by Y. Ukrainitz & B. Sarel
Mean shift
Search�window
Center of
mass
Slide by Y. Ukrainitz & B. Sarel
Mean shift clustering
Slide by Y. Ukrainitz & B. Sarel
Mean shift clustering/segmentation
Mean shift segmentation results
http://www.caip.rutgers.edu/~comanici/MSPAMI/msPamiResults.html
Mean shift segmentation results
Segmentation: Spectral Graph Techniques
Exploiting global constraints:�Image Segmentation as Graph Partitioning
83
Build a weighted graph G=(V,E) from image
V: image pixels
E: connections between pairs of nearby pixels
Partition graph so that similarity within group is large and similarity between groups is small -- Normalized Cuts [Shi & Malik 97]
Wij small when intervening contour strong, small when weak..� �Cij = max Pb(x,y) for (x,y) on line segment ij; Wij = exp ( - Cij / σ
84
How to partition a graph
85
Normalized Cut is a better measure ..
86
Solving the Normalized Cut problem
87
Normalized Cuts as a Spring-Mass system
(D - W) y = λDy
88
Eigenvectors carry contour information
89
Temporal NCuts [Shi & Malik, 98]
in (Marr’s) Theory
Input Image
Boundaries
Segmentation
Recognition
?
in Practice
Input Image
Edges
Segmentation
Recognition
Person
Car#1
Car#2
Road
...
What is a “good” segmentation??
Compare to human segmentation or to “ground truth”
No objective definition of segmentation!
Subject 1
Subject 2
Subject 3
No objective definition of segmentation!�
Evaluation: Boundary agreement
True boundary
Detected boundary
Correct if
D < T
Precision = % of detected boundary
pixels that are correct
Recall = % of boundary pixels that are detected
Varying T
Evaluation: Region overlap with ground truth
Evaluation: Region overlap with ground truth
Graph-based
Mean shift
Spectral
Ground truth
Results: Berkeley Segmentation Engine
Segmentation is not an aim in itself �– it’s a result of image understanding!
input image point process curve process
a color region texture regions objects
Superpixels