Supervised Classification
Supervised classification is probably the most commonly used machine learning technique. The 'supervised classification' algorithm offers supervised classification in eCognition and there are many 'supervised classification' parameters available to support several use cases: eCognition users can perform object- or a pixel-based training & classification, furthermore the users can load training samples from vector or statistics layers, and last but not least several classification methods (Decision Tree/CART, Random Trees/Random Forest, Bayes, KNN or SVM) be at user’s command.
Some parameter combination supports feature space optimization or to convert a trained model into ruleset code.
To get not lost in all the possibilities, Christian Weise generated (in 2012) the 'Example Project - supervised classification' to demonstrate typical supervised classification scenarios in eCognition.
Download 'Example Project - Supervised Classification'
Interesting related content:
- Tutorial: Tutorial - Sample Statistics and Accuracy Assessment Tool
- From the Ground Up: From the Ground Up - Supervised Classification
Was this article helpful?
14 comments
Your Answer
Articles in this section
- 3D Powerline Vegetation Risk Analysis
- Python Hexagon Segmentation
- eCognition Oil Palm Application (1.3) Architect Solution
- Architect Solution - Power Line Risk Area Extraction
- Pixel-Based Object Resizing Surface Tension Artificial
- Pixel-Based Object Resizing Object Generalization Complex Landcover
- Building Generalization
- Customized Image Object Fusion
- Hexagon Segmentation
- Clearance Mapping around Powerlines
In the example project there are one image and 2 shapefiles. Where is the eCognition project (dpr)?
Please try to download again. In the zip file you will find the input data (image + shapefile) as well as the Project.dpr.
Thank you very much!
I am new to ecognition and want to classify images using random forest or SVM. from the tutorial in the link above, the rulesets are already developing without explanation.
Please can anyone help me with the steps and explanation (training and applying the classification model) especially the configuration?
Hi
so I try to roughly explain the SVM object based (I don't know the "Random Forest" yet):
To apply the SVM you need a shapefile that indicates the class you want to determine for each point. The more points there are, the more your classes will be defined.
After creating the objects with the segmentation algorithm, you can create the classes with the "assign class by thematic layer" algorithm where you will have to indicate the name of your shapefile.
Then you can apply the "supervised classification" algorithm that you have to execute twice: the first time setting "Operation = train" and the second time "Operation = Apply".
In both times you will have to set the name of a "scene variable" in the "configuration" box. You have to create this variable in Process -> Manage variables -> Add. It must be a text variable and you have to assign it a name. This variable is used to store the information that eCognition processes during the train phase.
I hope I have helped you. I have left out many aspects that you can try for yourself to know.
regards
mattia
Hi,
Regarding the sample creation, you actually have 3 options!
When training the model it is saved in the variable that you have to define which Mattia explained. You simply can change the Classifier in the training and save the model in the same variable (it will overwrite) or create a new variable for a different Classifier. This is actually very nice, because you only need to change the classifier, train the model and then apply it and you instantly see the differences of the different Classifiers.
Dear Matthias,
do you know some tutorials regarding the sample statistics?
Thank you in advance.
Many thanks, Mattia and Matthias
please, how are the best parameters for SVM or Random Forest classifiers identified for a dataset?
In python, for instance, a grid or random search is usually used.
Please can anyone advice on how to identify optimal parameter for supervised classification (SVM or Random Forest)?
"Best" parameter are hard to find: https://towardsdatascience.com/6-must-know-parameters-for-machine-learning-algorithms-ed52964bd7a9
Please note, I updated the example project for eCognition 10.1, pls check the new version with 20 scenarios using supervised classification in eCognition.
Thank you Christian
I'll check it in the next days.
Have a nice day!
Mattia
Hello, Can anyone share the best way to generalize training data, such that samples selected on one image can be used to classify other images/scenes? Thank you!
Hi Briana,
For classifying other scenes / images with sample data collected or available for another one can be done in eCognition using "Sample Statistics". This is simply a table holding all the statistical information of your samples that can be created / exported and then loaded and applied on another project / scene. This allows you to also classify images / scenes using supervised classification without having overlapping samples, you are simply using the sample statistics created in another area. Please have a look at this tutorial for sample statistics here in the knowledge base (Tutorial - Sample Statistics and Accuracy Assessment Tool). We are currently working on a new tutorial looking into this issue which will be released beginning of next year.
Cheers,
Matthias