TissueImageAnalytics / tiatoolbox

Computational Pathology Toolbox developed by TIA Centre, University of Warwick.
https://warwick.ac.uk/tia
Other
340 stars 71 forks source link

Nucleus instance segmentation model output labels #750

Closed deeplearningmaniac closed 7 months ago

deeplearningmaniac commented 7 months ago

Description

The nucleus instance segmentation models "hovernet_fast-pannuke", "hovernet_fast-monusac", etc produce type indexes 1, 2, 3, ..., for the nuclei they segment, but I've scoured the documentation and don't see any information on what types of cells these values correspond to. I've checked the dataset documentations and can see what the cell types are, but not which indexes map to which cell types. Is this documented anywhere?

adamshephard commented 7 months ago

Hi @deeplearningmaniac,

Thanks for raising this issue. We will aim to add further information on this to the readthedocs page.

For now, the labels are consistent with that used in the original HoVer-Net pipeline notebook, where 0 is background: https://github.com/vqdang/hover_net/blob/master/examples/usage.ipynb

Best wishes, Adam

shaneahmed commented 7 months ago

For PanNuke trained model, the labels correspond to the classes listed in https://tia-toolbox.readthedocs.io/en/latest/_notebooks/jnb/08-nucleus-instance-segmentation.html#instance-segmentation-visualisation. @adamshephard Please can you add the labels for remaining models?

adamshephard commented 7 months ago

We have addressed this in the following PR: https://github.com/TissueImageAnalytics/tiatoolbox/pull/751

deeplearningmaniac commented 7 months ago

Hi @deeplearningmaniac,

Thanks for raising this issue. We will aim to add further information on this to the readthedocs page.

For now, the labels are consistent with that used in the original HoVer-Net pipeline notebook, where 0 is background: https://github.com/vqdang/hover_net/blob/master/examples/usage.ipynb

Best wishes, Adam

I'd just like to double check this -- in the nucleus instance segmentation notebook, the color map used is

color_dict = {
    0: ("neoplastic epithelial", (255, 0, 0)),
    1: ("Inflammatory", (255, 255, 0)),
    2: ("Connective", (0, 255, 0)),
    3: ("Dead", (0, 0, 0)),
    4: ("non-neoplastic epithelial", (0, 0, 255)),
}

where 0 is "neoplastic epithelial" instead of "background". Is there a reason for this discrepancy? Should 0 be "background" or "neoplastic epithelial" (in the case of PanNuke)?

Thanks for the very quick replies!