Segmentation slides adopted from Svetlana Lazebnik.

Slides:



Advertisements
Similar presentations
Bayesian Belief Propagation
Advertisements

Analysis of Contour Motions Ce Liu William T. Freeman Edward H. Adelson Computer Science and Artificial Intelligence Laboratory Massachusetts Institute.
Learning to Combine Bottom-Up and Top-Down Segmentation Anat Levin and Yair Weiss School of CS&Eng, The Hebrew University of Jerusalem, Israel.
Human Action Recognition across Datasets by Foreground-weighted Histogram Decomposition Waqas Sultani, Imran Saleemi CVPR 2014.
Computer vision: models, learning and inference Chapter 13 Image preprocessing and feature extraction.
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
Instructor: Mircea Nicolescu Lecture 13 CS 485 / 685 Computer Vision.
Biased Normalized Cuts 1 Subhransu Maji and Jithndra Malik University of California, Berkeley IEEE Conference on Computer Vision and Pattern Recognition.
Lecture 6 Image Segmentation
Image segmentation. The goals of segmentation Group together similar-looking pixels for efficiency of further processing “Bottom-up” process Unsupervised.
3D Computer Vision and Video Computing 3D Vision Topic 4 of Part II Visual Motion CSc I6716 Fall 2011 Cover Image/video credits: Rick Szeliski, MSR Zhigang.
Algorithms & Applications in Computer Vision Lihi Zelnik-Manor Lecture 11: Structure from Motion.
Segmentation. Terminology Segmentation, grouping, perceptual organization: gathering features that belong together Fitting: associating a model with observed.
Region Segmentation. Find sets of pixels, such that All pixels in region i satisfy some constraint of similarity.
Segmentation CSE P 576 Larry Zitnick Many slides courtesy of Steve Seitz.
Probabilistic video stabilization using Kalman filtering and mosaicking.
Segmentation Divide the image into segments. Each segment:
Today: Image Segmentation Image Segmentation Techniques Snakes Scissors Graph Cuts Mean Shift Wednesday (2/28) Texture analysis and synthesis Multiple.
Segmentation by Clustering Reading: Chapter 14 (skip 14.5) Data reduction - obtain a compact representation for interesting image data in terms of a set.
Visual motion Many slides adapted from S. Seitz, R. Szeliski, M. Pollefeys.
Segmentation and Perceptual Grouping. The image of this cube contradicts the optical image.
Visual motion Many slides adapted from S. Seitz, R. Szeliski, M. Pollefeys.
COMP 290 Computer Vision - Spring Motion II - Estimation of Motion field / 3-D construction from motion Yongjik Kim.
3D Rigid/Nonrigid RegistrationRegistration 1)Known features, correspondences, transformation model – feature basedfeature based 2)Specific motion type,
Matching Compare region of image to region of image. –We talked about this for stereo. –Important for motion. Epipolar constraint unknown. But motion small.
Perceptual Organization: Segmentation and Optical Flow.
3D Computer Vision and Video Computing 3D Vision Topic 8 of Part 2 Visual Motion (II) CSC I6716 Spring 2004 Zhigang Zhu, NAC 8/203A
Computer Vision - A Modern Approach Set: Segmentation Slides by D.A. Forsyth Segmentation and Grouping Motivation: not information is evidence Obtain a.
Motion and optical flow Thursday, Nov 20 Many slides adapted from S. Seitz, R. Szeliski, M. Pollefeys, S. Lazebnik.
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.
Image Segmentation Rob Atlas Nick Bridle Evan Radkoff.
Segmentation and Grouping Computer Vision CS 543 / ECE 549 University of Illinois Derek Hoiem 02/23/10.
Computer Vision James Hays, Brown
Feature and object tracking algorithms for video tracking Student: Oren Shevach Instructor: Arie nakhmani.
Prakash Chockalingam Clemson University Non-Rigid Multi-Modal Object Tracking Using Gaussian Mixture Models Committee Members Dr Stan Birchfield (chair)
TP15 - Tracking Computer Vision, FCUP, 2013 Miguel Coimbra Slides by Prof. Kristen Grauman.
What we didn’t have time for CS664 Lecture 26 Thursday 12/02/04 Some slides c/o Dan Huttenlocher, Stefano Soatto, Sebastian Thrun.
Segmentation using eigenvectors Papers: “Normalized Cuts and Image Segmentation”. Jianbo Shi and Jitendra Malik, IEEE, 2000 “Segmentation using eigenvectors:
MRFs and Segmentation with Graph Cuts Computer Vision CS 543 / ECE 549 University of Illinois Derek Hoiem 02/24/10.
CS 558 C OMPUTER V ISION Lecture VI: Segmentation and Grouping Slides adapted from S. Lazebnik.
Chapter 14: SEGMENTATION BY CLUSTERING 1. 2 Outline Introduction Human Vision & Gestalt Properties Applications – Background Subtraction – Shot Boundary.
CSE 185 Introduction to Computer Vision Pattern Recognition 2.
Motion Segmentation By Hadas Shahar (and John Y.A.Wang, and Edward H. Adelson, and Wikipedia and YouTube) 1.
Visual motion Many slides adapted from S. Seitz, R. Szeliski, M. Pollefeys.
Digital Image Processing
Segmentation & Grouping Tuesday, Sept 23 Kristen Grauman UT-Austin.
Lecture 9 Feature Extraction and Motion Estimation Slides by: Michael Black Clark F. Olson Jean Ponce.
CS654: Digital Image Analysis Lecture 28: Advanced topics in Image Segmentation Image courtesy: IEEE, IJCV.
Optical flow and keypoint tracking Many slides adapted from S. Seitz, R. Szeliski, M. Pollefeys.
Lecture 30: Segmentation CS4670 / 5670: Computer Vision Noah Snavely From Sandlot ScienceSandlot Science.
CS 2750: Machine Learning Clustering Prof. Adriana Kovashka University of Pittsburgh January 25, 2016.
Motion Segmentation at Any Speed Shrinivas J. Pundlik Department of Electrical and Computer Engineering, Clemson University, Clemson, SC.
MASKS © 2004 Invitation to 3D vision Lecture 3 Image Primitives andCorrespondence.
Image segmentation.
Segmentation slides adopted from Svetlana Lazebnik.
Course Introduction to Medical Imaging Segmentation 1 – Mean Shift and Graph-Cuts Guy Gilboa.
Motion and optical flow
Segmentation by clustering: normalized cut
Visual motion Many slides adapted from S. Seitz, R. Szeliski, M. Pollefeys.
Estimating Parametric and Layered Motion
Motion and Optical Flow
LOCUS: Learning Object Classes with Unsupervised Segmentation
Learning to Combine Bottom-Up and Top-Down Segmentation
Lecture 31: Graph-Based Image Segmentation
Digital Image Processing
Image Segmentation CS 678 Spring 2018.
Optical flow and keypoint tracking
“Traditional” image segmentation
Presentation transcript:

