QuPath 'Legacy' Classifier - different behavior between 0.1.2 and 0.2.2?

Since this question refers to the legacy classifier, I’m prepared to hear that it’s an unsolvable problem, so this is more out of curiosity than anything else… I am seeing very different classification results when taking the same image on QuPath 0.1.2 and 0.2.2 and using a classifier build with 0.1.x.

The workflows are essentially the same (via UI or script):

  • load image
  • set stains
  • select whole image
  • watershed cell detection
  • load and apply classifier

The cell detection does not appear to be the problem - in both cases, it finds ~19,100 cells +/- 40 cells. It is performed with the same requestedPixelSize (0) and the same # of tiles are generated.

But the 0.1.x classifier sees them as 14,200 tumor cells and 2,700 immune cells.
The 0.2.x classifier sees them as 5,800 tumor cells and 11,600 immune cells.

This of course leads to different clusters and measurements.

I know moving forward I will move to the new classifier system but had been hoping to validate data coming out of 0.1.x… am I forgetting a step in installing this classifier? Or is this expected behavior?


From your description, I understand that the classifier was the same in both cases – I guess trained in v0.1.2?

If so, then a potential explanation is that, although the cell detection may give similar numbers of cells, it may not give identical features; one difference that I remember off hand is that v0.2.0 uses the background value set along with stains, whereas v0.1.2 does not. Any different/missing features can impact the classifier a lot.

There is also this OpenCV issue but I wouldn’t expect that it alone would have a huge impact.

So it might be worth checking what the results are in 0.2.0 if the background is set to 255 255 255?
*prior to cell detection

Yes, that’s correct, it was trained in 0.1.2… was just loading it into the new project.

Oh, that is worth a try - will look into this first and then look at the OpenCV issue that @petebankhead mentioned.

1 Like

I recall there where many other revisions to the cell detection code. At once point I gave up trying to make the results the same, since QuPath v0.2.0 was just diverging too much from v0.1.2 – and the only real solution was to say classifiers shouldn’t be moved between versions.