Segmentation CSE P 576 Larry Zitnick Many slides courtesy of Steve Seitz.

Slides:



Advertisements
Similar presentations
Clustering II.
Advertisements

Cluster Analysis: Basic Concepts and Algorithms
Hierarchical Clustering, DBSCAN The EM Algorithm
Data Mining Cluster Analysis: Advanced Concepts and Algorithms
Lecture 24: Segmentation CS6670: Computer Vision Noah Snavely From Sandlot ScienceSandlot Science.
Department of Computer Engineering
Segmentácia farebného obrazu
I Images as graphs Fully-connected graph – node for every pixel – link between every pair of pixels, p,q – similarity w ij for each link j w ij c Source:
Graph-Based Image Segmentation
Image Segmentation Selim Aksoy Department of Computer Engineering Bilkent University
Lecture 6 Image Segmentation
Image segmentation. The goals of segmentation Group together similar-looking pixels for efficiency of further processing “Bottom-up” process Unsupervised.
Clustering II.
Segmentation. Terminology Segmentation, grouping, perceptual organization: gathering features that belong together Fitting: associating a model with observed.
© University of Minnesota Data Mining for the Discovery of Ocean Climate Indices 1 CSci 8980: Data Mining (Fall 2002) Vipin Kumar Army High Performance.
Problem Sets Problem Set 3 –Distributed Tuesday, 3/18. –Due Thursday, 4/3 Problem Set 4 –Distributed Tuesday, 4/1 –Due Tuesday, 4/15. Probably a total.
Segmentation Divide the image into segments. Each segment:
Announcements Project 2 more signup slots questions Picture taking at end of class.
Today: Image Segmentation Image Segmentation Techniques Snakes Scissors Graph Cuts Mean Shift Wednesday (2/28) Texture analysis and synthesis Multiple.
From Pixels to “Blobs” : Rendering and Image Processing Alexei Efros.
Prénom Nom Document Analysis: Data Analysis and Clustering Prof. Rolf Ingold, University of Fribourg Master course, spring semester 2008.
Clustering Color/Intensity
Lecture 18: Context and segmentation CS6670: Computer Vision Noah Snavely.
Image Segmentation Today’s Readings Forsyth & Ponce, Chapter 14
Perceptual Organization: Segmentation and Optical Flow.
Segmentation and Clustering Today’s Readings Forsyth & Ponce, Chapter 7 (plus lots of optional references in the slides) From Sandlot ScienceSandlot Science.
Announcements vote for Project 3 artifacts Project 4 (due next Wed night) Questions? Late day policy: everything must be turned in by next Friday.
Announcements Project 3 questions Photos after class.
Computer Vision - A Modern Approach Set: Segmentation Slides by D.A. Forsyth Segmentation and Grouping Motivation: not information is evidence Obtain a.
Image Segmentation Selim Aksoy Department of Computer Engineering Bilkent University
Graph-based Segmentation
Image Segmentation Image segmentation is the operation of partitioning an image into a collection of connected sets of pixels. 1. into regions, which usually.
Segmentation and Grouping Computer Vision CS 543 / ECE 549 University of Illinois Derek Hoiem 02/23/10.
Computer Vision James Hays, Brown
Segmentation Techniques Luis E. Tirado PhD qualifying exam presentation Northeastern University.
Graph-based Segmentation. Main Ideas Convert image into a graph Vertices for the pixels Vertices for the pixels Edges between the pixels Edges between.
Region Segmentation Readings: Chapter 10: 10.1 Additional Materials Provided K-means Clustering (text) EM Clustering (paper) Graph Partitioning (text)
7.1. Mean Shift Segmentation Idea of mean shift:
Chapter 14: SEGMENTATION BY CLUSTERING 1. 2 Outline Introduction Human Vision & Gestalt Properties Applications – Background Subtraction – Shot Boundary.
1 CSE 980: Data Mining Lecture 17: Density-based and Other Clustering Algorithms.
CSE 185 Introduction to Computer Vision Pattern Recognition 2.
Image segmentation Prof. Noah Snavely CS1114
Data Mining Cluster Analysis: Advanced Concepts and Algorithms Lecture Notes for Chapter 9 Introduction to Data Mining by Tan, Steinbach, Kumar © Tan,Steinbach,
Gaussian Mixture Models and Expectation-Maximization Algorithm.
CSSE463: Image Recognition Day 23 Midterm behind us… Midterm behind us… Foundations of Image Recognition completed! Foundations of Image Recognition completed!
Segmentation & Grouping Tuesday, Sept 23 Kristen Grauman UT-Austin.
CS654: Digital Image Analysis Lecture 28: Advanced topics in Image Segmentation Image courtesy: IEEE, IJCV.
© Tan,Steinbach, Kumar Introduction to Data Mining 4/18/ Data Mining: Cluster Analysis This lecture node is modified based on Lecture Notes for Chapter.
Photoconsistency constraint C2 q C1 p l = 2 l = 3 Depth labels If this 3D point is visible in both cameras, pixels p and q should have similar intensities.
CS 2750: Machine Learning Clustering Prof. Adriana Kovashka University of Pittsburgh January 25, 2016.
Course Introduction to Medical Imaging Segmentation 1 – Mean Shift and Graph-Cuts Guy Gilboa.
Clustering (2) Center-based algorithms Fuzzy k-means Density-based algorithms ( DBSCAN as an example ) Evaluation of clustering results Figures and equations.
Image Segmentation Today’s Readings Szesliski Chapter 5
Exercise class 13 : Image Segmentation
Announcements CS accounts Project 1 is out today
Region Segmentation Readings: Chapter 10: 10
Classification of unlabeled data:
Segmentation and Grouping
CS 2750: Machine Learning Clustering
Lecture 31: Graph-Based Image Segmentation
Announcements Photos right now Project 3 questions
Digital Image Processing
Seam Carving Project 1a due at midnight tonight.
Segmentation (continued)
Announcements Project 4 questions Evaluations.
Announcements Project 4 out today (due Wed March 10)
Announcements Project 1 is out today help session at the end of class.
EM Algorithm and its Applications
“Traditional” image segmentation
Presentation transcript:

