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
Copy file name to clipboardExpand all lines: README.md
+17-15Lines changed: 17 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,17 +8,15 @@
8
8
9
9
## Project Overview
10
10
11
-
This repository contains the code and notebooks for preparing ground truth data for training, training a 3D Stardist model, and then use it on unseen data for **Sparse bacteria segmentation in tissue samples**.
12
-
The project implements deep learning approaches for automated detection and segmentation of bacterial cells in complex tissue environments using 3D microscopy data.
11
+
This repository contains the code and notebooks for **sparse bacteria instance segmentation in 3D tissue samples**. The main approach consists on training a 3D StarDist model to process 3D microscopy images of tissue. The notebooks provide functionalities for preparing the training data, training a 3D Stardist model, and use it to process unseen data.
13
12
Developed as part of the [AI4Life project](https://ai4life.eurobioimaging.eu), it uses data provided by Sebastien Herbert from University of Basel in Switzerland.
14
-
All images used in this tutorial are licensed under **CC-BY**. If any of the instructions are not working, please [open an issue]
13
+
All images used in this tutorial are licensed under **CC-BY**. If any of the instructions are not working, please [open an issue].
15
14
16
15
17
16
## 🎯 Objective
18
17
19
18
The main goal is to develop robust AI models for:
20
-
- Automated segmentation of *Staphylococcus aureus* bacteria in tissue samples
21
-
- 3D cell detection and counting in microscopy images
19
+
- Automated 3D segmentation of *Staphylococcus aureus* bacteria in tissue samples
22
20
- Quality control and validation of segmentation results
23
21
24
22
## 📁 Repository Structure
@@ -48,10 +46,14 @@ AI4LIfe_OC_StaphInTissue/
48
46
49
47
1. Follow the [DL4MicEverywhere](https://github.com/HenriquesLab/DL4MicEverywhere) installation instructions and load the Stardist 3D ZeroCostDL4Mic environment.
50
48
51
-
2. In the Jupyter notebook interface, clone this repository:
49
+
2. In the Jupyter notebook interface opened by DL4MicEverywhere, clone this repository:
** Note: To reproduce the pipeline outside DL4MicEverywhere, please use the notebooks under the Stardist 3D ZeroCostDL4Mic environment, which can be set up with `env_requirements.txt`:
(Note: only needed when bacteria clusters are manually annotated as a unit rather than each individual bacterial cell having a unique label)
66
69
- Handling of touching/overlapping bacteria labeled as a single instance
67
70
- Application of watershed algorithm for improved instance labeling
68
71
69
72
### 3. Data Preprocessing (`0.3_normalize_and_crop.ipynb`)
70
-
- Image normalization and cropping, needed **only for the training data**due to its large size
71
-
- Cropping considers regions with bacteria to balance the ratio of empty background regions and optimize training efficiency
72
-
- This step is required to avoid the time consuming processing in the dataloaders during training, this step in not needed for the testing data nor inference as it is integrated in the prediction functions
73
+
- Image normalization and cropping, needed **only for the training data**. This step is required due to the large size of the images.
74
+
- Cropping considers regions with bacteria to balance the ratio of empty background regions and optimize training efficiency. This step is required to speed up data loading during training, as normalisation should be done sample-wise and not patch-wise.
75
+
- This step is **not needed for the test data nor during inference**, as it is integrated in the prediction functions
73
76
74
77
### 4. Model Training (`StarDist_3D_DL4MicEverywhere_Modified_AI4LifeOC.ipynb`)
75
78
- DL4MicEverywhere StarDist 3D model training, validation, and inference
76
-
- Custom modifications for large image handling
77
-
79
+
- The notebook contains custom modifications to handle large 3D images.
78
80
79
81
## 📈 Results
80
82
81
-
The model provides:
82
-
-Segmentation masks for individual bacteria
83
+
This pipeline provides:
84
+
-Instance segmentation masks for individual bacteria
83
85
- Quality metrics and validation reports
84
86
- Interactive visualization of results
85
87
@@ -88,8 +90,8 @@ The model provides:
88
90
89
91
- Schmidt, Uwe, et al. "Cell detection with star-convex polygons." International conference on medical image computing and computer-assisted intervention. Cham: Springer International Publishing, 2018.
90
92
- Weigert, Martin, et al. "Star-convex polyhedra for 3D object detection and segmentation in microscopy." Proceedings of the IEEE/CVF winter conference on applications of computer vision. 2020.
91
-
- Von Chamier, Lucas, et al. "Democratising deep learning for microscopy with ZeroCostDL4Mic." Nature communications 12.1 (2021): 2276.
92
-
- Hidalgo-Cenalmor, Iván, et al. "DL4MicEverywhere: deep learning for microscopy made flexible, shareable and reproducible." Nature methods 21.6 (2024): 925-927.
93
+
- Von Chamier, Lucas, et al. "Democratising deep learning for microscopy with ZeroCostDL4Mic." Nature Communications 12.1 (2021): 2276.
94
+
- Hidalgo-Cenalmor, Iván, et al. "DL4MicEverywhere: deep learning for microscopy made flexible, shareable and reproducible." Nature Methods 21.6 (2024): 925-927.
93
95
94
96
## Acknowledgements
95
97
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