I trained my own model in Stardist and I must say it works fantastic. Now I want to use the output as a segmentation image in Ilastik to do object recognition in the other channels of my image. My problem is this: the output of Stardist is a label image, but what I need for Ilastik is a binary mask. How do I convert the label image into a mask such that separate objects are not touching?
If I do the Stardist process in ImageJ the objects (nuclei) appear in the ROI manager, but they overlap. Here’s a screenshot of the label image and below is the same image with ROI outlines.
I notice in the QuPath docs for StarDist this comment: "Another difference is in how overlapping nuclei are handled. The Fiji plugin allows overlaps, controlled with an overlap threshold parameter.
QuPath does not permit overlapping nuclei. Rather, it handles overlaps by retaining the nucleus with the highest prediction probability unchanged, and removing overlapping areas from lower-probability detections - discarding these detections only if their area decreases by more than 50%."
I can see the advantage of overlapping ROI’s that map to the potential true dimensions of an object, but for practical purposes I need a binary mask of non-overlapping objects. Does anyone have a solution for this? Aside from abandoning the ImageJ-python ship I’m on and figuring out how to script in groovy…
Thanks for your time in advance! John