NoCodeSeg icon indicating copy to clipboard operation
NoCodeSeg copied to clipboard

Multi-class tile import?

Open andreped opened this issue 3 years ago • 4 comments

The current tileImport script does not support multiclass tiles, that is produced prediction tiles generated from MIB by a trained multi-class model.

It is possible to import predictions from MIB to QuPath by predicting on the full WSI in MIB which produces a stitched prediction image, which can be imported in QuPath using the importStitchedTIFfromMIBscript, similarly as done for FastPathology. And therefore, for the full pipeline a tile importer is not critical for using our pipeline.

However, there are scenarios where having a tile importer is beneficial over the other alternative, for instance if one only wishes to run prediction on a smaller region of the WSI (based on segmentations in QuPath) - which can be especially helpful if the image is extremely large. This can make inference a lot faster.

It is possible to do such a workflow in FastPathology, given that you provide the region of interest to run inference on. However, no such method has been made easily accessible. It would also require annotations or a model that can produce these ROI segmentation to use as a preprocessing step for the next patch-wise model.

Therefore, having multi-class support for the tile importer could be a valuable feature.

andreped avatar Jan 26 '22 14:01 andreped

I've just created a tutorial on how to do multiclass import on the WSI-level here: https://github.com/andreped/NoCodeSeg/issues/10

In some rare cases one would ideally also like to be able to import multiclass predictions from DeepMIB from exported patches from QuPath, but the current WSI-prediction approach will suffice in most cases I think.

SahPet avatar May 04 '22 19:05 SahPet

@SahPet Do you have a working groovy script that we could use as a drop-in replacement for the current script: https://github.com/andreped/NoCodeSeg/blob/main/source/importTiles.groovy

Alternatively, we could offer it as an alternative method (for the multi-class case).

andreped avatar Sep 09 '24 07:09 andreped

Import of downsampled full WSI tifs is working well with multiclass, but I've struggled with adapting the tile script to multiclass (I think I managed once, but I can't find the version of the script). For now, I recommend using the multiclass import for full downsampled versions of the WSI: https://github.com/andreped/NoCodeSeg/blob/main/source/importStitchedTIFfromMIB.groovy

SahPet avatar Sep 09 '24 07:09 SahPet

For now, I recommend using the multiclass import for full downsampled versions of the WSI:

@SahPet That you for the info!

OK, but that means that we still do not have a working multi-class tile import script, right? If you manage to create on down the line, feel free to mention it here, and I can add it for you. I will keep this issue open till then.

andreped avatar Sep 09 '24 07:09 andreped