How to use a classifier in QuPath

Hi all,

I think I missed something in using properly classifiers in QuPath.
I have images in brightfield with two stainings. I draw a ROI, I detected cells, and I draw labelled annotations around cells (stain1, stain2 and unstained classes). Then, I used the “create a detection classifier” tool. I chose the features and after a few trials, I was quite happy with the classification of all cells (auto update) of my ROI. So I saved the classifier.

Then, in order to use it on another ROI (close to the first one, with same types of cells and stainings), I loaded the detection classifier. But every cells were labelled as stain1.

Did I missed something in saving the classifier or in applying it ?
(I’m using milestone 8)

Thanks by advance

Nico

Hi @Nico,

Did you load the detection classifier, select the desired ROI and clicked on Run classifier?
Normally this should apply the same type of classification as what you had when you previously trained the classifier (and applied to the first ROI).

Just out of curiosity, if you re-apply your loaded classifier to the first ROI (for instance delete then recreate the first ROI to get rid of the cells and their classification), would it give you the same classification as during the training?

I have seen similar behavior when a measurement is missing. Is there any chance you applied extra features to your cells in the first set that were missing in the second set? Or somehow performed a different type of cell detection?

In the upper right I removed most of the measurements before applying the classifier, so everything ended up as my first class.

Thanks a lot !
That was it. I forgot I used extra-measurements in the classifier and so I forgot to compute them…

Nico

1 Like

Been there, done that :slight_smile:

btw @petebankhead, maybe a warning could be added to say “hey you used special features in your classifier and you forgot to compute them” :slight_smile:

@VirtualSlide added a feature request for this now :slight_smile:

1 Like