scverse / squidpy

Spatial Single Cell Analysis in Python
https://squidpy.readthedocs.io/en/stable/
BSD 3-Clause "New" or "Revised" License
424 stars 78 forks source link

implement methods for segmenting cells / nucleii from histopathological tissue images / fluorescence images #6

Closed hspitzer closed 3 years ago

hspitzer commented 4 years ago

Benefit: knowledge of cell count in each spot is very important for simulation for deconvolution, and for analysing data in general. On top of cell segmentations could calculate shape / size statistics as additional features

davidsebfischer commented 4 years ago

i looked into this a couple of weeks ago, stardist is very promising as an easy way of doing nuclei segmentaiton as they expose the tensorflow model and pretrained weights online so this could be wrapped relatively easily. alternatively, the custom segmentation pipeline from the Marr lab could be used. in both cases, we would interface a DL model with pretrained weights, i though we could maybe do this via sfaira to safe ourselves the trouble of setting up model query and zenodo interface? just an idea, but this would fit in well with the "zoo" of segmentation methods and likely also ultimatively pre-trained models by organ (segmentation models will likely need to be adapted to tissues, if not on the nuclei level, very likely so on the cell segmentation level).

giovp commented 4 years ago

sounds really cool and totally on board with your suggestion! One point not clear to me: why would we want a zoo of segmentation methods per organ? I guess we should test stardist a bit, but wouldn't one pre-trained model be enough?

davidsebfischer commented 4 years ago

let s say you are work a lot on livers from obese mice. you might be interested in training your own liver segmentation models because these tissues look very different from WT. similarly, there is many other phenotypes that will later tissue structure and therefore open up space for individually optimised segmentation models. let alone that some models might just be trained badly, this will be to some degree a subjective judgement though -> zoo.

davidsebfischer commented 4 years ago

Installing stardist on MacOS:

brew install gcc@8
brew link gcc@8
C=gcc-8 CXX=g++-8 pip install stardist