CS 231A CA Session: Problem Set 4 Review. Kevin Chen May 13, 2016

Similar documents
Problem Set 4. Danfei Xu CS 231A March 9th, (Courtesy of last year s slides)

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

CS 229 Midterm Review

Object Classification Problem

Classifying Images with Visual/Textual Cues. By Steven Kappes and Yan Cao

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

The goals of segmentation

Content-based Image and Video Retrieval. Image Segmentation

Social-Network Graphs

Robotics Programming Laboratory

Clustering Lecture 8. David Sontag New York University. Slides adapted from Luke Zettlemoyer, Vibhav Gogate, Carlos Guestrin, Andrew Moore, Dan Klein

Multi-view Facial Expression Recognition Analysis with Generic Sparse Coding Feature

Bag of Words Models. CS4670 / 5670: Computer Vision Noah Snavely. Bag-of-words models 11/26/2013

Feature Descriptors. CS 510 Lecture #21 April 29 th, 2013

TA Section: Problem Set 4

Unsupervised Learning : Clustering

Community Detection. Community

Cluster Analysis. Mu-Chun Su. Department of Computer Science and Information Engineering National Central University 2003/3/11 1

Spectral Clustering. Presented by Eldad Rubinstein Based on a Tutorial by Ulrike von Luxburg TAU Big Data Processing Seminar December 14, 2014

COSC160: Detection and Classification. Jeremy Bolton, PhD Assistant Teaching Professor

Machine Learning for Data Science (CS4786) Lecture 11

NAME: Sample Final Exam (based on previous CSE 455 exams by Profs. Seitz and Shapiro)

Machine Learning for Signal Processing Clustering. Bhiksha Raj Class Oct 2016

Image Segmentation. Selim Aksoy. Bilkent University

Image Segmentation. Selim Aksoy. Bilkent University

CS6670: Computer Vision

Voronoi Region. K-means method for Signal Compression: Vector Quantization. Compression Formula 11/20/2013

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

Computer Vision. Exercise Session 10 Image Categorization

Artificial Neural Networks (Feedforward Nets)

Cluster Analysis (b) Lijun Zhang

Lesson 2 7 Graph Partitioning

Improved image segmentation for tracking salt boundaries

Sparse coding for image classification

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

EE 701 ROBOT VISION. Segmentation

Visual Representations for Machine Learning

INF4820. Clustering. Erik Velldal. Nov. 17, University of Oslo. Erik Velldal INF / 22

MSA220 - Statistical Learning for Big Data

Image Processing. Image Features

Introduction to object recognition. Slides adapted from Fei-Fei Li, Rob Fergus, Antonio Torralba, and others

Application of Spectral Clustering Algorithm

Object Detection Using Segmented Images

SYDE Winter 2011 Introduction to Pattern Recognition. Clustering

9/17/2009. Wenyan Li (Emily Li) Sep. 15, Introduction to Clustering Analysis

Patch Descriptors. CSE 455 Linda Shapiro

Image Analysis & Retrieval. CS/EE 5590 Special Topics (Class Ids: 44873, 44874) Fall 2016, M/W Lec 18.

Spectral Clustering on Handwritten Digits Database

Action Recognition & Categories via Spatial-Temporal Features

Clustering CS 550: Machine Learning

BossaNova at ImageCLEF 2012 Flickr Photo Annotation Task

Midterm Examination CS540-2: Introduction to Artificial Intelligence

3D Object Recognition using Multiclass SVM-KNN

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

Dimension Reduction CS534

Normalized cuts and image segmentation

Lab # 2 - ACS I Part I - DATA COMPRESSION in IMAGE PROCESSING using SVD

Harder case. Image matching. Even harder case. Harder still? by Diva Sian. by swashford

OBJECT CATEGORIZATION

COMPUTER VISION > OPTICAL FLOW UTRECHT UNIVERSITY RONALD POPPE

Segmentation Computer Vision Spring 2018, Lecture 27

Clustering. Informal goal. General types of clustering. Applications: Clustering in information search and analysis. Example applications in search

Developing Open Source code for Pyramidal Histogram Feature Sets

Classification and Detection in Images. D.A. Forsyth

Analysis of Biological Networks. 1. Clustering 2. Random Walks 3. Finding paths

Computer vision: models, learning and inference. Chapter 13 Image preprocessing and feature extraction

9.1. K-means Clustering

Figure (5) Kohonen Self-Organized Map

Last week. Multi-Frame Structure from Motion: Multi-View Stereo. Unknown camera viewpoints

Cluster Analysis. Ying Shen, SSE, Tongji University

Image matching. Announcements. Harder case. Even harder case. Project 1 Out today Help session at the end of class. by Diva Sian.

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

Scale Invariant Feature Transform

Bag-of-features. Cordelia Schmid

Previously. Part-based and local feature models for generic object recognition. Bag-of-words model 4/20/2011

Introduction to Artificial Intelligence

Region-based Segmentation

Beyond bags of Features

Image Features. Work on project 1. All is Vanity, by C. Allan Gilbert,

CHAPTER 4: CLUSTER ANALYSIS

Clustering. Mihaela van der Schaar. January 27, Department of Engineering Science University of Oxford

Segmentation: Clustering, Graph Cut and EM

Harder case. Image matching. Even harder case. Harder still? by Diva Sian. by swashford

CS 534: Computer Vision Segmentation and Perceptual Grouping

Pattern recognition. Classification/Clustering GW Chapter 12 (some concepts) Textures

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

