Object Detection Classifier Question

Is it possible to create an object classifier in order to classify a cell subclass under another cell class which was classified before with another object classifier?

For example after making an object classifier in order to classify PanCK, CD3, CD68, Fibronectin, and DC-LAMP positive cells (nonoverlapping markers), is it possible to make another object classifier in order to detect the CD8 positive T cell subsets under CD3 cell class?
(I am not able to make basic threshold with a selected feature due to tissue artifacts)
(This is a 10 channel pseudofluorescence multiplex IHC image)

Kind of? There can only ever be one class assigned, though that can currently have derived classes. I would normally approach this from a slightly different direction, classifying all of my cells based on the individual channels, and then, assuming those classifications were the bases for my determinations of the combined classes, reassign the names.

So I make the 10 class classifier, and then rename “interesting” class combinations to “T-Cell” or other. That reminds me I really need to fix up the multiplex classifier so that the names are in alphabetical order so you don’t end up with multiple names for the same class.

See base classes and derived classes for the more QuPathy way to do things.

Though if you want to build your own decision tree classifier, you can do that using quite a few of the classifiers around and handle things that way. Then you can specify the class names to whatever you want, right off the bat.

To elaborate on the example in the link, you could setCellIntensityClassifications for some measurement of CD8ness, and then all CD3 : positive cells would be your CD8 Tcells.

I’m afraid not, but I’m working on it…

1 Like

My problem lies in your comment. When you have a mediocre (not great) staining for cd8 or many tissue staining artifacts, setting a treshold with single feature for positivity is usually not enough and it requires me to use object classifier by combining multiple features. That’s why I asked consecutive object classification.

Thanks Pete, it would be super useful for my projects

Ah well, if subcellular detections and cleanup doesn’t do it, I’m not sure what other options you might have. The only thing that comes to mind is classifying the cells for CD8 positivity first.
Create a new Measurement called “CD8”
Set that to 1 or 0 based on your first CD8 classifier
Run your second classifier for everything, and include the CD8 measurement OR
Run your second classifier, and use SetCellIntensityClassifications to toggle them to Positive or Negative based on the CD8 0 or 1 measurements.