7

I am working with a random forest classifier in eCognition (new with eCognition 9.0). The image shows 8 NAIP tiles I am attempting to classify using approximately 100 training points. The training data (blue points) are very simple and are comprised of a shapefile indicating the location and class of vegetation. I am classifying the images on a tile by tile basis, so I am looking for a way to utilize all of the training data rather than only the points that lie within the extent of an individual tile.

What methods are available to utilize the full range of training data on a tile by tile basis? I have considered extracting the pixel values for each point and exporting that as a table, although I have not found a way to use tabular data to train the random forest classifier in eCognition.

enter image description here

2
  • 1
    Please, could you clarify some points I don't get it?: 1. the output of the classifier would a label for each tile? 2. Those labels would be predefined classes of vegetation? 3. Do the class of vegetation in a tile depend on the vegetation of other tiles? That seems counterintuitive.
    – Lucas
    Oct 30, 2014 at 18:01
  • @Lucas Each tile would be segmented into image objects based on spectral characteristics of the NAIP tile. These segmented image objects are then classified to vegetation type based on the training data. So far, eCognition only allows me to utilize the training data within the extent of a single tile, which may be only 3 points. The question is, how can I utilize all of the information from training data that may include data outside of a particular tile? This would in effect increase the predictive power of the classifier.
    – Aaron
    Oct 30, 2014 at 18:20

3 Answers 3

4
+250

Why keep the entire analysis in eCognition? Once you have your image objects derived, export them and run the model in R. You have far more control of the model in R (e.g., model specification, multi-colinearty test, model selection, etc...) and there is no problem fitting a model to all of the data and predicting it to subsets represented by the tiles.

I would create a workflow where:

1) image objects are created and summarized in eCognition.

2) export results as image object polygons or rasters representing spectral/textural statistics of image objects.

3) read point training data and image objects, as polygon SpatialPolygonsDataFrame or raster stack object, into R.

4) assign image object statistics to training points. Due to the size of the problem, steps 3 & 4 may need to be done iteratively to construct data utilized in final model.

5) fit random forests model, applying multi-colinearity test and model selection.

6) predict global RF model to each tile of data.

1
  • I have tried this approach and it works in addition to allowing for more flexibility in the analysis. However, the processing time is astronomical compared to similar runs in eCognition. +250 Thanks for the answer--this is the best of the work-arounds.
    – Aaron
    Nov 7, 2014 at 18:31
2

This is not the exact answer but could be used as a workaround.

I guess that you are not using the 8 tiles together for memory reason, but your area seems to be quite homogeneous. So you could degrade the resolution of your images (e.g. with a factor 2 or 3) and create a mosaic. Then you train your classifier on the mosaic image and you "save to file" the scene variable containing your model parameters. This file can be uploaded as a scene variable in another project, and you can use it to apply the classifier with each tile.

2

There is a sample ruleset on the eCognition Community Ruleset Exchange that shows a work-around. Note that you may need to register to access the ruleset exchange link. The rule-set description states the following:

This zip archive contains example data to train and apply the classifier algorithm on multiple scenes. At the moment you can do this with a single project which contains the scenes as separate maps. This is a workaround if you want to train a classifier not over unlimited number of scenes. eCognition will cover the use case, to train a classifier automatic over a unlimited number of projects, hopefully in one of the next versions.

You can use the same approach also for SVM, Bayes and kNN.

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.