mean shift segmentation - ele.puc-rio.brraul/imageanalysis/mean shift segmentatio… · mean shift...

20
Mean Shift Segmentation Raul Queiroz Feitosa

Upload: others

Post on 16-Oct-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Mean Shift Segmentation - ele.puc-rio.brraul/ImageAnalysis/MEAN SHIFT SEGMENTATIO… · Mean Shift Segmentation Evaluation of optimization Techniques, Proceedings of the Third International

Mean Shift Segmentation

Raul Queiroz Feitosa

Page 2: Mean Shift Segmentation - ele.puc-rio.brraul/ImageAnalysis/MEAN SHIFT SEGMENTATIO… · Mean Shift Segmentation Evaluation of optimization Techniques, Proceedings of the Third International

What is Mean shift ?

A tool for:

Finding modes in a set of data samples, manifesting an underlying probability density function (PDF) in RN .

PDF in feature space

Color space

Scale space

Actually any feature space you can conceive

211/28/2019 Mean Shift Segmentation

Page 3: Mean Shift Segmentation - ele.puc-rio.brraul/ImageAnalysis/MEAN SHIFT SEGMENTATIO… · Mean Shift Segmentation Evaluation of optimization Techniques, Proceedings of the Third International

Basic IdeaObjective: Find the densest region

3

Neighborhood

Mean shift vectorCenter of mass

11/28/2019 Mean Shift Segmentation

Page 4: Mean Shift Segmentation - ele.puc-rio.brraul/ImageAnalysis/MEAN SHIFT SEGMENTATIO… · Mean Shift Segmentation Evaluation of optimization Techniques, Proceedings of the Third International

Computing the Mean shift Vector

4

11/28/2019 Mean Shift Segmentation

Page 5: Mean Shift Segmentation - ele.puc-rio.brraul/ImageAnalysis/MEAN SHIFT SEGMENTATIO… · Mean Shift Segmentation Evaluation of optimization Techniques, Proceedings of the Third International

Computing the Mean shift Vector

5

11/28/2019 Mean Shift Segmentation

Page 6: Mean Shift Segmentation - ele.puc-rio.brraul/ImageAnalysis/MEAN SHIFT SEGMENTATIO… · Mean Shift Segmentation Evaluation of optimization Techniques, Proceedings of the Third International

Kernel Functions

6

Examples of kernel functions :

• Epanechnikov Kernel

• Uniform Kernel

• Normal Kernel

21 1

( ) 0 otherwise

E

cK

x xx

1( )

0 otherwiseU

cK

xx

21( ) exp

2NK c

x x

11/28/2019 Mean Shift Segmentation

Page 7: Mean Shift Segmentation - ele.puc-rio.brraul/ImageAnalysis/MEAN SHIFT SEGMENTATIO… · Mean Shift Segmentation Evaluation of optimization Techniques, Proceedings of the Third International

7

Adaptive

Gradient

Ascent

• Automatic convergence speed – the mean shift

vector size depends on the gradient itself.

• Near maxima, the steps are small and refined

• Convergence is guaranteed for infinitesimal

steps only infinitely convergent,

(therefore set a lower bound)

Mean shift properties

11/28/2019 Mean Shift Segmentation

Page 8: Mean Shift Segmentation - ele.puc-rio.brraul/ImageAnalysis/MEAN SHIFT SEGMENTATIO… · Mean Shift Segmentation Evaluation of optimization Techniques, Proceedings of the Third International

Modality analysis

8

Tessellate the space with windows Run the procedure in parallel11/28/2019 Mean Shift Segmentation

Page 9: Mean Shift Segmentation - ele.puc-rio.brraul/ImageAnalysis/MEAN SHIFT SEGMENTATIO… · Mean Shift Segmentation Evaluation of optimization Techniques, Proceedings of the Third International

Modality analysis

9

Merge windows that end up near the same “peak” or mode

11/28/2019 Mean Shift Segmentation

Page 10: Mean Shift Segmentation - ele.puc-rio.brraul/ImageAnalysis/MEAN SHIFT SEGMENTATIO… · Mean Shift Segmentation Evaluation of optimization Techniques, Proceedings of the Third International

• Cluster: all data points in the attraction basin of a mode.

• Attraction basin: the region for which all trajectories lead to

the same mode.

Mean shift clustering

Slide by Y. Ukrainitz & B. Sarel