Segmentation CSE P 576 Larry Zitnick Many slides courtesy of Steve Seitz

Human segmentations Berkeley segmentation dataset, 5 subjects

Occlusion is an important cue in grouping. Courtesy of Bill Freeman, MIT.

Consequence: Groupings by Invisible Completions * Images from Steve Lehar’s Gestalt papers:

And the famous…

Gestalt psychology “The whole is greater than the sum of the parts” Fischler and Firshein, 1987 The Law of Proximity: Stimulus elements that are closed together tend to be perceived as a group The Law of Similarity: Similar stimuli tend to be grouped, this tendency can even dominate grouping due to proximity The Law of Closure: Stimuli tend to be grouped into complete figures The Law of Good Continuation: Stimuli tend to be grouped as to minimize change or discontinuity The Law of Symmetry: Regions bound by symmetrical boarders tend to be perceived as coherent figures The Law Simplicity: Ambiguous stimuli tend to be resolved in favor of the simplest

Image histograms How many “orange” pixels are in this image? This type of question answered by looking at the histogram A histogram counts the number of occurrences of each color –Given an image –The histogram is defined to be –What is the dimension of the histogram of an NxN RGB image?

What do histograms look like? How Many Modes Are There? Easy to see, hard to compute

Histogram-based segmentation Goal Break the image into K regions (segments) Solve this by reducing the number of colors to K and mapping each pixel to the closest color

Histogram-based segmentation Goal Break the image into K regions (segments) Solve this by reducing the number of colors to K and mapping each pixel to the closest color Here’s what it looks like if we use two colors

K-means

Clustering How to choose the representative colors? This is a clustering problem! Objective Each point should be as close as possible to a cluster center –Minimize sum squared distance of each point to closest center