Segmentation slides adopted from Svetlana Lazebnik

Image Intensity-based clustersColor-based clusters Segmentation as clustering K-means clustering based on intensity or color is essentially vector quantization of the image attributes Clusters don’t have to be spatially coherent

K-Means for segmentation Pros Very simple method Converges to a local minimum of the error function Cons Memory-intensive Need to pick K Sensitive to initialization Sensitive to outliers Only finds “spherical” clusters

Find features (color, gradients, texture, etc) 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/segmentation

Mean shift segmentation results

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

Segmentation by graph partitioning Break Graph into Segments Delete links that cross between segments Easiest to break links that have low affinity –similar pixels should be in the same segments –dissimilar pixels should be in different segments ABC Source: S. Seitz w ij i j

Measuring affinity 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:

Minimum cut We can do segmentation by finding the minimum cut in a graph Efficient algorithms exist for doing this Minimum cut example

Normalized cut Drawback: minimum cut tends to cut off very small, isolated components Ideal Cut Cuts with lesser weight than the ideal cut * Slide from Khurram Hassan-Shafique CAP5415 Computer Vision 2003

Normalized cut Drawback: minimum cut tends to cut off very small, isolated components This can be fixed by normalizing the cut by the weight of all the edges incident to the segment The normalized cut cost is: w(A, B) = sum of weights of all edges between A and B Solution to eigen decomposition of (D − W)y = λDy J. Shi and J. Malik. Normalized cuts and image segmentation. PAMI 2000Normalized cuts and image segmentation.

Example result

Challenge How to segment images that are a “mosaic of textures”?

Using texture features for segmentation Convolve image with a bank of filters J. Malik, S. Belongie, T. Leung and J. Shi. "Contour and Texture Analysis for Image Segmentation". IJCV 43(1),7-27,2001."Contour and Texture Analysis for Image Segmentation"