1011/28/2019 Mean Shift Segmentation

Page 11: Mean Shift Segmentation - ele.puc-rio.brraul/ImageAnalysis/MEAN SHIFT SEGMENTATIO… · Mean Shift Segmentation Evaluation of optimization Techniques, Proceedings of the Third International

Mean shift clustering

1111/28/2019 Mean Shift Segmentation

Page 12: Mean Shift Segmentation - ele.puc-rio.brraul/ImageAnalysis/MEAN SHIFT SEGMENTATIO… · Mean Shift Segmentation Evaluation of optimization Techniques, Proceedings of the Third International

12

window size in

range domain

window size in

space domain

Mean shift segmentation

11/28/2019 Mean Shift Segmentation

Page 13: Mean Shift Segmentation - ele.puc-rio.brraul/ImageAnalysis/MEAN SHIFT SEGMENTATIO… · Mean Shift Segmentation Evaluation of optimization Techniques, Proceedings of the Third International

Mean shift segmentation results

13

From Comaniciu & Meer, 2002

11/28/2019 Mean Shift Segmentation

Page 14: Mean Shift Segmentation - ele.puc-rio.brraul/ImageAnalysis/MEAN SHIFT SEGMENTATIO… · Mean Shift Segmentation Evaluation of optimization Techniques, Proceedings of the Third International

Mean shift segmentation results

1411/28/2019 Mean Shift Segmentation

From Comaniciu & Meer, 2002

Page 15: Mean Shift Segmentation - ele.puc-rio.brraul/ImageAnalysis/MEAN SHIFT SEGMENTATIO… · Mean Shift Segmentation Evaluation of optimization Techniques, Proceedings of the Third International

Mean shift segmentation results

15

From Comaniciu & Meer, 2002

11/28/2019 Mean Shift Segmentation

Page 16: Mean Shift Segmentation - ele.puc-rio.brraul/ImageAnalysis/MEAN SHIFT SEGMENTATIO… · Mean Shift Segmentation Evaluation of optimization Techniques, Proceedings of the Third International

Mean shift segmentation results

16

From Comaniciu & Meer, 2002

11/28/2019 Mean Shift Segmentation

Page 17: Mean Shift Segmentation - ele.puc-rio.brraul/ImageAnalysis/MEAN SHIFT SEGMENTATIO… · Mean Shift Segmentation Evaluation of optimization Techniques, Proceedings of the Third International

Pros & Cons

Pros

Does not assume spherical clusters

Window size has a physical meaning

Robust to outliers

Cons

Output depends on window size

Computationally expensive

1711/28/2019 Mean Shift Segmentation

Page 18: Mean Shift Segmentation - ele.puc-rio.brraul/ImageAnalysis/MEAN SHIFT SEGMENTATIO… · Mean Shift Segmentation Evaluation of optimization Techniques, Proceedings of the Third International

Exercise

Download the Color Clustering Methods using

Mean-Shift, Normalized-Cuts and KNN from here,

and experiment with with it.

1811/28/2019 Mean Shift Segmentation

Page 19: Mean Shift Segmentation - ele.puc-rio.brraul/ImageAnalysis/MEAN SHIFT SEGMENTATIO… · Mean Shift Segmentation Evaluation of optimization Techniques, Proceedings of the Third International

References

Ukrainitz, Y. & Bernard Sarel, B., slides avaiable in

http://www.wisdom.weizmann.ac.il/~vision/courses/2004_2/files/mean_shi

ft/mean_shift.ppt

Comaniciu, D. and Meer, P. (2002). Mean Shift: A Robust Approach

Toward Feature Space Analysis. IEEE Transactions on Pattern Analysis

and Machine Intelligence, 24(5), pp. 603–619.

Kaftan, J.N., Bell, A.A., Aach, T. (2008). Mean Shift Segmentation

Evaluation of optimization Techniques, Proceedings of the Third

International Conference on Computer Vision Theory and Applications,

VISAPP 2008, pp. 365-374.

1911/28/2019 Mean Shift Segmentation

Page 20: Mean Shift Segmentation - ele.puc-rio.brraul/ImageAnalysis/MEAN SHIFT SEGMENTATIO… · Mean Shift Segmentation Evaluation of optimization Techniques, Proceedings of the Third International

20

Next Topic

Graph Based

Segmentation

11/28/2019 Mean Shift Segmentation