Break it down into subproblems Suppose I tell you the cluster centers c i Q: how to determine which points to associate with each c i ? A: for each point p, choose closest c i Suppose I tell you the points in each cluster Q: how to determine the cluster centers? A: choose c i to be the mean of all points in the cluster

K-means clustering K-means clustering algorithm 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 Java demo: Properties Will always converge to some solution Can be a “local minimum” does not always find the global minimum of objective function:

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 Probabilistic clustering (basic idea) Treat each cluster as a Gaussian density function

Expectation Maximization (EM) A probabilistic variant of K-means: E step: “soft assignment” of points to clusters –estimate probability that a point is in a cluster M step: update cluster parameters –mean and variance info (covariance matrix) maximizes the likelihood of the points given the clusters

Applications of EM Turns out this is useful for all sorts of problems any clustering problem model estimation with missing/hidden data finding outliers segmentation problems –segmentation based on color –segmentation based on motion –foreground/background separation...

Example

Mean-shift

Good if you don’t know the number of clusters, but you do know the variance between points in the same cluster.

Mean-shift All points that end up in the same location are clustered together. Example exe:

More examples Climbing up the hill…

Clustering spatially What if you want to include spatial relationships? Cluster in 5 dimensions instead of 3:

Mean Shift color&spatial Segmentation Results:

Fast method

Fast and dirty What if you just want to group similar neighboring pixels? A C B A = min(S), where S is the set of similar pixels in {A, B, C}. A is always in S. Step 1:

A = min(S), where S is the set of similar pixels in {A, B, C}. A is always in S Fast and dirty What if you just want to group similar neighboring pixels? A C B Step 1: Step 2: Reassign clusters based on merge tree … …

Dilation operator: Dilation: does H “overlap” F around [x,y]? G[x,y] = 1 if H[u,v] and F[x+u-1,y+v-1] are both 1 somewhere 0 otherwise Written Assume: binary image

Dilation operator

Erosion: is H “contained in” F around [x,y] G[x,y] = 1 if F[x+u-1,y+v-1] is 1 everywhere that H[u,v] is 1 0 otherwise Written Erosion operator:

Erosion operator

Nested dilations and erosions What does this operation do? this is called a closing operation

Nested dilations and erosions What does this operation do? this is called a closing operation Is this the same thing as the following?

Nested dilations and erosions What does this operation do? this is called an opening operation You can clean up binary pictures by applying combinations of dilations and erosions Dilations, erosions, opening, and closing operations are known as morphological operations see

Normalized Cuts

q Images as graphs Fully-connected graph node for every pixel link between every pair of pixels, p,q cost c pq for each link –c pq measures similarity of pixels p C pq c

Graph-based segmentation? Similarity can be measured in many ways: Color Position Texture Motion Depth Etc.

Segmentation by Normalized Cuts Break Graph into Segments Delete links that cross between segments Easiest to break links that have low cost (not similar) –similar pixels should be in the same segments –dissimilar pixels should be in different segments w ABC

Cuts in a graph Link Cut set of links whose removal makes a graph disconnected cost of a cut: A B Find minimum cut gives you a segmentation fast algorithms exist for doing this

But min cut is not always the best cut...

Cuts in a graph A B Normalized Cut a cut penalizes large segments fix by normalizing for size of segments volume(A) = sum of costs of all edges that touch A

Interpretation as a Dynamical System Treat the links as springs and shake the system elasticity proportional to cost vibration “modes” correspond to segments –can compute these by solving an eigenvector problem

Interpretation as a Dynamical System Treat the links as springs and shake the system elasticity proportional to cost vibration “modes” correspond to segments –can compute these by solving an eigenvector problem

Color Image Segmentation

Which is best? Both mean-shift and normalized cuts are popular. Normalized cuts can handle complex similarly measures. Both do a better job than K-means at segmenting areas of smoothly varying intensities.