Machine learning - HT Clustering

Beyond Bags of features Spatial information & Shape models

The SIFT (Scale Invariant Feature

Feature Selection for fmri Classification

Random Forest A. Fornaser

Aarti Singh. Machine Learning / Slides Courtesy: Eric Xing, M. Hein & U.V. Luxburg

Scale Invariant Feature Transform

Unsupervised Learning

Local Features: Detection, Description & Matching

Homework 4: Clustering, Recommenders, Dim. Reduction, ML and Graph Mining (due November 19 th, 2014, 2:30pm, in class hard-copy please)

CS229: Action Recognition in Tennis

Diffusion and Clustering on Large Graphs

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

Nonparametric Methods Recap

Transcription:

CS 231A CA Session: Problem Set 4 Review Kevin Chen May 13, 2016

PS4 Outline Problem 1: Viewpoint estimation Problem 2: Segmentation Meanshift segmentation Normalized cut

Problem 1: Viewpoint Estimation

Viewpoint estimation using Bag of Words Goal: Perform image classification Steps: Build dictionary of codewords Build features based on codewords Train an SVM classifier on the features and labels

Viewpoint estimation using Bag of Words Goal: Perform image classification Steps: Build dictionary of codewords Build features based on codewords Train an SVM classifier on the features and labels

Build dictionary of codewords Goal: compute words for our bag of words model Will be useful for computing a feature vector for an image Basic idea: perform k-means on dense SIFT features Cluster centers form the words in the bag of words model Algorithm Subsample images in train set Compute dense SIFT features Find cluster centers by running k-means

K-means clustering Fixed number of clusters (k) Algorithm Use VLFeat Given an initial set of k means Repeat until convergence Assign each point to a ith cluster if it is closest to the ith mean (euclidean distance) Recompute means

k-means clustering Step 1 Step 2 Step 3 Result Repeat

Viewpoint estimation using Bag of Words Goal: Perform image classification Steps: Build dictionary of codewords Build features based on codewords Train an SVM classifier on the features and labels

Build features based on codewords Goal: Extract a feature from each image Algorithm Extract dense SIFT features for every image in train set For each image, build pyramid of dxd sub-images For each pyramid depth For every dense SIFT feature, find nearest codeword according to EUCLIDEAN distance Build histogram of codewords Concatenate sub-image histograms to build the final feature vector for the image

Viewpoint estimation using Bag of Words Goal: Perform image classification Steps: Build dictionary of codewords Build features based on codewords Train an SVM classifier on the features and labels

Problem 2: Segmentation

Segmentation

Meanshift

Meanshift segmentation Compute features for each pixel, e.g. (u, v, R, G, B) Keep track of visited pixels (initialize all to unvisited) Keep track of cluster centers (initially there are none) Repeat until all pixels have been visited Pick a random, unvisited pixel and get its corresponding feature vector Perform meanshift procedure to get cluster center Make sure to update visited pixels Update list of cluster centers Check if the newly computed cluster center is sufficiently close to any previous cluster centers If so, ignore newly computed cluster center (say it s part of a previous cluster) If not, add new cluster to cluster list Assign pixels to nearest cluster (in feature space)

Meanshift procedure Repeat until convergence Find all features within bandwidth distance from the current feature vector Compute mean of these features All features with bandwidth circle (at any iteration) should have their corresponding pixels marked as visited Update current feature vector as the newly computed mean Return the final mean as a new cluster center

Normalized Cut

Motivation Graph can be constructed with nodes as pixels and edges between pixels Weights are associated with each edge Typically want to partition graph into two parts Find partition corresponding to minimum cut cost Often ends up choosing cuts that partition small sets of nodes Use norm cut instead Norm cut - cost is computed as a fraction of weights of edges connecting to the partition See paper for details

Basic ideas Vector x defines a partition x i = 1 if node i is in subset A x i = -1 if node i is in subset B We want to solve the following problem: Solve for partition by trying to solve an equivalent problem subject to y is a reformulation of the partition indicator vector x We can retrieve A, B from y

We ask you to implement... The computation of norm cut cost A recursive algorithm for partitioning the graph

We ask you to implement... The computation of norm cut cost A recursive algorithm for partitioning the graph

Computation of norm cut Given a partition value ϵ and vector v, we can compute x If v i > ϵ, then x i = 1 If v i <= ϵ, then x i = -1 Use definitions to compute D, k, b, and y Cost can then be computed by

Definitions Given a weight matrix W in which W(i, j) corresponds to edge weight between node i and node j Compute diagonal matrix D in which D(i, i) corresponds to sum of weights connecting to node i Vector x defines a partition Others x i = 1 if node i is in subset A x i = -1 if node i is in subset B Define k to be sum of edge weights which connect to nodes in A Define b to be ratio of edge weights in A to edge weights in B

We ask you to implement... The computation of norm cut cost A recursive algorithm for partitioning the graph

Recursive algorithm for partitioning the graph Compute D Approximately solve for y in the problem shown before subject to To do this, solve generalized eigensystem by finding the eigenvector v associated with the second smallest eigenvalue of the generalized eigensystem This does not satisfy first constraint, so find best partition point using fminsearch on norm cut cost Once a partition point is found, we can get A and B Recurse on partitions A and B unless end recursion conditions are true

When ending recursion... Suppose we want to partition V into A and B End recursion conditions Norm cust cost is above threshold Proposed A partition is too small Proposed B partition is too small If any of the above are true Return V as the segmentation

Questions?