Image Segmentation. Luc Van Gool, ETH Zurich. Vittorio Ferrari, Un. of Edinburgh. With important contributions by

Size: px
Start display at page:

Download "Image Segmentation. Luc Van Gool, ETH Zurich. Vittorio Ferrari, Un. of Edinburgh. With important contributions by"

Transcription

1 Image Segmentation Perceptual and Sensory Augmented Computing Computer Vision WS 0/09 Luc Van Gool, ETH Zurich With important contributions by Vittorio Ferrari, Un. of Edinburgh Slide credits: K. Grauman, B. Leibe, S. Lazebnik, S. Seitz, Y Boykov, W. Freeman, P. Kohli

2 Topics of This Lecture Perceptual and Sensory Augmented Computing Introduction Gestalt principles Image segmentation Segmentation as clustering k-means Feature spaces Mixture of Gaussians, EM Model-free clustering: Mean-Shift Graph theoretic segmentation: Normalized Cuts Interactive Segmentation with path search

3 Slide credit: Kristen Grauman Grouping in Vision Perceptual and Sensory Augmented Computing Fast, bottom-up mechanisms to determine regions that belong together stepping stone between pixels/retina cell responses and scene interpretation. Psychophysics has listed features that seem to provoke perceptual grouping

4 Slide adapted from Kristen Grauman Similarity in appearance

5 Slide credit: Kristen Grauman Symmetry

6 Slide credit: Kristen Grauman Common Fate Image credit: Arthus-Bertrand (via F. Durand)

7 Slide credit: Kristen Grauman Proximity

