dzetsaka : how to make your first classification in Qgis ?

I just published the plugin dzetsaka : classification tool (github/qgis) on Qgis plugin server. This is a very simple plugin to make a fast but powerful classification. I used it for making numerous classifications of SPOT 5 scenes in the French Guiana Amazon forest.

A project with samples (an old map (map.tif) and ROI (train.shp)) is available on the docs branch. You can download these files directly here.

How to make your shapefile ?

dzetsaka with data sample
dzetsaka with data sample

dzetsaka uses GMM (Gaussian Mixture Model, developped by Mathieu Fauvel) classifier, which is not developped to work with text. So you need to create a shapefile with a numeric column where you save your classification number for each polygon. Here’s a example :


Need a mask ?

Sometimes the use of a mask is unavoidable. There are two options, one for larger productions, the other for some tests.

Mask files are raster (best .tif) with the same extent as your main raster. Pixels to classify are value 1, others are 0.

1. Automatic find your mask

If your raster file is ‘spot6scene.tif‘ and you want the script to find automatically the mask, just name it ‘spot6scene_mask.tif‘. So if you have several files to classify, you can batch creation of mask by naming it the same way, and you won’t have to specify it each time for the classification, very useful !

2. Specify your mask

The second method is easy : just check the Mask tickbox, and you’ll have to specify your mask file. Nothing more to do.

Save and load model

Nothing easier… Imagine you have a scene where ROI are missing, or you don’t find theme for numerous reasons. For a first test, you can use a classification that was working for another image. To do that, just check the box Save model and load it later with another image. Maybe you will find the same spectral signature where you didn’t know it was supposed to be !

Hope you appreciate this plugin.