Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
d0265bb
refactor(Zettaset): remove mandatory `zettaset_path` requirement
torms3 Dec 22, 2023
0a9bb82
feat(Zettaset): add zettaset-specific specs for separate and detailed…
torms3 Dec 22, 2023
dd8d81c
feat(Zettaset): remove the requirement for specifying dataset module and
torms3 Dec 27, 2023
87bf2b7
chore(dataset): delete unnecesarry dataset `fib25`
torms3 Dec 27, 2023
c140303
refactor(augment): rename `ariadne_worm` to `isotropic` and add MIP1
torms3 Dec 27, 2023
ec04caf
chore(sampler): add trailing commas to last parameters in method sign…
torms3 Dec 27, 2023
9e6648c
feat(sampler): introduce `DataSuperset` support and enhance code quality
torms3 Dec 27, 2023
54f0d5f
refactor(loss): use `reduction` instead of the deprecated `size_average`
torms3 Dec 28, 2023
1a60c74
fix(option): The parameter `data` was previously hardcoded as a requi…
torms3 Jan 3, 2024
4cac781
feat(option): binarize blood vessel label
torms3 Jan 18, 2024
4c3ae03
feat(Zettaset): allow sharing of a user-specified mask volume across …
torms3 Jan 18, 2024
bc1bd35
feat(option): enhance error handling by including list details in Val…
torms3 Jan 22, 2024
6cbe10b
feat(augment): add `recompute` and `border`
torms3 Jan 23, 2024
64db722
feat(augment): add augmentation for 16nm data
torms3 Jan 23, 2024
c8ace88
feat(loss): implement option to toggle background masking for
torms3 Jan 25, 2024
b6178bd
feat(augment): add 16nm data augmentation for fly
torms3 Mar 1, 2024
d0a6dfe
feat(zettaset): enable zettaset-wise resolution
torms3 Mar 1, 2024
45fdd2e
chore(Dockerfile): default to PyTorch 1.11.0
torms3 Mar 1, 2024
1fae11f
fix(Dockerfile): install `cffi` and `brotli` to address dependency is…
torms3 Mar 1, 2024
324873b
chore(zettaset): add conversion of padding to tuple
torms3 Mar 1, 2024
f48ec5d
feat: data augmentation for dacey human retina
torms3 Mar 28, 2024
63770e2
feat: data augmentation for ariadne mouse cerebellum
torms3 Apr 12, 2024
694b9c9
WIP(mean): fix a bug when mask_background is False
torms3 Apr 25, 2024
7c9f370
chore(Dockerfile): update
torms3 Apr 25, 2024
dd399e0
refactor: update Iterable import for Python 3.9+ compatibility and re…
torms3 May 10, 2024
7f1c1fa
feat: 3x up-down net
torms3 May 14, 2024
275b6a7
feat: up-down by an arbitrary factor
torms3 May 14, 2024
5dfb9ea
feat: cortex augmentation
torms3 May 14, 2024
104740c
feat: support semantic segmentation
torms3 May 15, 2024
f812fce
fix: apply correct weights for static class balancing
torms3 May 21, 2024
cf140b6
fix: update Label augmentation to include recompute targets
torms3 May 22, 2024
f2e7c01
feat: section gap augmentation
torms3 May 24, 2024
6a47003
feat: add fly augmentation
torms3 Jun 27, 2024
6df0bef
refactor(mean): minor code modifications to improve efficiency
torms3 Aug 23, 2024
ff5a7de
feat(mean): add downsampled loss computation to improve efficiency
torms3 Aug 23, 2024
e988f8b
feat: add option for split boundary
torms3 Dec 11, 2024
fb43e6d
feat: add mip1 aug to dacey human retina
torms3 Jan 7, 2025
50e63b1
feat: relabel augmentation takes target list
torms3 Jan 7, 2025
30b425e
feat: border augmentation takes target list
torms3 Jan 7, 2025
7626fcb
feat(docker): upgrade cloud-volume and imagecodecs to resolve JXL enc…
torms3 Jan 7, 2025
4a47015
fix: update UpBlock of up-down net to support ONNX export
torms3 Jan 23, 2025
646fff9
feat: update class balancing for auxiliary tasks
torms3 Feb 4, 2025
ec6452b
fix(cv_utils): resolve potential mismatch between coord_mip and in_mi…
torms3 Feb 4, 2025
5e6c584
feat: add anisotropic models with `scale_init`
torms3 Feb 13, 2025
05d432c
refactor(Dockerfile): restructure and improve package installation
torms3 Feb 24, 2025
2dc4d03
refactor(logger): remove TensorBoard support
torms3 Feb 24, 2025
aae325a
Replace imp module with importlib
ranlu Jan 29, 2025
9de2bcf
Merge pull request #14 from ZettaAI/importlib
torms3 Feb 26, 2025
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
101 changes: 101 additions & 0 deletions deepem/data/augment/cortex/aug_16nm.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
from augmentor import *