8 The Gestalt School Grouping is key to visual perception `Belonging together is inferred from relationships The whole is greater than the sum of its parts Illusory/subjective contours Slide credit: Svetlana Lazebnik Occlusion Familiar configuration Image source: Steve Lehar

9 Gestalt Theory Gestalt: whole or group Whole is greater than sum of its parts Relationships among parts can yield new properties/features Psychologists identified series of factors that predispose set of elements to be grouped (by human visual system) Slide credit: B. Leibe 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 ( ) Untersuchungen zur Lehre von der Gestalt, Psychologische Forschung, Vol. 4, pp ,

10 Slide credit: B. Leibe Image source: Forsyth & Ponce Gestalt Factors These factors make intuitive sense, but are very difficult to translate into algorithms.

11 Slide credit: B. Leibe Figure-Ground Discrimination

12 The Ultimate Gestalt test Slide adapted from B. Leibe

13 Slide credit: Steve Seitz, Kristen Grauman Image Segmentation Goal: identify groups of pixels that go together

14 Slide credit: Svetlana Lazebnik The Goals of Segmentation Separate image into objects Image Human segmentation

15 Topics of This Lecture Introduction Gestalt principles Image segmentation Segmentation as clustering k-means Feature spaces Mixture of Gaussians, EM Model-free clustering: Mean-Shift Graph theoretic segmentation: Normalized Cuts Interactive Segmentation with path search

16 Slide credit: Kristen Grauman Image Segmentation: Toy Example These intensities define the three groups. We could label every pixel in the image according to which of these it is. 1 2 input image 3 black pixels intensity i.e. segment the image based on the intensity feature. What if the image isn t quite so simple? gray pixels white pixels

17 Input image Input image Slide credit: Kristen Grauman Pixel count Pixel count Intensity Intensity

18 Slide credit: Kristen Grauman Input image Pixel count Intensity Now how to determine the three main intensities that define our groups? We need to cluster.

19 Slide credit: Kristen Grauman Intensity 1 2 Goal: choose three centers as the representative intensities, and label every pixel according to which of these centers it is nearest to. Best cluster centers are those that minimize SSD between all points and their nearest cluster center c i : 3

20 Slide credit: Kristen Grauman Clustering With this objective, it is a chicken and egg problem: If we knew the cluster centers, we could allocate points to groups by assigning each to its closest center. If we knew the group memberships, we could get the centers by computing the mean per group.

21 Slide credit: Steve Seitz K-Means Clustering Basic idea: randomly initialize the k cluster centers, and iterate between the two steps we just saw. 1. Randomly initialize the cluster centers, c 1,..., c K 2. Given cluster centers, determine points in each cluster For each point p, find the closest c i. Put p into cluster i 3. Given points in each cluster, solve for c i Set c i to be the mean of points in cluster i 4. If c i have changed, repeat Step 2 Properties Will always converge to some solution Can be a local minimum Does not always find the global minimum of objective function:

22 Slide credit: Kristen Grauman Segmentation as Clustering K=2 K=3

23 Slide credit: Kristen Grauman Feature Space Depending on what we choose as the feature space, we can group pixels in different ways. Grouping pixels based on intensity similarity Feature space: intensity value (1D)

24 Feature Space Depending on what we choose as the feature space, we can group pixels in different ways. Grouping pixels based on color similarity B Feature space: color value (3D) Slide credit: Kristen Grauman R G R=15 G=189 B=2 R=3 G=12 B=2 R=255 G=200 B=250 R=245 G=220 B=248

25 Segmentation as Clustering Depending on what we choose as the feature space, we can group pixels in different ways. Grouping pixels based on texture similarity F 1 F 2 F 24 Feature space: filter bank responses (e.g. 24D) Slide credit: Kristen Grauman Filter bank of 24 filters

26 Slide adapted from Kristen Grauman Spatial coherence Assign a cluster label per pixel à possible discontinuities Original How can we ensure they are spatially smooth? Labeled by cluster center s intensity? 1 2 3

27 Slide adapted from Kristen Grauman Spatial coherence Depending on what we choose as the feature space, we can group pixels in different ways. Grouping pixels based on intensity+position similarity Intensity Y X Way to encode both similarity and proximity.

28 Slide credit: Kristen Grauman Summary K-Means Pros Simple, fast to compute Converges to local minimum of within-cluster squared error Cons/issues Setting k? Sensitive to initial centers Sensitive to outliers Detects spherical clusters only

29 Slide credit: Steve Seitz Probabilistic Clustering Basic questions What s the probability that a point x is in cluster m? What s the shape of each cluster? K-means doesn t answer these questions. Basic idea Instead of treating the data as a bunch of points, assume that they are all generated by sampling a continuous function. This function is called a generative model. Defined by a vector of parameters θ No hard (as with K-means) but a soft assignment to different clusters each with their probability

30 Slide adapted from Steve Seitz Mixture of Gaussians One generative model is a mixture of Gaussians (MoG) K Gaussian blobs with means µ b covariance matrices V b, dimension d Blob b defined by: Blob b is selected with probability ( ) The likelihood of observing x is a weighted mixture of Gaussians, K α b = 1 b=1

31 Slide adapted from Steve Seitz Expectation Maximization (EM) Goal Approach: Find blob parameters θ that maximize the likelihood function over all all datapoints 1. E-step: given current guess of blobs, compute probabilistic ownership of each point 2. M-step: given ownership probabilities, update blobs to maximize likelihood function 3. Repeat until convergence

32 Slide adapted from Steve Seitz EM Details E-step M-step Compute probability that point x is in blob b, given current guess of θ Compute overall probability that blob b is selected Mean of blob b Covariance of blob b (N data points)

33 Slide credit: B. Leibe Image source: Serge Belongie Segmentation with EM K = 3

34 Slide adapted from B. Leibe Summary: Mixtures of Gaussians, EM Pros Cons Probabilistic interpretation Soft assignments between data points and clusters Generative model, can predict novel data points Relatively compact storage Initialization often a good idea to start from output of k-means Local minima Need to know number of components K solutions: add a cost for model complexity Need to choose generative model (math form of a cluster?)

35 Topics of This Lecture Introduction Gestalt principles Image segmentation Segmentation as clustering k-means Feature spaces Mixture of Gaussians, EM Model-free clustering: Mean-Shift Graph theoretic segmentation: Normalized Cuts Interactive Segmentation with GraphCuts

36 Topics of This Lecture Introduction Gestalt principles Image segmentation Segmentation as clustering k-means Feature spaces Mixture of Gaussians, EM Model-free clustering: Mean-Shift Graph theoretic segmentation: Normalized Cuts Interactive Segmentation with path search

37 Slide adapted from Steve Seitz Finding Modes in a Histogram How many modes are there? Mode = local maximum of a given distribution Easy to see, hard to compute

38 Slide credit: Svetlana Lazebnik Mean-Shift Segmentation An advanced and versatile technique for clusteringbased segmentation D. Comaniciu and P. Meer, Mean Shift: A Robust Approach toward Feature Space Analysis, PAMI 2002.

39 Slide adapted from Steve Seitz Mean-Shift Algorithm Iterative Mode Search 1. Initialize random seed center and window W 2. Calculate center of gravity (the mean ) of W: 3. Shift the search window to the mean 4. Repeat steps 2+3 until convergence

40 Slide by Y. Ukrainitz & B. Sarel Mean-Shift Region of interest Center of mass Mean Shift vector

41 Slide by Y. Ukrainitz & B. Sarel Mean-Shift Region of interest Center of mass Mean Shift vector

42 Slide by Y. Ukrainitz & B. Sarel Mean-Shift Region of interest Center of mass Mean Shift vector

43 Slide by Y. Ukrainitz & B. Sarel Mean-Shift Region of interest Center of mass Mean Shift vector

44 Slide by Y. Ukrainitz & B. Sarel Mean-Shift Region of interest Center of mass Mean Shift vector

45 Slide by Y. Ukrainitz & B. Sarel Mean-Shift Region of interest Center of mass Mean Shift vector

46 Slide by Y. Ukrainitz & B. Sarel Mean-Shift Region of interest Center of mass

47 Real Modality Analysis Tessellate the space with windows Slide by Y. Ukrainitz & B. Sarel Run the procedure in parallel

48 Slide by Y. Ukrainitz & B. Sarel Real Modality Analysis The blue data points were traversed by the windows towards the mode.

49 Slide by Y. Ukrainitz & B. Sarel Mean-Shift Clustering Cluster: all data points in the attraction basin of a mode Attraction basin: the region for which all trajectories lead to the same mode

50 Slide adapted from Svetlana Lazebnik Mean-Shift Clustering/Segmentation Choose features (color, gradients, texture, etc) Initialize windows at individual pixel locations Start mean-shift from each window until convergence Merge windows that end up near the same peak or mode

51 Mean-Shift Segmentation Results Slide credit: Svetlana Lazebnik

52 Slide adapted from Svetlana Lazebnik Summary Mean-Shift Pros General, application-independent tool Model-free, does not assume any prior shape (spherical, elliptical, etc.) on data clusters Just a single parameter (window size h) Cons h has a physical meaning (unlike k-means) == scale of clustering Finds variable number of modes given the same h Robust to outliers Output depends on window size h Window size (bandwidth) selection is not trivial Computationally rather expensive Does not scale well with dimension of feature space (sparsity problems in high-dimensional spaces )

53 Topics of This Lecture Introduction Gestalt principles Image segmentation Segmentation as clustering k-means Feature spaces Mixture of Gaussians, EM Model-free clustering: Mean-Shift Graph theoretic segmentation: Normalized Cuts Interactive Segmentation with path search

54 Slide adapted from Steve Seitz Images as Graphs q Fully-connected graph p w pq Node (vertex) for every pixel Edge between every pair of pixels (p,q) Affinity weight w pq for each edge w pq measures similarity Similarity is inversely proportional to difference (in color, texture, position, ) w

55 Source: Forsyth & Ponce Measuring Affinity Distance { 2 } 1 2σ aff ( x, y) = exp x y 2 d Intensity Color Texture { 2 } 1 2σ aff ( x, y) = exp I( x) I( y) 2 d { ( ) } dist c x c y 2σ aff ( x, y) = exp ( ), ( ) d (some suitable color space distance) { 2 } 1 2σ aff ( x, y) = exp f ( x) f ( y) 2 d (vectors of filter outputs)

56 Slide adapted from Steve Seitz Segmentation by Graph Cuts w A B C Break Graph into Segments Delete edges crossing between segments Easiest to break edges with low similarity (low weight) Similar pixels should be in the same segments Dissimilar pixels should be in different segments

57 Slide adapted from Steve Seitz Graph Cut (GC) GC = edges whose removal partitions a graph in two Cost of a cut Sum of weights of cut edges: A graph cut gives us a segmentation A B cut( A, B) w p, q p A, q B What is a good graph cut and how do we find one? =

58 Slide credit: Khurram Hassan-Shafique Minimum Cut We can do segmentation by finding the minimum cut in a graph Drawback: Efficient algorithms exist for doing this Weight of cut proportional to number of edges in the cut Minimum cut tends to cut off very small, isolated components Ideal Cut Cuts with lesser weight than the ideal cut

59 Normalized Cut (NCut) Min-cut has bias toward partitioning out small segments This can be fixed by normalizing for size of segments The normalized cut cost is: cut(a,b) assoc(a,v ) + cut(a,b) assoc(b,v ) assoc(a,v) = sum of weights from A to all nodes in the graph The exact solution is NP-hard but an approximation can be computed by solving a generalized eigenvalue problem. J. Shi and J. Malik. Normalized cuts and image segmentation. PAMI 2000 Slide adapted from Svetlana Lazebnik

60 Slide adapted from Steve Seitz Interpretation as a Dynamical System Treat the edges as springs and shake the system Elasticity proportional to cost Vibration modes correspond to segments Can compute these by solving a generalized eigenvector problem

61 NCuts Example NCuts segments Slide credit: B. Leibe Image source: Shi & Malik

62 Slide credit: Steve Seitz Image Source: Shi & Malik Color Image Segmentation with NCuts

63 Results with Color & Texture

64 Slide credit: Kristen Grauman Summary: Normalized Cuts Pros: Cons: Generic framework, flexible to choice of function that computes weights ( affinities ) between nodes Does not require any model of the data distribution Time and memory complexity can be high Dense, highly connected graphs many affinity computations Solving eigenvalue problem Preference for balanced partitions If a region is uniform, NCuts will find the modes of vibration of the image dimensions

65 Slide credit: William Freeman Markov Random Fields Allow rich probabilistic models for images But built in a local, modular way Learn local effects, get global effects out Observed evidence Hidden true states Neighborhood relations

66 Slide adapted from William Freeman MRF Nodes as Pixels (or Patches) Image pixels Φ( x, y ) i i Ψ( x, x ) i j Image states (e.g. foreground/background)

67 Slide adapted from William Freeman Network Joint Probability Pxy (, ) ( x, y) ( x, x) states Image = Φ Ψ i Image-state compatibility function i i i j i, j Local observations state-state compatibility function Neighboring nodes

68 Energy Formulation Joint probability Pxy (, ) ( x, y) ( x, x) = Φ Ψ i i i i j i, j Maximizing the joint probability is the same as minimizing the -log log P(x, y) = log Φ(x i, y i ) log Ψ(x i, x j ) i E(x, y) = ϕ(x i, y i ) + ψ (x i, x j ) i i, j This is similar to free-energy problems in statistical mechanics (spin glass theory). We therefore draw the analogy and call E an energy function. ϕ and ψ are called potentials. Slide credit: B. Leibe i, j

69 Energy Formulation Energy function Unary potentials Encode local information about the given pixel/patch How likely is a pixel/patch to be in a certain state? (e.g. foreground/background)? Pairwise potentials Exy (, ) = ϕ( x, y) + ψ( x, x) i i i i j i, j Unary potentials Pairwise potentials ϕ( x, y ) Encode neighborhood information How different is a pixel/patch s label from that of its neighbor? (e.g. here independent of image data, but later based on intensity/color/texture difference) Slide adapted from B. Leibe ϕ ψ i i ψ ( x, x ) i j

70 Slide credit: B. Leibe Energy Minimization Goal: Infer the optimal labeling of the MRF. Many inference algorithms are available, e.g. Gibbs sampling, simulated annealing Iterated conditional modes (ICM) Variational methods Belief propagation Graph cuts Recently, Graph Cuts have become a popular tool ϕ( x, y ) Only suitable for a certain class of energy functions But the solution can be obtained very fast for typical vision problems (~1MPixel/sec). i i ψ ( x, x ) i j

71 Graph Cuts for Optimal Boundary Detection Idea: convert MRF into source-sink graph Minimum cost cut can be computed in polynomial time (max-flow/min-cut algorithms) hard constraint n-links t s a cut hard constraint Slide adapted from Yuri Boykov [Boykov & Jolly, ICCV 01]

72 Slide credit: Yuri Boykov [Boykov & Jolly, ICCV 01] Adding Regional Properties D p (t) n-links t a cut Regional bias example I s Suppose are given expected intensities of object and background t-link w pq s t-link D p (s) t and I ( s 2 2 D ( s) exp I I / 2σ ) D p p p ( t 2 2 I I / 2 ) ( t) exp σ p

73 Slide credit: Yuri Boykov [Boykov & Jolly, ICCV 01] Adding Regional Properties More generally, regional bias can be based on any intensity models of object and background D p (s) D p (t) t s a cut D ( L ) = log Pr( I L ) Pr( Pr( I p I p t) s) p p p p given object and background intensity histograms I p I

74 Slide credit: Pushmeet Kohli How Does it Work? The s-t-mincut Problem Source v 1 v Sink 4 Graph (V, E, C) Vertices V = {v 1, v 2... v n } Edges E = {(v 1, v 2 )...} Costs C = {c (1, 2)...}

75 Slide credit: Pushmeet Kohli The s-t-mincut Problem What is an st-cut? Source v 1 v Sink = 16 An st-cut (S,T) divides the nodes between source and sink. What is the cost of a st-cut? Sum of cost of all edges going from S to T

76 Slide credit: Pushmeet Kohli The s-t-mincut Problem What is an st-cut? Source v 1 v Sink = 7 An st-cut (S,T) divides the nodes between source and sink. What is the cost of a st-cut? Sum of cost of all edges going from S to T What is the st-mincut? st-cut with the minimum cost

77 Slide credit: Pushmeet Kohli How to Compute the s-t-mincut? Source v 1 v Sink 4 Solve the dual maximum flow problem Compute the maximum flow between Source and Sink Constraints Edges: Flow < Capacity Nodes: Flow in = Flow out Min-cut/Max-flow Theorem In every network, the maximum flow equals the cost of the st-mincut

78 Maxflow Algorithms Source v 1 v 2 5 Flow = Sink Slide credit: Pushmeet Kohli 9 4 Augmenting Path Based Algorithms 1. Find path from source to sink with positive capacity 2. Push maximum possible flow through this path 3. Repeat until no path can be found Algorithms assume non-negative capacity

79 Maxflow Algorithms Source v 1 v Flow = Sink Slide credit: Pushmeet Kohli 9 4 Augmenting Path Based Algorithms 1. Find path from source to sink with positive capacity 2. Push maximum possible flow through this path 3. Repeat until no path can be found Algorithms assume non-negative capacity

80 Maxflow Algorithms Flow = Source v 1 v Sink Slide credit: Pushmeet Kohli 9 4 Augmenting Path Based Algorithms 1. Find path from source to sink with positive capacity 2. Push maximum possible flow through this path 3. Repeat until no path can be found Algorithms assume non-negative capacity

81 Maxflow Algorithms Source v 1 v Flow = Sink Slide credit: Pushmeet Kohli 9 4 Augmenting Path Based Algorithms 1. Find path from source to sink with positive capacity 2. Push maximum possible flow through this path 3. Repeat until no path can be found Algorithms assume non-negative capacity

82 Maxflow Algorithms Source v 1 v 2 3 Flow = Sink Slide credit: Pushmeet Kohli 9 4 Augmenting Path Based Algorithms 1. Find path from source to sink with positive capacity 2. Push maximum possible flow through this path 3. Repeat until no path can be found Algorithms assume non-negative capacity

83 Maxflow Algorithms Source v 1 v Flow = Sink Slide credit: Pushmeet Kohli 9 4 Augmenting Path Based Algorithms 1. Find path from source to sink with positive capacity 2. Push maximum possible flow through this path 3. Repeat until no path can be found Algorithms assume non-negative capacity

84 Maxflow Algorithms Flow = Source v 1 v Sink Slide credit: Pushmeet Kohli 5 0 Augmenting Path Based Algorithms 1. Find path from source to sink with positive capacity 2. Push maximum possible flow through this path 3. Repeat until no path can be found Algorithms assume non-negative capacity

85 Maxflow Algorithms Source v 1 v 2 3 Flow = Sink Slide credit: Pushmeet Kohli 5 0 Augmenting Path Based Algorithms 1. Find path from source to sink with positive capacity 2. Push maximum possible flow through this path 3. Repeat until no path can be found Algorithms assume non-negative capacity

86 Maxflow Algorithms Source v 1 v Flow = Sink Slide credit: Pushmeet Kohli 5 0 Augmenting Path Based Algorithms 1. Find path from source to sink with positive capacity 2. Push maximum possible flow through this path 3. Repeat until no path can be found Algorithms assume non-negative capacity

87 Maxflow Algorithms Flow = Source v 1 v Sink Slide credit: Pushmeet Kohli 4 0 Augmenting Path Based Algorithms 1. Find path from source to sink with positive capacity 2. Push maximum possible flow through this path 3. Repeat until no path can be found Algorithms assume non-negative capacity

88 Maxflow Algorithms Source v 1 v Flow = Sink Slide credit: Pushmeet Kohli 5 0 Augmenting Path Based Algorithms 1. Find path from source to sink with positive capacity 2. Push maximum possible flow through this path 3. Repeat until no path can be found Algorithms assume non-negative capacity

89 Maxflow Algorithms Source v 1 v Flow = Sink Slide credit: Pushmeet Kohli 5 0 Augmenting Path Based Algorithms 1. Find path from source to sink with positive capacity 2. Push maximum possible flow through this path 3. Repeat until no path can be found Algorithms assume non-negative capacity

90 Slide credit: B. Leibe Dealing with Non-Binary Cases For image segmentation, the limitation to binary energies is a nuisance. Binary segmentation only We would like to solve also multi-label problems. NP-hard problem with 3 or more labels There exist some approximation algorithms which extend graph cuts to the multi-label case E.g. -Expansion They are no longer guaranteed to return the globally optimal result. α α But -Expansion has a guaranteed approximation quality and converges in a few iterations.

91 Slide credit: B. Leibe Summary: Graph Cuts Segmentation Pros Powerful technique, based on probabilistic model (MRF). Applicable for a wide range of problems. Very efficient algorithms available for vision problems. Becoming a de-facto standard for many segmentation tasks. Cons/Issues Graph cuts can only solve a limited class of models Submodular energy functions Can capture only part of the expressiveness of MRFs Only approximate algorithms available for multi-label case

92 Slide credit: Kristen Grauman Segmentation: Caveats We ve looked at bottom-up ways to segment an image into regions, yet finding meaningful segments is intertwined with the recognition problem. Often want to avoid making hard decisions too soon Difficult to evaluate; when is a segmentation successful?

93 Slide credit: Svetlana Lazebnik Speeding up 1: start from `superpixels Start from an over-segmentation, similar-looking pixels have been grouped together quickly; requires object boundaries to be preserved as part of superpixel edges! superpixels X. Ren and J. Malik. Learning a classification model for segmentation. ICCV 2003.

