aiod-registry 0.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. aiod_registry-0.1/.gitignore +62 -0
  2. aiod_registry-0.1/.python-version +1 -0
  3. aiod_registry-0.1/LICENSE +21 -0
  4. aiod_registry-0.1/PKG-INFO +59 -0
  5. aiod_registry-0.1/README.md +31 -0
  6. aiod_registry-0.1/aiod_registry/__init__.py +4 -0
  7. aiod_registry-0.1/aiod_registry/default_configs/cellpose.yaml +14 -0
  8. aiod_registry-0.1/aiod_registry/default_configs/cellposesam.yaml +15 -0
  9. aiod_registry-0.1/aiod_registry/default_configs/empanada.yaml +15 -0
  10. aiod_registry-0.1/aiod_registry/default_configs/panseg.yaml +20 -0
  11. aiod_registry-0.1/aiod_registry/default_configs/sam.yaml +13 -0
  12. aiod_registry-0.1/aiod_registry/default_configs/sam2.yaml +14 -0
  13. aiod_registry-0.1/aiod_registry/default_configs/stardist.yaml +9 -0
  14. aiod_registry-0.1/aiod_registry/manifests/cellpose.json +202 -0
  15. aiod_registry-0.1/aiod_registry/manifests/cellposesam.json +143 -0
  16. aiod_registry-0.1/aiod_registry/manifests/empanada.json +176 -0
  17. aiod_registry-0.1/aiod_registry/manifests/panseg.json +441 -0
  18. aiod_registry-0.1/aiod_registry/manifests/sam.json +245 -0
  19. aiod_registry-0.1/aiod_registry/manifests/sam2.json +228 -0
  20. aiod_registry-0.1/aiod_registry/manifests/seai_unet.json +95 -0
  21. aiod_registry-0.1/aiod_registry/manifests/stardist.json +202 -0
  22. aiod_registry-0.1/aiod_registry/schema.json +539 -0
  23. aiod_registry-0.1/aiod_registry/schema.py +306 -0
  24. aiod_registry-0.1/aiod_registry/utils.py +266 -0
  25. aiod_registry-0.1/pyproject.toml +114 -0
  26. aiod_registry-0.1/tests/test_jsons.py +16 -0
  27. aiod_registry-0.1/tests/test_utils.py +538 -0
  28. aiod_registry-0.1/uv.lock +313 -0
