cellpose icon indicating copy to clipboard operation
cellpose copied to clipboard

Can we use cpsam to simultaneously segment cytoplasm and nuclear masks?

Open AmosFong1 opened this issue 7 months ago • 3 comments

Hello,

I used the "cytosam" model to segment my spatial molecular imaging data and the results look great! I was wondering if any variant of the cellposeSAM models are able to simultaneously segment cytoplasm and nuclear masks?

Best, Amos

AmosFong1 avatar May 30 '25 23:05 AmosFong1

Great to hear cellpose works well on your data @AmosFong1 ! Cellpose is unable to provide more than one segmentation per pixel, so it's unable to produce both a cytoplasm and nucleus mask 'simultaneously'. You can however, run the model twice to accomplish the same result. You'll select the data associated with cytoplasm for one run and data associated with nucleus for the second run. You'll end up with two mask files per image and will have to do post processing.

Unfortunately, we don't offer any code to do that on this repo.

mrariden avatar May 31 '25 21:05 mrariden

Hello @mrariden,

Sounds like a good plan. Would you recommend using all channels to produce cytoplasm masks, and nuclear only for nucleus? In other words, do you recommend always providing a nuclear channel when available for cytoplasm segmentation?

AmosFong1 avatar May 31 '25 22:05 AmosFong1

It depends on your data. I'd guess that more channels would give you better segmentation but that depends on the quality of your markers. I'd experiment with different combinations and see what gives you the best segmentation result. Doing 2 cytoplasm + 1 nucleus might work better than 3 cytoplasm, but again I'd recommend playing around with different options.

mrariden avatar Jun 02 '25 13:06 mrariden

closing due to inactivity

mrariden avatar Jul 29 '25 17:07 mrariden