MouseLand / cellpose

a generalist algorithm for cellular segmentation with human-in-the-loop capabilities
https://www.cellpose.org/
BSD 3-Clause "New" or "Revised" License
1.33k stars 381 forks source link

[FEATURE]Segmentation using transcripts density #1009

Closed marsdenl closed 1 week ago

marsdenl commented 2 weeks ago

Hey there,

Thank you so much for providing us with this amazing tool! I have a MERSCOPE brain dataset I'd like to segment and the default off-the-shelf segmentation from vizgen failed (I assume since poly/cellbound stainings don't really work on brain samples). I'm therefore left with DAPI and transcripts density to segment (image below).

I was hoping to tailor the cellpose2 model to my dataset by training it on dapi/transcript.png images and later on applying that model to segment my DAPI.TIFF files. Is there a way to do this? Apologies if I missed this in the documentation.

Thanks for your help.

Luc

sample

carsen-stringer commented 1 week ago

if you'd like cellpose to use both channels for segmentation, you can put all the transcripts into one channel (e.g. average/sum across the transcript channels), and then use DAPI as your second channel. From there you can train your own model. Alternatively, you can use the DAPI channel and dilate your masks a small amount, we have a fork of vizgen-postprocessing that does this: https://github.com/carsen-stringer/vizgen-postprocessing

marsdenl commented 1 week ago

Lovely thanks for your help.