Saving/loading training objects for cell classifier in QuPath M11

Hello,

With the new milestone 11, I noticed that the old “Create detection classifier” is now listed as “deprecated”.

As such, I tried using the new “Train object classifier”. While on the surface it works similar to the old classifier, I could not find any option to save the training objects and load it into another image to add and build to the training objects, which is particularly useful for images in a project that have inconsistent staining between slides.

Is this function no longer possible?

PS. I tried using the old “Create detection classifier” to use the save/load training objects but encountered an error when starting the training with annotations:

ERROR: QuPath exception
    at qupath.process.gui.ml.legacy.ConfusionMatrix.toString(ConfusionMatrix.java:80)
    at qupath.process.gui.ml.legacy.ClassifierBuilderPane.completeClassification(ClassifierBuilderPane.java:1477)
    at qupath.process.gui.ml.legacy.ClassifierBuilderPane.lambda$completeClassification$24(ClassifierBuilderPane.java:1428)
    at com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:428)
    at java.base/java.security.AccessController.doPrivileged(Unknown Source)
    at com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:427)
    at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
    at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
    at com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:174)
    at java.base/java.lang.Thread.run(Unknown Source)

This morning I wrote a little bit about what ‘deprecated’ means in this context at https://qupath.readthedocs.io/en/latest/docs/reference/faqs.html#why-are-some-commands-marked-as-deprecated

I also created an enhancement request regarding training the classifiers from multiple images here.

I completely agree this is necessary; the fact it doesn’t yet exist is a big part of the reason why the ‘old’ classifier approach remains for now. They have only deprecated and not removed because I understand they may still be required for some/many applications - however the old classifiers will not be further developed and enhanced.

The new classifiers will continue to be improved.

Thanks for reporting this, definitely a bug. I think this commit should fix it.

2 Likes

Thanks Pete, I can confirm that the commit did fix the error.

3 Likes