Saving train pixel classifier for surface measurements

Hi all,

I am working with the train pixel classifier to measure the surface of the tissue within an annotation.

My question is, if there is a possible way to save the pixel classifier for other projects. Cause, for example, we have a H-DAB IBA-1 staining for different aims. So it would be very helpful if there is a possible way to save these classifiers! Maybe it can by a script or something?

Thank you and best,
Kimberly

Hi @K.massy,

At the bottom of the Train pixel classifier window there should be a small textfield for you to input a classifier name. You can then press Save, which will save the classifier as a .json file in the pixel classifiers subdirectory within your project.

You can copy paste the output file within a similar pixel classifiers directory in your other projects. Then, after opening the other projects in QuPath, press Classify > Load pixel classifier and it will be applied to your image again.

EDIT: this is provided that you have a recent enough version of QuPath (> 0.2.0)

3 Likes

Thanks @melvingelbard!

You also need the folderpixel_classifiers!

So what I did:
Open the folder where the QuPath data is stored. You also will find the folder classifiers.
In this map, you need to make a new folder called pixel_classifers. Now you need to copy the .json file in this folder.

Now, by opening an other projects in QuPath, this classifier works!

1 Like