Using texture features for segmentation Convolve image with a bank of filters Find textons by clustering vectors of filter bank outputs J. Malik, S. Belongie, T. Leung and J. Shi. "Contour and Texture Analysis for Image Segmentation". IJCV 43(1),7-27,2001."Contour and Texture Analysis for Image Segmentation" Texton mapImage

Using texture features for segmentation Convolve image with a bank of filters Find textons by clustering vectors of filter bank outputs The final texture feature is a texton histogram computed over image windows at some “local scale” J. Malik, S. Belongie, T. Leung and J. Shi. "Contour and Texture Analysis for Image Segmentation". IJCV 43(1),7-27,2001."Contour and Texture Analysis for Image Segmentation"

Pitfall of texture features Possible solution: check for “intervening contours” when computing connection weights J. Malik, S. Belongie, T. Leung and J. Shi. "Contour and Texture Analysis for Image Segmentation". IJCV 43(1),7-27,2001."Contour and Texture Analysis for Image Segmentation"

An example Implemention 1.Compute an initial segmentation from the locally estimated weight matrix. a) Compute eigen-decomposition of Connectivity graph b) Pixel wise K-means with K=30 on the 11-dim subspace defined by the eigenvectors 2-12 c) Reduce K until error threshold is reached

An example Implemention 1. Compute an initial segmentation from the locally estimated weight matrix. 2. Update the weights using the initial segmentation. - build histogram by considering pixels in the intersection of segmentation and local window

An example Implemention 1. Compute an initial segmentation from the locally estimated weight matrix. 2. Update the weights using the initial segmentation. 3. Coarsen the graph with the updated weights to reduce the segmentation to a much simpler problem. - Each segment is now a node in the graph - Weights are computed through aggregation over the original graph matrix weights

An example Implementation 1. Compute an initial segmentation from the locally estimated weight matrix. 2. Update the weights using the initial segmentation. 3. Coarsen the graph with the updated weights to reduce the segmentation to a much simpler problem. 4. Compute a final segmentation using the coarsened graph. 1. Compute the second smallest eigenvector for the generalized eigensystem using weights for coarsened graph 2. Threshold the eigenvector to produce a bipartitioning of the image. 30 different values uniformly spaced within the range of the eigenvector are tried as the threshold. The one producing a partition which minimizes the normalized cut value is chosen. The corresponding partition is the best way to segment the image into two regions. 3. Recursively repeat steps 1 and 2 for each of the partitions until the normalized cut value is larger than 0.1.

Example results

Results: Berkeley Segmentation Engine

Pros Generic framework, can be used with many different features and affinity formulations Cons High storage requirement and time complexity Bias towards partitioning into equal segments Normalized cuts: Pro and con

Segmentation many slides from Svetlana Lazebnik, Anat Levin

Segments as primitives for recognition J. Tighe and S. Lazebnik, ECCV 2010

Bottom-up segmentation Normalized cuts Mean shift … Bottom-up approaches: Use low level cues to group similar pixels

Bottom-up segmentation is ill posed Some segmentation example (maybe horses from Eran’s paper) Many possible segmentation are equally good based on low level cues alone. images from Borenstein and Ullman 02

Top-down segmentation Class-specific, top-down segmentation (Borenstein & Ullman Eccv02) Winn and Jojic 05 Leibe et al 04 Yuille and Hallinan 02. Liu and Sclaroff 01 Yu and Shi 03

Combining top-down and bottom-up segmentation Find a segmentation: 1.Similar to the top-down model 2.Aligns with image edges +

Why learning top-down and bottom-up models simultaneously? Large number of freedom degrees in tentacles configuration- requires a complex deformable top down model On the other hand: rather uniform colors- low level segmentation is easy

simultaneouslyLearn top-down and bottom-up models simultaneously Reduces at run time to energy minimization with binary labels (graph min cut) Combined Learning Approach

Energy model Consistency with fragments segmentation Segmentation alignment with image edges

Energy model Segmentation alignment with image edges Consistency with fragments segmentation

Energy model Segmentation alignment with image edges Resulting min-cut segmentation Consistency with fragments segmentation

Learning from segmented class images Training data : Learn fragments for an energy function

Fragments selection Candidate fragments pool: Greedy energy design:

Fragments selection challenges Straightforward computation of likelihood improvement is impractical 2000 Fragments 50 Training images 10 Fragments selection iterations 1,000,000 inference operations!

