Possibility of 1) re-training 2) transferring existing object classifier

Hi all

I have two questions regarding a trained object classifier that has been saved locally.

  1. When there’s more training annotations available, is it possible to load back the saved classifier and update it with the new training annotations? or can this only be done by training a new classifier with the bigger set of training annotations and saving it & replacing the old one?

  2. Is it possible to load the saved classifier in some other programme like Matlab, python or R to conduct classification in those platforms?

Any help would be appreciated!

Hi @king_bean,

You have to create a new classifier, but you can use the old training annotations.

The classifiers are just .json files, so they can potentially be read elsewhere. If you want to create the exact classifier outside QuPath, you would need to use OpenCV (which is where the classifiers are implemented) and read the classifier from the relevant fields of the .json.

I expect that anyone who wants to continue classification outside of QuPath will generally have a very specific kind of pipeline they want to apply – QuPath supports all this kind of import/export by scripting. There’s a blogpost describing one method here. You might not need all of that though (e.g. you could just export measurements/features for classification elsewhere, not the full GeoJSON including contours).

1 Like

Thank you Pete for your help!