I'm busy trying to create a widely applicable reedbed vegetation classifier that could potentially classify any given area within Europe. I already have training data for an area around the Balaton lake in Hungary and the classification is very accurate >99%.

The problem is that the random forest classifier uses a lot of data and time while training. I know that within python there is a way to store a classifier using a "pickling" method, so if you would choose a different area you would not have to retrain your classifier every time. I was wondering if there is any way to do this in JavaScript within the Google Earth Engine?

  • 1
    I'd love to know if you managed to resolve this. There's a pickle.js implementation apparently link. I'm in a similar situation... Feb 28 '19 at 17:48
  • In the end I did not use Pickle, just retrained the classifier each time. But thank you for pointing me on the pickle.js! I will try if this works soon.
    – Jim Groot
    Apr 10 '19 at 12:25

You can apply the same classifier to a different set of images as long as the have the same bands as your original location. You still need to collect samples to test the model.


Try this using ee.Serializer(), you can serialize an earth engine object, also true for ee.Classifier().

var classifier_serialized = ee.Serializer.toJSON(classifier)

// Load using this
var json = ee.String(ee.Feature(ee.FeatureCollection(assetName).first()).get('classifier'))
var classifier = ee.Deserializer.fromJSON(json)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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