Fragments selection Fragment with low error on the training set First order approximation to log-likelihood gain: Fragment not accounted for by the existing model

Requires a single inference process on the previous iteration energy to evaluate approximations with respect to all fragments First order approximation evaluation is linear in the fragment size First order approximation to log-likelihood gain: Fragments selection

Training horses model

Training horses model-one fragment

Training horses model-two fragments

Training horses model-three fragments

Results- horses dataset

Fragments number Mislabeled pixels percent Comparable to previous but with far fewer fragments

Results- artificial octopi

Top-down segmentation E. Borenstein and S. Ullman, “Class-specific, top-down segmentation,” ECCV 2002“Class-specific, top-down segmentation,” A. Levin and Y. Weiss, “Learning to Combine Bottom-Up and Top-Down Segmentation,” ECCV 2006.“Learning to Combine Bottom-Up and Top-Down Segmentation,”

Visual motion Many slides adapted from S. Seitz, R. Szeliski, M. Pollefeys

Motion and perceptual organization Sometimes, motion is the only cue

Motion and perceptual organization Sometimes, motion is foremost cue

Motion and perceptual organization Even “impoverished” motion data can evoke a strong percept G. Johansson, “Visual Perception of Biological Motion and a Model For Its Analysis", Perception and Psychophysics 14, , 1973.

Motion and perceptual organization Even “impoverished” motion data can evoke a strong percept G. Johansson, “Visual Perception of Biological Motion and a Model For Its Analysis", Perception and Psychophysics 14, , 1973.

Motion and perceptual organization Even “impoverished” motion data can evoke a strong percept G. Johansson, “Visual Perception of Biological Motion and a Model For Its Analysis", Perception and Psychophysics 14, , 1973.

Uses of motion Estimating 3D structure Segmenting objects based on motion cues Learning and tracking dynamical models Recognizing events and activities

Motion field The motion field is the projection of the 3D scene motion into the image

Motion field and parallax X(t) is a moving 3D point Velocity of scene point: V = dX/dt x(t) = (x(t),y(t)) is the projection of X in the image Apparent velocity v in the image: given by components v x = dx/dt and v y = dy/dt These components are known as the motion field of the image x(t)x(t) x(t+dt) X(t)X(t) X(t+dt) V v

Motion field and parallax x(t)x(t) x(t+dt) X(t)X(t) X(t+dt) V v To find image velocity v, differentiate x=(x,y) with respect to t (using quotient rule): Image motion is a function of both the 3D motion (V) and the depth of the 3D point (Z)

Motion field and parallax Pure translation: V is constant everywhere

Motion field and parallax Pure translation: V is constant everywhere The length of the motion vectors is inversely proportional to the depth Z V z is nonzero: Every motion vector points toward (or away from) the vanishing point of the translation direction

Motion field and parallax Pure translation: V is constant everywhere The length of the motion vectors is inversely proportional to the depth Z V z is nonzero: Every motion vector points toward (or away from) the vanishing point of the translation direction V z is zero: Motion is parallel to the image plane, all the motion vectors are parallel

Figure from Michael Black, Ph.D. Thesis Length of flow vectors inversely proportional to depth Z of 3d point points closer to the camera move more quickly across the image plane Motion field + camera motion

Zoom outZoom inPan right to left

Motion field + camera motion Rigid Motion with Rotation Component

Motion field + camera motion Rotation Optical flowTranslation Optical Flow

Motion estimation techniques Feature-based methods Extract visual features (corners, textured areas) and track them over multiple frames Sparse motion fields, but more robust tracking Suitable when image motion is large (10s of pixels) Direct methods Directly recover image motion at each pixel from spatio-temporal image brightness variations Dense motion fields, but sensitive to appearance variations Suitable for video and when image motion is small

Optical Flow based segmentation segmentation of flow vectors using the above techniques: mean shift normalized cuts top down approaches

Applications of segmentation to video Background subtraction A static camera is observing a scene Goal: separate the static background from the moving foreground How to come up with backgroun d frame estimate without access to “empty” scene?

Applications of segmentation to video Background subtraction Shot boundary detection Commercial video is usually composed of shots or sequences showing the same objects or scene Goal: segment video into shots for summarization and browsing (each shot can be represented by a single keyframe in a user interface) Difference from background subtraction: the camera is not necessarily stationary