Cluster-based Segmentation Algorithm Why Shift What is Mean Idea - - PowerPoint PPT Presentation

cluster based segmentation
SMART_READER_LITE
LIVE PREVIEW

Cluster-based Segmentation Algorithm Why Shift What is Mean Idea - - PowerPoint PPT Presentation

Cluster- Mean Shift http://vision.ouc.edu.cn/~zhenghaiyong CVBIOUC WangRuchen Cluster-based Segmentation Algorithm Why Shift What is Mean Idea K-means++ based Algorithm Idea K-means with Clustering


slide-1
SLIDE 1

Cluster- based Segmenta- tion Introduction

Clustering Analysis Image Segmentation with Clustering

K-means

Idea Algorithm K-means++

Mean Shift

Idea What is Mean Shift Why Algorithm

Cluster-based Segmentation

基于聚类的图像分割 WangRuchen

CVBIOUC http://vision.ouc.edu.cn/~zhenghaiyong

May 26, 2015

slide-2
SLIDE 2

Cluster- based Segmenta- tion Introduction

Clustering Analysis Image Segmentation with Clustering

K-means

Idea Algorithm K-means++

Mean Shift

Idea What is Mean Shift Why Algorithm

Contents

1 Introduction

Clustering Analysis Image Segmentation with Clustering

2 K-means

Idea Algorithm K-means++

3 Mean Shift

Idea What is Mean Shift Why Algorithm

slide-3
SLIDE 3

Cluster- based Segmenta- tion Introduction

Clustering Analysis Image Segmentation with Clustering

K-means

Idea Algorithm K-means++

Mean Shift

Idea What is Mean Shift Why Algorithm

Clustering Analysis

Clustering is unsupervised classifjcation: no predefjned classes. Cluster: a collection of data objects Similar to one another within the same cluster Dissimilar to the objects in other clusters

slide-4
SLIDE 4

Cluster- based Segmenta- tion Introduction

Clustering Analysis Image Segmentation with Clustering

K-means

Idea Algorithm K-means++

Mean Shift

Idea What is Mean Shift Why Algorithm

Image Segmentation with Clustering

Idea: Cluster similar pixel features together. How to segment images by clustering?

slide-5
SLIDE 5

Cluster- based Segmenta- tion Introduction

Clustering Analysis Image Segmentation with Clustering

K-means

Idea Algorithm K-means++

Mean Shift

Idea What is Mean Shift Why Algorithm

Image Segmentation with Clustering

Image ù ñ Feature space Feature space:(R,G,B),(R,G,B,X,Y),(L,U,V)

slide-6
SLIDE 6

Cluster- based Segmenta- tion Introduction

Clustering Analysis Image Segmentation with Clustering

K-means

Idea Algorithm K-means++

Mean Shift

Idea What is Mean Shift Why Algorithm

Image Segmentation with Clustering

Image ù ñ Feature space Feature space:(R,G,B),(R,G,B,X,Y),(L,U,V)¨ ¨ ¨

slide-7
SLIDE 7

Cluster- based Segmenta- tion Introduction

Clustering Analysis Image Segmentation with Clustering

K-means

Idea Algorithm K-means++

Mean Shift

Idea What is Mean Shift Why Algorithm

Image Segmentation with Clustering

Vector Clustering Each point has a vector. Graph Clustering Each vertex is connected to others by edges.

slide-8
SLIDE 8

Cluster- based Segmenta- tion Introduction

Clustering Analysis Image Segmentation with Clustering

K-means

Idea Algorithm K-means++

Mean Shift

Idea What is Mean Shift Why Algorithm

Image Segmentation with Clustering

Image ù ñ Feature space Feature space:(R,G,B),(R,G,B,X,Y),(L,U,V)¨ ¨ ¨

slide-9
SLIDE 9

Cluster- based Segmenta- tion Introduction

Clustering Analysis Image Segmentation with Clustering

K-means

Idea Algorithm K-means++

Mean Shift

Idea What is Mean Shift Why Algorithm

Image Segmentation with Clustering

Techniques: K-means Mean Shift

slide-10
SLIDE 10

Cluster- based Segmenta- tion Introduction

Clustering Analysis Image Segmentation with Clustering

K-means

Idea Algorithm K-means++

Mean Shift

Idea What is Mean Shift Why Algorithm

K-means

Idea:

1 Randomly initialize the K cluster centers. 2 For each point, fjnd the closest cluster centers. Put the

point into the cluster.

3 Change the cluster centers.

slide-11
SLIDE 11

Cluster- based Segmenta- tion Introduction

Clustering Analysis Image Segmentation with Clustering

K-means

Idea Algorithm K-means++

Mean Shift

Idea What is Mean Shift Why Algorithm

K-means

Algorithm:

1 Choose randomly K-means m1, . . . , mk. 2 For each vector xi compute D(xi, mk(ic)), k = 1, . . . , K

and assign xi to the cluster Cj with nearest mean.

