Cunmin Zhao#, Zelin Li#, Pei Zhang, Yixuan Chen, Pohao Ye, Ming-Kin Wong, Lu-Yan Chan, Hong Yan, Chao Tang, Guoye Guan*, Zhongying Zhao*
In [arXiv]
# Equal contribution,
* Correspondence Author.
Motivations: Cellular shape dynamics are critical for understanding cell fate determination and organogenesis during development. However, fluorescence live-cell images of cell membranes frequently suffer from a low signal-to-noise ratio, especially during long-duration imaging with high spatiotemporal resolutions. This is caused by phototoxicity and photobleaching, which limit laser power and hinder effective time-lapse cell shape reconstruction, particularly in rapidly developing embryos.
Results: We devised a new computational framework, EmbSAM, that incorporates a deep-learning-based cell boundary localization algorithm and the Segment Anything Model. EmbSAM enables accurate and robust three-dimensional (3D) cell membrane segmentation for roundworm Caenorhabditis elegans embryos imaged every 10 seconds. The cell shape data prior to gastrulation quantitatively characterizes a series of cell-division-coupled morphodynamics associated with cell position, cell identity, lineage, and fate, and can be accessed locally and online. The framework also exhibits potential in segmenting and quantifying the fluorescence labeling various cell-membraned-attached molecules in both wild-type and RNAi-treated embryos.
Fig. 1. The flowchart of EmbSAM
- Python 3.11.0
- Pytorch 2.0.1
- Create Conda Environment
conda create --name EmbSAM python=3.11.0
conda activate EmbSAM
conda install anaconda::git
- Clone Repo
git clone https://github.com/cunminzhao/EmbSAM.git
- Install Dependencies
cd EmbSAM
pip install -r ./requirement.txt
You can refer to the following links to download the datasets of raw cell membrane fluorescence Emb1_Raw.zip, Emb2_Raw.zip, Emb3_Raw.zip, Emb4_Raw.zip and Emb5_Raw.zip
the pre-trained models of this project can be downloaded here
- The model_parameters with Segment Anything Model(vit_b) and the image denosing module trained on X_axis, Y_axis and Z_axis [model_parameters]. You need to download these parameters and put them into model_parameters.
- Structure of model_parameters:
model_parameters/ |--Z_axis.pth |--Y_axis.pth |--X_axis.pth |--sam_vit_b_01ec64.pth
Example: to run EmbSAM with Emb1_Raw, you need to keep these data in
- Structure of data folder:
data/ |--Emb1_Raw/*.tif
- Structure of confs folder:
The Emb1_CellTracing.csv is the tracing result of cell nucleus fluorescence, saved in confs.confs/ |--Emb1_CellTracing.csv |--running_Emb1.txt ... |--other running confs
Then run
python EmbSAM.py -cfg_path ./confs/running_Emb1.txt
you will get your result in
./output_folder/result
-
All the 5 embryo samples processed in this paper are digitized into the format customized to our visualization software ITK-SNAP-CVE from https://doi.org/10.1101/2023.11.20.567849, and can be downloaded online.
-
The effective visualization is shown below: