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

Similar documents
The goals of segmentation

Segmentation (continued)

Segmentation. Bottom Up Segmentation

Segmentation & Clustering

Segmentation and Grouping

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

Segmentation and Grouping April 19 th, 2018

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

CMPSCI 670: Computer Vision! Grouping

Grouping and Segmentation

Lecture 16 Segmentation and Scene understanding

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

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

Lecture: k-means & mean-shift clustering

Segmentation and Grouping April 21 st, 2015

Lecture: k-means & mean-shift clustering

Digital Image Processing

Segmentation & Grouping Kristen Grauman UT Austin. Announcements

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

Segmentation Computer Vision Spring 2018, Lecture 27

Lecture 7: Segmentation. Thursday, Sept 20

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

Lecture 13: k-means and mean-shift clustering

Image Segmentation. Selim Aksoy. Bilkent University

Image Segmentation. Selim Aksoy. Bilkent University

Grouping and Segmentation

Segmentation and Grouping

Computer Vision Lecture 6

CSSE463: Image Recognition Day 21

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

CS 534: Computer Vision Segmentation and Perceptual Grouping

CS 534: Computer Vision Segmentation and Perceptual Grouping

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

CS 664 Segmentation. Daniel Huttenlocher

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

Lecture 10: Semantic Segmentation and Clustering

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

Dr. Ulas Bagci

Segmentation. Separate image into coherent regions

SYDE Winter 2011 Introduction to Pattern Recognition. Clustering

Clustering CS 550: Machine Learning

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

Cluster Analysis. Ying Shen, SSE, Tongji University

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

Image Segmentation. Shengnan Wang

Image Analysis Lecture Segmentation. Idar Dyrdal

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

Clustering Color/Intensity. Group together pixels of similar color/intensity.

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

CS 2750 Machine Learning. Lecture 19. Clustering. CS 2750 Machine Learning. Clustering. Groups together similar instances in the data sample

Segmentation by Clustering

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

Clustering Lecture 3: Hierarchical Methods

Computer Vision Lecture 6

Segmentation by Clustering. Segmentation by Clustering Reading: Chapter 14 (skip 14.5) General ideas

Segmentation by Clustering Reading: Chapter 14 (skip 14.5)

Image Analysis - Lecture 5

Lecture 8: Fitting. Tuesday, Sept 25

Image Analysis. Segmentation by Clustering

Visual Representations for Machine Learning

Content-based Image and Video Retrieval. Image Segmentation

CS 1675 Introduction to Machine Learning Lecture 18. Clustering. Clustering. Groups together similar instances in the data sample

Computer Vision 5 Segmentation by Clustering

University of Florida CISE department Gator Engineering. Clustering Part 2

Clustering. CS294 Practical Machine Learning Junming Yin 10/09/06

Introduction to Mobile Robotics

Image Segmentation continued Graph Based Methods

Image Processing and Image Analysis VU

CSE 5243 INTRO. TO DATA MINING

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

Data Mining Cluster Analysis: Basic Concepts and Algorithms. Slides From Lecture Notes for Chapter 8. Introduction to Data Mining

Normalized cuts and image segmentation

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

CSE 5243 INTRO. TO DATA MINING

Topic 4 Image Segmentation

EE 701 ROBOT VISION. Segmentation

Unsupervised Learning

Hierarchical clustering

Idea. Found boundaries between regions (edges) Didn t return the actual region

Using the Kolmogorov-Smirnov Test for Image Segmentation

Clustering Part 3. Hierarchical Clustering

BBS654 Data Mining. Pinar Duygulu. Slides are adapted from Nazli Ikizler

Clustering in Data Mining

Segmentation and low-level grouping.

Hierarchical Clustering

Region-based Segmentation

4. Ad-hoc I: Hierarchical clustering

Supervised vs. Unsupervised Learning

CHAPTER 4: CLUSTER ANALYSIS

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

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

10701 Machine Learning. Clustering

Computer Vision II Lecture 4

Clustering. CE-717: Machine Learning Sharif University of Technology Spring Soleymani

Discriminative Clustering for Image Co-Segmentation

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

Lesson 3. Prof. Enza Messina

University of Florida CISE department Gator Engineering. Clustering Part 4

Unsupervised learning in Vision

Clustering. Chapter 10 in Introduction to statistical learning

Transcription:

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 scissors Foreground / background segmentation Finding skin-colored regions Finding the moving objects Finding the cars in a video sequence Semantics

What is coherent? Questions

What is coherent? Spatial proximity? Similar color? Similar texture? Questions

Questions What is coherent? Spatial proximity? Similar color? Similar texture? What kinds of regions?

Questions What is coherent? Spatial proximity? Similar color? Similar texture? What kinds of regions? Nearly convex? Smooth boundaries? Nearly equal sizes? What granularity?

Gestault factors: Grouping Cues

A Typical Segmentation Problem Partition an image into arbitrarily shaped regions containing pixels with similar colors and positions

Segmentation Algorithms? What kinds of algorithm(s) can solve this problem?

Some Segmentation Algorithms Divisive clustering Hierarchical clustering K-means clustering Mean shift clustering Graph cuts More next time

Segmentation as Clustering Segmentation can be treated as a clustering problem

Divisive Clustering Start with whole image in one cluster Iterate: Find cluster with largest intra-cluster variation Split into two pieces that yield largest inter-cluster distance Stopping criteria?

Divisive Clustering Start with whole image in one cluster Iterate: Find cluster with largest intra-cluster variation Split into two pieces that yield largest inter-cluster distance Stopping criteria

Divisive Clustering Start with whole image in one cluster Iterate: Find cluster with largest intra-cluster variation Split into two pieces that yield largest inter-cluster distance Stopping criteria

Hierarchical Clustering Start with each pixel in its own cluster Iterate: Find pair of clusters with smallest inter-cluster distance Merge Stopping criteria?

Hierarchical Clustering Start with each pixel in its own cluster Iterate: Find pair of clusters with smallest inter-cluster distance Merge Stopping criteria?

Hierarchical Clustering Start with each pixel in its own cluster Iterate: Find pair of clusters with smallest inter-cluster distance Merge Stopping criteria?

Hierarchical Clustering Start with each pixel in its own cluster Iterate: Find pair of clusters with smallest inter-cluster distance Merge Stopping criteria?

Hierarchical Clustering Start with each pixel in its own cluster Iterate: Find pair of clusters with smallest inter-cluster distance Merge Stopping criteria?

Hierarchical Clustering Start with each pixel in its own cluster Iterate: Find pair of clusters with smallest inter-cluster distance Merge Stopping criteria?

Hierarchical Clustering Start with each pixel in its own cluster Iterate: Find pair of clusters with smallest inter-cluster distance Merge Stopping criteria?

Hierarchical Clustering Start with each pixel in its own cluster Iterate: Find pair of clusters with smallest inter-cluster distance Merge Stopping criteria?

Hierarchical Clustering Conservative stopping criteria yields superpixels, which can be used as starting point for more complex algorithms Ren et al.

Problems with These Algorithms?

Problems with These Algorithms Greedy Decisions made early in process dictate final result Making good early decisions is hard/expensive Many possibilities at each iteration Computing good merge or split is expensive Heuristics to speed things up: For agglomerative clustering, approximate each cluster by average for distance computations For divisive clustering, use summary (histogram) of a region to compute split

Some Segmentation Algorithms Divisive clustering Hierarchical clustering k-means clustering Mean shift clustering Graph cuts More next time

k-means Clustering Instead of merging or splitting, start out with the clusters and move them around 1. Pick number of clusters k 2. Randomly scatter k cluster centers in color space 3. Repeat: a. Assign each data point to its closest cluster center b. Move each cluster center to the mean of the points assigned to it

k-means Clustering

k-means Clustering

k-means Clustering

k-means Clustering

k-means Clustering

k-means Clustering

k-means Clustering

k-means Clustering

Results of k-means Clustering Original Image k-means, k=5 k-means, k=11

Results of k-means Clustering Sample clusters with k-means clustering based on color

k-means Pros and Cons?

Pros Very simple method k-means Pros and Cons Cons Need to pick K Converges to a local minimum Sensitive to initialization Sensitive to outliers Only finds spherical clusters Sensitive to outliers Spherical clusters Slide by K. Grauman

Some Segmentation Algorithms Divisive clustering Hierarchical clustering k-means clustering Mean shift clustering Graph cuts More next time

Mean Shift Clustering Seek modes (peaks) of density in feature space Image Feature space (color values) Slide by Y. Ukrainitz & B. Sarel

Mean Shift Clustering Algorithm: Initialize windows at individual feature points Perform mean shift for each window until convergence Merge windows that end up near the same peak or mode

Mean Shift Clustering Search window Center of mass Mean Shift vector Slide by Y. Ukrainitz & B. Sarel

Mean Shift Clustering Search window Center of mass Mean Shift vector Slide by Y. Ukrainitz & B. Sarel

Mean Shift Clustering Search window Center of mass Mean Shift vector Slide by Y. Ukrainitz & B. Sarel

Mean Shift Clustering Search window Center of mass Mean Shift vector Slide by Y. Ukrainitz & B. Sarel

Mean Shift Clustering Search window Center of mass Mean Shift vector Slide by Y. Ukrainitz & B. Sarel

Mean Shift Clustering Search window Center of mass Mean Shift vector Slide by Y. Ukrainitz & B. Sarel

Mean Shift Clustering Search window Center of mass Slide by Y. Ukrainitz & B. Sarel

Mean Shift Clustering Cluster all data points in the attraction basin of a mode Separate segment for each mode Assign points to segments based on which mode is at the end of their mean shift trajectories Slide by Y. Ukrainitz & B. Sarel

Mean Shift Clustering Segments Density Slide by Y. Ukrainitz & B. Sarel

Mean Shift Results http://www.caip.rutgers.edu/~comanici/mspami/mspamiresults.html

Mean Shift Results

Mean Shift Pros and Cons?

Mean Shift Pros and Cons Pros Finds variable number of modes Does not assume spherical clusters Just a single parameter (window size) Robust to outliers Cons Output depends on window size Computationally expensive Does not scale well with dimension of feature space Slide by Kristen Grauman

Some Segmentation Algorithms Divisive clustering Hierarchical clustering k-means clustering Mean shift clustering Graph cuts More next time

Graph Cuts Create weighted graph: Nodes = pixels in image Edge between pairs of pixels Edge weight = similarity (intensity, color, texture, etc.) C pq q p Slide by S. Seitz]

Graph Cuts Intuition: partition graph into disconnected segments by removing edges that have low cost (low similarity) Similar pixels should be in the same segments Dissimilar pixels should be in different segments w A B C Example by S. Seitz

Graph Cuts Graph cut Set of links whose removal makes a graph disconnected Partitions the graph (defines a segmentation) Cut cost = sum of costs of all edges in set A B Example by S. Seitz

Graph Cuts Can define arbitrary similarity function between pixels Example by L. Lazebnik

Graph Cuts Simple similarity function: Suppose we represent each pixel by a feature vector x, and define a distance function appropriate for this feature representation Then we can convert the distance between two feature vectors into an affinity with the help of a generalized Gaussian kernel:

Graph Cuts More sophisticated similarity functions: Difference of histograms built from properties of pixels in optimizally oriented hemi-circles i ( g g i hi h 2 2 1 i ) ( g, h) 2 i (x,y) r g 1 h 1 g 2 h 2

Graph Cuts More sophisticated similarity functions: Similarity based on intervening contours W(p1,p2) >>W(p1,p3) as p1 and p2 are more likely to belong to the same region than are p1 and p3, which are separated by a strong boundary.

Graph Cuts Now, need to find best cut. How? Want to partition nodes based on similarities Example by L. Lazebnik

Graph Cuts Min-cut Find cut with minimum cost Fast (polynomial-time) algorithm Example by L. Lazebnik

Graph Cuts Min-cut Find cut with minimum cost Fast (polynomial-time) algorithm Not always the best choice Cuts with lesser weight than the ideal cut Ideal Cut Example by L. Lazebnik

Graph Cuts Normalized Cut Find minimum cut normalized by segment size w(a, B) = sum of weights of all edges between A and B A B Slide by S. Seitz

Graph Cuts Normalized Cut No polynomial-time algorithm to find optimal cut Can use an approximation based on eigen-analysis of the graph adjacency matrix

Graph Cuts http://www.cs.berkeley.edu/~fowlkes/bse/

Graph Cuts http://www.cs.berkeley.edu/~fowlkes/bse/

Graph Cuts Pros and Cons Pros Generic framework, can be used with many different features and affinity formulations Fast and practical for interactive foreground-background segmentation Cons High storage requirement and time complexity for automatic segmentation

Summary Segmentation: Partitioning image into coherent regions Algorithms: Divisive and hierarchical clustering k-means clustering Mean shift clustering Graph cuts More next time Applications Image processing, object recognition, interactive image editing, etc.