3 Update the means to get m1(ic), . . . , mK(ic).

m(t+1)

i

= 1 |S(t)

i |

ÿ

xjPS(t)

i

xj

4 Repeat steps 2 and 3 until Ck(ic) = Ck(ic + 1) for all k.

slide-12
SLIDE 12

Cluster- based Segmenta- tion Introduction

Clustering Analysis Image Segmentation with Clustering

K-means

Idea Algorithm K-means++

Mean Shift

Idea What is Mean Shift Why Algorithm

K-means

Pros: Simple and fast Converges to a local minimum of the error function Cons: Sensitive to initialization Need to pick K

slide-13
SLIDE 13

Cluster- based Segmenta- tion Introduction

Clustering Analysis Image Segmentation with Clustering

K-means

Idea Algorithm K-means++

Mean Shift

Idea What is Mean Shift Why Algorithm

K-means++1

Algorithm:

1 Take one center c1, chosen uniformly at random from X. 2 Take a new center ci, choosing x P X with probability D(x)2 ř

xPX D(x)2 .

3 Repeat Step2, until we have taken k centers altogether. 4 Proceed as with the standard K-means algorithm.

D(x) denote the shortest distance from a data point to the closest center we have already chosen.

1Arthur, D. and Vassilvitskii, S, “K-means++: The Advantages of

Careful Seeding”, PA, 2007.

slide-14
SLIDE 14

Cluster- based Segmenta- tion Introduction

Clustering Analysis Image Segmentation with Clustering

K-means

Idea Algorithm K-means++

Mean Shift

Idea What is Mean Shift Why Algorithm

K-means

Pros: Simple and fast Converges to a local minimum of the error function Cons: Sensitive to initialization Need to pick K

slide-15
SLIDE 15

Cluster- based Segmenta- tion Introduction

Clustering Analysis Image Segmentation with Clustering

K-means

Idea Algorithm K-means++

Mean Shift

Idea What is Mean Shift Why Algorithm

Mean Shift2

An advanced and versatile technique for clustering-based segmentation. Idea: Find the clustering center.

  • 2D. Comaniciu and P. Meer, “Mean Shift: A Robust Approach

toward Feature Space Analysis”, PAMI, 2002.

slide-16
SLIDE 16

Cluster- based Segmenta- tion Introduction

Clustering Analysis Image Segmentation with Clustering

K-means

Idea Algorithm K-means++

Mean Shift

Idea What is Mean Shift Why Algorithm

What and How?

Center is maximum points of probability density function and gradient direction.

slide-17
SLIDE 17

Cluster- based Segmenta- tion Introduction

Clustering Analysis Image Segmentation with Clustering

K-means

Idea Algorithm K-means++

Mean Shift

Idea What is Mean Shift Why Algorithm

What and How?

Center is maximum points of probability density function and gradient direction.

slide-18
SLIDE 18

Cluster- based Segmenta- tion Introduction

Clustering Analysis Image Segmentation with Clustering

K-means

Idea Algorithm K-means++

Mean Shift

Idea What is Mean Shift Why Algorithm

Mean Shift Vector

Mh = 1 K ÿ

xiSk

(xi ´ x)

slide-19
SLIDE 19

Cluster- based Segmenta- tion Introduction

Clustering Analysis Image Segmentation with Clustering

K-means

Idea Algorithm K-means++

Mean Shift

Idea What is Mean Shift Why Algorithm

What is Mean Shift

slide-20
SLIDE 20

Cluster- based Segmenta- tion Introduction

Clustering Analysis Image Segmentation with Clustering

K-means

Idea Algorithm K-means++

Mean Shift

Idea What is Mean Shift Why Algorithm

What is Mean Shift

slide-21
SLIDE 21

Cluster- based Segmenta- tion Introduction

Clustering Analysis Image Segmentation with Clustering

K-means

Idea Algorithm K-means++

Mean Shift

Idea What is Mean Shift Why Algorithm

What is Mean Shift

slide-22
SLIDE 22

Cluster- based Segmenta- tion Introduction

Clustering Analysis Image Segmentation with Clustering

K-means

Idea Algorithm K-means++

Mean Shift

Idea What is Mean Shift Why Algorithm

What is Mean Shift

slide-23
SLIDE 23

Cluster- based Segmenta- tion Introduction

Clustering Analysis Image Segmentation with Clustering

K-means

Idea Algorithm K-means++

Mean Shift

Idea What is Mean Shift Why Algorithm

What is Mean Shift

slide-24
SLIDE 24

Cluster- based Segmenta- tion Introduction

Clustering Analysis Image Segmentation with Clustering

K-means

Idea Algorithm K-means++

Mean Shift

Idea What is Mean Shift Why Algorithm

What is Mean Shift

slide-25
SLIDE 25

Cluster- based Segmenta- tion Introduction

Clustering Analysis Image Segmentation with Clustering

K-means

