You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Python pipeline for stitching, denoising (Noise2Void), and segmenting migrating cells in 5D microscopy data (X, Y, Z, T, C) of tumor spheroids embedded in collagen.
4
-
Developed as part of the AI4Life Open Call 3 project, building on [OC-1 Project 11](https://github.com/ai4life-opencalls/oc-1-project-11/tree/main).
7
+
# Project 18: 3D Matrix Motility Map (3DM³)
5
8
6
-
---
7
-
8
-
## 1. Environment Setup (Windows + NVIDIA GPU)
9
-
10
-
This project uses:
9
+
**A collaboration with the Institute of Cell Biology and Immunology, University of Stuttgart, Germany**
11
10
12
-
-[Noise2Void (n2v)](https://github.com/juglab/n2v) for denoising
13
-
-[Cellpose](https://github.com/MouseLand/cellpose) for segmentation
11
+
---
14
12
15
-
To replicate the GPU-enabled setup:
13
+
## 🧠 Introduction
16
14
17
-
```
18
-
conda env create -f n2v_env.yaml
19
-
conda activate n2v
20
-
```
15
+
Cancer cell dissemination in 3D matrices is driven by interactions between cells and the extracellular matrix (ECM), especially collagen.
16
+
This project focuses on live-cell imaging of breast tumor spheroids embedded in collagen to analyze cancer cell migration, shape, and interaction with ECM architecture.
21
17
22
-
This uses:
23
-
-`tensorflow==2.10.1` (GPU)
24
-
-`cudatoolkit=11.2`
25
-
-`cudnn=8.1.0`
18
+
The dataset includes **5D live imaging (X, Y, Z, T, C)** acquired using widefield and confocal microscopy.
Again, run each cell and specify the dataset. This will need a different environment.
84
+
For any assistance, consult [CAREamics' documentation](https://careamics.github.io/0.1).
89
85
90
-
## 5. Annotating & Training Segmentation with Cellpose
86
+
Here you can see an image representing (from top to bottom) the original image, the image after being properly stitched and preprocessed and after denoising with CAREamics.
91
87
92
-
### 5.1 Manual Annotation (done using Cellpose GUI)
We extract individual timepoints from the denoised TIFF stack (done manually or with Fiji).
95
-
We then open selected frames in the **Cellpose GUI**, annotate them, and save masks as `_seg.npy`.
90
+
### 5. Cell Annotation and Training
96
91
97
-
To annotate 3D images open cellpose GUI as:
98
-
```
92
+
#### 5.1 Manual Annotation
93
+
Use the Cellpose GUI for annotation:
94
+
```bash
99
95
python -m cellpose --Zstack
100
96
```
101
-
For more information on how to annotate images read [this docs](https://cellpose.readthedocs.io/en/latest/gui.html) and [this blog post](https://focalplane.biologists.com/2025/06/05/annotating-images-in-cellpose/).
102
-
103
-
This produces training pairs like:
104
97
105
-
```
98
+
Save training pairs like:
99
+
```text
106
100
segmentation_input/training/
107
101
├── nuclei_t003.tif
108
102
├── nuclei_t003_seg.npy
109
103
```
110
-
Repeat for 5–10 diverse timepoints.
111
104
112
-
---
105
+
To have a consisten training of cellpose you will need to annotate between 15-20 nuclei per time-point and multiple time-points per scene. If not, there is not enough data to fine-tune cellpose.
106
+
107
+
For more information on how to annotate images read [this docs](https://cellpose.readthedocs.io/en/latest/gui.html) and [this blog post](https://focalplane.biologists.com/2025/06/05/annotating-images-in-cellpose/).
113
108
114
109
### 5.2 Training Custom Cellpose Model
115
110
@@ -130,37 +125,7 @@ Trained model is saved to:
130
125
```
131
126
models/cellpose_nuclei_model/nuclei_custom/
132
127
```
133
-
---
134
128
135
-
## 6. File Structure Overview
136
-
137
-
```
138
-
AI4Life-OC-3DM3/
139
-
│
140
-
├── models/
141
-
│ ├── denoising_5slices_n2v/
142
-
│ │ ├── weights_best.h5
143
-
│ │ └── original-denoised-difference.png
144
-
│ └── cellpose_nuclei_model/
145
-
│ └── nuclei_custom/
146
-
│
147
-
├── data/
148
-
│ ├── raw/ # Raw stitched tiles
149
-
│ ├── n2v_input/ # Projected TIFFs for N2V
150
-
│ └── segmentation_input/
151
-
│ └── training/ # .tif + _seg.npy pairs
152
-
│
153
-
├── notebooks/
154
-
│ └── N2V_denoising.ipynb
155
-
│
156
-
├── scripts/
157
-
│ └── train_cellpose.bat
158
-
│
159
-
├── stitch.py
160
-
├── prepare_n2v.py
161
-
├── n2v_env.yaml
162
-
└── README.md
163
-
```
164
-
---
129
+
**Acknowledgements**
165
130
166
-
Made by the OC-3DM³ team.
131
+
AI4Life has received funding from the European Union’s Horizon Europe research and innovation programme under grant agreement number 101057970. Views and opinions expressed are however those of the author(s) only and do not necessarily reflect those of the European Union or the European Research Council Executive Agency. Neither the European Union nor the granting authority can be held responsible for them.
0 commit comments