Further training a cell classifier on a new image

Hi,
I apologise if this is a silly question, I am new to QuPath!
The version of QuPath I’m using is (0.2.0-m8).

I’m working on a project which requires me to train a cell classifier to distinguish tumour cells. I trained this classifier on one slide image, and what I wanted to do was to take this classifier and apply and train it on a new slide image.
However, when I apply the classifier to annotations on the new slide image, I find myself unable to open the classifier onto its ‘build and update’ page in order to further train it using annotations on the new image.
Is this something that QuPath is unable to do?
Thanks!

1 Like

Yes, but it doesn’t mean all hope is lost.

Once a classifer is saved, it can’t be retrained or updated. However, you can add new training data to it by adding new annotations/detections across a bunch of images in your project and then open the “Create Detection Classifier” window and click the the “More” button and then select 'Rebuild training from project". This will take into account any annotations it can find in the images in the project and train the classifier using all that information.

2 Likes

And if you are in M8, you can build a training image across your project if you want to run all of your training from a single image.

Classify->Create project training image

To run this, you will need some kind of annotation with a consistent classification. QuPath will then create a combined image from the portions of the image within each annotation of that class across the project.


More information there on “Create training image”

What I have been doing is making use of “Save training objects” and “Load training objects” from:

After going through each image, I save the training objects and the classifier before moving to the next image.

Usually, when you close the current image, it will ask you if you want to retain training objects; if you do so, you don’t have to load the training objects for the next image.

Loading training objects is useful if you want to update your training in the future. When you want to do so, create a new detection classifier and load your training objects, and continue adding training objects!

I might be using this function wrongly (please let me know) but this is how I’ve been doing it and it kinda works so far.

2 Likes