Skip to content

Commit 5402ab3

Browse files
committed
latest work from private repo
1 parent cf962b3 commit 5402ab3

40 files changed

+883
-172
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#name: napari hub Preview Page # we use this name to find your preview page artifact, so don't change it!
2+
## For more info on this action, see https://github.com/chanzuckerberg/napari-hub-preview-action/blob/main/action.yml
3+
#
4+
#on:
5+
# pull_request:
6+
# branches:
7+
# - '**'
8+
#
9+
#jobs:
10+
# preview-page:
11+
# name: Preview Page Deploy
12+
# runs-on: ubuntu-latest
13+
#
14+
# steps:
15+
# - name: Checkout repo
16+
# uses: actions/checkout@v2
17+
#
18+
# - name: napari hub Preview Page Builder
19+
# uses: chanzuckerberg/[email protected]
20+
# with:
21+
# hub-ref: main

.github/workflows/test_and_deploy.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
## This workflows will upload a Python Package using Twine when a release is created
2-
## For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
3-
#
1+
# This workflows will upload a Python Package using Twine when a release is created
2+
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
3+
44
#name: tests
55
#
66
#on:
@@ -22,8 +22,8 @@
2222
# runs-on: ${{ matrix.platform }}
2323
# strategy:
2424
# matrix:
25-
# platform: [windows-latest, macos-latest, ubuntu-latest]
26-
# python-version: [3.8, 3.9]
25+
# platform: [windows-latest]
26+
# python-version: [3.8]
2727
#
2828
# steps:
2929
# - uses: actions/checkout@v2

.napari/DESCRIPTION.md

Lines changed: 43 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,22 @@
11

2-
3-
<!-- This file is designed to provide you with a starting template for documenting
2+
<!---->
3+
<!--
4+
TODO : complete
5+
This file is designed to provide you with a starting template for documenting
46
the functionality of your plugin. Its content will be rendered on your plugin's
57
napari hub page.
68
79
The sections below are given as a guide for the flow of information only, and
810
are in no way prescriptive. You should feel free to merge, remove, add and
911
rename sections at will to make this document work best for your plugin.
10-
12+
-->
1113
## Description
1214