94 Speeding up 2: objectness Trying to draw bounding boxes around Focus on regions objects, that an `objectness score indicates as probably containing without knowing an object what they are e 7: Best windows proposed by our method (yellow), out of 1000, for the ground-truth annotations (blue). The examples in yellow: bb by computer / blue: by human

95 Topics of This Lecture Introduction Gestalt principles Image segmentation Segmentation as clustering k-means Feature spaces Mixture of Gaussians, EM Model-free clustering: Mean-Shift Graph theoretic segmentation: Normalized Cuts Interactive Segmentation with path search

96 Dynamic path search: principle Guided by a user-supplied cost function, expressing expectations like good edges to contain pixels with high gradients, edges to be smooth, etc. find optimal path through the image: 1. having lowest cost 2. satisfying constraints (e.g. given endpoints) Useful in interactive applications (e.g. medical), or when environment constrained

97 Dynamic path search : nomenclature A graph consists of nodes (pixels) connected by arcs (steps) Nodes connected by steps are parents and successors Identifying a node s successors is expansion of that node A tree is a graph with 1 parent for the nodes (our arcs are undirected)

98 Dynamic path search : nomenclature cont d Often the arcs are assigned a cost A sequence of nodes n 1,n 2,,n k (n i = sucessor of n i-1 ) is a path of length k Usually path cost = Σ arc costs

99 Dynamic path search : cost functions Cost function incorporates problem-specific information e.g. penalize changes in edge direction e.g. penalize the inclusion of pixels with low intensity gradient problem is one of optimization : l 1. gradient descent l 2. path array methods l 3. best-first search

100 Gradient descent Always choose the next pixel that adds the smallest cost Example :

101 Gradient descent : example angiogram image :

102 Gradient descent : example cont d Cost : 3 i 3 + d 1

103 Gradient descent : problem Gradient descent never looks back :

104 Gradient descent : remarks Gradient descent used for several purposes Fast but no guarantee that the optimal path is found

105 Path array techniques : principle Illustration of one-pass example : the angiogram? Select cheapest step to a node Remember by putting a pointer back

106 Path array techniques : principle Upon reaching the last column BACKTRACK Select cheapest node in last column

107 Path array techniques : principle Summary From left to right : determine cheapest path + cost for each pixel set pointer back Determine pixel with lowest value in right column backtrack

108 Path array techniques : example Optimal paths are found :

109 Path array techniques : remarks guaranteed to find the optimal path solves many optimisation problems simultaneously : from each point cheapest path can be backtracked suboptimal in that sense program is simple cannot handle meandering paths, so far

110 Path array techniques : principle of F* Solution to meandering problem via multipass algorithm : F* Path array is constructed iteratively until no changes F* finds optimal paths notation : P( i, j ) = cost up to point ( i, j ) C( i,j, i, j ) = cost for step from ( i, j ) to ( i, j )

111 Path array techniques : F* algorithm l 1. P initialized to, starting node = 0 l 2. Top to bottom, row by row updating of P : first, fromleft to right : P( i, j), C( i 1, j 1, i, j) + P( i 1, j 1 ), P( i, j) : = min C( i 1, j, i, j) + P( i 1, j), C( i 1, j + 1, i, j) + P( i 1, j + 1 ), ( ) ( ) C i, j 1, i, j + P i, j 1 then, from right to left : P( i, j) : = min ( P( i, j), C( i, j + 1, i, j) + P( i, j + 1) ) l 3. Alternating bottom to top and top to bottom l 4. Stops when no changes l 5. Optimal path is backtracked

112 Path array techniques : F* example Road detection in aerial image : Endpoints are given

113 Path array techniques : F* example Cost : C ( i, j ) = (255 - F( i, j )) a F ( i, j ) is scaled output of matched convolution filter :

114 Path array techniques : F* example Result for a = 1 Result for a = 2.4

115 Path array techniques : F* remarks Choice of cost function is crucial but not trivial! Note special structure of cost function in the ex.: C ( i, j, i, j ) = C ( i, j ) backtracking via cheapest neighbour instead of pointers F* yields the optimal solution Invests much effort in finding irrelevant solutions as before

116 Best - first search : principle Strike a balance between the two previous ones n 1. Uses problem-specific information to guide the process selectively n 2. Returns the optimal solution if applied properly New data structures: list OPEN: end nodes of paths list CLOSED: nodes already passed through furthermore: evaluation function f(n)

117 Best - first : the algorithm BF 1. Start node s on OPEN 2. OPEN = empty exit with failure 3. OPEN node n with f min., put it on CLOSED 4. Expand n 5. A successor = a goal node solved 6. For every successor n Calculate f (n ) If n neither on OPEN nor CLOSED : put n on OPEN, set ptr If n already on OPEN or CLOSED, replace f (n ) and redirect ptr if new f (n ) lower, if n on CLOSED, back to OPEN 7. Go to step 2. ñ ñ

118 Best - first : the algorithm BF 1. Start node s on OPEN 2. OPEN = empty exit with failure 3. OPEN node n with f min., put it on CLOSED 4. Expand n 5. A successor = a goal node solved 6. For every successor n Calculate f (n ) If n neither on OPEN nor CLOSED : put n on OPEN, set ptr If n already on OPEN or CLOSED, replace f (n ) and redirect ptr if new f (n ) lower, if n on CLOSED, back to OPEN 7. Go to step 2. ñ ñ

119 Best - first : BF* Risk of missing the optimal solution In step 5 : quits if successor is a goal node We should include the cost of the last arc

120 Best - first : BF* BF* algorithm wait until new arc is part of f (n) exit when node n is a goal node

121 Best - first : cost functions The BF and BF* algorithms advance slowly. For a typical cost function, short paths will have lower costs and need to be developed before the actual solution path can reach a goal node. We now try to do something about that.

122 Best - first : cost functions C (n) = cost for portion from n to the END of the path C (n) is recursive if for immediate successor n s C (n) = F (E (n), C (n s )) where E (n) function of local properties only If such rollback function F exists, it is possible to evaluate the cost of a path knowing the optimal remaining cost and the costs of steps taken so far Examples of rollback functions are the maximum or the sum of the arc costs.

123 Best - first : crystal balls??????!!!!!! BUT we don t know the path to the goal...

124 Best - first : crystal balls? We introduce an estimate h (n) Recursiveness of the roll-back function allows us to effectively use such estimate! this version of BF is the Z algorithm this version of BF* is the Z* algorithm

125 Best - first: Z Examples of non-recursive cost functions: 1 2 Largest - smallest node cost C ( n ) = c( n, n ) C ( n) nr + With Cnr(n ) the cost from start node to n Suppose n-1 is a start node, n+2 is a goal node ( 1) = c( n + 1, n + 2) + c( n, n + 1) + c( n 1, n) C n Cannot be retrieved from c(n-1,n) and ( n) = c( n + 1, n + 2) + c( n n + 1) nr C,

126 Best - first : Z* Z* finds the optimal path if 1. h (n) underestimates the remaining cost 2. for n successor of n : ( E( n), h ( n ) F( E( n), h ( n ) F 3. for parents n 1 and n 2 of a F E n h n F E n, h ( ( ) ( )) ( ( ) ( n) ) 1, 2 common successor n : ( E( n ) h ( n) ) F ( E( n ), h ( n) ) F 1 ( n ) h ( n ) h, 2 Sum and maximum cost are acceptable functions

127 Best - first : A* A* uses a sum : C(n) = c( n,n s ) + C(n s ) f(n) = g(n) + h(n), with g(n) sum of arc costs up to the current point

128 Best - first : the A* algorithm 1. Start node on OPEN 2. OPEN = empty exit, failure 3. n with min. f from OPEN, put it on CLOSED 5. expand n n not on OPEN or CLOSED, estimate h(n ), calculate f (n ), set ptrs. n on OPEN or CLOSED, direct ptr along path with lowest g (n ) if n obtained new ptr + on CLOSED, then put on OPEN 6. Go to step 2. ñ 4. n = goal node solved ñ

129 Best-first : consistency assumption if h ( m) h( n) c ( m, n) min then reconsidering CLOSED is unnecessary explanation : If the assumption holds, costs always increase over time. Hence returning to a node with lower cost is impossible remark : with h(n) = 0, the assumption normally applies

130 Best-search : Z*, A* remarks Increase efficiency by penalizing path incompleteness Spend less time on needlessly growing inferior paths Nevertheless, e.g. F* can be superior if the optimum is not outstanding, due to bookkeeping overhead or if there can be changes in the goal

Lecture: k-means & mean-shift clustering

Lecture: k-means & mean-shift clustering Lecture: k-means & mean-shift clustering Juan Carlos Niebles and Ranjay Krishna Stanford Vision and Learning Lab Lecture 11-1 Recap: Image Segmentation Goal: identify groups of pixels that go together

More information

Image Segmentation. Marc Pollefeys. ETH Zurich. Slide credits: V. Ferrari, K. Grauman, B. Leibe, S. Lazebnik, S. Seitz,Y Boykov, W. Freeman, P.

Image Segmentation. Marc Pollefeys. ETH Zurich. Slide credits: V. Ferrari, K. Grauman, B. Leibe, S. Lazebnik, S. Seitz,Y Boykov, W. Freeman, P. Image Segmentation Perceptual and Sensory Augmented Computing Computer Vision WS 0/09 Marc Pollefeys ETH Zurich Slide credits: V. Ferrari, K. Grauman, B. Leibe, S. Lazebnik, S. Seitz,Y Boykov, W. Freeman,

More information

Lecture: k-means & mean-shift clustering

Lecture: k-means & mean-shift clustering Lecture: k-means & mean-shift clustering Juan Carlos Niebles and Ranjay Krishna Stanford Vision and Learning Lab 1 Recap: Image Segmentation Goal: identify groups of pixels that go together 2 Recap: Gestalt

More information

Computer Vision Lecture 6

Computer Vision Lecture 6 Computer Vision Lecture 6 Segmentation 12.11.2015 Bastian Leibe RWTH Aachen http://www.vision.rwth-aachen.de leibe@vision.rwth-aachen.de Course Outline Image Processing Basics Structure Extraction Segmentation

More information

Segmentation and Grouping April 19 th, 2018

Segmentation and Grouping April 19 th, 2018 Segmentation and Grouping April 19 th, 2018 Yong Jae Lee UC Davis Features and filters Transforming and describing images; textures, edges 2 Grouping and fitting [fig from Shi et al] Clustering, segmentation,

More information

Computer Vision Lecture 6

Computer Vision Lecture 6 Course Outline Computer Vision Lecture 6 Segmentation Image Processing Basics Structure Extraction Segmentation Segmentation as Clustering Graph-theoretic Segmentation 12.11.2015 Recognition Global Representations

More information

Segmentation & Grouping Kristen Grauman UT Austin. Announcements

Segmentation & Grouping Kristen Grauman UT Austin. Announcements Segmentation & Grouping Kristen Grauman UT Austin Tues Feb 7 A0 on Canvas Announcements No office hours today TA office hours this week as usual Guest lecture Thursday by Suyog Jain Interactive segmentation

More information

The goals of segmentation

The goals of segmentation Image segmentation The goals of segmentation Group together similar-looking pixels for efficiency of further processing Bottom-up process Unsupervised superpixels X. Ren and J. Malik. Learning a classification

More information

Grouping and Segmentation

Grouping and Segmentation Grouping and Segmentation CS 554 Computer Vision Pinar Duygulu Bilkent University (Source:Kristen Grauman ) Goals: Grouping in vision Gather features that belong together Obtain an intermediate representation

More information

Outline. Segmentation & Grouping. Examples of grouping in vision. Grouping in vision. Grouping in vision 2/9/2011. CS 376 Lecture 7 Segmentation 1

Outline. Segmentation & Grouping. Examples of grouping in vision. Grouping in vision. Grouping in vision 2/9/2011. CS 376 Lecture 7 Segmentation 1 Outline What are grouping problems in vision? Segmentation & Grouping Wed, Feb 9 Prof. UT-Austin Inspiration from human perception Gestalt properties Bottom-up segmentation via clustering Algorithms: Mode

More information

Segmentation and Grouping

Segmentation and Grouping CS 1699: Intro to Computer Vision Segmentation and Grouping Prof. Adriana Kovashka University of Pittsburgh September 24, 2015 Goals: Grouping in vision Gather features that belong together Obtain an intermediate

More information

Segmentation and Grouping April 21 st, 2015

Segmentation and Grouping April 21 st, 2015 Segmentation and Grouping April 21 st, 2015 Yong Jae Lee UC Davis Announcements PS0 grades are up on SmartSite Please put name on answer sheet 2 Features and filters Transforming and describing images;

More information

Lecture 13: k-means and mean-shift clustering

Lecture 13: k-means and mean-shift clustering Lecture 13: k-means and mean-shift clustering Juan Carlos Niebles Stanford AI Lab Professor Stanford Vision Lab Lecture 13-1 Recap: Image Segmentation Goal: identify groups of pixels that go together Lecture

More information

CMPSCI 670: Computer Vision! Grouping

CMPSCI 670: Computer Vision! Grouping CMPSCI 670: Computer Vision! Grouping University of Massachusetts, Amherst October 14, 2014 Instructor: Subhransu Maji Slides credit: Kristen Grauman and others Final project guidelines posted Milestones

More information

Lecture 7: Segmentation. Thursday, Sept 20

Lecture 7: Segmentation. Thursday, Sept 20 Lecture 7: Segmentation Thursday, Sept 20 Outline Why segmentation? Gestalt properties, fun illusions and/or revealing examples Clustering Hierarchical K-means Mean Shift Graph-theoretic Normalized cuts

More information

CS 2770: Computer Vision. Edges and Segments. Prof. Adriana Kovashka University of Pittsburgh February 21, 2017

CS 2770: Computer Vision. Edges and Segments. Prof. Adriana Kovashka University of Pittsburgh February 21, 2017 CS 2770: Computer Vision Edges and Segments Prof. Adriana Kovashka University of Pittsburgh February 21, 2017 Edges vs Segments Figure adapted from J. Hays Edges vs Segments Edges More low-level Don t

More information

CS 4495 Computer Vision. Segmentation. Aaron Bobick (slides by Tucker Hermans) School of Interactive Computing. Segmentation

CS 4495 Computer Vision. Segmentation. Aaron Bobick (slides by Tucker Hermans) School of Interactive Computing. Segmentation CS 4495 Computer Vision Aaron Bobick (slides by Tucker Hermans) School of Interactive Computing Administrivia PS 4: Out but I was a bit late so due date pushed back to Oct 29. OpenCV now has real SIFT

More information

Image Segmentation. April 24, Stanford University. Philipp Krähenbühl (Stanford University) Segmentation April 24, / 63

Image Segmentation. April 24, Stanford University. Philipp Krähenbühl (Stanford University) Segmentation April 24, / 63 Image Segmentation Philipp Krähenbühl Stanford University April 24, 2013 Philipp Krähenbühl (Stanford University) Segmentation April 24, 2013 1 / 63 Image Segmentation Goal: identify groups of pixels that

More information

Lecture 16 Segmentation and Scene understanding

Lecture 16 Segmentation and Scene understanding Lecture 16 Segmentation and Scene understanding Introduction! Mean-shift! Graph-based segmentation! Top-down segmentation! Silvio Savarese Lecture 15 -! 3-Mar-14 Segmentation Silvio Savarese Lecture 15

More information

CS 2750: Machine Learning. Clustering. Prof. Adriana Kovashka University of Pittsburgh January 17, 2017

CS 2750: Machine Learning. Clustering. Prof. Adriana Kovashka University of Pittsburgh January 17, 2017 CS 2750: Machine Learning Clustering Prof. Adriana Kovashka University of Pittsburgh January 17, 2017 What is clustering? Grouping items that belong together (i.e. have similar features) Unsupervised:

More information

Segmentation (continued)

Segmentation (continued) Segmentation (continued) Lecture 05 Computer Vision Material Citations Dr George Stockman Professor Emeritus, Michigan State University Dr Mubarak Shah Professor, University of Central Florida The Robotics

More information

Segmentation & Clustering

Segmentation & Clustering EECS 442 Computer vision Segmentation & Clustering Segmentation in human vision K-mean clustering Mean-shift Graph-cut Reading: Chapters 14 [FP] Some slides of this lectures are courtesy of prof F. Li,

More information

CSE 473/573 Computer Vision and Image Processing (CVIP) Ifeoma Nwogu. Lectures 21 & 22 Segmentation and clustering

CSE 473/573 Computer Vision and Image Processing (CVIP) Ifeoma Nwogu. Lectures 21 & 22 Segmentation and clustering CSE 473/573 Computer Vision and Image Processing (CVIP) Ifeoma Nwogu Lectures 21 & 22 Segmentation and clustering 1 Schedule Last class We started on segmentation Today Segmentation continued Readings

More information

Announcements. Image Segmentation. From images to objects. Extracting objects. Status reports next Thursday ~5min presentations in class

Announcements. Image Segmentation. From images to objects. Extracting objects. Status reports next Thursday ~5min presentations in class Image Segmentation Announcements Status reports next Thursday ~5min presentations in class Project voting From Sandlot Science Today s Readings Forsyth & Ponce, Chapter 1 (plus lots of optional references

More information

Segmentation. Bottom Up Segmentation

Segmentation. Bottom Up Segmentation Segmentation Bottom up Segmentation Semantic Segmentation Bottom Up Segmentation 1 Segmentation as clustering Depending on what we choose as the feature space, we can group pixels in different ways. Grouping

More information

Applications. Foreground / background segmentation Finding skin-colored regions. Finding the moving objects. Intelligent scissors

Applications. Foreground / background segmentation Finding skin-colored regions. Finding the moving objects. Intelligent scissors Segmentation I Goal Separate image into coherent regions Berkeley segmentation database: http://www.eecs.berkeley.edu/research/projects/cs/vision/grouping/segbench/ Slide by L. Lazebnik Applications Intelligent

More information

Image Segmentation. Selim Aksoy. Bilkent University

Image Segmentation. Selim Aksoy. Bilkent University Image Segmentation Selim Aksoy Department of Computer Engineering Bilkent University saksoy@cs.bilkent.edu.tr Examples of grouping in vision [http://poseidon.csd.auth.gr/lab_research/latest/imgs/s peakdepvidindex_img2.jpg]

More information

Segmentation and Grouping

Segmentation and Grouping 02/23/10 Segmentation and Grouping Computer Vision CS 543 / ECE 549 University of Illinois Derek Hoiem Last week Clustering EM Today s class More on EM Segmentation and grouping Gestalt cues By boundaries

More information

Image Segmentation. Selim Aksoy. Bilkent University

Image Segmentation. Selim Aksoy. Bilkent University Image Segmentation Selim Aksoy Department of Computer Engineering Bilkent University saksoy@cs.bilkent.edu.tr Examples of grouping in vision [http://poseidon.csd.auth.gr/lab_research/latest/imgs/s peakdepvidindex_img2.jpg]

More information

Grouping and Segmentation

Grouping and Segmentation 03/17/15 Grouping and Segmentation Computer Vision CS 543 / ECE 549 University of Illinois Derek Hoiem Today s class Segmentation and grouping Gestalt cues By clustering (mean-shift) By boundaries (watershed)

More information

CS 534: Computer Vision Segmentation and Perceptual Grouping

CS 534: Computer Vision Segmentation and Perceptual Grouping CS 534: Computer Vision Segmentation and Perceptual Grouping Ahmed Elgammal Dept of Computer Science CS 534 Segmentation - 1 Outlines Mid-level vision What is segmentation Perceptual Grouping Segmentation

More information

2%34 #5 +,,% ! # %& ()% #% +,,%. & /%0%)( 1 ! # %& % %()# +(& ,.+/ +&0%//#/ &

2%34 #5 +,,% ! # %& ()% #% +,,%. & /%0%)( 1 ! # %& % %()# +(& ,.+/ +&0%//#/ & ! # %& ()% #% +,,%. & /%0%)( 1 2%34 #5 +,,%! # %& % %()# +(&,.+/ +&0%//#/ & & Many slides in this lecture are due to other authors; they are credited on the bottom right Topics of This Lecture Problem

More information

Lecture 11: E-M and MeanShift. CAP 5415 Fall 2007

Lecture 11: E-M and MeanShift. CAP 5415 Fall 2007 Lecture 11: E-M and MeanShift CAP 5415 Fall 2007 Review on Segmentation by Clustering Each Pixel Data Vector Example (From Comanciu and Meer) Review of k-means Let's find three clusters in this data These

More information

Image Segmentation continued Graph Based Methods. Some slides: courtesy of O. Capms, Penn State, J.Ponce and D. Fortsyth, Computer Vision Book

Image Segmentation continued Graph Based Methods. Some slides: courtesy of O. Capms, Penn State, J.Ponce and D. Fortsyth, Computer Vision Book Image Segmentation continued Graph Based Methods Some slides: courtesy of O. Capms, Penn State, J.Ponce and D. Fortsyth, Computer Vision Book Previously Binary segmentation Segmentation by thresholding

More information

Segmentation Computer Vision Spring 2018, Lecture 27

Segmentation Computer Vision Spring 2018, Lecture 27 Segmentation http://www.cs.cmu.edu/~16385/ 16-385 Computer Vision Spring 218, Lecture 27 Course announcements Homework 7 is due on Sunday 6 th. - Any questions about homework 7? - How many of you have

More information

Image Analysis. Segmentation by Clustering

Image Analysis. Segmentation by Clustering Image Analysis Segmentation by Clustering Christophoros Nikou cnikou@cs.uoi.gr Images taken from: D. Forsyth and J. Ponce. Computer Vision: A Modern Approach, Prentice Hall, 2003. Computer Vision course

More information

Segmentation and low-level grouping.

Segmentation and low-level grouping. Segmentation and low-level grouping. Bill Freeman, MIT 6.869 April 14, 2005 Readings: Mean shift paper and background segmentation paper. Mean shift IEEE PAMI paper by Comanici and Meer, http://www.caip.rutgers.edu/~comanici/papers/msrobustapproach.pdf

More information

From Pixels to Blobs

From Pixels to Blobs From Pixels to Blobs 15-463: Rendering and Image Processing Alexei Efros Today Blobs Need for blobs Extracting blobs Image Segmentation Working with binary images Mathematical Morphology Blob properties

More information

6.801/866. Segmentation and Line Fitting. T. Darrell

6.801/866. Segmentation and Line Fitting. T. Darrell 6.801/866 Segmentation and Line Fitting T. Darrell Segmentation and Line Fitting Gestalt grouping Background subtraction K-Means Graph cuts Hough transform Iterative fitting (Next time: Probabilistic segmentation)

More information

Image Segmentation continued Graph Based Methods

Image Segmentation continued Graph Based Methods Image Segmentation continued Graph Based Methods Previously Images as graphs Fully-connected graph node (vertex) for every pixel link between every pair of pixels, p,q affinity weight w pq for each link

More information

Digital Image Processing

Digital Image Processing Digital Image Processing Segmentation Material in this presentation is largely based on/derived from presentations by: Sventlana Lazebnik, and Noah Snavely Brent M. Dingle, Ph.D. 2015 Game Design and Development

More information

Lecture 10: Semantic Segmentation and Clustering

Lecture 10: Semantic Segmentation and Clustering Lecture 10: Semantic Segmentation and Clustering Vineet Kosaraju, Davy Ragland, Adrien Truong, Effie Nehoran, Maneekwan Toyungyernsub Department of Computer Science Stanford University Stanford, CA 94305

More information

Normalized cuts and image segmentation

Normalized cuts and image segmentation Normalized cuts and image segmentation Department of EE University of Washington Yeping Su Xiaodan Song Normalized Cuts and Image Segmentation, IEEE Trans. PAMI, August 2000 5/20/2003 1 Outline 1. Image

More information

Unit 3 : Image Segmentation

Unit 3 : Image Segmentation Unit 3 : Image Segmentation K-means Clustering Mean Shift Segmentation Active Contour Models Snakes Normalized Cut Segmentation CS 6550 0 Histogram-based segmentation Goal Break the image into K regions

More information

Targil 12 : Image Segmentation. Image segmentation. Why do we need it? Image segmentation

Targil 12 : Image Segmentation. Image segmentation. Why do we need it? Image segmentation Targil : Image Segmentation Image segmentation Many slides from Steve Seitz Segment region of the image which: elongs to a single object. Looks uniform (gray levels, color ) Have the same attributes (texture

More information

CS 534: Computer Vision Segmentation and Perceptual Grouping

CS 534: Computer Vision Segmentation and Perceptual Grouping CS 534: Computer Vision Segmentation and Perceptual Grouping Spring 2005 Ahmed Elgammal Dept of Computer Science CS 534 Segmentation - 1 Where are we? Image Formation Human vision Cameras Geometric Camera

More information

Lecture 13 Segmentation and Scene Understanding Chris Choy, Ph.D. candidate Stanford Vision and Learning Lab (SVL)

Lecture 13 Segmentation and Scene Understanding Chris Choy, Ph.D. candidate Stanford Vision and Learning Lab (SVL) Lecture 13 Segmentation and Scene Understanding Chris Choy, Ph.D. candidate Stanford Vision and Learning Lab (SVL) http://chrischoy.org Stanford CS231A 1 Understanding a Scene Objects Chairs, Cups, Tables,

More information

CS 664 Segmentation. Daniel Huttenlocher

CS 664 Segmentation. Daniel Huttenlocher CS 664 Segmentation Daniel Huttenlocher Grouping Perceptual Organization Structural relationships between tokens Parallelism, symmetry, alignment Similarity of token properties Often strong psychophysical

More information

Markov Random Fields and Segmentation with Graph Cuts

Markov Random Fields and Segmentation with Graph Cuts Markov Random Fields and Segmentation with Graph Cuts Computer Vision Jia-Bin Huang, Virginia Tech Many slides from D. Hoiem Administrative stuffs Final project Proposal due Oct 27 (Thursday) HW 4 is out

More information

CEE598 - Visual Sensing for Civil Infrastructure Eng. & Mgmt.

CEE598 - Visual Sensing for Civil Infrastructure Eng. & Mgmt. CEE598 - Visual Sensing for Civil Infrastructure Eng. & Mgmt. Session 11 Segmentation And Clustering Mani Golparvar-Fard Department of Civil and Environmental Engineering 3129D, Newmark Civil Engineering

More information

In this lecture, we are going to talk about image segmentation, essentially defined as methods for grouping pixels together.

In this lecture, we are going to talk about image segmentation, essentially defined as methods for grouping pixels together. In this lecture, we are going to talk about image segmentation, essentially defined as methods for grouping pixels together. We will first define the segmentation problem, overview some basic ideas of

More information

MRFs and Segmentation with Graph Cuts

MRFs and Segmentation with Graph Cuts 02/24/10 MRFs and Segmentation with Graph Cuts Computer Vision CS 543 / ECE 549 University of Illinois Derek Hoiem Today s class Finish up EM MRFs w ij i Segmentation with Graph Cuts j EM Algorithm: Recap

More information

Image Processing and Image Analysis VU

Image Processing and Image Analysis VU Image Processing and Image Analysis 052617 VU Yll Haxhimusa yll.haxhimusa@medunwien.ac.at vda.univie.ac.at/teaching/ipa/17w/ Outline What are grouping problems in vision? Inspiration from human perception

More information

Clustering. Subhransu Maji. CMPSCI 689: Machine Learning. 2 April April 2015

Clustering. Subhransu Maji. CMPSCI 689: Machine Learning. 2 April April 2015 Clustering Subhransu Maji CMPSCI 689: Machine Learning 2 April 2015 7 April 2015 So far in the course Supervised learning: learning with a teacher You had training data which was (feature, label) pairs

More information

Introduction to Machine Learning CMU-10701

Introduction to Machine Learning CMU-10701 Introduction to Machine Learning CMU-10701 Clustering and EM Barnabás Póczos & Aarti Singh Contents Clustering K-means Mixture of Gaussians Expectation Maximization Variational Methods 2 Clustering 3 K-

More information

Dr. Ulas Bagci

Dr. Ulas Bagci CAP5415-Computer Vision Lecture 11-Image Segmentation (BASICS): Thresholding, Region Growing, Clustering Dr. Ulas Bagci bagci@ucf.edu 1 Image Segmentation Aim: to partition an image into a collection of

More information

EE 701 ROBOT VISION. Segmentation

EE 701 ROBOT VISION. Segmentation EE 701 ROBOT VISION Regions and Image Segmentation Histogram-based Segmentation Automatic Thresholding K-means Clustering Spatial Coherence Merging and Splitting Graph Theoretic Segmentation Region Growing

More information

Colorado School of Mines. Computer Vision. Professor William Hoff Dept of Electrical Engineering &Computer Science.

Colorado School of Mines. Computer Vision. Professor William Hoff Dept of Electrical Engineering &Computer Science. Professor William Hoff Dept of Electrical Engineering &Computer Science http://inside.mines.edu/~whoff/ 1 Image Segmentation Some material for these slides comes from https://www.csd.uwo.ca/courses/cs4487a/

More information

Computer Vision 5 Segmentation by Clustering

Computer Vision 5 Segmentation by Clustering Computer Vision 5 Segmentation by Clustering MAP-I Doctoral Programme Miguel Tavares Coimbra Outline Introduction Applications Simple clustering K-means clustering Graph-theoretic clustering Acknowledgements:

More information

Clustering. Discover groups such that samples within a group are more similar to each other than samples across groups.

Clustering. Discover groups such that samples within a group are more similar to each other than samples across groups. Clustering 1 Clustering Discover groups such that samples within a group are more similar to each other than samples across groups. 2 Clustering Discover groups such that samples within a group are more

More information

Models for grids. Computer vision: models, learning and inference. Multi label Denoising. Binary Denoising. Denoising Goal.

Models for grids. Computer vision: models, learning and inference. Multi label Denoising. Binary Denoising. Denoising Goal. Models for grids Computer vision: models, learning and inference Chapter 9 Graphical Models Consider models where one unknown world state at each pixel in the image takes the form of a grid. Loops in the

More information

Image Analysis - Lecture 5

Image Analysis - Lecture 5 Texture Segmentation Clustering Review Image Analysis - Lecture 5 Texture and Segmentation Magnus Oskarsson Lecture 5 Texture Segmentation Clustering Review Contents Texture Textons Filter Banks Gabor

More information

Regularization and Markov Random Fields (MRF) CS 664 Spring 2008

Regularization and Markov Random Fields (MRF) CS 664 Spring 2008 Regularization and Markov Random Fields (MRF) CS 664 Spring 2008 Regularization in Low Level Vision Low level vision problems concerned with estimating some quantity at each pixel Visual motion (u(x,y),v(x,y))

More information

Fitting: Voting and the Hough Transform April 23 rd, Yong Jae Lee UC Davis

Fitting: Voting and the Hough Transform April 23 rd, Yong Jae Lee UC Davis Fitting: Voting and the Hough Transform April 23 rd, 2015 Yong Jae Lee UC Davis Last time: Grouping Bottom-up segmentation via clustering To find mid-level regions, tokens General choices -- features,

More information

Lecture 8: Fitting. Tuesday, Sept 25

Lecture 8: Fitting. Tuesday, Sept 25 Lecture 8: Fitting Tuesday, Sept 25 Announcements, schedule Grad student extensions Due end of term Data sets, suggestions Reminder: Midterm Tuesday 10/9 Problem set 2 out Thursday, due 10/11 Outline Review

More information

Markov Networks in Computer Vision

Markov Networks in Computer Vision Markov Networks in Computer Vision Sargur Srihari srihari@cedar.buffalo.edu 1 Markov Networks for Computer Vision Some applications: 1. Image segmentation 2. Removal of blur/noise 3. Stereo reconstruction

More information

Computer Vision II Lecture 4

Computer Vision II Lecture 4 Computer Vision II Lecture 4 Color based Tracking 29.04.2014 Bastian Leibe RWTH Aachen http://www.vision.rwth-aachen.de leibe@vision.rwth-aachen.de Course Outline Single-Object Tracking Background modeling

More information

Announcements. Segmentation & Grouping. Review questions. Outline. Grouping in vision. Examples of grouping in vision 9/21/2015

Announcements. Segmentation & Grouping. Review questions. Outline. Grouping in vision. Examples of grouping in vision 9/21/2015 Announcements Segmentation & Grouping Tues Sept 22 A2 goes out Thursday, due in 2 weeks Late submissions on Canvas Final exam dates now posted by registrar. Ours is Dec 9, 2-5 pm. Check in on pace Review

More information

Markov Networks in Computer Vision. Sargur Srihari

Markov Networks in Computer Vision. Sargur Srihari Markov Networks in Computer Vision Sargur srihari@cedar.buffalo.edu 1 Markov Networks for Computer Vision Important application area for MNs 1. Image segmentation 2. Removal of blur/noise 3. Stereo reconstruction

More information

Segmentation. Bottom up Segmentation Semantic Segmentation

Segmentation. Bottom up Segmentation Semantic Segmentation Segmentation Bottom up Segmentation Semantic Segmentation Semantic Labeling of Street Scenes Ground Truth Labels 11 classes, almost all occur simultaneously, large changes in viewpoint, scale sky, road,

More information

Image Segmentation. Shengnan Wang

Image Segmentation. Shengnan Wang Image Segmentation Shengnan Wang shengnan@cs.wisc.edu Contents I. Introduction to Segmentation II. Mean Shift Theory 1. What is Mean Shift? 2. Density Estimation Methods 3. Deriving the Mean Shift 4. Mean

More information

CS4670: Computer Vision

CS4670: Computer Vision CS4670: Computer Vision Noah Snavely Lecture 34: Segmentation From Sandlot Science Announcements In-class exam this Friday, December 3 Review session in class on Wednesday Final projects: Slides due: Sunday,

More information

human vision: grouping k-means clustering graph-theoretic clustering Hough transform line fitting RANSAC

human vision: grouping k-means clustering graph-theoretic clustering Hough transform line fitting RANSAC COS 429: COMPUTER VISON Segmentation human vision: grouping k-means clustering graph-theoretic clustering Hough transform line fitting RANSAC Reading: Chapters 14, 15 Some of the slides are credited to:

More information

CS 664 Slides #11 Image Segmentation. Prof. Dan Huttenlocher Fall 2003

CS 664 Slides #11 Image Segmentation. Prof. Dan Huttenlocher Fall 2003 CS 664 Slides #11 Image Segmentation Prof. Dan Huttenlocher Fall 2003 Image Segmentation Find regions of image that are coherent Dual of edge detection Regions vs. boundaries Related to clustering problems

More information

Content-based Image and Video Retrieval. Image Segmentation

Content-based Image and Video Retrieval. Image Segmentation Content-based Image and Video Retrieval Vorlesung, SS 2011 Image Segmentation 2.5.2011 / 9.5.2011 Image Segmentation One of the key problem in computer vision Identification of homogenous region in the

More information

CS 534: Computer Vision Segmentation II Graph Cuts and Image Segmentation

CS 534: Computer Vision Segmentation II Graph Cuts and Image Segmentation CS 534: Computer Vision Segmentation II Graph Cuts and Image Segmentation Spring 2005 Ahmed Elgammal Dept of Computer Science CS 534 Segmentation II - 1 Outlines What is Graph cuts Graph-based clustering

More information

Segmentation. Separate image into coherent regions

Segmentation. Separate image into coherent regions Segmentation II Segmentation Separate image into coherent regions Berkeley segmentation database: http://www.eecs.berkeley.edu/research/projects/cs/vision/grouping/segbench/ Slide by L. Lazebnik Interactive

More information

Clustering web search results

Clustering web search results Clustering K-means Machine Learning CSE546 Emily Fox University of Washington November 4, 2013 1 Clustering images Set of Images [Goldberger et al.] 2 1 Clustering web search results 3 Some Data 4 2 K-means

More information

Generative and discriminative classification techniques

Generative and discriminative classification techniques Generative and discriminative classification techniques Machine Learning and Category Representation 013-014 Jakob Verbeek, December 13+0, 013 Course website: http://lear.inrialpes.fr/~verbeek/mlcr.13.14

More information

Mixture Models and EM

Mixture Models and EM Mixture Models and EM Goal: Introduction to probabilistic mixture models and the expectationmaximization (EM) algorithm. Motivation: simultaneous fitting of multiple model instances unsupervised clustering

More information

Visual Representations for Machine Learning

Visual Representations for Machine Learning Visual Representations for Machine Learning Spectral Clustering and Channel Representations Lecture 1 Spectral Clustering: introduction and confusion Michael Felsberg Klas Nordberg The Spectral Clustering

More information

Analysis: TextonBoost and Semantic Texton Forests. Daniel Munoz Februrary 9, 2009

Analysis: TextonBoost and Semantic Texton Forests. Daniel Munoz Februrary 9, 2009 Analysis: TextonBoost and Semantic Texton Forests Daniel Munoz 16-721 Februrary 9, 2009 Papers [shotton-eccv-06] J. Shotton, J. Winn, C. Rother, A. Criminisi, TextonBoost: Joint Appearance, Shape and Context

More information

Using the Kolmogorov-Smirnov Test for Image Segmentation

Using the Kolmogorov-Smirnov Test for Image Segmentation Using the Kolmogorov-Smirnov Test for Image Segmentation Yong Jae Lee CS395T Computational Statistics Final Project Report May 6th, 2009 I. INTRODUCTION Image segmentation is a fundamental task in computer

More information

Markov Random Fields and Segmentation with Graph Cuts

Markov Random Fields and Segmentation with Graph Cuts Markov Random Fields and Segmentation with Graph Cuts Computer Vision Jia-Bin Huang, Virginia Tech Many slides from D. Hoiem Administrative stuffs Final project Proposal due Oct 30 (Monday) HW 4 is out

More information

Clustering. So far in the course. Clustering. Clustering. Subhransu Maji. CMPSCI 689: Machine Learning. dist(x, y) = x y 2 2

Clustering. So far in the course. Clustering. Clustering. Subhransu Maji. CMPSCI 689: Machine Learning. dist(x, y) = x y 2 2 So far in the course Clustering Subhransu Maji : Machine Learning 2 April 2015 7 April 2015 Supervised learning: learning with a teacher You had training data which was (feature, label) pairs and the goal

More information

Energy Minimization for Segmentation in Computer Vision

Energy Minimization for Segmentation in Computer Vision S * = arg S min E(S) Energy Minimization for Segmentation in Computer Vision Meng Tang, Dmitrii Marin, Ismail Ben Ayed, Yuri Boykov Outline Clustering/segmentation methods K-means, GrabCut, Normalized

More information

Introduction to Mobile Robotics

Introduction to Mobile Robotics Introduction to Mobile Robotics Clustering Wolfram Burgard Cyrill Stachniss Giorgio Grisetti Maren Bennewitz Christian Plagemann Clustering (1) Common technique for statistical data analysis (machine learning,

More information

CAP 5415 Computer Vision Fall 2012

CAP 5415 Computer Vision Fall 2012 CAP 5415 Computer Vision Fall 01 Dr. Mubarak Shah Univ. of Central Florida Office 47-F HEC Lecture-5 SIFT: David Lowe, UBC SIFT - Key Point Extraction Stands for scale invariant feature transform Patented

More information

Supervised texture detection in images

Supervised texture detection in images Supervised texture detection in images Branislav Mičušík and Allan Hanbury Pattern Recognition and Image Processing Group, Institute of Computer Aided Automation, Vienna University of Technology Favoritenstraße

More information

Image Segmentation. Srikumar Ramalingam School of Computing University of Utah. Slides borrowed from Ross Whitaker

Image Segmentation. Srikumar Ramalingam School of Computing University of Utah. Slides borrowed from Ross Whitaker Image Segmentation Srikumar Ramalingam School of Computing University of Utah Slides borrowed from Ross Whitaker Segmentation Semantic Segmentation Indoor layout estimation What is Segmentation? Partitioning

More information

SGN (4 cr) Chapter 11

SGN (4 cr) Chapter 11 SGN-41006 (4 cr) Chapter 11 Clustering Jussi Tohka & Jari Niemi Department of Signal Processing Tampere University of Technology February 25, 2014 J. Tohka & J. Niemi (TUT-SGN) SGN-41006 (4 cr) Chapter

More information

Markov/Conditional Random Fields, Graph Cut, and applications in Computer Vision

Markov/Conditional Random Fields, Graph Cut, and applications in Computer Vision Markov/Conditional Random Fields, Graph Cut, and applications in Computer Vision Fuxin Li Slides and materials from Le Song, Tucker Hermans, Pawan Kumar, Carsten Rother, Peter Orchard, and others Recap:

More information

CAP5415-Computer Vision Lecture 13-Image/Video Segmentation Part II. Dr. Ulas Bagci

CAP5415-Computer Vision Lecture 13-Image/Video Segmentation Part II. Dr. Ulas Bagci CAP-Computer Vision Lecture -Image/Video Segmentation Part II Dr. Ulas Bagci bagci@ucf.edu Labeling & Segmentation Labeling is a common way for modeling various computer vision problems (e.g. optical flow,

More information

Undirected Graphical Models. Raul Queiroz Feitosa

Undirected Graphical Models. Raul Queiroz Feitosa Undirected Graphical Models Raul Queiroz Feitosa Pros and Cons Advantages of UGMs over DGMs UGMs are more natural for some domains (e.g. context-dependent entities) Discriminative UGMs (CRF) are better

More information

MultiDimensional Signal Processing Master Degree in Ingegneria delle Telecomunicazioni A.A

MultiDimensional Signal Processing Master Degree in Ingegneria delle Telecomunicazioni A.A MultiDimensional Signal Processing Master Degree in Ingegneria delle Telecomunicazioni A.A. 205-206 Pietro Guccione, PhD DEI - DIPARTIMENTO DI INGEGNERIA ELETTRICA E DELL INFORMAZIONE POLITECNICO DI BARI

More information

Learning and Inferring Depth from Monocular Images. Jiyan Pan April 1, 2009

Learning and Inferring Depth from Monocular Images. Jiyan Pan April 1, 2009 Learning and Inferring Depth from Monocular Images Jiyan Pan April 1, 2009 Traditional ways of inferring depth Binocular disparity Structure from motion Defocus Given a single monocular image, how to infer

More information

Part-based and local feature models for generic object recognition

Part-based and local feature models for generic object recognition Part-based and local feature models for generic object recognition May 28 th, 2015 Yong Jae Lee UC Davis Announcements PS2 grades up on SmartSite PS2 stats: Mean: 80.15 Standard Dev: 22.77 Vote on piazza

More information

CS4670 / 5670: Computer Vision Noah Snavely

CS4670 / 5670: Computer Vision Noah Snavely { { 11/26/2013 CS4670 / 5670: Computer Vision Noah Snavely Graph-Based Image Segmentation Stereo as a minimization problem match cost Want each pixel to find a good match in the other image smoothness

More information

Image Segmentation Using Iterated Graph Cuts Based on Multi-scale Smoothing

Image Segmentation Using Iterated Graph Cuts Based on Multi-scale Smoothing Image Segmentation Using Iterated Graph Cuts Based on Multi-scale Smoothing Tomoyuki Nagahashi 1, Hironobu Fujiyoshi 1, and Takeo Kanade 2 1 Dept. of Computer Science, Chubu University. Matsumoto 1200,

More information

Region-based Segmentation

Region-based Segmentation Region-based Segmentation Image Segmentation Group similar components (such as, pixels in an image, image frames in a video) to obtain a compact representation. Applications: Finding tumors, veins, etc.

More information