def get_augmentation(
is_train,
box=None,
missing=7,
blur=7,
lost=True,
random=False,
recompute=[],
border=[],
section_gap=0,
mask_section_gap=False,
**kwargs
):
augs = list()

# Box
if is_train:
if box == 'noise':
augs.append(
NoiseBox(sigma=(1, 3), dims=(3, 13), margin=(1, 3, 3),
density=0.3, skip=0.1)
)
elif box == 'fill':
augs.append(
FillBox(dims=(3, 13), margin=(1, 3, 3),
density=0.3, skip=0.1)
)

# Brightness & contrast purterbation
augs.append(
MixedGrayscale2D(
contrast_factor=0.5,
brightness_factor=0.5,
prob=1, skip=0.3))

# Missing section & misalignment
to_blend = list()
# Misalingments
trans = Compose([Misalign((0, 3), margin=1),
Misalign((0, 8), margin=1),
Misalign((0, 13), margin=1)])

# Out-of-alignments
slip = Compose([SlipMisalign((0, 3), interp=True, margin=1),
SlipMisalign((0, 8), interp=True, margin=1),
SlipMisalign((0, 13), interp=True, margin=1)])
to_blend.append(Blend([trans, slip], props=[0.7, 0.3]))
if is_train:
to_blend.append(Blend([
MisalignPlusMissing((2, 8), value=0, random=random),
MisalignPlusMissing((2, 8), value=0, random=False)
]))
else:
to_blend.append(MisalignPlusMissing((2, 8), value=0, random=False))
if missing > 0:
if is_train:
to_blend.append(Blend([
MixedMissingSection(maxsec=missing, individual=True, value=0, random=False),
MixedMissingSection(maxsec=missing, individual=True, value=0, random=random),
MissingSection(maxsec=missing, individual=False, value=0, random=random),
]))
else:
to_blend.append(
MixedMissingSection(maxsec=missing, individual=True, value=0, random=False)
)
if lost:
if is_train:
to_blend.append(Blend([
LostSection(1),
LostPlusMissing(value=0, random=random),
LostPlusMissing(value=0, random=False)
]))
augs.append(Blend(to_blend))

# Out-of-focus
if blur > 0:
augs.append(MixedBlurrySection(maxsec=blur))

# Warping
if is_train:
augs.append(Warp(skip=0.3, do_twist=False, rot_max=45.0, scale_max=1.1))

# Flip & rotate
augs.append(FlipRotate())

# Create border
if border:
augs.append(Border(targets=border))

# Recompute connected components
if recompute:
augs.append(Label(targets=recompute))

# Section gap
if section_gap > 0:
augs.append(SectionGap(num_secs=section_gap, masked=mask_section_gap))

return Compose(augs)
105 changes: 105 additions & 0 deletions deepem/data/augment/cortex/aug_16nm_gap3-5.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
from augmentor import *


def get_augmentation(
is_train,
box=None,
missing=7,
blur=7,
lost=True,
random=False,
recompute=[],
border=[],
mask_section_gap=False,
**kwargs
):
augs = list()

# Box
if is_train:
if box == 'noise':
augs.append(
NoiseBox(sigma=(1, 3), dims=(3, 13), margin=(1, 3, 3),
density=0.3, skip=0.1)
)
elif box == 'fill':
augs.append(
FillBox(dims=(3, 13), margin=(1, 3, 3),
density=0.3, skip=0.1)
)

# Brightness & contrast purterbation
augs.append(
MixedGrayscale2D(
contrast_factor=0.5,
brightness_factor=0.5,
prob=1, skip=0.3))

# Missing section & misalignment
to_blend = list()
# Misalingments
trans = Compose([Misalign((0, 3), margin=1),
Misalign((0, 8), margin=1),
Misalign((0, 13), margin=1)])