15+
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.
16+
17+
A detailed walk-through and description is available [on the documentation website](https://adaptivemotorcontrollab.github.io/cellseg3d-docs/res/welcome.html).
18+
19+
<!--
1320
This should be a detailed description of the context of your plugin and its
1421
intended purpose.
1522
@@ -38,9 +45,16 @@ hosted on GitHub for you, but will not be placed in your repository.
3845
Here is an example of an mp4 video embedded this way.
3946
4047
https://user-images.githubusercontent.com/17995243/120088305-6c093380-c132-11eb-822d-620e81eb5f0e.mp4
41-
48+
-->
4249
## Intended Audience & Supported Data
4350

51+
This plugin requires basic knowledge in machine learning;
52+
all the concepts required for the parameters of the plugin are still covered and explained for their contextual use in the plugin.
53+
54+
Currently, this plugin requires 3D volumes as .tif files, for review and cropping 2D stacks as .tif or .png are supported as well.
55+
Feel free to open an issue on Github if you'd like to discuss implementation of a specific file type !
56+
57+
<!--
4458
This section should describe the target audience for this plugin (any knowledge,
4559
skills and experience required), as well as a description of the types of data
4660
supported by this plugin.
@@ -53,7 +67,8 @@ make sure to mention this.
5367
5468
If you know of researchers, groups or labs using your plugin, or if it has been cited
5569
anywhere, feel free to also include this information here.
56-
70+
-->
71+
<!--
5772
## Quickstart
5873
5974
This section should go through step-by-step examples of how your plugin should be used.
@@ -65,8 +80,21 @@ Ideally, this section should start with minimal examples for those who just want
6580
quick overview of the plugin's functionality, but you should definitely link out to
6681
more complex and in-depth tutorials highlighting any intricacies of your plugin, and
6782
more detailed documentation if you have it.
83+
-->
84+
## Additional Install Steps
6885

69-
## Additional Install Steps (uncommon)
86+
**Python >= 3.8 required**
87+
88+
Requires manual installation of **pytorch** and **MONAI**.
89+
90+
For Pytorch, please see [PyTorch's website for installation instructions](https://pytorch.org/get-started/locally/).
91+
92+
A **CUDA-capable GPU** is not needed but very strongly recommended, especially for training.
93+
Simply follow the instructions on Pytorch's install page.
94+
95+
If you get errors from MONAI regarding missing readers, please see [MONAI's optional dependencies](https://docs.monai.io/en/stable/installation.html#installing-the-recommended-dependencies) page for instructions on getting the readers required by your images.
96+
97+
<!--
7098
We will be providing installation instructions on the hub, which will be sufficient
7199
for the majority of plugins. They will include instructions to pip install, and
72100
to install via napari itself.
@@ -75,18 +103,25 @@ Most plugins can be installed out-of-the-box by just specifying the package requ
75103
over in `setup.cfg`. However, if your plugin has any more complex dependencies, or
76104
requires any additional preparation before (or after) installation, you should add
77105
this information here.
78-
106+
-->
79107
## Getting Help
80108

109+
If you would like to report an issue with the plugin,
110+
please open an [issue on Github](https://github.com/AdaptiveMotorControlLab/CellSeg3d/issues)
111+
<!--
81112
This section should point users to your preferred support tools, whether this be raising
82113
an issue on GitHub, asking a question on image.sc, or using some other method of contact.
83114
If you distinguish between usage support and bug/feature support, you should state that
84115
here.
116+
-->
85117

86118
## How to Cite
87119

120+
121+
<!--
88122
Many plugins may be used in the course of published (or publishable) research, as well as
89123
during conference talks and other public facing events. If you'd like to be cited in
90-
a particular format, or have a DOI you'd like used, you should provide that information here. -->
124+
a particular format, or have a DOI you'd like used, you should provide that information here.
91125
92126
The developer has not yet provided a napari-hub specific description.
127+
-->

.napari/config.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
visibility: hidden
2+
3+
project_urls:
4+
Bug Tracker: https://github.com/AdaptiveMotorControlLab/CellSeg3d/issues
5+
Documentation: https://adaptivemotorcontrollab.github.io/cellseg3d-docs/res/welcome.html
6+
Source Code: https://github.com/AdaptiveMotorControlLab/CellSeg3d
7+
Project Site: https://github.com/AdaptiveMotorControlLab/CellSeg3d
8+
User Support: https://github.com/AdaptiveMotorControlLab/CellSeg3d/issues
9+
10+
# Add labels from the EDAM Bioimaging ontology
11+
labels:
12+
ontology: EDAM-BIOIMAGING:alpha06
13+
terms:
14+
- 3D image
15+
- Cell segmentation
16+
- Light-sheet microscopy
17+
- Image visualisation
18+
- Neuron image analysis
19+
- Convolutional neural network
20+
- Watershed segmentation
21+
- Object counting
22+
- Image crop
23+
- Plotting

README.md

Lines changed: 40 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,28 @@
11
# napari-cellseg3d: a napari plug-in for 3d deep learning models for cell segmentation
22

33

4-
<img src="https://images.squarespace-cdn.com/content/v1/57f6d51c9f74566f55ecf271/04991e21-9cee-4b21-bdfc-d465fd73247d/CELLSEGGIT.png?format=2500w" width="250" title="cellseg3d" alt="cellseg3d" align="right" vspace = "80">
5-
6-
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://www.gnu.org/licenses/mit)
7-
[![PyPI](https://img.shields.io/pypi/v/napari-cellseg-3d.svg?color=green)](https://pypi.org/project/napari-cellseg-3d)
8-
[![Python Version](https://img.shields.io/pypi/pyversions/napari-cellseg-3d.svg?color=green)](https://python.org)
9-
![Tests](https://github.com/AdaptiveMotorControlLab/CellSeg3d/workflows/Python%20package/badge.svg)
10-
[![codecov](https://codecov.io/gh/AdaptiveMotorControlLab/CellSeg3d/branch/main/graph/badge.svg)](https://codecov.io/gh/AdaptiveMotorControlLab/CellSeg3d)
11-
[![napari hub](https://img.shields.io/endpoint?url=https://api.napari-hub.org/shields/napari-cellseg-3d)](https://napari-hub.org/plugins/napari-cellseg-3d)
4+
<img src="docs/res/logo/logo_diag.png" title="cellseg3d" alt="cellseg3d logo" width="250" align="right" vspace = "80"/>
125

6+
<a href="https://github.com/psf/black"><img alt="Code style: black" src="https://img.shields.io/badge/code%20style-black-000000.svg"></a>
7+
[![License MIT](https://img.shields.io/pypi/l/napari-cellseg3d.svg?color=green)](https://github.com/AdaptiveMotorControlLab/CellSeg3d/raw/main/LICENSE)
8+
[![PyPI](https://img.shields.io/pypi/v/napari-cellseg3d.svg?color=green)](https://pypi.org/project/napari-cellseg3d)
9+
[![Python Version](https://img.shields.io/pypi/pyversions/CellSeg3d.svg?color=green)](https://python.org)
10+
[![tests](https://github.com/AdaptiveMotorControlLab/CellSeg3d/workflows/tests/badge.svg)](https://github.com/AdaptiveMotorControlLab/CellSeg3d/actions)
11+
[![codecov](https://codecov.io/gh/AdaptiveMotorControlLab/napari-cellseg3d/branch/main/graph/badge.svg)](https://codecov.io/gh/AdaptiveMotorControlLab/CellSeg3d)
12+
[![napari hub](https://img.shields.io/endpoint?url=https://api.napari-hub.org/shields/napari-cellseg3d)](https://napari-hub.org/plugins/CellSeg3d)
1313

1414

1515
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.
1616

17+
**Pre-Alpha version, please expect bugs and issues. Reporting them on the Github repository would help us a lot!**
1718

1819
----------------------------------
1920

2021
## Installation
2122

22-
You can install `napari-cellseg-3d` via [pip]:
23+
You can install `napari-cellseg-3d` via [pip] (pypi-test placeholder):
2324

24-
pip install napari-cellseg-3d
25+
pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ napari-cellseg3d==0.0.3
2526

2627
## Documentation
2728

@@ -40,10 +41,27 @@ napari
4041
Then go into Plugins > napari-cellseg-3d, and choose which tool to use.
4142

4243
- **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.
43-
- **Infer**: This module allows you to use pre-trained segmentation algorithms on volumes to automatically label cells.
44+
- **Inference**: This module allows you to use pre-trained segmentation algorithms on volumes to automatically label cells and compute statistics.
4445
- **Train**: This module allows you to train segmentation algorithms from labeled volumes.
4546
- **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.
4647

48+
49+
## Requirements
50+
**Python >= 3.8 required**
51+
52+
Requires manual installation of **pytorch** and **MONAI**.
53+
54+
For Pytorch, please see [PyTorch's website for installation instructions].
55+
A CUDA-capable GPU is not needed but very strongly recommended, especially for training.
56+
57+
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.
58+
59+
60+
## Issues
61+
62+
If you encounter any problems, please [file an issue] along with a detailed description.
63+
64+
4765
## Testing
4866

4967
To run tests locally:
@@ -55,33 +73,21 @@ To run tests locally:
5573
## Contributing
5674

5775
Contributions are very welcome.
76+
5877
Please ensure the coverage at least stays the same before you submit a pull request.
5978

60-
For local installation, please run:
79+
For local installation from Github cloning, please run:
6180

6281
```
6382
pip install -e .
6483
```
6584

66-
6785
## License
6886

69-
Distributed under the terms of the [MIT] license,
70-
"napari-cellseg-3d" is free and open source software
87+
Distributed under the terms of the [MIT] license.
7188

72-
## Issues
73-
74-
If you encounter any problems, please [file an issue] along with a detailed description.
89+
"napari-cellseg-3d" is free and open source software.
7590

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.
8591

8692
[file an issue]: https://github.com/AdaptiveMotorControlLab/CellSeg3d/issues
8793
[napari]: https://github.com/napari/napari
@@ -106,12 +112,17 @@ If you get errors from MONAI regarding missing readers, please see [MONAI's opti
106112
## Acknowledgements
107113

108114
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.
115+
116+
This work was funded, in part, from the Wyss Center to the Adaptive Motor Control Lab.
117+
118+
119+
## Plugin base
120+
This [napari] plugin was generated with [Cookiecutter] using [@napari]'s [cookiecutter-napari-plugin] template.
110121

111122
<!--
112123
Don't miss the full getting started guide to set up your new package:
113124
https://github.com/napari/cookiecutter-napari-plugin#getting-started
114125
115126
and review the napari docs for plugin developers:
116127
https://napari.org/plugins/stable/index.html
117-
-->
128+
-->

docs/index.rst

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,20 @@ Welcome to napari-cellseg3d's documentation!
1313

1414
.. toctree::
1515
:maxdepth: 1
16-
:caption: Utilities & advanced guides:
16+
:caption: Utilities :
1717

1818
res/guides/metrics_module_guide
1919
res/guides/convert_module_guide
2020
res/guides/cropping_module_guide
21-
res/guides/custom_model_template
2221

2322

23+
.. toctree::
24+
:maxdepth: 2
25+
:caption: Advanced guides and walk-through:
26+
27+
res/guides/detailed_walkthrough
28+
res/guides/custom_model_template
29+
2430
.. toctree::
2531
:maxdepth: 1
2632
:caption: Source files:

docs/res/guides/convert_module_guide.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ You can :
1717
* Remove small objects :
1818
You can specify a size threshold in pixels; all objects smaller than this size will be removed in the image.
1919

20+
.. figure:: ../images/converted_labels.png
21+
:scale: 30 %
22+
:align: center
23+
24+
Example of instance labels (left) converted to instance labels (right)
2025

2126
Source code
2227
-------------------------------------------------

docs/res/guides/custom_model_template.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ To add a custom model, you will need a **.py** file with the following structure
2828

2929
def get_validation(model, val_inputs):
3030
val_outputs = model(val_inputs) # should return the proper type for validation
31-
# with single_window_inference from MONAI
31+
# with sliding_window_inference from MONAI
3232
return val_outputs
3333

3434

3535
def ModelClass(x1,x2...):
3636
# your Pytorch model here...
37-
return results
37+
return results # should return as [C, N, D,H,W]
3838

3939

0 commit comments

Comments
 (0)