Chapter 3: Summary


  • Can find an arbitrary number of clusters
  • Capable of clustering arbitrary shapes
  • The only parameter is the kernel used
  • Can cluster arbitrary feature spaces


  • Slow
  • Finding the right kernel can be difficult
  • Numerical errors can cause issues
  • Merging and convergence strategies have to be defined

How to deal with large amounts of data?

Mean Shift is by its nature a slow algorithm. Indeed, at every iteration, each center has to compute many pairwise functions. One way to overcome this is to use a batched version of the algorithm. It means that the density distribution will be estimated on a subset of the data at each iteration. This will likely make each shift less “effective”, but it has the benefit of putting an upper-bound on the number of pairwise computations required.

How to use Mean Shift for image segmentation?

Mean Shift can be used for image segmentation. Because it can cluster arbitrary shapes in arbitrary feature spaces, we can define our image as a set of vectors representing the RGB intensities as well as the coordinates of each pixel. This way, pixels that are physically close to each other or that have similar colours will be clustered together