# Out-of-alignments
slip = Compose([SlipMisalign((0, 3), interp=True, margin=1),
SlipMisalign((0, 8), interp=True, margin=1),
SlipMisalign((0, 13), interp=True, margin=1)])
to_blend.append(Blend([trans, slip], props=[0.7, 0.3]))
if is_train:
to_blend.append(Blend([
MisalignPlusMissing((2, 8), value=0, random=random),
MisalignPlusMissing((2, 8), value=0, random=False)
]))
else:
to_blend.append(MisalignPlusMissing((2, 8), value=0, random=False))
if missing > 0:
if is_train:
to_blend.append(Blend([
MixedMissingSection(maxsec=missing, individual=True, value=0, random=False),
MixedMissingSection(maxsec=missing, individual=True, value=0, random=random),
MissingSection(maxsec=missing, individual=False, value=0, random=random),
]))
else:
to_blend.append(
MixedMissingSection(maxsec=missing, individual=True, value=0, random=False)
)
if lost:
if is_train:
to_blend.append(Blend([
LostSection(1),
LostPlusMissing(value=0, random=random),
LostPlusMissing(value=0, random=False)
]))
augs.append(Blend(to_blend))

# Out-of-focus
if blur > 0:
augs.append(MixedBlurrySection(maxsec=blur))

# Warping
if is_train:
augs.append(Warp(skip=0.3, do_twist=False, rot_max=45.0, scale_max=1.1))

# Flip & rotate
augs.append(FlipRotate())

# Create border
if border:
augs.append(Border(targets=border))

# Recompute connected components
if recompute:
augs.append(Label(targets=recompute))

# Section gap
augs.append(
Blend([
SectionGap(num_secs=3, masked=mask_section_gap),
SectionGap(num_secs=4, masked=mask_section_gap),
SectionGap(num_secs=5, masked=mask_section_gap),
])
)

return Compose(augs)
101 changes: 101 additions & 0 deletions deepem/data/augment/cortex/aug_4nm.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
from augmentor import *


def get_augmentation(
is_train,
box=None,
missing=7,
blur=7,
lost=True,
random=False,
recompute=[],
border=[],
section_gap=0,
mask_section_gap=False,
**kwargs
):
augs = list()

# Box
if is_train:
if box == 'noise':
augs.append(
NoiseBox(sigma=(1, 3), dims=(10, 50), margin=(1, 10, 10),
density=0.3, skip=0.1)
)
elif box == 'fill':
augs.append(
FillBox(dims=(10, 50), margin=(1, 10, 10),
density=0.3, skip=0.1)
)

# Brightness & contrast purterbation
augs.append(
MixedGrayscale2D(
contrast_factor=0.5,
brightness_factor=0.5,
prob=1, skip=0.3))

# Missing section & misalignment
to_blend = list()
# Misalingments
trans = Compose([Misalign((0, 10), margin=1),
Misalign((0, 30), margin=1),
Misalign((0, 50), margin=1)])

# Out-of-alignments
slip = Compose([SlipMisalign((0, 10), interp=True, margin=1),
SlipMisalign((0, 30), interp=True, margin=1),
SlipMisalign((0, 50), interp=True, margin=1)])
to_blend.append(Blend([trans, slip], props=[0.7, 0.3]))
if is_train:
to_blend.append(Blend([
MisalignPlusMissing((5, 30), value=0, random=random),
MisalignPlusMissing((5, 30), value=0, random=False)
]))
else:
to_blend.append(MisalignPlusMissing((5, 30), value=0, random=False))
if missing > 0:
if is_train:
to_blend.append(Blend([
MixedMissingSection(maxsec=missing, individual=True, value=0, random=False),
MixedMissingSection(maxsec=missing, individual=True, value=0, random=random),
MissingSection(maxsec=missing, individual=False, value=0, random=random),
]))
else:
to_blend.append(
MixedMissingSection(maxsec=missing, individual=True, value=0, random=False)
)
if lost:
if is_train:
to_blend.append(Blend([
LostSection(1),
LostPlusMissing(value=0, random=random),
LostPlusMissing(value=0, random=False)
]))
augs.append(Blend(to_blend))

# Out-of-focus
if blur > 0:
augs.append(MixedBlurrySection(maxsec=blur))

# Warping
if is_train:
augs.append(Warp(skip=0.3, do_twist=False, rot_max=45.0, scale_max=1.1))

# Flip & rotate
augs.append(FlipRotate())

# Create border
if border:
augs.append(Border(targets=border))

# Recompute connected components
if recompute:
augs.append(Label(targets=recompute))

# Section gap
if section_gap > 0:
augs.append(SectionGap(num_secs=section_gap, masked=mask_section_gap))

return Compose(augs)
Loading