@@ -0,0 +1,62 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ share/python-wheels/
24
+ *.egg-info/
25
+ .installed.cfg
26
+ *.egg
27
+ MANIFEST
28
+
29
+ # PyInstaller
30
+ # Usually these files are written by a python script from a template
31
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
32
+ *.manifest
33
+ *.spec
34
+
35
+ # Installer logs
36
+ pip-log.txt
37
+ pip-delete-this-directory.txt
38
+
39
+ # Unit test / coverage reports
40
+ htmlcov/
41
+ .tox/
42
+ .nox/
43
+ .coverage
44
+ .coverage.*
45
+ .cache
46
+ nosetests.xml
47
+ coverage.xml
48
+ *.cover
49
+ *.py,cover
50
+ .hypothesis/
51
+ .pytest_cache/
52
+ cover/
53
+
54
+ # Sphinx documentation
55
+ docs/_build/
56
+
57
+ .DS_Store
58
+ .vscode/
59
+ .idea/
60
+ venv/
61
+ **/_version.py
62
+ /.gitignore
@@ -0,0 +1 @@
1
+ 3.12
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Cameron Shand
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,59 @@
1
+ Metadata-Version: 2.4
2
+ Name: aiod-registry
3
+ Version: 0.1
4
+ Summary: A registry of models for use with AI OnDemand (AIoD)
5
+ Project-URL: homepage, https://github.com/FrancisCrickInstitute/aiod_registry
6
+ Project-URL: documentation, https://franciscrickinstitute.github.io/aiod_docs/sections/model_registry/
7
+ Project-URL: source, https://github.com/FrancisCrickInstitute/aiod_registry
8
+ Author-email: Cameron Shand <cameron.shand@crick.ac.uk>, Numan Ahmed <numan.ahmed@crick.ac.uk>, Qin Yu <qin.yu@crick.ac.uk>, Fiona Young <fiona.young@crick.ac.uk>, Jon Smith <jon.smith@crick.ac.uk>
9
+ License-File: LICENSE
10
+ Classifier: Development Status :: 4 - Beta
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: Intended Audience :: Science/Research
13
+ Classifier: License :: OSI Approved :: MIT License
14
+ Classifier: Operating System :: OS Independent
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3 :: Only
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
20
+ Classifier: Topic :: Scientific/Engineering :: Image Processing
21
+ Requires-Python: <3.13,>=3.11
22
+ Requires-Dist: pydantic>=2.0
23
+ Requires-Dist: pyyaml
24
+ Provides-Extra: dev
25
+ Requires-Dist: pytest; extra == 'dev'
26
+ Requires-Dist: pytest-cov; extra == 'dev'
27
+ Description-Content-Type: text/markdown
28
+
29
+ # AIoD Model Registry
30
+ This repository contains the central manifests/schemas that defines the models available within AIoD.
31
+
32
+ In addition, are:
33
+
34
+ - Tests for validating schemas
35
+ - Utility functions for ingesting the schemas and filtering by whether a user has access to each model, enabling us to [automatically write the UI for our Napari plugin](https://franciscrickinstitute.github.io/aiod_docs/sections/development/#automatic-ui-construction)
36
+
37
+ ## Installation
38
+
39
+ ```
40
+ git clone https://github.com/FrancisCrickInstitute/AIoD-Model-Registry.git
41
+ cd AIoD-Model-Registry/
42
+ pip install .
43
+ ```
44
+
45
+ or
46
+
47
+ ```
48
+ pip install git+https://github.com/FrancisCrickInstitute/AIoD-Model-Registry.git
49
+ ```
50
+
51
+ ## Contact Details
52
+ * cameron.shand@crick.ac.uk
53
+ * jon.smith@crick.ac.uk
54
+
55
+ ## Contribution Guidelines
56
+ See our [documentation](https://franciscrickinstitute.github.io/aiod_docs/sections/contributing/expanding/) for guidance on adding models to this repo.
57
+
58
+ ### Local Validation
59
+ To locally test whether a new manifest is eligible, simply run `pytest -v tests/`, where any errors will be detailed by Pydantic.
@@ -0,0 +1,31 @@
1
+ # AIoD Model Registry
2
+ This repository contains the central manifests/schemas that defines the models available within AIoD.
3
+
4
+ In addition, are:
5
+
6
+ - Tests for validating schemas
7
+ - Utility functions for ingesting the schemas and filtering by whether a user has access to each model, enabling us to [automatically write the UI for our Napari plugin](https://franciscrickinstitute.github.io/aiod_docs/sections/development/#automatic-ui-construction)
8
+
9
+ ## Installation
10
+
11
+ ```
12
+ git clone https://github.com/FrancisCrickInstitute/AIoD-Model-Registry.git
13
+ cd AIoD-Model-Registry/
14
+ pip install .
15
+ ```
16
+
17
+ or
18
+
19
+ ```
20
+ pip install git+https://github.com/FrancisCrickInstitute/AIoD-Model-Registry.git
21
+ ```
22
+
23
+ ## Contact Details
24
+ * cameron.shand@crick.ac.uk
25
+ * jon.smith@crick.ac.uk
26
+
27
+ ## Contribution Guidelines
28
+ See our [documentation](https://franciscrickinstitute.github.io/aiod_docs/sections/contributing/expanding/) for guidance on adding models to this repo.
29
+
30
+ ### Local Validation
31
+ To locally test whether a new manifest is eligible, simply run `pytest -v tests/`, where any errors will be detailed by Pydantic.
@@ -0,0 +1,4 @@
1
+ from aiod_registry.schema import TASK_NAMES, ModelManifest
2
+ from aiod_registry.utils import get_manifest_paths, load_manifests
3
+
4
+ __all__ = ["TASK_NAMES", "ModelManifest", "get_manifest_paths", "load_manifests"]
@@ -0,0 +1,14 @@
1
+ # Auto-generated by save_all_default_configs - do not edit manually
2
+ diameter: 0
3
+ segment_channel: 0
4
+ nucleus_channel: 0
5
+ do_3D: false
6
+ stitch_threshold: 0.0
7
+ cellprob_threshold: 0.0
8
+ flow_threshold: 0.4
9
+ niter: 0
10
+ anisotropy: null
11
+ channel_axis: null
12
+ z_axis: null
13
+ batch_size: 64
14
+ min_size: 15
@@ -0,0 +1,15 @@
1
+ # Auto-generated by save_all_default_configs - do not edit manually
2
+ segment_channel: 0
3
+ do_3D: false
4
+ resample: true
5
+ stitch_threshold: 0.0
6
+ cellprob_threshold: 0.0
7
+ flow_threshold: 0.4
8
+ niter: 0
9
+ anisotropy: null
10
+ channel_axis: null
11
+ z_axis: null
12
+ batch_size: 64
13
+ min_size: 15
14
+ max_size_fraction: 0.4
15
+ tile_overlap: 0.1
@@ -0,0 +1,15 @@
1
+ # Auto-generated by save_all_default_configs - do not edit manually
2
+ plane: XY
3
+ downsampling: 1
4
+ conf_threshold: 0.5
5
+ center_threshold: 0.1
6
+ min_distance: 3
7
+ max_objects: 10000
8
+ semantic_only: false
9
+ fine_boundaries: false
10
+ fill_holes_in_segmentation: false
11
+ median_slices: 3
12
+ label_erosion: 0
13
+ label_dilation: 0
14
+ pixel_vote_thr: 2
15
+ allow_one_view: false
@@ -0,0 +1,20 @@
1
+ # Auto-generated by save_all_default_configs - do not edit manually
2
+ patch: null
3
+ patch_halo: null
4
+ single_batch_mode: true
5
+ model_update: false
6
+ disable_tqdm: false
7
+ ws_threshold: 0.5
8
+ ws_sigma_seeds: 1.0
9
+ ws_stacked: false
10
+ ws_sigma_weights: 2.0
11
+ ws_min_size: 100
12
+ ws_alpha: 1.0
13
+ ws_pixel_pitch: null
14
+ ws_apply_nonmax_suppression: false
15
+ gasp_linkage_criteria: average
16
+ gasp_beta: 0.5
17
+ gasp_post_minsize: 100
18
+ n_threads: 6
19
+ voxel_size: null
20
+ voxel_size_unit: um
@@ -0,0 +1,13 @@
1
+ # Auto-generated by save_all_default_configs - do not edit manually
2
+ points_per_side: 32
3
+ points_per_batch: 64
4
+ pred_iou_thresh: 0.88
5
+ stability_score_thresh: 0.95
6
+ stability_score_offset: 1.0
7
+ box_nms_thresh: 0.7
8
+ crop_n_layers: 0
9
+ crop_nms_thresh: 0.7
10
+ crop_overlap_ratio: 0.34133
11
+ crop_n_points_downscale_factor: 1
12
+ min_mask_region_area: 3
13
+ max_mask_region_area: 0
@@ -0,0 +1,14 @@
1
+ # Auto-generated by save_all_default_configs - do not edit manually
2
+ points_per_side: 32
3
+ points_per_batch: 64
4
+ pred_iou_thresh: 0.88
5
+ stability_score_thresh: 0.95
6
+ stability_score_offset: 1.0
7
+ box_nms_thresh: 0.7
8
+ crop_n_layers: 0
9
+ crop_nms_thresh: 0.7
10
+ crop_overlap_ratio: 0.34133
11
+ crop_n_points_downscale_factor: 1
12
+ min_mask_region_area: 0
13
+ use_m2m: false
14
+ multimask_output: false
@@ -0,0 +1,9 @@
1
+ # Auto-generated by save_all_default_configs - do not edit manually
2
+ prob_thresh: null
3
+ nms_thresh: null
4
+ normalize_pmin: 1
5
+ normalize_pmax: 99.8
6
+ n_tiles: null
7
+ normalize_img: true
8
+ scale: null
9
+ channel_idx: 0
@@ -0,0 +1,202 @@
1
+ {
2
+ "name": "Cellpose",
3
+ "short_name": "cellpose",
4
+ "metadata": {
5
+ "description": "Cellpose is a generalist model for cell and nucleus segmentation.",
6
+ "url": "https://cellpose.readthedocs.io/en/v3.1.1.1/",
7
+ "repo": "https://github.com/MouseLand/cellpose",
8
+ "pubs": [
9
+ {
10
+ "info": "Cellpose v1",
11
+ "url": "https://doi.org/10.1038/s41592-020-01018-x",
12
+ "title": "Cellpose: a generalist algorithm for cellular segmentation",
13
+ "doi": "10.1038/s41592-020-01018-x",
14
+ "authors": [
15
+ {
16
+ "name": "Carsen Stringer",
17
+ "affiliation": "HHMI Janelia Research Campus, Ashburn, VA, USA"
18
+ },
19
+ {
20
+ "name": "Tim Wang",
21
+ "affiliation": "HHMI Janelia Research Campus, Ashburn, VA, USA"
22
+ },
23
+ {
24
+ "name": "Michalis Michaelos",
25
+ "affiliation": "HHMI Janelia Research Campus, Ashburn, VA, USA"
26
+ },
27
+ {
28
+ "name": "Marius Pachitariu",
29
+ "affiliation": "HHMI Janelia Research Campus, Ashburn, VA, USA"
30
+ }
31
+ ]
32
+ },
33
+ {
34
+ "info": "Cellpose v2",
35
+ "url": "https://doi.org/10.1038/s41592-022-01663-4",
36
+ "title": "Cellpose 2.0: how to train your own model",
37
+ "doi": "10.1038/s41592-022-01663-4",
38
+ "authors": [
39
+ {
40
+ "name": "Marius Pachitariu",
41
+ "affiliation": "HHMI Janelia Research Campus, Ashburn, VA, USA"
42
+ },
43
+ {
44
+ "name": "Carsen Stringer",
45
+ "affiliation": "HHMI Janelia Research Campus, Ashburn, VA, USA"
46
+ }
47
+ ]
48
+ },
49
+ {
50
+ "info": "Cellpose v3",
51
+ "url": "https://www.biorxiv.org/content/10.1101/2024.02.10.579780v2",
52
+ "title": "Cellpose3: one-click image restoration for improved cellular segmentation",
53
+ "doi": "10.1101/2024.02.10.579780",
54
+ "authors": [
55
+ {
56
+ "name": "Carsen Stringer",
57
+ "affiliation": "HHMI Janelia Research Campus, Ashburn, VA, USA"
58
+ },
59
+ {
60
+ "name": "Marius Pachitariu",
61
+ "affiliation": "HHMI Janelia Research Campus, Ashburn, VA, USA"
62
+ }
63
+ ]
64
+ }
65
+ ]
66
+ },
67
+ "versions": {
68
+ "cyto3": {
69
+ "tasks": {
70
+ "cyto": {
71
+ "locations": [
72
+ {
73
+ "location": "https://www.cellpose.org/models/cyto3"
74
+ }
75
+ ]
76
+ }
77
+ }
78
+ },
79
+ "nuclei": {
80
+ "tasks": {
81
+ "nuclei": {
82
+ "locations": [
83
+ {
84
+ "location": "https://www.cellpose.org/models/nucleitorch_0"
85
+ }
86
+ ]
87
+ }
88
+ }
89
+ },
90
+ "cyto1": {
91
+ "tasks": {
92
+ "cyto": {
93
+ "locations": [
94
+ {
95
+ "location": "https://www.cellpose.org/models/cytotorch_0"
96
+ }
97
+ ]
98
+ }
99
+ }
100
+ },
101
+ "cyto2": {
102
+ "tasks": {
103
+ "cyto": {
104
+ "locations": [
105
+ {
106
+ "location": "https://www.cellpose.org/models/cyto2torch_0"
107
+ }
108
+ ]
109
+ }
110
+ }
111
+ }
112
+ },
113
+ "params": [
114
+ {
115
+ "name": "Diameter",
116
+ "arg_name": "diameter",
117
+ "value": 0,
118
+ "tooltip": "Diameter of the cells in pixels. If None or 0, Cellpose will try to estimate it. Setting the value may improve results. See https://cellpose.readthedocs.io/en/v3.1.1.1/settings.html#diameter for details."
119
+ },
120
+ {
121
+ "name": "Segment Channel",
122
+ "arg_name": "segment_channel",
123
+ "value": 0,
124
+ "param_type": "channel",
125
+ "channel_start": 0,
126
+ "channel_start_label": "Grayscale",
127
+ "tooltip": "What channel to segment on. Cellpose channel convention: 0=grayscale (no specific channel), 1=first image channel, 2=second image channel, etc. See https://cellpose.readthedocs.io/en/v3.1.1.1/settings.html#channels for details."
128
+ },
129
+ {
130
+ "name": "Nucleus Channel",
131
+ "arg_name": "nucleus_channel",
132
+ "value": 0,
133
+ "param_type": "channel",
134
+ "channel_start": 0,
135
+ "channel_start_label": "No nucleus channel",
136
+ "tooltip": "What channel contains the nucleus. Cellpose channel convention: 0=no nucleus channel (grayscale), 1=first image channel, 2=second image channel, etc. Unused for the 'nuclei' model (nucleus is already the segment channel). See https://cellpose.readthedocs.io/en/v3.1.1.1/settings.html#channels for details."
137
+ },
138
+ {
139
+ "name": "3D Segmentation",
140
+ "arg_name": "do_3D",
141
+ "value": false,
142
+ "tooltip": "Whether to do 3D segmentation. If True, will try to segment in 3D (XY, XZ, YZ). If False, will segment in 2D and combine with stitch_threshold."
143
+ },
144
+ {
145
+ "name": "Stitch Threshold",
146
+ "arg_name": "stitch_threshold",
147
+ "value": 0.0,
148
+ "tooltip": "Threshold for stitching 2D segmentations together. Value is the IoU that constitutes an overlap and thus merge. Only used if do_3D is False and >0."
149
+ },
150
+ {
151
+ "name": "Cellprob Threshold",
152
+ "arg_name": "cellprob_threshold",
153
+ "value": 0.0,
154
+ "tooltip": "Threshold for flows to determine ROIs. Decrease to find more & larger ROIs, increase if too many ROIs (esp. in dim regions). See https://cellpose.readthedocs.io/en/v3.1.1.1/settings.html#cellprob-threshold for details."
155
+ },
156
+ {
157
+ "name": "Flow Threshold",
158
+ "arg_name": "flow_threshold",
159
+ "value": 0.4,
160
+ "tooltip": "Threshold for flows to determine ROIs. Not used for 3D. See https://cellpose.readthedocs.io/en/v3.1.1.1/settings.html#cellprob-threshold for details."
161
+ },
162
+ {
163
+ "name": "Num Iterations",
164
+ "arg_name": "niter",
165
+ "value": 0,
166
+ "tooltip": "Number of iterations to simulate dynamics for. By default (0/None), proportional to ROI diameter. See https://cellpose.readthedocs.io/en/v3.1.1.1/settings.html#number-of-iterations-niter for details."
167
+ },
168
+ {
169
+ "name": "Anisotropy",
170
+ "arg_name": "anisotropy",
171
+ "value": null,
172
+ "dtype": "float",
173
+ "tooltip": "Optional rescaling factor for Z (e.g. set to 2.0 if Z is sampled half as dense as X or Y). Only used if do_3D is True."
174
+ },
175
+ {
176
+ "name": "Channel axis",
177
+ "arg_name": "channel_axis",
178
+ "value": null,
179
+ "dtype": "int",
180
+ "tooltip": "Set the axis where channels are stored. 'None' means it tries to figure it out - useful if no/poor metadata and not loading properly."
181
+ },
182
+ {
183
+ "name": "Z axis",
184
+ "arg_name": "z_axis",
185
+ "value": null,
186
+ "dtype": "int",
187
+ "tooltip": "Set the axis where Z slices are stored. 'None' means it tries to figure it out - useful if no/poor metadata and not loading properly."
188
+ },
189
+ {
190
+ "name": "Batch size",
191
+ "arg_name": "batch_size",
192
+ "value": 64,
193
+ "tooltip": "Number of 224x224 patches to run simultaneously on the GPU. Can make smaller or bigger depending on GPU memory usage."
194
+ },
195
+ {
196
+ "name": "Minimum size",
197
+ "arg_name": "min_size",
198
+ "value": 15,
199
+ "tooltip": "Size (in pixels) of ROIs/to remove if lower. 0 will not remove any masks."
200
+ }
201
+ ]
202
+ }
@@ -0,0 +1,143 @@
1
+ {
2
+ "name": "Cellpose-SAM",
3
+ "short_name": "cellposesam",
4
+ "metadata": {
5
+ "description": "Cellpose-SAM is a generalist model for cell segmentation.",
6
+ "url": "https://cellpose.readthedocs.io/en/latest/",
7
+ "repo": "https://github.com/MouseLand/cellpose",
8
+ "pubs": [
9
+ {
10
+ "info": "Cellpose-SAM",
11
+ "url": "https://doi.org/10.1101/2025.04.28.651001",
12
+ "title": "Cellpose-SAM: superhuman generalization for cellular segmentation",
13
+ "doi": "10.1101/2025.04.28.651001",
14
+ "authors": [
15
+ {
16
+ "name": "Marius Pachitariu",
17
+ "affiliation": "HHMI Janelia Research Campus, Ashburn, VA, USA"
18
+ },
19
+ {
20
+ "name": "Michael Rariden",
21
+ "affiliation": "HHMI Janelia Research Campus, Ashburn, VA, USA"
22
+ },
23
+ {
24
+ "name": "Carsen Stringer",
25
+ "affiliation": "HHMI Janelia Research Campus, Ashburn, VA, USA"
26
+ }
27
+ ]
28
+ }
29
+ ]
30
+ },
31
+ "versions": {
32
+ "cpsam": {
33
+ "tasks": {
34
+ "cyto": {
35
+ "locations": [
36
+ {
37
+ "location": "https://huggingface.co/mouseland/cellpose-sam/resolve/main/cpsam"
38
+ }
39
+ ]
40
+ },
41
+ "nuclei": {
42
+ "locations": [
43
+ {
44
+ "location": "https://huggingface.co/mouseland/cellpose-sam/resolve/main/cpsam"
45
+ }
46
+ ]
47
+ }
48
+ }
49
+ }
50
+ },
51
+ "params": [
52
+ {
53
+ "name": "Segment Channel",
54
+ "arg_name": "segment_channel",
55
+ "value": 0,
56
+ "param_type": "channel",
57
+ "channel_start": 0,
58
+ "channel_start_label": "Grayscale",
59
+ "tooltip": "What channel to segment on. Cellpose-SAM is trained to be invariant to channel order and uses the first 3 channels of your image. Cellpose channel convention: 0=grayscale (no specific channel), 1=first image channel, 2=second image channel, etc. See https://cellpose.readthedocs.io/en/latest/settings.html#channels for details."
60
+ },
61
+ {
62
+ "name": "3D Segmentation",
63
+ "arg_name": "do_3D",
64
+ "value": false,
65
+ "tooltip": "Whether to do 3D segmentation. If True, will try to segment in 3D (XY, XZ, YZ). If False, will segment in 2D and combine with stitch_threshold."
66
+ },
67
+ {
68
+ "name": "Resample",
69
+ "arg_name": "resample",
70
+ "value": true,
71
+ "tooltip": "Whether to run dynamics at original image size (rather than likely smaller resized image). Slower, but more accurate boundaries."
72
+ },
73
+ {
74
+ "name": "Stitch Threshold",
75
+ "arg_name": "stitch_threshold",
76
+ "value": 0.0,
77
+ "tooltip": "Threshold for stitching 2D segmentations together. Value is the IoU that constitutes an overlap and thus merge. Only used if do_3D is False and >0."
78
+ },
79
+ {
80
+ "name": "Cellprob Threshold",
81
+ "arg_name": "cellprob_threshold",
82
+ "value": 0.0,
83
+ "tooltip": "Threshold for flows to determine ROIs. Decrease to find more & larger ROIs, increase if too many ROIs (esp. in dim regions). See https://cellpose.readthedocs.io/en/latest/settings.html#cellprob-threshold for details."
84
+ },
85
+ {
86
+ "name": "Flow Threshold",
87
+ "arg_name": "flow_threshold",
88
+ "value": 0.4,
89
+ "tooltip": "Threshold for flows to determine ROIs. Not used for 3D. See https://cellpose.readthedocs.io/en/latest/settings.html#cellprob-threshold for details."
90
+ },
91
+ {
92
+ "name": "Num Iterations",
93
+ "arg_name": "niter",
94
+ "value": 0,
95
+ "tooltip": "Number of iterations to simulate dynamics for. By default (0/None), proportional to ROI diameter. See https://cellpose.readthedocs.io/en/latest/settings.html#number-of-iterations-niter for details."
96
+ },
97
+ {
98
+ "name": "Anisotropy",
99
+ "arg_name": "anisotropy",
100
+ "value": null,
101
+ "dtype": "float",
102
+ "tooltip": "Optional rescaling factor for Z (e.g. set to 2.0 if Z is sampled half as dense as X or Y). Only used if do_3D is True."
103
+ },
104
+ {
105
+ "name": "Channel axis",
106
+ "arg_name": "channel_axis",
107
+ "value": null,
108
+ "dtype": "int",
109
+ "tooltip": "Set the axis where channels are stored. 'None' means it tries to figure it out - useful if no/poor metadata and not loading properly."
110
+ },
111
+ {
112
+ "name": "Z axis",
113
+ "arg_name": "z_axis",
114
+ "value": null,
115
+ "dtype": "int",
116
+ "tooltip": "Set the axis where Z slices are stored. 'None' means it tries to figure it out - useful if no/poor metadata and not loading properly."
117
+ },
118
+ {
119
+ "name": "Batch size",
120
+ "arg_name": "batch_size",
121
+ "value": 64,
122
+ "tooltip": "Number of 224x224 patches to run simultaneously on the GPU. Can make smaller or bigger depending on GPU memory usage."
123
+ },
124
+ {
125
+ "name": "Minimum size",
126
+ "arg_name": "min_size",
127
+ "value": 15,
128
+ "tooltip": "Size (in pixels) of ROIs/to remove if lower. 0 will not remove any masks."
129
+ },
130
+ {
131
+ "name": "Max size fraction",
132
+ "arg_name": "max_size_fraction",
133
+ "value": 0.4,
134
+ "tooltip": "Maximum size of ROIs as fraction of image size. Masks larger than this are removed."
135
+ },
136
+ {
137
+ "name": "Tile Overlap",
138
+ "arg_name": "tile_overlap",
139
+ "value": 0.1,
140
+ "tooltip": "Fraction of overlap of tiles when computing flows."
141
+ }
142
+ ]
143
+ }