Combining Random Forest classifiers

Hi,

I was wondering if it is possible to combine two different classifiers created through random forest classification in snap?

The aim is to create one classifier that can be used on many different images and preferably that classifier is based on more than on image.

Can you please describe it a bit more? Iā€™m not sure if I understood it correctly.
What is the difference between classification one and two and why do you want to combine them?

I am trying to create a one RF classifier for glacial features that can be used on other images.

The problem with that is that there is no one image that contains all the features that I am interested in so I would like to create a classifier that is based on more than one image - is that a possibility through snap?

so you want to train the classifier based on image1 and then apply this classifier to image2, image3ā€¦?

This is possible in SNAP when the band names are identical for all rasters.

In the RF operator you are asked for a name for the classifier. You could call it RF_train. Then you execute the classification for image1 and see if the result is okay for you. If so, you sart the classifier again, this time with image2 as input. You can then select ā€œLoad and apply classifierā€ and select it from the dropdown menu.

@ABraun

Hi - I made a separate post yesterday, but this post probably describes what I want to do more appropriately. Similar to @salka , I want to create one RF classifier for inshore sea ice, but the various ice types I need to create training samples from are spread over 10+ different scenes; the individual scenes I am using do not have enough ā€˜sea iceā€™ pixels to use within the RF classifier, so I need to collect the samples from different scenes.

Essentially - can I combine all the different training samples from say, 10 scenes, into one? I hope I am making sense - if not I will try to add more context.

Thank you for any help you can offer, it is greatly appreciated.

1 Like

Is it an option to create a mosaic from these multiple images so you can train on one product?

I need to use the same geographic extent of scene (one particular fjord system approximately 30km x 30km) but the scene ranges from 2015 - 2019.

I want to use the same location as a training sample because the ice has a particular quality due to its location (lat and long) - however I want to create training samples from the ice that formed during the previous 4/5 years.

I see. Usually, I would recommend to make a stack and use it for training, but each date will get a different band name (e.g. Sigma 0_slv4) and that prevents them from being interpreted as the same input source, so this will not work. Maybe you can train the classifier based on one image and open the corresponding text file. If it consists of a clear structure of training areas/statistics, you could probably merge the trained classifiers outside SNAP before you apply them to an untrained image.

2 Likes

Thank you for your response - thatā€™s really helpful. I am a novice user - have you got any links to an instruction / tutorial on how to merge the classifiers outside of SNAP?

If I canā€™t use merge the classifiers, my intent is to create a stack of VV, VH, and various GLCM bands from 1 scene, I hope this will give me enough bands to conduct a reliable supervised classification.

Thanks again for your help with this

I have not seen anything about this, sorry.

I just checked how a classifier is saved: newClassifier.class (1009.5 KB) Unfortunately, it is not an editable text file.

1 Like

Thanks for taking the time to check for me, much appreciated.

Hi again!

Thank you for your reply.

No, my goal is to create a classifier based on two different satellite images. Is that possible through SNAP?

To explain further, creating class polygons on two (or more) images which are then used to create one classifier that can be used on other images. By doing this I would be able to include more information into one classifier.

the random forest classifier can take more than one input image. Do these rasters contain the same information (S2+S2+S2) or are they of complementary nature (S1+S2)?

In my instance, I plan on only using S2 images.

and you want to digitize training areas on different S2 dates for the same class?

I canā€™t think of a way how this could technically work in SNAPā€¦

Alright.
Thank you for your answers.