Вы находитесь на странице: 1из 10

EnMAP-Box

Application Tutorial: imageSVM Classification

Date
16.03.2015

Authors: Matthias Held, Sebastian van der Linden, Benjamin Jakimow, Andreas
Rabe and Patrick Hostert

Abstract: Application and performance evaluation of imageSVM classification.

Copyright
Humboldt-Universitt zu Berlin, Geomatics Lab, 2015, www.hu-geomatics.de

Citation
Please cite this tutorial as: Held, M., van der Linden, S., Jakimow, B., Rabe, A.,
Hostert, P. (2015). EnMAP-Box Application Tutorial: imageSVM Classification,
Humboldt-Universitt zu Berlin, Germany.

Disclaimer
The authors of this tutorial accept no responsibility for errors or omissions in this
work and shall not be liable for any damage caused by these errors or omissions.

Contents
1

Introduction ......................................................................................... 4

Data Preparation .................................................................................. 4

Parameterization with Default Values ...................................................... 7

Parameterization with Advanced Values ................................................... 8

Fast Accuracy Assessment ..................................................................... 9

Introduction

In this tutorial you will be made familiar with the basic workflow of an example
classification using imageSVM.
You will create your own reference data by adding spectra to an existing spectral
library. With it you are going to train the model and perform an accuracy
assessment.

Data Preparation

Select File > Open > hub API Test Images

Select File > Open > hub API Test SpecLibs

Drag-and-drop ClassificationSpeclib onto the view manager and click


visualize in Spectral View.
Now you will load the corresponding labels into the spectral view.
Click into the already open spectral view and then right-click to open the
context menu. Then click Show Labeling Tool which opens the labelling tool
where you can create spectra of interest (SOIs).
The ClassificationLabels corresponds to already existing SOIs. To load it into
the spectral view, in the labelling tool click File > Import SOIs from label
image and choose the Classification Labels.
Your spectral library should now look more colourful. For a better view, click
into the spectral view and then on the detach button
Now you can enlarge the window (close to re-attach).

in the upper menu.

You will now collect new spectra for the classes built-up and impervious,
open the HyMAP_Berlin-A_Image in a new Image View.
In the Image View, open the context menu (right-click) > Link Image
Profile to Spectral View. Now the pixel profile is shown in the spectral view.
With Shift+LeftClick you can collect pixel profiles for the linked spectral
library.
So now collect 10 spectra for the class built-up, which means roofs of
houses in Berlin.
In the Profile List on the right side of the Spectral View, 10 new spectra
should appear on the bottom of the list, with the pixel positions in the profile
names.

In order to add these 10 spectra to the SOI named built-up, select them in
the profile list (with CTRL or Shift).
Now select the SOI built-up in the labelling tool by clicking on the respective
ID on the left side. The marked SOI will receive a star *.

In the spectral view, right-click on the selected profiles, then choose


> Manage Selection > Add to current SOI

Your SOI built-up should now contain 60 spectra.

Repeat this procedure for the class impervious, where you should search
for streets in the image.

You will now prepare your spectral library with the corresponding labels to use it
in a classifier. Therefore, you have to save the SOIs (labels) and the spectral
library which now contains 270 spectra (initial 250 + your 20 spectra).
For saving the SOIs, click on File > Export SOIs to Classification Image

The Class ID Attribute is the column called classID


The Class Names Attribute is the column called className

For saving the spectral library, open the context menu in the spectral
view, then > Export Profiles to ENVI Speclib.
Now in the Filelist, the new speclib and the labels classification should
appear.

Parameterization with Default Values

Select Applications > Classification > imageSVM Classification >


Parameterize SV Classifier (SVC).

The Input Image is the speclib and the Reference Areas your
classification.

Define an Output path for


svcModel_Def.svc and Accept.

In your HTML browser a report will open with the chosen Model
Parameters and values for their averaged F1 measures with a

the

created

SVC

File,

name

it

Performance Surface. Click no in the opening dialog asking you if you


want to apply the model to an image.

The plot has a legend on the upper right indicating the values of lowest and
highest F1 accuracy. You will notice in the plot that lower values of g and
higher values of C lead to higher accuracy values. Therefore we will run the
parameterization again and change the grid search settings. Leave your
browser open for later comparison.

Parameterization with Advanced Values

Select Applications > Classification > imageSVM Classification >


Parameterize SV Classifier (SVC).

The Input Image and Reference Areas stay the same.

Click Advanced to expand the dialog for user defined changes.

The default range of g parameter is 0.01 1000 with a multiplier of 10.

The default range of C starts at 0.1.

Now change the max(g) to 10, and decrease the multiplier to 2.

And change the min(C) to 1, and decrease the multiplier to 2.

Define an Output path for the new SVC File, name it svcModel_Adv and
Accept.

Again click no in the opening dialog and have a look at the Model
Parameters and Performance Surface with its minimum and maximum value.

Now you probably have a higher maximum accuracy than before.

Fast Accuracy Assessment

Select Applications > Classification > imageSVM Classification > Fast


Accuracy Assessment.

Start with the SVC Model that was created last, svcModel_Adv.svc.

Choose the Image HyMAP_Berlin-A_Image and the Reference Areas


HyMAP_Berlin-A_Classification-Validation-Sample, then Accept.

Do these steps again for the first model svcModel_Def.svc and compare
the two results in your browser.

In the browser the following information are displayed.

Quick Overview: Overall accuracy measures and class-wise measures


including the 95% confidence interval.

Error Matrix: Containing the number of correctly classified pixels in the


diagonal (here marked in green), omitted pixels in the column of each class,
falsely included pixels in the row of each class.

Estimated Map Areas

Performance Measures for each class


Error of Omission [%]: The share of reference pixels in that class that have
been omitted in the classification image (pixels in the column except from
the diagonal). Equals 100 minus Producer Accuracy.
Error of Commission [%]: Percentage of class pixels in the classification
image which are falsely classified. Equals 100 minus User Accuracy.
User Accuracy [%]: 100 minus Error of Commission.
Producer Accuracy [%]: 100 minus Error of Omission.
F1 Measure [%]: Weighted harmonic mean of User Accuracy (UA) and
Producer Accuracy (PA). F1 Measure of class i is given by:
F1i = 2.UAi.PAi/(UA+PA).
Avg. F1 Accuracy: Arithmetic mean of class-wise F1 measures.
Overall Accuracy [%]: Percentage of correctly classified pixels.
Kappa Accuracy: Kappa value

10

Вам также может понравиться