dacapo-toolbox 1.0.0__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.
- dacapo_toolbox-1.0.0/.github/ISSUE_TEMPLATE/bug_report.md +38 -0
- dacapo_toolbox-1.0.0/.github/ISSUE_TEMPLATE/feature_request.md +20 -0
- dacapo_toolbox-1.0.0/.github/ISSUE_TEMPLATE.md +26 -0
- dacapo_toolbox-1.0.0/.github/workflows/docs.yaml +37 -0
- dacapo_toolbox-1.0.0/.github/workflows/publish.yaml +37 -0
- dacapo_toolbox-1.0.0/.github/workflows/ruff.yaml +22 -0
- dacapo_toolbox-1.0.0/.github/workflows/tests.yaml +36 -0
- dacapo_toolbox-1.0.0/.github/workflows/ty.yaml +22 -0
- dacapo_toolbox-1.0.0/.gitignore +17 -0
- dacapo_toolbox-1.0.0/PKG-INFO +74 -0
- dacapo_toolbox-1.0.0/README.md +27 -0
- dacapo_toolbox-1.0.0/docs/source/Makefile +20 -0
- dacapo_toolbox-1.0.0/docs/source/_static/dacapo-toolbox-logo.png +0 -0
- dacapo_toolbox-1.0.0/docs/source/_static/dacapo-toolbox.png +0 -0
- dacapo_toolbox-1.0.0/docs/source/api.rst +79 -0
- dacapo_toolbox-1.0.0/docs/source/conf.py +65 -0
- dacapo_toolbox-1.0.0/docs/source/index.rst +17 -0
- dacapo_toolbox-1.0.0/docs/source/install.rst +16 -0
- dacapo_toolbox-1.0.0/docs/source/make.bat +35 -0
- dacapo_toolbox-1.0.0/docs/source/overview.rst +13 -0
- dacapo_toolbox-1.0.0/examples/affs.py +141 -0
- dacapo_toolbox-1.0.0/examples/lsds.py +94 -0
- dacapo_toolbox-1.0.0/examples/sdt.py +93 -0
- dacapo_toolbox-1.0.0/justfile +11 -0
- dacapo_toolbox-1.0.0/pyproject.toml +56 -0
- dacapo_toolbox-1.0.0/setup.cfg +4 -0
- dacapo_toolbox-1.0.0/src/dacapo_toolbox/__init__.py +0 -0
- dacapo_toolbox-1.0.0/src/dacapo_toolbox/dataset.py +483 -0
- dacapo_toolbox-1.0.0/src/dacapo_toolbox/modules/__init__.py +0 -0
- dacapo_toolbox-1.0.0/src/dacapo_toolbox/modules/distance_head.py +29 -0
- dacapo_toolbox-1.0.0/src/dacapo_toolbox/postprocessing.py +281 -0
- dacapo_toolbox-1.0.0/src/dacapo_toolbox/py.typed +0 -0
- dacapo_toolbox-1.0.0/src/dacapo_toolbox/sample_datasets.py +57 -0
- dacapo_toolbox-1.0.0/src/dacapo_toolbox/tmp.py +11 -0
- dacapo_toolbox-1.0.0/src/dacapo_toolbox/transforms/affs.py +159 -0
- dacapo_toolbox-1.0.0/src/dacapo_toolbox/transforms/distances.py +38 -0
- dacapo_toolbox-1.0.0/src/dacapo_toolbox/transforms/lsds.py +285 -0
- dacapo_toolbox-1.0.0/src/dacapo_toolbox/transforms/weight_balancing.py +93 -0
- dacapo_toolbox-1.0.0/src/dacapo_toolbox/vis/preview.py +444 -0
- dacapo_toolbox-1.0.0/src/dacapo_toolbox.egg-info/PKG-INFO +74 -0
- dacapo_toolbox-1.0.0/src/dacapo_toolbox.egg-info/SOURCES.txt +48 -0
- dacapo_toolbox-1.0.0/src/dacapo_toolbox.egg-info/dependency_links.txt +1 -0
- dacapo_toolbox-1.0.0/src/dacapo_toolbox.egg-info/requires.txt +47 -0
- dacapo_toolbox-1.0.0/src/dacapo_toolbox.egg-info/top_level.txt +1 -0
- dacapo_toolbox-1.0.0/test.py +2 -0
- dacapo_toolbox-1.0.0/tests/__init__.py +0 -0
- dacapo_toolbox-1.0.0/tests/test_transforms.py +55 -0
- dacapo_toolbox-1.0.0/tutorials/dataset/cremi.py +600 -0
- dacapo_toolbox-1.0.0/tutorials/dataset/dataset_benchmarking.py +193 -0
- dacapo_toolbox-1.0.0/tutorials/dataset/dataset_overview.py +490 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Bug report
|
|
3
|
+
about: Create a report to help us improve
|
|
4
|
+
title: ''
|
|
5
|
+
labels: ''
|
|
6
|
+
assignees: ''
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
**Describe the bug**
|
|
11
|
+
A clear and concise description of what the bug is.
|
|
12
|
+
|
|
13
|
+
**To Reproduce**
|
|
14
|
+
Steps to reproduce the behavior:
|
|
15
|
+
1. Go to '...'
|
|
16
|
+
2. Click on '....'
|
|
17
|
+
3. Scroll down to '....'
|
|
18
|
+
4. See error
|
|
19
|
+
|
|
20
|
+
**Expected behavior**
|
|
21
|
+
A clear and concise description of what you expected to happen.
|
|
22
|
+
|
|
23
|
+
**Screenshots**
|
|
24
|
+
If applicable, add screenshots to help explain your problem.
|
|
25
|
+
|
|
26
|
+
**Desktop (please complete the following information):**
|
|
27
|
+
- OS: [e.g. iOS]
|
|
28
|
+
- Browser [e.g. chrome, safari]
|
|
29
|
+
- Version [e.g. 22]
|
|
30
|
+
|
|
31
|
+
**Smartphone (please complete the following information):**
|
|
32
|
+
- Device: [e.g. iPhone6]
|
|
33
|
+
- OS: [e.g. iOS8.1]
|
|
34
|
+
- Browser [e.g. stock browser, safari]
|
|
35
|
+
- Version [e.g. 22]
|
|
36
|
+
|
|
37
|
+
**Additional context**
|
|
38
|
+
Add any other context about the problem here.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Feature request
|
|
3
|
+
about: Suggest an idea for this project
|
|
4
|
+
title: ''
|
|
5
|
+
labels: ''
|
|
6
|
+
assignees: ''
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
**Is your feature request related to a problem? Please describe.**
|
|
11
|
+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
|
12
|
+
|
|
13
|
+
**Describe the solution you'd like**
|
|
14
|
+
A clear and concise description of what you want to happen.
|
|
15
|
+
|
|
16
|
+
**Describe alternatives you've considered**
|
|
17
|
+
A clear and concise description of any alternative solutions or features you've considered.
|
|
18
|
+
|
|
19
|
+
**Additional context**
|
|
20
|
+
Add any other context or screenshots about the feature request here.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
* {{ cookiecutter.project_name }} version:
|
|
2
|
+
* Python version:
|
|
3
|
+
* Operating System:
|
|
4
|
+
|
|
5
|
+
### Bug or feature?
|
|
6
|
+
|
|
7
|
+
Are you reporting a bug or adding a new feature? Perhaps you want more documentation?
|
|
8
|
+
Please tell us here and tag the issue appropriately.
|
|
9
|
+
|
|
10
|
+
### Description
|
|
11
|
+
|
|
12
|
+
Describe the bug you want fixed, the feature you want to see, etc.
|
|
13
|
+
If you are requesting a new feature, please say why you think that feature is important and belongs in this library, and any guesses on how to implement it.
|
|
14
|
+
|
|
15
|
+
### What I Did/What I Would Like to Do
|
|
16
|
+
|
|
17
|
+
For a bug:
|
|
18
|
+
```
|
|
19
|
+
Paste the command(s) you ran and the output.
|
|
20
|
+
If there was a crash, please include the traceback here.
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
For a feature:
|
|
24
|
+
```
|
|
25
|
+
Provide sample code that you would hope to run and what it would output.
|
|
26
|
+
```
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
name: Generate Pages
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
id-token: write
|
|
10
|
+
contents: write
|
|
11
|
+
pages: write
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
build:
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
timeout-minutes: 180
|
|
17
|
+
steps:
|
|
18
|
+
- name: Setup checkout
|
|
19
|
+
uses: actions/checkout@master
|
|
20
|
+
- name: Install uv
|
|
21
|
+
uses: astral-sh/setup-uv@main
|
|
22
|
+
- uses: extractions/setup-just@v3
|
|
23
|
+
- name: Install pandoc
|
|
24
|
+
uses: pandoc/actions/setup@v1
|
|
25
|
+
with:
|
|
26
|
+
version: 2.19
|
|
27
|
+
- name: install ffmpeg
|
|
28
|
+
run: sudo apt-get install ffmpeg
|
|
29
|
+
- name: build docs
|
|
30
|
+
run: just docs
|
|
31
|
+
- name: Set permissions
|
|
32
|
+
run: chmod -R a+rX ./docs/build/html
|
|
33
|
+
- name: Update gh branch
|
|
34
|
+
uses: peaceiris/actions-gh-pages@v4
|
|
35
|
+
with:
|
|
36
|
+
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
37
|
+
publish_dir: docs/build/html
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
name: Publish
|
|
2
|
+
|
|
3
|
+
permissions:
|
|
4
|
+
id-token: write
|
|
5
|
+
|
|
6
|
+
on:
|
|
7
|
+
push:
|
|
8
|
+
tags: ["*"]
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
build-n-publish:
|
|
12
|
+
name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
steps:
|
|
15
|
+
- uses: actions/checkout@master
|
|
16
|
+
- name: Set up Python 3.10
|
|
17
|
+
uses: actions/setup-python@v3
|
|
18
|
+
with:
|
|
19
|
+
python-version: "3.10"
|
|
20
|
+
- name: Install pypa/build
|
|
21
|
+
run: >-
|
|
22
|
+
python -m
|
|
23
|
+
pip install
|
|
24
|
+
build
|
|
25
|
+
--user
|
|
26
|
+
- name: Build a binary wheel and a source tarball
|
|
27
|
+
run: >-
|
|
28
|
+
python -m
|
|
29
|
+
build
|
|
30
|
+
--sdist
|
|
31
|
+
--wheel
|
|
32
|
+
--outdir dist/
|
|
33
|
+
- name: Publish distribution 📦 to PyPI
|
|
34
|
+
if: startsWith(github.ref, 'refs/tags')
|
|
35
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
36
|
+
with:
|
|
37
|
+
password: ${{ secrets.PYPI_API_TOKEN }}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
name: ruff
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
push:
|
|
8
|
+
branches:
|
|
9
|
+
- main
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
static-analysis:
|
|
13
|
+
name: ruff
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
steps:
|
|
16
|
+
- name: Setup checkout
|
|
17
|
+
uses: actions/checkout@v4
|
|
18
|
+
- name: Install uv
|
|
19
|
+
uses: astral-sh/setup-uv@v5
|
|
20
|
+
- name: ruff
|
|
21
|
+
run: |
|
|
22
|
+
uv run --extra dev ruff check src tests
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
name: Test
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
- dev/main
|
|
8
|
+
push:
|
|
9
|
+
branches:
|
|
10
|
+
- main
|
|
11
|
+
- dev/main
|
|
12
|
+
workflow_dispatch:
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
test:
|
|
16
|
+
name: ${{ matrix.platform }} py${{ matrix.python-version }}
|
|
17
|
+
runs-on: ${{ matrix.platform }}
|
|
18
|
+
strategy:
|
|
19
|
+
fail-fast: false
|
|
20
|
+
matrix:
|
|
21
|
+
# platform: [ubuntu-latest, windows-latest, macos-latest]
|
|
22
|
+
platform: [ubuntu-latest]
|
|
23
|
+
python-version: ['3.11', '3.12']
|
|
24
|
+
timeout-minutes: 20
|
|
25
|
+
|
|
26
|
+
steps:
|
|
27
|
+
- uses: actions/checkout@v4
|
|
28
|
+
|
|
29
|
+
- name: Install uv
|
|
30
|
+
uses: astral-sh/setup-uv@v5
|
|
31
|
+
|
|
32
|
+
- name: Test
|
|
33
|
+
run: uv run --pre --extra dev --python ${{ matrix.python-version }} pytest --color=yes --cov --cov-report=xml --cov-report=term-missing
|
|
34
|
+
|
|
35
|
+
- name: Coverage
|
|
36
|
+
uses: codecov/codecov-action@v3
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
name: type-check
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
push:
|
|
8
|
+
branches:
|
|
9
|
+
- main
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
static-analysis:
|
|
13
|
+
name: ty
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
steps:
|
|
16
|
+
- name: Setup checkout
|
|
17
|
+
uses: actions/checkout@v4
|
|
18
|
+
- name: Install uv
|
|
19
|
+
uses: astral-sh/setup-uv@v5
|
|
20
|
+
- name: ty
|
|
21
|
+
run: |
|
|
22
|
+
uv run --pre --all-extras ty check src/dacapo_toolbox
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: dacapo-toolbox
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: A suite of tools for large scale ND training.
|
|
5
|
+
Requires-Python: >=3.11
|
|
6
|
+
Description-Content-Type: text/markdown
|
|
7
|
+
Requires-Dist: edt>=3.0.0
|
|
8
|
+
Requires-Dist: funlib-persistence>=0.6
|
|
9
|
+
Requires-Dist: gunpowder>=1.4.2
|
|
10
|
+
Requires-Dist: scikit-learn>=1.7.1
|
|
11
|
+
Requires-Dist: torch>=2.6.0
|
|
12
|
+
Provides-Extra: postprocessing
|
|
13
|
+
Requires-Dist: volara-torch>=1.0.1; extra == "postprocessing"
|
|
14
|
+
Requires-Dist: volara>=1.0.2; extra == "postprocessing"
|
|
15
|
+
Provides-Extra: vis
|
|
16
|
+
Requires-Dist: matplotlib>=3.10.5; extra == "vis"
|
|
17
|
+
Provides-Extra: dev
|
|
18
|
+
Requires-Dist: pytest>=8.3.4; extra == "dev"
|
|
19
|
+
Requires-Dist: pytest-cov>=6.0.0; extra == "dev"
|
|
20
|
+
Requires-Dist: ruff>=0.9.6; extra == "dev"
|
|
21
|
+
Requires-Dist: pytest-xdist>=3.6.1; extra == "dev"
|
|
22
|
+
Requires-Dist: ty>=0.0.1a18; extra == "dev"
|
|
23
|
+
Provides-Extra: accelerators
|
|
24
|
+
Requires-Dist: accelerate>=1.10.0; extra == "accelerators"
|
|
25
|
+
Requires-Dist: lightning>=2.5.3; extra == "accelerators"
|
|
26
|
+
Provides-Extra: sample-datasets
|
|
27
|
+
Requires-Dist: wget>=3.2; extra == "sample-datasets"
|
|
28
|
+
Provides-Extra: examples
|
|
29
|
+
Requires-Dist: torchvision>=0.22.0; extra == "examples"
|
|
30
|
+
Provides-Extra: docs
|
|
31
|
+
Requires-Dist: h5py>=3.13.0; extra == "docs"
|
|
32
|
+
Requires-Dist: ipykernel>=6.29.5; extra == "docs"
|
|
33
|
+
Requires-Dist: matplotlib>=3.10.3; extra == "docs"
|
|
34
|
+
Requires-Dist: mwatershed>=0.5.3; extra == "docs"
|
|
35
|
+
Requires-Dist: tems>=1.0.3; extra == "docs"
|
|
36
|
+
Requires-Dist: torchvision>=0.22.0; extra == "docs"
|
|
37
|
+
Requires-Dist: volara>=1.0.1; extra == "docs"
|
|
38
|
+
Requires-Dist: volara-torch>=1.0.0; extra == "docs"
|
|
39
|
+
Requires-Dist: wget>=3.2; extra == "docs"
|
|
40
|
+
Requires-Dist: jupytext>=1.17.2; extra == "docs"
|
|
41
|
+
Requires-Dist: sphinx-autodoc-typehints>=2.0; extra == "docs"
|
|
42
|
+
Requires-Dist: sphinx-material>=0.0.36; extra == "docs"
|
|
43
|
+
Requires-Dist: sphinx-click>=6.0; extra == "docs"
|
|
44
|
+
Requires-Dist: sphinx-rtd-theme>=2.0; extra == "docs"
|
|
45
|
+
Requires-Dist: nbsphinx>=0.9.7; extra == "docs"
|
|
46
|
+
Requires-Dist: myst-parser>=4.0; extra == "docs"
|
|
47
|
+
|
|
48
|
+

|
|
49
|
+
[](https://github.com/pattonw/dacapo-toolbox/actions/workflows/tests.yaml)
|
|
50
|
+
[](https://github.com/pattonw/dacapo-toolbox/actions/workflows/ruff.yaml)
|
|
51
|
+
[](https://github.com/pattonw/dacapo-toolbox/actions/workflows/ty.yaml)
|
|
52
|
+
[](https://pypi.org/project/dacapo-toolbox/)
|
|
53
|
+
[](https://github.com/pattonw/dacapo-toolbox/actions/workflows/docs.yaml)
|
|
54
|
+
|
|
55
|
+
# DaCapo-Toolbox
|
|
56
|
+
|
|
57
|
+
> A simple interface for large scale microscopy training and post processing
|
|
58
|
+
|
|
59
|
+
## What is DaCapo-Toolbox?
|
|
60
|
+
|
|
61
|
+
DaCapo-Toolbox wraps powerful tools for large scale microscopy training and evaluation such as:
|
|
62
|
+
[gunpowder](https://github.com/funkelab/gunpowder), [daisy](https://github.com/funkelab/daisy), and
|
|
63
|
+
[volara](https://github.com/e11bio/volara) in simple interfaces that abstract away the intricacies
|
|
64
|
+
of the specific tools and just provides interfaces in common formats such as
|
|
65
|
+
[zarr](https://zarr.readthedocs.io/en/stable/), [torch](https://pytorch.org), [dask](https://dask.org),
|
|
66
|
+
and [numpy](https://numpy.org).
|
|
67
|
+
|
|
68
|
+
## Installation
|
|
69
|
+
|
|
70
|
+
`pip install dacapo-toolbox`
|
|
71
|
+
|
|
72
|
+
## Usage
|
|
73
|
+
|
|
74
|
+
See the [DaCapo-Toolbox docs](https://pattonw.github.io/dacapo-toolbox)
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+

|
|
2
|
+
[](https://github.com/pattonw/dacapo-toolbox/actions/workflows/tests.yaml)
|
|
3
|
+
[](https://github.com/pattonw/dacapo-toolbox/actions/workflows/ruff.yaml)
|
|
4
|
+
[](https://github.com/pattonw/dacapo-toolbox/actions/workflows/ty.yaml)
|
|
5
|
+
[](https://pypi.org/project/dacapo-toolbox/)
|
|
6
|
+
[](https://github.com/pattonw/dacapo-toolbox/actions/workflows/docs.yaml)
|
|
7
|
+
|
|
8
|
+
# DaCapo-Toolbox
|
|
9
|
+
|
|
10
|
+
> A simple interface for large scale microscopy training and post processing
|
|
11
|
+
|
|
12
|
+
## What is DaCapo-Toolbox?
|
|
13
|
+
|
|
14
|
+
DaCapo-Toolbox wraps powerful tools for large scale microscopy training and evaluation such as:
|
|
15
|
+
[gunpowder](https://github.com/funkelab/gunpowder), [daisy](https://github.com/funkelab/daisy), and
|
|
16
|
+
[volara](https://github.com/e11bio/volara) in simple interfaces that abstract away the intricacies
|
|
17
|
+
of the specific tools and just provides interfaces in common formats such as
|
|
18
|
+
[zarr](https://zarr.readthedocs.io/en/stable/), [torch](https://pytorch.org), [dask](https://dask.org),
|
|
19
|
+
and [numpy](https://numpy.org).
|
|
20
|
+
|
|
21
|
+
## Installation
|
|
22
|
+
|
|
23
|
+
`pip install dacapo-toolbox`
|
|
24
|
+
|
|
25
|
+
## Usage
|
|
26
|
+
|
|
27
|
+
See the [DaCapo-Toolbox docs](https://pattonw.github.io/dacapo-toolbox)
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Minimal makefile for Sphinx documentation
|
|
2
|
+
#
|
|
3
|
+
|
|
4
|
+
# You can set these variables from the command line, and also
|
|
5
|
+
# from the environment for the first two.
|
|
6
|
+
SPHINXOPTS ?=
|
|
7
|
+
SPHINXBUILD ?= sphinx-build
|
|
8
|
+
SOURCEDIR = .
|
|
9
|
+
BUILDDIR = _build
|
|
10
|
+
|
|
11
|
+
# Put it first so that "make" without argument is like "make help".
|
|
12
|
+
help:
|
|
13
|
+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
|
14
|
+
|
|
15
|
+
.PHONY: help Makefile
|
|
16
|
+
|
|
17
|
+
# Catch-all target: route all unknown targets to Sphinx using the new
|
|
18
|
+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
|
|
19
|
+
%: Makefile
|
|
20
|
+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
.. _sec_api:
|
|
2
|
+
|
|
3
|
+
API Reference
|
|
4
|
+
=============
|
|
5
|
+
|
|
6
|
+
.. automodule:: dacapo_toolbox
|
|
7
|
+
:no-index:
|
|
8
|
+
|
|
9
|
+
Dataset
|
|
10
|
+
=======
|
|
11
|
+
|
|
12
|
+
.. autoclass:: dacapo_toolbox.dataset.iterable_dataset
|
|
13
|
+
:members:
|
|
14
|
+
|
|
15
|
+
.. autoclass:: dacapo_toolbox.dataset.SimpleAugmentConfig
|
|
16
|
+
:members:
|
|
17
|
+
|
|
18
|
+
.. autoclass:: dacapo_toolbox.dataset.DeformAugmentConfig
|
|
19
|
+
:members:
|
|
20
|
+
|
|
21
|
+
.. autoclass:: dacapo_toolbox.dataset.MaskedSampling
|
|
22
|
+
:members:
|
|
23
|
+
|
|
24
|
+
.. autoclass:: dacapo_toolbox.dataset.PointSampling
|
|
25
|
+
:members:
|
|
26
|
+
|
|
27
|
+
Transforms
|
|
28
|
+
==========
|
|
29
|
+
|
|
30
|
+
Affinities
|
|
31
|
+
----------
|
|
32
|
+
|
|
33
|
+
.. autoclass:: dacapo_toolbox.transforms.affs.Affs
|
|
34
|
+
:members:
|
|
35
|
+
|
|
36
|
+
.. autoclass:: dacapo_toolbox.transforms.affs.AffsMask
|
|
37
|
+
:members:
|
|
38
|
+
|
|
39
|
+
.. autofunction:: dacapo_toolbox.transforms.affs.compute_affs
|
|
40
|
+
:members:
|
|
41
|
+
|
|
42
|
+
Distances
|
|
43
|
+
---------
|
|
44
|
+
|
|
45
|
+
.. autoclass:: dacapo_toolbox.transforms.distances.SignedDistanceTransform
|
|
46
|
+
:members:
|
|
47
|
+
|
|
48
|
+
.. autoclass:: dacapo_toolbox.transforms.distances.SDTBoundaryMask
|
|
49
|
+
:members:
|
|
50
|
+
|
|
51
|
+
LSDS
|
|
52
|
+
----
|
|
53
|
+
|
|
54
|
+
.. autoclass:: dacapo_toolbox.transforms.lsds.LSD
|
|
55
|
+
:members:
|
|
56
|
+
|
|
57
|
+
.. autofunction:: dacapo_toolbox.transforms.lsds.get_local_shape_descriptors
|
|
58
|
+
|
|
59
|
+
Weight Balancing
|
|
60
|
+
----------------
|
|
61
|
+
|
|
62
|
+
.. autoclass:: dacapo_toolbox.transforms.weight_balancing.BalanceLabels
|
|
63
|
+
:members:
|
|
64
|
+
|
|
65
|
+
.. autofunction:: dacapo_toolbox.transforms.weight_balancing.balance_weights
|
|
66
|
+
|
|
67
|
+
Visualizations
|
|
68
|
+
==============
|
|
69
|
+
|
|
70
|
+
.. autofunction:: dacapo_toolbox.vis.preview.gif_2d
|
|
71
|
+
|
|
72
|
+
.. autofunction:: dacapo_toolbox.vis.preview.cube
|
|
73
|
+
|
|
74
|
+
Sample Data
|
|
75
|
+
===========
|
|
76
|
+
|
|
77
|
+
.. autofunction:: dacapo_toolbox.sample_datasets.cremi
|
|
78
|
+
|
|
79
|
+
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# Configuration file for the Sphinx documentation builder.
|
|
2
|
+
#
|
|
3
|
+
# This file only contains a selection of the most common options. For a full
|
|
4
|
+
# list see the documentation:
|
|
5
|
+
# https://www.sphinx-doc.org/en/master/usage/configuration.html
|
|
6
|
+
|
|
7
|
+
# -- Path setup --------------------------------------------------------------
|
|
8
|
+
|
|
9
|
+
# If extensions (or modules to document with autodoc) are in another directory,
|
|
10
|
+
# add these directories to sys.path here. If the directory is relative to the
|
|
11
|
+
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
|
12
|
+
#
|
|
13
|
+
import os
|
|
14
|
+
import sys
|
|
15
|
+
|
|
16
|
+
sys.path.insert(0, os.path.abspath("../.."))
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
# -- Project information -----------------------------------------------------
|
|
20
|
+
|
|
21
|
+
project = "DaCapo"
|
|
22
|
+
copyright = "2024, William Patton, Jeff Rhoades, Marwan Zouinkhi, David Ackerman, Caroline Malin-Mayor, Jan Funke"
|
|
23
|
+
author = " William Patton, Jeff Rhoades, Marwan Zouinkhi, David Ackerman, Caroline Malin-Mayor, Jan Funke"
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
# -- General configuration ---------------------------------------------------
|
|
27
|
+
|
|
28
|
+
# Add any Sphinx extension module names here, as strings. They can be
|
|
29
|
+
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
|
|
30
|
+
# ones.
|
|
31
|
+
extensions = [
|
|
32
|
+
"nbsphinx",
|
|
33
|
+
"sphinx.ext.autodoc",
|
|
34
|
+
"sphinx.ext.napoleon",
|
|
35
|
+
"sphinx_autodoc_typehints",
|
|
36
|
+
"sphinx_click", # auto document cli
|
|
37
|
+
"myst_parser", # include md files in rst files
|
|
38
|
+
]
|
|
39
|
+
|
|
40
|
+
nbsphinx_custom_formats = {
|
|
41
|
+
".py": ["jupytext.reads", {"fmt", "py:percent"}],
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
# Add any paths that contain templates here, relative to this directory.
|
|
45
|
+
templates_path = ["_templates"]
|
|
46
|
+
|
|
47
|
+
# List of patterns, relative to source directory, that match files and
|
|
48
|
+
# directories to ignore when looking for source files.
|
|
49
|
+
# This pattern also affects html_static_path and html_extra_path.
|
|
50
|
+
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
|
|
51
|
+
|
|
52
|
+
# -- Options for HTML output -------------------------------------------------
|
|
53
|
+
|
|
54
|
+
# The theme to use for HTML and HTML Help pages. See the documentation for
|
|
55
|
+
# a list of builtin themes.
|
|
56
|
+
#
|
|
57
|
+
html_theme = "sphinx_rtd_theme"
|
|
58
|
+
|
|
59
|
+
# Add any paths that contain custom static files (such as style sheets) here,
|
|
60
|
+
# relative to this directory. They are copied after the builtin static files,
|
|
61
|
+
# so a file named "default.css" will overwrite the builtin "default.css".
|
|
62
|
+
html_static_path = ["_static"]
|
|
63
|
+
html_css_files = [
|
|
64
|
+
"css/custom.css",
|
|
65
|
+
]
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
.. DaCapo documentation master file, created by
|
|
2
|
+
sphinx-quickstart on Tue Aug 2 16:34:19 2022.
|
|
3
|
+
You can adapt this file completely to your liking, but it should at least
|
|
4
|
+
contain the root `toctree` directive.
|
|
5
|
+
.. toctree::
|
|
6
|
+
:maxdepth: 2
|
|
7
|
+
:hidden:
|
|
8
|
+
:caption: DaCapo Toolbox:
|
|
9
|
+
|
|
10
|
+
overview
|
|
11
|
+
install
|
|
12
|
+
api
|
|
13
|
+
tutorials/dataset/dataset_overview
|
|
14
|
+
tutorials/dataset/cremi
|
|
15
|
+
|
|
16
|
+
.. include:: ../../README.md
|
|
17
|
+
:parser: myst_parser.sphinx_
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
.. _sec_install:
|
|
2
|
+
|
|
3
|
+
Installation
|
|
4
|
+
============
|
|
5
|
+
|
|
6
|
+
For the most recent release:
|
|
7
|
+
|
|
8
|
+
.. code-block:: bash
|
|
9
|
+
|
|
10
|
+
pip install dacapo-toolbox
|
|
11
|
+
|
|
12
|
+
For the latest version:
|
|
13
|
+
|
|
14
|
+
.. code-block:: bash
|
|
15
|
+
|
|
16
|
+
pip install git+https://github.com/pattonw/dacapo-toolbox
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
@ECHO OFF
|
|
2
|
+
|
|
3
|
+
pushd %~dp0
|
|
4
|
+
|
|
5
|
+
REM Command file for Sphinx documentation
|
|
6
|
+
|
|
7
|
+
if "%SPHINXBUILD%" == "" (
|
|
8
|
+
set SPHINXBUILD=sphinx-build
|
|
9
|
+
)
|
|
10
|
+
set SOURCEDIR=.
|
|
11
|
+
set BUILDDIR=_build
|
|
12
|
+
|
|
13
|
+
if "%1" == "" goto help
|
|
14
|
+
|
|
15
|
+
%SPHINXBUILD% >NUL 2>NUL
|
|
16
|
+
if errorlevel 9009 (
|
|
17
|
+
echo.
|
|
18
|
+
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
|
|
19
|
+
echo.installed, then set the SPHINXBUILD environment variable to point
|
|
20
|
+
echo.to the full path of the 'sphinx-build' executable. Alternatively you
|
|
21
|
+
echo.may add the Sphinx directory to PATH.
|
|
22
|
+
echo.
|
|
23
|
+
echo.If you don't have Sphinx installed, grab it from
|
|
24
|
+
echo.https://www.sphinx-doc.org/
|
|
25
|
+
exit /b 1
|
|
26
|
+
)
|
|
27
|
+
|
|
28
|
+
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
|
|
29
|
+
goto end
|
|
30
|
+
|
|
31
|
+
:help
|
|
32
|
+
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
|
|
33
|
+
|
|
34
|
+
:end
|
|
35
|
+
popd
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
.. _sec_overview:
|
|
2
|
+
|
|
3
|
+
Overview
|
|
4
|
+
========
|
|
5
|
+
|
|
6
|
+
What is the DaCapo Toolbox?
|
|
7
|
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
8
|
+
|
|
9
|
+
The DaCapo Toolbox contains a set of convenient tools for training neural networks on large microscopy datasets.
|
|
10
|
+
Specifically it focuses on providing a simple interface to many tools and techniques with an emphasis on
|
|
11
|
+
common interfaces such as torch/numpy/dask and other common scientific computing packages.
|
|
12
|
+
The main exception to this is the `funlib.persistence.Array` object. A thin wrapper around a `dask` array with
|
|
13
|
+
added metadata necessary for reliable training on diverse microscopy datasets.
|