Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dev/main #276

Open
wants to merge 318 commits into
base: dev/main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
318 commits
Select commit Hold shift + click to select a range
b649843
Merge branch 'main' into fix/store_training_stats
mzouink Jul 22, 2024
e0cae67
Merge branch 'main' into optional_dep
mzouink Jul 22, 2024
5f6b7ea
perf: ⚡️ Add found options file to the environment variable. (#277)
mzouink Jul 22, 2024
0fa962c
Merge branch 'main' into feat_datasplit_use_negativ
mzouink Jul 22, 2024
8ca78c4
Merge branch 'main' into optional_dep
mzouink Jul 22, 2024
33c6f52
better datasplit generator (#272)
mzouink Jul 22, 2024
9e5ca55
Merge branch 'main' into feat_datasplit_use_negativ
mzouink Jul 22, 2024
e806bf4
use negative crops + better neutoglancer (#267)
mzouink Jul 22, 2024
fb1bd5d
fix: :bug: fix how file stats are updated (#265)
mzouink Jul 22, 2024
6876cac
Merge branch 'main' of github.com:janelia-cellmap/dacapo
rhoadesScholar Jul 23, 2024
6a6ee1b
fix: 🐛 Fix validation model loading.
rhoadesScholar Jul 23, 2024
926bb2d
better datasplit generator naming
mzouink Jul 23, 2024
aecdadd
Merge branch 'main' into validate_patch
mzouink Jul 23, 2024
9d63428
Merge branch 'validate_patch' of github.com:janelia-cellmap/dacapo in…
rhoadesScholar Jul 25, 2024
e89e2ec
support global_run for local compute context, solve tcp buffer error
mzouink Jul 29, 2024
18ecf1a
Merge branch 'validate_patch' of https://github.com/janelia-cellmap/d…
mzouink Jul 29, 2024
9ea893c
black format
mzouink Jul 29, 2024
0cf9e25
fix plot hack
mzouink Jul 30, 2024
276d481
fix import
mzouink Jul 30, 2024
24c963a
matplotlib plot
mzouink Jul 31, 2024
7f534cf
:art: Format Python code with psf/black
mzouink Jul 31, 2024
86d2bb9
Format Python code with psf/black push (#281)
mzouink Jul 31, 2024
e5c1fbc
Merge branch 'validate_patch' of github.com:janelia-cellmap/dacapo in…
rhoadesScholar Aug 2, 2024
2ed077e
Merge branch 'main' of github.com:janelia-cellmap/dacapo
rhoadesScholar Aug 2, 2024
8e04c1c
Merge branch 'main' into validate_patch
mzouink Aug 5, 2024
a64c80f
black format
mzouink Aug 5, 2024
e2e9da7
mypy fix
mzouink Aug 5, 2024
4919c91
:art: Format Python code with psf/black
mzouink Aug 5, 2024
2dd89c4
Format Python code with psf/black push (#282)
mzouink Aug 5, 2024
8be4941
fix circular import
mzouink Aug 5, 2024
573d669
fix circular import
mzouink Aug 5, 2024
cab1169
fix validate
mzouink Aug 5, 2024
5e59778
fix tests
mzouink Aug 5, 2024
5a6440b
:art: Format Python code with psf/black
mzouink Aug 5, 2024
c529ed2
Format Python code with psf/black push (#283)
mzouink Aug 5, 2024
d3a55c9
Validate patch (#278)
mzouink Aug 5, 2024
d5196e1
fix new pytorch error
mzouink Aug 5, 2024
a7200c2
Merge branch 'main' into validate_patch
mzouink Aug 5, 2024
8d06bdb
fix new pytorch error
mzouink Aug 5, 2024
b856760
:art: Format Python code with psf/black
mzouink Aug 5, 2024
c0ed0d9
Format Python code with psf/black push (#285)
rhoadesScholar Aug 7, 2024
cc37119
Create CITATION.cff
rhoadesScholar Aug 7, 2024
2e77a18
Update README.md
rhoadesScholar Aug 7, 2024
5bcd5e0
Merge branch 'main' of github.com:janelia-cellmap/dacapo
rhoadesScholar Aug 12, 2024
8e690aa
Merge branch 'main' into validate_patch
rhoadesScholar Aug 12, 2024
36ede1c
Fix small typos
atc3 Aug 12, 2024
9f1f842
Merge branch 'validate_patch' of github.com:janelia-cellmap/dacapo in…
rhoadesScholar Aug 12, 2024
ccc9882
chore: 🙈 Untrack experiment files.
rhoadesScholar Aug 13, 2024
e262537
Merge branch 'main' into typo-fix-240812
mzouink Aug 14, 2024
54e60ad
Merge branch 'main' into validate_patch
mzouink Aug 14, 2024
9682290
fix new pytorch error (#284)
mzouink Aug 14, 2024
54d1df4
Merge branch 'main' into typo-fix-240812
mzouink Aug 14, 2024
4c87b78
Fix small typos (#286)
mzouink Aug 14, 2024
103e9cf
Merge branch 'dev/main' into main
mzouink Aug 14, 2024
bccd778
feat: ✨ Add more extensive pipeline visualize for GunpowderTrainer/Run.
rhoadesScholar Sep 5, 2024
407dd59
fix: 🐛 Fix `datasplit._neuroglancer` bug that happened with binarized…
rhoadesScholar Sep 5, 2024
37c9bea
fix plot bug, retreive fnc is changed
mzouink Sep 10, 2024
d8a77fc
Merge branch 'main' of https://github.com/janelia-cellmap/dacapo
mzouink Sep 10, 2024
f9959f0
support max validation size
mzouink Sep 10, 2024
1cb4748
fix import
mzouink Sep 10, 2024
e4a84ac
:art: Format Python code with psf/black
mzouink Sep 10, 2024
637c53d
Format Python code with psf/black push (#290)
mzouink Sep 10, 2024
5ad40f3
support nD
mzouink Sep 10, 2024
e678aea
Merge branch 'visualize_pipeline'
mzouink Sep 10, 2024
8d0dbf6
force funlib persistence version until we fix new things
mzouink Sep 12, 2024
c0b09bd
Merge branch 'main' into ft_datasplit_gt_limit
mzouink Sep 12, 2024
3430d6a
Feat: datasplit limit validation size (#289)
mzouink Sep 12, 2024
a1e46bd
local blockwise
mzouink Sep 23, 2024
a81983b
:art: Format Python code with psf/black
mzouink Sep 23, 2024
59a9b67
Format Python code with psf/black push (#295)
rhoadesScholar Sep 24, 2024
c65a3e9
Add bind_address and bind_port parameters to all neuroglancer instant…
atc3 Sep 25, 2024
473bc38
all local changes
mzouink Sep 26, 2024
ca206aa
all local changes
mzouink Sep 26, 2024
1eca4e8
local changes
mzouink Sep 26, 2024
4520c3f
remove plot debug prints
mzouink Oct 2, 2024
aca7f68
env DACAPO_OPTIONS_FILE
mzouink Oct 2, 2024
9dfbdc1
remove trash
mzouink Oct 2, 2024
5de82f2
:art: Format Python code with psf/black
mzouink Oct 2, 2024
39f9dc9
Format Python code with psf/black push (#299)
mzouink Oct 2, 2024
7794118
Add bind parameters to neuroglancer instantiations (#297)
mzouink Oct 2, 2024
14434d5
:art: Format Python code with psf/black
mzouink Oct 2, 2024
1369fa3
Format Python code with psf/black push (#300)
mzouink Oct 2, 2024
00149c7
Merge branch 'main' into fix_local_predict
mzouink Oct 2, 2024
2775317
fix restart run
mzouink Oct 2, 2024
35d8644
batch norm params
mzouink Oct 2, 2024
d372cd8
revert changes
mzouink Oct 2, 2024
e9285c8
gunpowder trainer reject min option
mzouink Oct 2, 2024
ae93dbc
remove + uint8
mzouink Oct 2, 2024
6d7d5d8
fix validate
mzouink Oct 2, 2024
6c922da
:art: Format Python code with psf/black
mzouink Oct 2, 2024
3abcf96
Format Python code with psf/black push (#301)
mzouink Oct 2, 2024
eb03070
avoid adding auxiliary loss if not predicting affs since this results…
pattonw Oct 16, 2024
a1e492a
Add a minimal tutorial
pattonw Oct 16, 2024
0ef4f61
add the minimal tutorial and notebook parsing to the docs workflow
pattonw Oct 16, 2024
8de17a3
Basic tutorial (#303)
mzouink Oct 16, 2024
689a5a8
Merge branch 'basic_tutorial' into fix_local_predict
mzouink Oct 16, 2024
6c539e3
fix tests
mzouink Oct 16, 2024
27f531c
fix validate tests
mzouink Oct 16, 2024
60a2364
:art: Format Python code with psf/black
mzouink Oct 16, 2024
82df104
Fix local predict (#305)
mzouink Oct 17, 2024
245b5f2
working example
mzouink Oct 18, 2024
39ed9eb
fix dep
mzouink Oct 18, 2024
7888713
Merge branch 'basic_tutorial' into actions/black
mzouink Oct 18, 2024
012de04
Format Python code with psf/black push (#306)
mzouink Oct 18, 2024
934a6db
tests works
mzouink Oct 18, 2024
1cf8ecc
clean code
mzouink Oct 18, 2024
cb41e7b
add watershed postprocessor and a visualization of the validations
pattonw Oct 21, 2024
7c83e66
fix small bug
pattonw Oct 21, 2024
a41a18a
add notebook dependencies to pyproject.toml
pattonw Oct 21, 2024
f9b0ac1
fix small bug in visualization
pattonw Oct 21, 2024
be53a19
Basic tutorial (#308)
mzouink Oct 22, 2024
f1fdef3
Basic tutorial (#304)
mzouink Oct 22, 2024
f1dd368
remove prediction postprocessing and save results as np.float32
pattonw Oct 22, 2024
26ef22f
convert to float dtype for mutex watershed
pattonw Oct 22, 2024
48384e6
improve watershed training and validation
pattonw Oct 22, 2024
51b3821
Merge branch 'main' into basic_tutorial
mzouink Oct 23, 2024
f4ac3a6
Basic tutorial (#310)
mzouink Oct 23, 2024
690e6ed
fix bug no kernel found
mzouink Oct 23, 2024
7ec69fb
fix bug no kernel found
mzouink Oct 23, 2024
5690eda
fix mypy error
mzouink Oct 23, 2024
8c74991
fix docs
mzouink Oct 23, 2024
71657c7
starter example
mzouink Oct 23, 2024
9c2c123
better docs
mzouink Oct 23, 2024
fd18921
continue when generate error
mzouink Oct 23, 2024
b9d150f
updating docs
mzouink Oct 23, 2024
86a6a18
fix dep
mzouink Oct 23, 2024
1cf729c
affinities example
mzouink Oct 23, 2024
7b18210
tqdm all in one line
mzouink Oct 23, 2024
0b62633
plot color fix
mzouink Oct 23, 2024
3b17a37
tuto ipynb version
mzouink Oct 24, 2024
35e274d
install dep
mzouink Oct 24, 2024
2d11926
add google colab link
Oct 24, 2024
bb9268b
feat: ✨ Add support for training on Apple M1/M2/M3 (mps) devices.
rhoadesScholar Oct 24, 2024
4152f7c
fix: 🐛 Fix float64 for mps device. (convert to float32 first)
rhoadesScholar Oct 24, 2024
ee7c762
Update gunpowder_trainer.py to swap to(device) and float()
psobolewskiPhD Oct 24, 2024
e58a01d
Update gunpowder_trainer.py to swap to(device) and float() (#312)
rhoadesScholar Oct 24, 2024
193b71b
feat: ✨ Add support for training on Apple M1/M2/M3 (mps) devices. (#311)
mzouink Oct 24, 2024
fd04379
update dependencies
pattonw Oct 18, 2024
94c9894
update to funlib.persistence
pattonw Oct 21, 2024
218c955
Add optional probabilities to augmentations.
vaxenburg Oct 30, 2024
108db88
Add optional probabilities to augmentations (#314)
mzouink Nov 4, 2024
89add10
update predict local
pattonw Nov 5, 2024
db84f33
fix bug in constant array
pattonw Nov 5, 2024
285e869
remove unnecessary print statements
pattonw Nov 5, 2024
d177bda
remove unnecessary print statement
pattonw Nov 5, 2024
e013652
minor improvements in type hints and fix small bugs
pattonw Nov 5, 2024
7b72857
fix watershed post processor and affinities predictor
pattonw Nov 5, 2024
148251d
fix predict local
pattonw Nov 5, 2024
4eeabc9
fix binary segmentation postprocessors
pattonw Nov 5, 2024
d8d056b
update dependencies
pattonw Nov 5, 2024
978950e
import zarr before using it
pattonw Nov 5, 2024
1cae5cf
fix local predict
pattonw Nov 5, 2024
0cc6db1
update minimal tutorial
pattonw Nov 5, 2024
d67f098
Add support for most of the remaining arrays.
pattonw Nov 5, 2024
41cf3a9
black formatting
pattonw Nov 5, 2024
215d8b4
fix mypy errors
pattonw Nov 5, 2024
8fdcdd1
remove extra notebooks, these should be built by sphinx
pattonw Nov 6, 2024
ec8f7a6
update starter_tutorial to match doc example
pattonw Nov 6, 2024
161e753
update github docs workflow to execute tutorial from examples
pattonw Nov 6, 2024
1d5c501
Merge branch 'main' into funlib-persistence
mzouink Nov 6, 2024
aeb77a6
Funlib persistence update (#322)
mzouink Nov 6, 2024
ac23b78
:art: Format Python code with psf/black
mzouink Nov 6, 2024
254bcc1
Format Python code with psf/black push (#324)
mzouink Nov 6, 2024
895b22f
fix mps
mzouink Nov 6, 2024
fef8553
fix minor bug
mzouink Nov 6, 2024
dbf12fe
version 0.3.2
mzouink Nov 6, 2024
bfd1f72
cosem_starter
mzouink Nov 7, 2024
d0133fe
fix table
mzouink Nov 7, 2024
2e0f5b7
Add a roadmap to the docs
pattonw Nov 11, 2024
9df9bbd
improve formatting
pattonw Nov 11, 2024
d59bd8f
add documentation for data formatting
pattonw Nov 11, 2024
460cf2a
unet examples
Nov 11, 2024
565b964
Depricate old data configs, add simplified data config
pattonw Nov 12, 2024
0fc04d2
use simplified data config
pattonw Nov 12, 2024
f0a7a39
add even simpler case
pattonw Nov 12, 2024
17b7707
update roadmap
pattonw Nov 12, 2024
a56dca3
heavy unet tests
mzouink Nov 12, 2024
2d63df5
:art: Format Python code with psf/black
mzouink Nov 12, 2024
75e2980
Format Python code with psf/black push (#328)
rhoadesScholar Nov 12, 2024
64a508b
avoid using dataset classes for indexing, just use strings
pattonw Nov 12, 2024
e8b9a99
Merge branch 'main' into road-map
mzouink Nov 12, 2024
637859a
Update index.rst
mzouink Nov 12, 2024
975b8b8
Road map (#330)
mzouink Nov 12, 2024
4a4312b
Merge branch 'main' into data-conventions
mzouink Nov 12, 2024
9f7b0e4
Merge branch 'main' into tests_v0_3_5
mzouink Nov 12, 2024
afcefae
test context
mzouink Nov 12, 2024
4192606
fix arch dims
mzouink Nov 13, 2024
c81f4de
Merge branch 'tests_v0_3_5' of https://github.com/janelia-cellmap/dac…
mzouink Nov 13, 2024
bc70727
Revert architecture changes, didn't work
mzouink Nov 13, 2024
0d3b3d2
more architecture tests
mzouink Nov 13, 2024
c35b702
add stored architecture test
mzouink Nov 13, 2024
327ef8b
update data-conventions (#334)
mzouink Nov 13, 2024
f7ceb32
Merge branch 'data-conventions' into data-conventions
mzouink Nov 13, 2024
fc8c73c
Data conventions (#329)
mzouink Nov 13, 2024
d22eee5
index docs
mzouink Nov 13, 2024
e69bba2
Data conventions (#335)
mzouink Nov 13, 2024
9ef1d0a
:art: Format Python code with psf/black
mzouink Nov 13, 2024
9c4c789
Merge branch 'main' into actions/black
mzouink Nov 13, 2024
fc4a5e6
Format Python code with psf/black push (#336)
mzouink Nov 13, 2024
3556c9d
Merge branch 'main' into tests_v0_3_5
mzouink Nov 13, 2024
ac1144e
fix bug in cnnectome_unet return types
pattonw Nov 13, 2024
08d7074
CNNectomeUNet fix kernel size logic
pattonw Nov 13, 2024
a0b5116
CNNectomeUNet: make the final conv pass in the upsample pass a bit mo…
pattonw Nov 13, 2024
36cbd67
Gunpowder Trainer: if the raw data doesn't have a channel dim, add it…
pattonw Nov 13, 2024
23d1c22
Datasplit test fixture: use the voxel_size attribute for voxel size.
pattonw Nov 13, 2024
270c469
2D model still only gets data with a single channel from the trainer
pattonw Nov 13, 2024
ea4f2b1
fix dims error
mzouink Nov 13, 2024
a5e30e0
Merge branch 'tests_v0_3_5' into tests_v0_3_5
mzouink Nov 13, 2024
080f00a
Tests v0 3 5 (#338)
mzouink Nov 13, 2024
57822af
:art: Format Python code with psf/black
mzouink Nov 13, 2024
c57371e
Format Python code with psf/black push (#339)
mzouink Nov 13, 2024
f3d0508
revert change, fixed in unet
mzouink Nov 13, 2024
6d87d38
organize
mzouink Nov 13, 2024
2b80cfa
add validate test
mzouink Nov 13, 2024
65a8743
:art: Format Python code with psf/black
mzouink Nov 13, 2024
7b7c956
Format Python code with psf/black push (#340)
mzouink Nov 13, 2024
200ff20
add unet2d/3d validation test
mzouink Nov 14, 2024
1abb3fd
:art: Format Python code with psf/black
mzouink Nov 14, 2024
ec4b5d3
Format Python code with psf/black push (#341)
mzouink Nov 14, 2024
dd39075
add validation tests
mzouink Nov 14, 2024
4a18c42
error handling 2d unet
mzouink Nov 14, 2024
58a16f2
more iterations:
mzouink Nov 14, 2024
0979152
:art: Format Python code with psf/black
mzouink Nov 14, 2024
31c2911
Format Python code with psf/black push (#344)
mzouink Nov 14, 2024
c4a234b
add hot_distance test, and fix bugs
mzouink Nov 15, 2024
0d2362c
:art: Format Python code with psf/black
mzouink Nov 15, 2024
18a0b20
Format Python code with psf/black push (#345)
mzouink Nov 15, 2024
ea9f5dd
autouse fork/spawn fixture so we test both
pattonw Nov 19, 2024
0da0911
add helpers to build simple parametrized test configs
pattonw Nov 19, 2024
29cbd6d
simplify tests
pattonw Nov 19, 2024
02ee936
fix hard coded dimensions
pattonw Nov 19, 2024
242eeb1
bugfix: typo
pattonw Nov 19, 2024
5898c17
bugfix: hardcoded dimensions
pattonw Nov 19, 2024
ada4a98
simplify validation tests
pattonw Nov 19, 2024
f08b65e
bugfix: Distance predictor wasn't working properly when run on single…
pattonw Nov 19, 2024
425cbfc
Deprication warning:
pattonw Nov 19, 2024
74fcc3a
bugfix: remove the mask_integral_downsample_factor from use. Its not …
pattonw Nov 19, 2024
c52ee0f
bugfix: balance_weights now handles boolean ground truth
pattonw Nov 19, 2024
abfcd02
bugfix: kernel size
pattonw Nov 19, 2024
e302c33
add todo on test
pattonw Nov 19, 2024
aa3b72c
Tests v0 3 5 (#346)
mzouink Nov 19, 2024
4b703fe
:art: Format Python code with psf/black
mzouink Nov 19, 2024
1ec82c0
Format Python code with psf/black push (#347)
mzouink Nov 19, 2024
cac4542
v0.3.5
mzouink Nov 19, 2024
53217ed
fix mypy
mzouink Nov 19, 2024
f5c4b36
heavy unet tests - v0.3.5 (#327)
mzouink Nov 19, 2024
175bff6
Bump mwatershed
vaxenburg Nov 19, 2024
1df45db
Bump mwatershed (#348)
mzouink Nov 19, 2024
1ed3c5f
fix small bug in simple dataset config
pattonw Dec 3, 2024
e9697ad
fix small bug in simple dataset config (#351)
mzouink Dec 3, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,17 @@ jobs:
with:
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
- name: install dacapo
run: pip install .[docs]
# run:
run: |
pip install sphinx-autodoc-typehints sphinx-autoapi sphinx-click sphinx-rtd-theme myst-parser jupytext ipykernel nbsphinx myst_nb
python -m ipykernel install --user --name python3
pip install .[docs]

- name: parse notebooks
run: |
jupytext --to notebook --execute ./examples/starter_tutorial/minimal_tutorial.py --output ./docs/source/notebooks/minimal_tutorial.ipynb
- name: remove notebook scripts
run: rm ./docs/source/notebooks/*.py
- name: Build and Commit
uses: sphinx-notes/pages@v2
with:
Expand Down
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,7 @@ tmp/
# daisy logs
daisy_logs/

*.csv
*.csv
*.private

user_experiments/*
62 changes: 62 additions & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@

cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: "Patton"
given-names: "William"
orcid: "https://orcid.org/0000-0002-9652-3222"
- family-names: "Rhoades"
given-names: "Jeff L."
orcid: "https://orcid.org/0000-0001-5077-2533"
- family-names: "Zouinkhi"
given-names: "Marwan"
orcid: "https://orcid.org/0000-0002-9441-2908"
- family-names: "Funke"
given-names: "Jan"
orcid: "http://orcid.org/0000-0003-4388-7783"
title: "DaCapo"
version: 0.3.0
doi: 10.48550/arXiv.2408.02834
date-released: 2024-08-05
url: "https://github.com/janelia-cellmap/dacapo"
preferred-citation:
type: article
authors:
- family-names: "Patton"
given-names: "William"
orcid: "https://orcid.org/0000-0002-9652-3222"
- family-names: "Rhoades"
given-names: "Jeff L."
orcid: "https://orcid.org/0000-0001-5077-2533"
- family-names: "Zouinkhi"
given-names: "Marwan"
orcid: "https://orcid.org/0000-0002-9441-2908"
- family-names: "Ackerman"
given-names: "David G."
orcid: "http://orcid.org/0000-0003-0172-6594"
- family-names: "Malin-Mayor"
given-names: "Caroline"
orcid: "https://orcid.org/0000-0002-9627-6030"
- family-names: "Adjavon"
given-names: "Diane"
- family-names: "Heinrich"
given-names: "Larissa"
orcid: "http://orcid.org/0000-0003-2852-6664"
- family-names: "Bennett"
given-names: "Davis"
orcid: "http://orcid.org/0000-0001-7579-2848"
- family-names: "Zubov"
given-names: "Yurii"
orcid: "https://orcid.org/0000-0003-1988-8081"
- family-names: "Project Team"
given-names: "CellMap"
- family-names: "Weigel"
given-names: "Aubrey V."
orcid: "http://orcid.org/0000-0003-1694-4420"
- family-names: "Funke"
given-names: "Jan"
orcid: "http://orcid.org/0000-0003-4388-7783"
doi: 10.48550/arXiv.2408.02834
journal: "arXiv-cs.CV"
title: "DaCapo: a modular deep learning framework for scalable 3D image segmentation"
year: 2024
10 changes: 5 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ This will also be run automatically when a PR is made to master and a codecov re


## Branching and PRs
- Users that have been added to the CellMap organization and the DaCapo project should be able to develop directly into the CellMap fork of DaCapo. Other users will need to create a fork.
- For a completely new feature, make a branch off of the `dev/main` branch of CellMap's fork of DaCapo with a name describing the feature. If you are collaborating on a feature that already has a branch, you can branch off that feature branch.
- Currently, you should make your PRs into the `dev/main` branch of CellMap's fork, or the feature branch you branched off of. PRs currently require one maintainer's approval before merging. Once the PR is merged, the feature branch should be deleted.
- `dev/main` will be regularly merged to `main` when new features are fully implemented and all tests are passing.
- Users that have been added to the CellMap organization and the DaCapo project should be able to develop directly into the CellMap fork of DaCapo. Other users will need to create a fork or ask to be added as a collaborator.
- For a completely new feature, make a branch off of the `main` branch of CellMap's fork of DaCapo with a name describing the feature. If you are collaborating on a feature that already has a branch, you can branch off that feature branch.
- Currently, you should make your PRs into the `main` branch of CellMap's fork, or the feature branch you branched off of. PRs currently require one maintainer's approval before merging. Once the PR is merged, the feature branch will/should be deleted.
- `main` will be regularly published to PyPi when new features are fully implemented and all tests are passing.


## Documentation
Documentation is built using Sphinx. To build the documentation locally, run
```bash
sphinx-build -M html docs/source docs/build
```
This will generate the html files in the `docs/build/html` directory.
This will generate the html files in the `docs/build/html` directory.
33 changes: 27 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,20 @@
A framework for easy application of established machine learning techniques on large, multi-dimensional images.

`dacapo` allows you to configure machine learning jobs as combinations of
[DataSplits](http://docs/api.html#datasplits),
[Architectures](http://docs/api.html#architectures),
[Tasks](http://docs/api.html#tasks),
[Trainers](http://docs/api.html#trainers),
[DataSplits](https://janelia-cellmap.github.io/dacapo/autoapi/dacapo/experiments/datasplits/index.html),
[Architectures](https://janelia-cellmap.github.io/dacapo/autoapi/dacapo/experiments/architectures/index.html),
[Tasks](https://janelia-cellmap.github.io/dacapo/autoapi/dacapo/experiments/tasks/index.html),
[Trainers](https://janelia-cellmap.github.io/dacapo/autoapi/dacapo/experiments/trainers/index.html),
on arbitrarily large volumes of
multi-dimensional images. `dacapo` is not tied to a particular learning
framework, but currently only supports [`torch`](https://pytorch.org/) with
plans to support [`tensorflow`](https://www.tensorflow.org/).


![DaCapo Diagram](https://raw.githubusercontent.com/janelia-cellmap/dacapo/main/docs/source/_static/dacapo_diagram.png)



## Installation and Setup
Currently, python>=3.10 is supported. We recommend creating a new conda environment for dacapo with python 3.10.
```
Expand All @@ -52,7 +57,12 @@ Tasks we support and approaches for those tasks:
- Semantic segmentation
- Signed distances
- One-hot encoding of different types of objects


## Example Tutorial
A minimal example tutorial can be found in the examples directory and opened in colab here: <a target="_blank" href="https://colab.research.google.com/github/janelia-cellmap/dacapo/blob/main/examples/starter_tutorial/minimal_tutorial.ipynb">
<img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/>
</a>

## Helpful Resources & Tools
- Chunked data, zarr, and n5
- OME-Zarr: a cloud-optimized bioimaging file format with international community support (doi: [10.1101/2023.02.17.528834](https://pubmed.ncbi.nlm.nih.gov/36865282/))
Expand All @@ -72,4 +82,15 @@ Tasks we support and approaches for those tasks:
- Example of [groundtruth data](https://tinyurl.com/pu8mespz)
- Visualization
- [Neuroglancer GitHub Repo](https://github.com/google/neuroglancer)


# Citing this repo
If you use our code, please cite us and spread the news!
```
@article{Patton_DaCapo_a_modular_2024,
author = {Patton, William and Rhoades, Jeff L. and Zouinkhi, Marwan and Ackerman, David G. and Malin-Mayor, Caroline and Adjavon, Diane and Heinrich, Larissa and Bennett, Davis and Zubov, Yurii and Project Team, CellMap and Weigel, Aubrey V. and Funke, Jan},
doi = {10.48550/arXiv.2408.02834},
journal = {arXiv-cs.CV},
title = {{DaCapo: a modular deep learning framework for scalable 3D image segmentation}},
year = {2024}
}
```
5 changes: 3 additions & 2 deletions dacapo/__init__.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
__version__ = "0.3.0"
__version__ = "0.3.5"
__version_info__ = tuple(int(i) for i in __version__.split("."))

from .options import Options # noqa
from . import experiments, utils # noqa
from .apply import apply # noqa
from .train import train # noqa
from .validate import validate # noqa
from .validate import validate, validate_run # noqa
from .predict import predict # noqa
from .blockwise import run_blockwise, segment_blockwise # noqa
from . import predict_local
9 changes: 5 additions & 4 deletions dacapo/apply.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import logging
from typing import Optional
from funlib.geometry import Roi, Coordinate
from funlib.persistence import open_ds
import numpy as np
from dacapo.experiments.datasplits.datasets.arrays.array import Array
from dacapo.experiments.datasplits.datasets.dataset import Dataset
from dacapo.experiments.run import Run

Expand All @@ -12,7 +12,6 @@
import dacapo.experiments.tasks.post_processors as post_processors
from dacapo.store.array_store import LocalArrayIdentifier
from dacapo.predict import predict
from dacapo.experiments.datasplits.datasets.arrays import ZarrArray
from dacapo.store.create_store import (
create_config_store,
create_weights_store,
Expand Down Expand Up @@ -164,7 +163,9 @@ def apply(

# make array identifiers for input, predictions and outputs
input_array_identifier = LocalArrayIdentifier(Path(input_container), input_dataset)
input_array = ZarrArray.open_from_array_identifier(input_array_identifier)
input_array = open_ds(
f"{input_array_identifier.container}/{input_array_identifier.dataset}"
)
if roi is None:
_roi = input_array.roi
else:
Expand Down Expand Up @@ -226,7 +227,7 @@ def apply_run(
output_dtype (np.dtype | str, optional): The output data type. Defaults to np.uint8.
overwrite (bool, optional): Whether to overwrite existing output. Defaults to True.
Raises:
ValueError: If the input array is not a ZarrArray.
ValueError: If the input array is not a zarr array.
Examples:
>>> apply_run(
... run=run,
Expand Down
27 changes: 22 additions & 5 deletions dacapo/blockwise/argmax_worker.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
from upath import UPath as Path
import sys
from dacapo.experiments.datasplits.datasets.arrays.zarr_array import ZarrArray

from dacapo.store.array_store import LocalArrayIdentifier
from dacapo.compute_context import create_compute_context
from dacapo.tmp import open_from_identifier

import daisy

Expand Down Expand Up @@ -54,6 +55,22 @@ def start_worker(
output_container: Path | str,
output_dataset: str,
return_io_loop: bool = False,
):
return start_worker_fn(
input_container=input_container,
input_dataset=input_dataset,
output_container=output_container,
output_dataset=output_dataset,
return_io_loop=return_io_loop,
)


def start_worker_fn(
input_container: Path | str,
input_dataset: str,
output_container: Path | str,
output_dataset: str,
return_io_loop: bool = False,
):
"""
Start the threshold worker.
Expand All @@ -66,12 +83,12 @@ def start_worker(
"""
# get arrays
input_array_identifier = LocalArrayIdentifier(Path(input_container), input_dataset)
input_array = ZarrArray.open_from_array_identifier(input_array_identifier)
input_array = open_from_identifier(input_array_identifier)

output_array_identifier = LocalArrayIdentifier(
Path(output_container), output_dataset
)
output_array = ZarrArray.open_from_array_identifier(output_array_identifier)
output_array = open_from_identifier(output_array_identifier)

def io_loop():
# wait for blocks to run pipeline
Expand All @@ -86,7 +103,7 @@ def io_loop():
# write to output array
output_array[block.write_roi] = np.argmax(
input_array[block.write_roi],
axis=input_array.axes.index("c"),
axis=input_array.axis_names.index("c^"),
)

if return_io_loop:
Expand All @@ -111,7 +128,7 @@ def spawn_worker(
"""
compute_context = create_compute_context()
if not compute_context.distribute_workers:
return start_worker(
return start_worker_fn(
input_array_identifier.container,
input_array_identifier.dataset,
output_array_identifier.container,
Expand Down
4 changes: 2 additions & 2 deletions dacapo/blockwise/empanada_function.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def segment_function(input_array, block, **parameters):

Args:
input_array (np.ndarray): The 3D array to segment.
block (dask.array.core.Block): The block object.
block (daisy.Block): The block object.
**parameters: Parameters for the empanada-napari segmenter.
Returns:
np.ndarray: The segmented 3D array.
Expand Down Expand Up @@ -374,7 +374,7 @@ def start_consensus_worker(trackers_dict):
assert image.ndim in [3, 4], "Only 3D and 4D input images can be handled!"
if image.ndim == 4:
# channel dimensions are commonly 1, 3 and 4
# check for dimensions on zeroeth and last axes
# check for dimensions on zeroeth and last axis_names
shape = image.shape
if shape[0] in [1, 3, 4]:
image = image[0]
Expand Down
Loading
Loading