Easily correct by hand pre-existing segmentation

Dear all,

apologies in advance for the noob question, I am new to the field and a bit overwhelmed by the amount of tools available.

My goal: I would like to manually correct several segmentations made with Stardist (directly in Python for sake of automation). What I have are tiff files where pixels have value 0 if they belong to the background, 1 to n if they belong to cluster/cell/nucleus 1 to n

My problem: all the software I found so far allow to create a segmentation by hand from scratch with more or less practical tools (so far what I like the most is QuPath and its brush) but I got nothing that allows me to open the base image, load the Stardist segmentation on top and work on that, ideally with some sort of brush tool. The closest thing I found so far is the promising Caliban by the Van Valen Lab, but something easier to install and operate would be extremely welcome.

I was thinking of doing this directly in Photoshop, but:
a) I would be happier to find an open source solution/Fiji plugin,
b) with PS I wouldn’t know how to add a color mapping to the segments layer so to have it as the usual happy patchwork of colors rather than a black file with almost black spots as it would be naturally read.

Attached, just to give you a flavor of the order of magnitude of the “errors” I need to correct, a tetraptych consisting of:

  1. Grayscale nuclei channel used by Stardist,
  2. same as 1) with its Stardist segmentation superimposed, as a raster layer,
  3. nuclei and membrane channels
  4. same as 3) but with segments as seen by Stardist (centroids, boundaries)

Thank you all in advance for the help and the patience. Hopefully I didn’t cause any heart attack by misusing the terminology or so.

While it doesn’t necessarily include randomized colors (although you could probably do that with a custom LUT), I am not sure how what you are describing differs from running StarDist within QuPath and then drawing over the cell detections with the brush tool.

If you really want to run StarDist externally, you might want to import the labels as objects (as long as this is not a whole slide image), then use a colormap to distinguish those.

There are a few threads on using QuPath to train StarDist models, I think, though I have not ended up doing much of it myself. Maybe @oburri will have better suggestions. Adding StarDist to the tags.

1 Like

oh… I missed the fact that one could run StarDist in QuPath! That would surely simplify things and give me plenty new stuff to give a look at. Thanks!