The SVM classification framework

The aim of the new SVM classification framework is to provide a supervised pixel-wise classification chain based on learning from multiple images. It supports huge images through streaming and multi-threading.

Please note that this framework is still in development. We would be glad to receive feedbacks on these tools.

Building a training data set

The chain is supervised : one has to build a training set with positive examples of different objects of interest. This can be done with the Vectorization Monteverdi module, by building a VectorData containing polygons centered on occurrences of the different objects of interest. This operation will be reproduce on each images used as input of the training function.

Please note that the positive examples in the vector data should have a Class field with a label higher than 1 and coherent in each different images.

Training the classification tool

The classification chain will perform a SVM training step based on the intensities of each pixel as features. Please note that the images will have the same number of bands to be comparable.

Images statistics

In order to make these features comparable between all the input images, the first step consists in estimating the statistics of the group of input images. These statistics will be used to center and reduce the intensities (mean of 0, std dev of 1) of samples based on the vector data produced by the user. To do so, the otbComputeImagesStatistics tool can be used:

Validate the classification model

It is also possible to estimate the performance of the svm model with a new set of validation samples and another image with the following application.
It will compute the global confusion matrix and precision, recall and F-score of each class based on the ConfusionMatrixCalculator class.
It is done by otbValidateImagesClassifier:

You can set an input mask to restricted the classification to the mask area with value >0.

Fancy classification results

In order to get an RGB classification map instead of greylevel labels, one can use the otbColorMapping tool. This tool will replace each label with an 8-bits RGB color specified in a mapping file. The mapping file should look like this :

# Lines beginning with a # are ignored
1 255 0 0

In the previous example, 1 is the label and 255 0 0 is a RGB color (this one will be rendered as red). To use the mapping tool, enter the following :