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
A napari plugin for 3D cell segmentation: training, inference, and data review. In particular, this project was developed for analysis of mesoSPIM-acquired (cleared tissue + lightsheet) datasets.
23
16
24
-
## Requirements
25
-
26
-
Requires manual installation of pytorch and MONAI.
27
-
For Pytorch, please see [PyTorch]'s website for installation instructions.
28
-
A CUDA-capable GPU is not needed but very strongly recommended, especially for training.
29
-
30
-
If you get errors from MONAI regarding missing readers, please see [MONAI's optional dependencies] page for instructions on getting the readers required by your images.
31
17
18
+
----------------------------------
32
19
33
20
## Installation
34
21
35
-
You can install `napari-cellseg3d` via [pip]:
22
+
You can install `napari-cellseg-3d` via [pip]:
36
23
37
-
pip install napari-cellseg3d
24
+
pip install napari-cellseg-3d
38
25
39
-
For local installation, please run:
26
+
## Documentation
40
27
41
-
```
42
-
pip install -e .
43
-
```
28
+
Available on the [Github pages website](https://adaptivemotorcontrollab.github.io/cellseg3d-docs/)
44
29
45
-
## Documentation
30
+
Source files can be found at https://AdaptiveMotorControlLab.github.io/cellseg3d-docs
46
31
47
-
You can generate docs by running ``make html`` in the docs folder
32
+
You can also generate docs by running ``make html`` in the docs folder.
48
33
49
34
## Usage
50
35
51
36
To use the plugin, please run:
52
37
```
53
38
napari
54
39
```
55
-
Then go into Plugins > napari-cellseg3d, and choose which tool to use.
40
+
Then go into Plugins > napari-cellseg-3d, and choose which tool to use.
56
41
57
42
-**Review**: This module allows you to review your labels, from predictions or manual labeling, and correct them if needed. It then saves the status of each file in a csv, for easier monitoring.
58
43
-**Infer**: This module allows you to use pre-trained segmentation algorithms on volumes to automatically label cells.
59
44
-**Train**: This module allows you to train segmentation algorithms from labeled volumes.
60
-
-**Crop utility**: This module allows you to crop your volumes and labels dynamically, by selecting a fixed size volume and moving it around the image.
45
+
-**Utilities**: This module allows you to perform several actions like cropping your volumes and labels dynamically, by selecting a fixed size volume and moving it around the image; computing prediction scores from ground truth and predicition labels; or converting labels from instance to segmentation and the opposite.
61
46
62
47
## Testing
63
48
64
49
To run tests locally:
65
50
66
51
- Locally : run ``pytest`` in the plugin folder
67
-
- Locally with coverage : In the plugin folder, run ``coverage run --source=napari_cellseg3d -m pytest`` then ``coverage.xml`` to generate a .xml coverage file.
52
+
- Locally with coverage : In the plugin folder, run ``coverage run --source=src -m pytest`` then ``coverage.xml`` to generate a .xml coverage file.
68
53
- With tox : run ``tox`` in the plugin folder (will simulate tests with several python and OS configs, requires substantial storage space)
69
54
70
55
## Contributing
71
56
72
-
Contributions are very welcome. Tests can be run with [tox], please ensure
73
-
the coverage at least stays the same before you submit a pull request.
57
+
Contributions are very welcome.
58
+
Please ensure the coverage at least stays the same before you submit a pull request.
59
+
60
+
For local installation, please run:
61
+
62
+
```
63
+
pip install -e .
64
+
```
65
+
74
66
75
67
## License
76
68
77
69
Distributed under the terms of the [MIT] license,
78
-
"napari-cellseg3d" is free and open source software
70
+
"napari-cellseg-3d" is free and open source software
79
71
80
72
## Issues
81
73
82
74
If you encounter any problems, please [file an issue] along with a detailed description.
83
75
76
+
## Requirements
77
+
**Python >= 3.8 required**
78
+
79
+
Requires manual installation of **pytorch** and **MONAI**.
80
+
81
+
For Pytorch, please see [PyTorch's website for installation instructions].
82
+
A CUDA-capable GPU is not needed but very strongly recommended, especially for training.
83
+
84
+
If you get errors from MONAI regarding missing readers, please see [MONAI's optional dependencies] page for instructions on getting the readers required by your images.
85
+
86
+
[[file an issue]: https://github.com/AdaptiveMotorControlLab/CellSeg3d/issues
This plugin was developed by Cyril Achard & Maxime Vidal.
109
+
This [napari] plugin was generated with [Cookiecutter] using [@napari]'s [cookiecutter-napari-plugin] template. This work was funded, in part, from the Wyss Center to the Adaptive Motor Control Lab.
110
+
111
+
<!--
112
+
Don't miss the full getting started guide to set up your new package:
Copy file name to clipboardExpand all lines: docs/res/guides/inference_module_guide.rst
+5-4Lines changed: 5 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,10 +40,7 @@ Interface and functionalities
40
40
41
41
|You can then choose one of the provided **models** above, which will be used for inference.
42
42
|You may also choose to **load custom weights** rather than the pre-trained ones, simply ensure they are **compatible** (e.g. produced from the training module for the same model)
43
-
44
-
.. note::
45
-
Currently the SegResNet model requires you to provide the size of the images the model was trained with due to the VAE module.
46
-
Provided weights use a size of 128, please leave it as is if you're not using custom weights.
43
+
|If you choose to use a SegResNet with custom weights, you will have to provide the size of images it was trained on to ensure compatibility. (See note below)
47
44
48
45
* **Inference parameters** :
49
46
@@ -106,6 +103,10 @@ Once it has finished, results will be saved then displayed in napari; each outpu
106
103
On the left side, a progress bar and a log will keep you informed on the process.
107
104
108
105
106
+
.. note::
107
+
Currently the SegResNet model requires you to provide the size of the images the model was trained with due to the VAE module.
108
+
Provided weights use a size of 128, please leave it as is if you're not using custom weights.
109
+
109
110
110
111
.. note::
111
112
|The files will be saved using the following format :
self.window_infer_box.setToolTip("Sliding window inference runs the model on parts of the image"
250
+
"\nrather than the whole image, to reduce memory requirements."
251
+
"\nUse this if you have large images.")
252
+
self.window_size_choice.setToolTip("Size of the window to run inference with (in pixels)")
253
+
self.keep_data_on_cpu_box.setToolTip("If enabled, data will be kept on the RAM rather than the VRAM.\nCan avoid out of memory issues with CUDA")
254
+
self.instance_box.setToolTip("Instance segmentation will convert instance (0/1) labels to labels that attempt to assign an unique ID to each cell.")
255
+
self.instance_method_choice.setToolTip("Choose which method to use for instance segmentation"
256
+
"\nConnected components : all separated objects will be assigned an unique ID. Robust but will not work correctly with adjacent/touching objects\n"
257
+
"Watershed : assigns objects ID based on the probability gradient surrounding an object. Requires the model to surround objects in a gradient; can possibly correctly separate unique but touching/adjacent objects.")
258
+
self.instance_prob_thresh.setToolTip("All objects below this probability will be ignored (set to 0)")
259
+
self.instance_small_object_thresh.setToolTip("Will remove all objects smaller (in volume) than the specified number of pixels")
260
+
self.save_stats_to_csv_box.setToolTip("Will save several statistics for each object to a csv in the results folder. Stats include : volume, centroid coordinates, sphericity")
261
+
##################
262
+
##################
263
+
238
264
self.build()
239
265
240
266
defcheck_ready(self):
@@ -587,6 +613,7 @@ def start(self): # TODO update
0 commit comments