Classifier of superpixels / supervoxels
Classifier of superpixels/supervoxels is a good method for automatic segmentation of images usingtrainandpredictscheme.
This classifier uses theSLIC (Simple Linear Iterative Clustering) algorithmwritten by Radhakrishna Achanta, Appu Shaji, Kevin Smith, Aurelien Lucchi, Pascal Fua, and Sabine Süsstrunk, Ecole Polytechnique Federale de Lausanne (EPFL), Switzerland to simplify the dataset by clustering of pixels into groups: superpixels for 2D or supervoxels for 3D. Each of these superpixels/voxels is characterized and these characteristics are used for the classification.
The example of use is presented below.
Back toIndex-->User Guide-->Menu-->Tools
Contents
Dataset and the aim of the segmentation
Below is a dataset imaged with light microscopy where the aim is to segment the outlines of the cells (in green). The cells have different intensity and can't be directly segemented using the black-and-white thresholding.
Training the classifier
The first part of the classification is to select areas that belong to the object of interest and background.
- Start a new model:Segmentation Panel->the Create button
- Add two materials for the model:分割面板- > +按钮
- Rename material 1 toObjectand material 2 toBackground. Highlight material in the left list box, press the right mouse button and selectRenamein the popup menu
- Select the Brush tool and select some profiles of the endoplasmic reticulum and assign them to theObjectmaterial of the model (select '1' in the 'Add to' list and press the 'A' shortcut)
- Select few areas of the background and add those to theBackgroundmaterial of the model (select '2' in the 'Add to' list and press the 'A' shortcut)
- Start the Classifier:Menu->Tools->Classifier->Superpixel classification
- 指定一个导演ry to keep temporary data. By default, MIB offers to useRF_Templocated next to the data.
- Select the mode to use:2Dfor 2D images and superpixels or 3D for 3D datasets and supervoxels
- Select the type of superpixels to calculate:SLICfor objects with distinct intensity vs background orWatershedfor objects that have distinct boundaries
- Select the color channel that should be used to generate superpixels/voxels:Color channel
- Define size for superpixels/voxels and their compactness:SizeandCompactness. For theWatershedsuperpixels theSizefield defines a factor that regulates size of superpixels (larger number gives bigger superpixels) and theBlack on whitefield. When the boundaries of objects are bright over dark background, theBlack on whiteshould be 0; otherwise any number bigger than 0.
- If needed the area for processing can be modified using the Subarea panel.
- Press theCalculate superpixelsbutton to generate SLIC superpixels
- Press thePreview superpixelsbutton to see the generated superpixels
- If size and quality of superpixels is acceptable press theCalculate featuresbutton to calculate features for the superpixels.
- Press theTrain & Predict buttonto access settings for the classification
In this window it is possible either load classifier from the training session done earlier (the Load classifier button), or train a new one if labels exist.
- SelectObjectin theObjectpopup menu
- SelectBackgroundin theBackgroundpopup menu
- Choose type of the classifier to use in theClassifierpopup menu
- Press theTrain classifierto start the training session
- Press thePredict datasetto start the prediction session
- Check results in theImage View panel. If needed add more markers for the Object and Background and repeat Training and Prediction.
Wiping the temp directory
During the prediction the classifier creates files in theRF_Tempdirectory. This directory can be deleted by pressing theWipe Temp dirbutton or manually using any file explorer.
Back toIndex-->User Guide-->Menu-->Tools