SLIC Superpixels

Abstract

Superpixels are becoming increasingly popular for use in computer vision applications. However, there are few algorithms that output a desired number of regular, compact superpixels with a low computational overhead. We introduce a novel algorithm called SLIC (Simple Linear Iterative Clustering) that clusters pixels in the combined five-dimensional color and image plane space to efficiently generate compact, nearly uniform superpixels. The simplicity of our approach makes it extremely easy to use – a lone parameter specifies the number of superpixels – and the efficiency of the algorithm makes it very practical. Experiments show that our approach produces superpixels at a lower computational cost while achieving a segmentation quality equal to or greater than four state-of-the-art methods, as measured by boundary recall and under-segmentation error. We also demonstrate the benefits of our superpixel approach in contrast to existing methods for two tasks in which superpixels have already been shown to increase performance over pixel-based methods.

This page provides C++ source code for SLIC superpixels and supervoxels.

This page also provides C++ code for SLICO, the zero parameter version of the SLIC algorithm.

Reference

Radhakrishna Achanta, Appu Shaji, Kevin Smith, Aurelien Lucchi, Pascal Fua, and Sabine Süsstrunk, SLIC Superpixels Compared to State-of-the-art Superpixel Methods, IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 34, num. 11, p. 2274 – 2282, May 2012.

Radhakrishna Achanta, Appu Shaji, Kevin Smith, Aurelien Lucchi, Pascal Fua, and Sabine Süsstrunk, SLIC Superpixels, EPFL Technical Report no. 149300, June 2010.

Download Windows executable (GUI)

Windows GUI based executable

Download Windows executable (Command line)

Windows command line based executable

<!–

Download 32 bits Linux executable

Linux executable (32 bits)

Download 64 bits Linux executable

Linux executable (64 bits)

–>

The C++ source code and executable for SLIC superpixels and supervoxels available here:

MS Visual Studio 2008 workspace

MATLAB code for SLIC and SLICO superpixels, and SLIC supervoxels

Mex file and MATLAB demo script

Links to other SLIC implementations

The following are links to other implementations of SLIC, not developed at EPFL.

VLFeat SLIC implementation

A fast GPU implementation (gSLICr)

Please note: for questions related to these implementations please contact the authors/owners directly.

Sample segmentation output

[Click on the images to see bigger versions.]

Visual Comparison with other algorithms

[GS04] Graph-based segmentation [NC05] Normalized cuts [TP09] Turbopixels [QS09] QuickShift SLIC

Other superpixel methods

[GS04] Felzenszwalb, P., Huttenlocher, D.: Efficient graph-based image segmentation. IJCV (2004).
[NC05] G. Mori, Guiding Model Search Using Segmentation. ICCV (2005).
[TP09] Levinshtein, A., Stere, A., Kutulakos, K., Fleet, D., Dickinson, S., Siddiqi, K.:Turbopixels: Fast superpixels using geometric flows. PAMI (2009)
[QS09] Vedaldi, A., Soatto, S.: Quick shift and kernel methods for mode seeking. ECCV (2008)

Work that uses SLIC superpixels

A. Lucchi, K. Smith, R. Achanta, V. Lepetit and P. Fua, A Fully Automated Approach to Segmentation of Irregularly Shaped Cellular Structures in EM Images, International Conference on Medical Image Computing and Computer Assisted Intervention (MICCAI), Beijing, China, 2010.

SLICO, zero parameter version of SLIC

How is SLICO different from SLIC?

SLIC uses the same compactnes parameter (chosen by user) for all superpixels in the image. If the image is smooth in certain regions but highly textured in others, SLIC produces smooth regular-sized superpixels in the smooth regions and highly irregular superpixels in the textured regions. So, it become tricky choosing the right parameter for each image.

SLICO does away with this problem completely. The user no longer has to set the compactness parameter or try different values of it. SLICO adaptively chooses the compactness parameter for each superpixel differently. This generates regular shaped superpixels in both textured and non textured regions alike. The improvement comes with hardly any compromise on the computational efficiency – SLICO continues to be as fast as SLIC.

In the figure below, the top row of images shows SLIC output with a constant compactness factor for all superpixels, while the bottom row of images shows the ouput of SLICO, which chooses the compactness factor adaptively for each superpixel.

The principle of SLICO is explained in the paper SLIC Superpixels Compared to State-of-the-art Superpixel Methods in section IV.E where Adaptive-SLIC (or ASLIC) is explained. While ASLIC chooses both the compactness factor as well as the superpixel step size adaptively, SLICO chooses only the compactness factor adaptively, keeping the step size constant (as chosen by the user).

Download SLICO (Win32 GUI based executable only)

Download SLICO source code (C++)

DISCLAIMER: Please use the software provided on this page at your own risk. The executable is provided only for the purpose of evalualtion of the algorithm presented in the paper “SLIC Superpixels Compared to State-of-the-art Superpixel Methods” (TPAMI 2012). Neither the authors of the paper nor EPFL can be held responsible for any damages resulting from use of this software.