Idea Algorithm K-means++

Mean Shift

Idea What is Mean Shift Why Algorithm

What is Mean Shift

slide-26
SLIDE 26

Cluster- based Segmenta- tion Introduction

Clustering Analysis Image Segmentation with Clustering

K-means

Idea Algorithm K-means++

Mean Shift

Idea What is Mean Shift Why Algorithm

What is Mean Shift

slide-27
SLIDE 27

Cluster- based Segmenta- tion Introduction

Clustering Analysis Image Segmentation with Clustering

K-means

Idea Algorithm K-means++

Mean Shift

Idea What is Mean Shift Why Algorithm

Density Estimation

P = Nk N f(x) = P S = Nk NS

slide-28
SLIDE 28

Cluster- based Segmenta- tion Introduction

Clustering Analysis Image Segmentation with Clustering

K-means

Idea Algorithm K-means++

Mean Shift

Idea What is Mean Shift Why Algorithm

Kernel density estimation (Parzen windows)

Kernel density estimation: Let (x1, x2, …, xn) be an independent and identically distributed sample drawn from some distribution with an unknown density f(x). Its kernel density estimator is ˆ f(x)h,k = 1 Nhd

N

ÿ

n=1

k(xn ´ x h ) Kernel function: k(u) = " 1 |ui| ď 1

2, i = 1, . . . , D

  • therwise
slide-29
SLIDE 29

Cluster- based Segmenta- tion Introduction

Clustering Analysis Image Segmentation with Clustering

K-means

Idea Algorithm K-means++

Mean Shift

Idea What is Mean Shift Why Algorithm

Kernel density estimation

ˆ fh,K(x) = 1 Nhd

N

ÿ

n=1

k(||x ´ xn h ||2) Density gradient: ˆ ▽fh,K(x) = 2 Nhd+2

N

ÿ

n=1

(xn ´ x)[´k1(||x ´ xn h ||2)] g(x) = ´k1(x)

slide-30
SLIDE 30

Cluster- based Segmenta- tion Introduction

Clustering Analysis Image Segmentation with Clustering

K-means

Idea Algorithm K-means++

Mean Shift

Idea What is Mean Shift Why Algorithm

Kernel density estimation

ˆ ▽fh,K(x) = 2 Nhd+2

N

ÿ

n=1

(xn ´ x)[g(||x ´ xn h ||2)] = 2 h2 lo

  • mo
  • n

C

[ 1 Nhd

N

ÿ

n=1

g(||xn ´ x h ||2)] loooooooooooooomoooooooooooooon

ˆ fh,G(x)

[ řN

n=1 xng(||xn´x h ||2)

řN

n=1 g(|| xn´x h ||2)

´ x] looooooooooooooomooooooooooooooon

mh,G(x)

slide-31
SLIDE 31

Cluster- based Segmenta- tion Introduction

Clustering Analysis Image Segmentation with Clustering

K-means

Idea Algorithm K-means++

Mean Shift

Idea What is Mean Shift Why Algorithm

Kernel density estimation

Mh = 1 K ÿ

xiSk

(xi ´ x)

slide-32
SLIDE 32

Cluster- based Segmenta- tion Introduction

Clustering Analysis Image Segmentation with Clustering

K-means

Idea Algorithm K-means++

Mean Shift

Idea What is Mean Shift Why Algorithm

Kernel density estimation

mh,G(x) = řN

n=1 xng(||xn´x h ||2)

řN

n=1 g(|| xn´x h ||2)

´x mh,G(x) = 0

slide-33
SLIDE 33

Cluster- based Segmenta- tion Introduction

Clustering Analysis Image Segmentation with Clustering

K-means

Idea Algorithm K-means++

Mean Shift

Idea What is Mean Shift Why Algorithm

Kernel density estimation

slide-34
SLIDE 34

Cluster- based Segmenta- tion Introduction

Clustering Analysis Image Segmentation with Clustering

K-means

Idea Algorithm K-means++

Mean Shift

Idea What is Mean Shift Why Algorithm

Kernel density estimation

Clustering center: yi,k+1 = řN

n=1 xng(||xn´x h ||2)

řN

n=1 g(|| xn´x h ||2)

slide-35
SLIDE 35

Cluster- based Segmenta- tion Introduction

Clustering Analysis Image Segmentation with Clustering

K-means

Idea Algorithm K-means++

Mean Shift

Idea What is Mean Shift Why Algorithm

Mean Shift

Algorithm:

1 Find features(color, gradients, texture, etc). 2 Initialize windows at individual pixel locations. 3 Compute yi,k+1 until convergence, yi,k = yi,k+1. 4 Assign zi = (xi, yi,k).

slide-36
SLIDE 36

Cluster- based Segmenta- tion Introduction

Clustering Analysis Image Segmentation with Clustering

K-means

Idea Algorithm K-means++

Mean Shift

Idea What is Mean Shift Why Algorithm

Thanks!