careamics 0.1.0rc1__py3-none-any.whl → 0.1.0rc3__py3-none-any.whl
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.
Potentially problematic release.
This version of careamics might be problematic. Click here for more details.
- careamics/__init__.py +14 -4
- careamics/callbacks/__init__.py +6 -0
- careamics/callbacks/hyperparameters_callback.py +42 -0
- careamics/callbacks/progress_bar_callback.py +57 -0
- careamics/careamist.py +761 -0
- careamics/config/__init__.py +27 -3
- careamics/config/algorithm_model.py +167 -0
- careamics/config/architectures/__init__.py +17 -0
- careamics/config/architectures/architecture_model.py +29 -0
- careamics/config/architectures/custom_model.py +150 -0
- careamics/config/architectures/register_model.py +101 -0
- careamics/config/architectures/unet_model.py +96 -0
- careamics/config/architectures/vae_model.py +39 -0
- careamics/config/callback_model.py +92 -0
- careamics/config/configuration_factory.py +460 -0
- careamics/config/configuration_model.py +596 -0
- careamics/config/data_model.py +555 -0
- careamics/config/inference_model.py +283 -0
- careamics/config/noise_models.py +162 -0
- careamics/config/optimizer_models.py +181 -0
- careamics/config/references/__init__.py +45 -0
- careamics/config/references/algorithm_descriptions.py +131 -0
- careamics/config/references/references.py +38 -0
- careamics/config/support/__init__.py +33 -0
- careamics/config/support/supported_activations.py +24 -0
- careamics/config/support/supported_algorithms.py +18 -0
- careamics/config/support/supported_architectures.py +18 -0
- careamics/config/support/supported_data.py +82 -0
- careamics/{dataset/extraction_strategy.py → config/support/supported_extraction_strategies.py} +5 -2
- careamics/config/support/supported_loggers.py +8 -0
- careamics/config/support/supported_losses.py +25 -0
- careamics/config/support/supported_optimizers.py +55 -0
- careamics/config/support/supported_pixel_manipulations.py +15 -0
- careamics/config/support/supported_struct_axis.py +19 -0
- careamics/config/support/supported_transforms.py +23 -0
- careamics/config/tile_information.py +104 -0
- careamics/config/training_model.py +65 -0
- careamics/config/transformations/__init__.py +14 -0
- careamics/config/transformations/n2v_manipulate_model.py +63 -0
- careamics/config/transformations/nd_flip_model.py +32 -0
- careamics/config/transformations/normalize_model.py +31 -0
- careamics/config/transformations/transform_model.py +44 -0
- careamics/config/transformations/xy_random_rotate90_model.py +29 -0
- careamics/config/validators/__init__.py +5 -0
- careamics/config/validators/validator_utils.py +100 -0
- careamics/conftest.py +26 -0
- careamics/dataset/__init__.py +5 -0
- careamics/dataset/dataset_utils/__init__.py +19 -0
- careamics/dataset/dataset_utils/dataset_utils.py +100 -0
- careamics/dataset/dataset_utils/file_utils.py +140 -0
- careamics/dataset/dataset_utils/read_tiff.py +61 -0
- careamics/dataset/dataset_utils/read_utils.py +25 -0
- careamics/dataset/dataset_utils/read_zarr.py +56 -0
- careamics/dataset/in_memory_dataset.py +321 -131
- careamics/dataset/iterable_dataset.py +416 -0
- careamics/dataset/patching/__init__.py +8 -0
- careamics/dataset/patching/patch_transform.py +44 -0
- careamics/dataset/patching/patching.py +212 -0
- careamics/dataset/patching/random_patching.py +190 -0
- careamics/dataset/patching/sequential_patching.py +206 -0
- careamics/dataset/patching/tiled_patching.py +158 -0
- careamics/dataset/patching/validate_patch_dimension.py +60 -0
- careamics/dataset/zarr_dataset.py +149 -0
- careamics/lightning_datamodule.py +665 -0
- careamics/lightning_module.py +292 -0
- careamics/lightning_prediction_datamodule.py +390 -0
- careamics/lightning_prediction_loop.py +116 -0
- careamics/losses/__init__.py +4 -1
- careamics/losses/loss_factory.py +24 -13
- careamics/losses/losses.py +65 -5
- careamics/losses/noise_model_factory.py +40 -0
- careamics/losses/noise_models.py +524 -0
- careamics/model_io/__init__.py +8 -0
- careamics/model_io/bioimage/__init__.py +11 -0
- careamics/model_io/bioimage/_readme_factory.py +120 -0
- careamics/model_io/bioimage/bioimage_utils.py +48 -0
- careamics/model_io/bioimage/model_description.py +318 -0
- careamics/model_io/bmz_io.py +231 -0
- careamics/model_io/model_io_utils.py +80 -0
- careamics/models/__init__.py +4 -1
- careamics/models/activation.py +35 -0
- careamics/models/layers.py +244 -0
- careamics/models/model_factory.py +21 -202
- careamics/models/unet.py +46 -20
- careamics/prediction/__init__.py +1 -3
- careamics/prediction/stitch_prediction.py +73 -0
- careamics/transforms/__init__.py +41 -0
- careamics/transforms/n2v_manipulate.py +113 -0
- careamics/transforms/nd_flip.py +93 -0
- careamics/transforms/normalize.py +109 -0
- careamics/transforms/pixel_manipulation.py +383 -0
- careamics/transforms/struct_mask_parameters.py +18 -0
- careamics/transforms/tta.py +74 -0
- careamics/transforms/xy_random_rotate90.py +95 -0
- careamics/utils/__init__.py +10 -13
- careamics/utils/base_enum.py +32 -0
- careamics/utils/context.py +22 -2
- careamics/utils/metrics.py +0 -46
- careamics/utils/path_utils.py +24 -0
- careamics/utils/ram.py +13 -0
- careamics/utils/receptive_field.py +102 -0
- careamics/utils/running_stats.py +43 -0
- careamics/utils/torch_utils.py +89 -56
- careamics-0.1.0rc3.dist-info/METADATA +122 -0
- careamics-0.1.0rc3.dist-info/RECORD +109 -0
- {careamics-0.1.0rc1.dist-info → careamics-0.1.0rc3.dist-info}/WHEEL +1 -1
- careamics/bioimage/__init__.py +0 -15
- careamics/bioimage/docs/Noise2Void.md +0 -5
- careamics/bioimage/docs/__init__.py +0 -1
- careamics/bioimage/io.py +0 -271
- careamics/config/algorithm.py +0 -231
- careamics/config/config.py +0 -296
- careamics/config/config_filter.py +0 -44
- careamics/config/data.py +0 -194
- careamics/config/torch_optim.py +0 -118
- careamics/config/training.py +0 -534
- careamics/dataset/dataset_utils.py +0 -115
- careamics/dataset/patching.py +0 -493
- careamics/dataset/prepare_dataset.py +0 -174
- careamics/dataset/tiff_dataset.py +0 -211
- careamics/engine.py +0 -954
- careamics/manipulation/__init__.py +0 -4
- careamics/manipulation/pixel_manipulation.py +0 -158
- careamics/prediction/prediction_utils.py +0 -102
- careamics/utils/ascii_logo.txt +0 -9
- careamics/utils/augment.py +0 -65
- careamics/utils/normalization.py +0 -55
- careamics/utils/validators.py +0 -156
- careamics/utils/wandb.py +0 -121
- careamics-0.1.0rc1.dist-info/METADATA +0 -80
- careamics-0.1.0rc1.dist-info/RECORD +0 -46
- {careamics-0.1.0rc1.dist-info → careamics-0.1.0rc3.dist-info}/licenses/LICENSE +0 -0
careamics/utils/metrics.py
CHANGED
|
@@ -112,49 +112,3 @@ def scale_invariant_psnr(
|
|
|
112
112
|
range_parameter = (np.max(gt) - np.min(gt)) / np.std(gt)
|
|
113
113
|
gt_ = _zero_mean(gt) / np.std(gt)
|
|
114
114
|
return psnr(_zero_mean(gt_), _fix(gt_, pred), range_parameter)
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
class MetricTracker:
|
|
118
|
-
"""
|
|
119
|
-
Metric tracker class.
|
|
120
|
-
|
|
121
|
-
This class is used to track values, sum, count and average of a metric over time.
|
|
122
|
-
|
|
123
|
-
Attributes
|
|
124
|
-
----------
|
|
125
|
-
val : int
|
|
126
|
-
Last value of the metric.
|
|
127
|
-
avg : torch.Tensor.float
|
|
128
|
-
Average value of the metric.
|
|
129
|
-
sum : int
|
|
130
|
-
Sum of the metric values (times number of values).
|
|
131
|
-
count : int
|
|
132
|
-
Number of values.
|
|
133
|
-
"""
|
|
134
|
-
|
|
135
|
-
def __init__(self) -> None:
|
|
136
|
-
"""Constructor."""
|
|
137
|
-
self.reset()
|
|
138
|
-
|
|
139
|
-
def reset(self) -> None:
|
|
140
|
-
"""Reset the metric tracker state."""
|
|
141
|
-
self.val = 0.0
|
|
142
|
-
self.avg: torch.Tensor.float = 0.0
|
|
143
|
-
self.sum = 0.0
|
|
144
|
-
self.count = 0.0
|
|
145
|
-
|
|
146
|
-
def update(self, value: int, n: int = 1) -> None:
|
|
147
|
-
"""
|
|
148
|
-
Update the metric tracker state.
|
|
149
|
-
|
|
150
|
-
Parameters
|
|
151
|
-
----------
|
|
152
|
-
value : int
|
|
153
|
-
Value to update the metric tracker with.
|
|
154
|
-
n : int
|
|
155
|
-
Number of values, equals to batch size.
|
|
156
|
-
"""
|
|
157
|
-
self.val = value
|
|
158
|
-
self.sum += value * n
|
|
159
|
-
self.count += n
|
|
160
|
-
self.avg = self.sum / self.count
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
from pathlib import Path
|
|
2
|
+
from typing import Union
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
def check_path_exists(path: Union[str, Path]) -> Path:
|
|
6
|
+
"""Check if a path exists. If not, raise an error.
|
|
7
|
+
|
|
8
|
+
Note that it returns `path` as a Path object.
|
|
9
|
+
|
|
10
|
+
Parameters
|
|
11
|
+
----------
|
|
12
|
+
path : Union[str, Path]
|
|
13
|
+
Path to check.
|
|
14
|
+
|
|
15
|
+
Returns
|
|
16
|
+
-------
|
|
17
|
+
Path
|
|
18
|
+
Path as a Path object.
|
|
19
|
+
"""
|
|
20
|
+
path = Path(path)
|
|
21
|
+
if not path.exists():
|
|
22
|
+
raise FileNotFoundError(f"Data path {path} is incorrect or does not exist.")
|
|
23
|
+
|
|
24
|
+
return path
|
careamics/utils/ram.py
ADDED
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
"""Receptive field calculation for computing the tile overlap."""
|
|
2
|
+
|
|
3
|
+
# Adapted from: https://github.com/frgfm/torch-scan
|
|
4
|
+
|
|
5
|
+
import math
|
|
6
|
+
import warnings
|
|
7
|
+
from typing import Tuple, Union
|
|
8
|
+
|
|
9
|
+
from torch import Tensor, nn
|
|
10
|
+
from torch.nn import Module
|
|
11
|
+
from torch.nn.modules.batchnorm import _BatchNorm
|
|
12
|
+
from torch.nn.modules.conv import _ConvNd, _ConvTransposeNd
|
|
13
|
+
from torch.nn.modules.pooling import (
|
|
14
|
+
_AdaptiveAvgPoolNd,
|
|
15
|
+
_AdaptiveMaxPoolNd,
|
|
16
|
+
_AvgPoolNd,
|
|
17
|
+
_MaxPoolNd,
|
|
18
|
+
)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
def module_rf(module: Module, inp: Tensor, out: Tensor) -> Tuple[float, float, float]:
|
|
22
|
+
"""Estimate the spatial receptive field of the module.
|
|
23
|
+
|
|
24
|
+
Args:
|
|
25
|
+
module (torch.nn.Module): PyTorch module
|
|
26
|
+
inp (torch.Tensor): input to the module
|
|
27
|
+
out (torch.Tensor): output of the module
|
|
28
|
+
Returns:
|
|
29
|
+
receptive field
|
|
30
|
+
effective stride
|
|
31
|
+
effective padding
|
|
32
|
+
"""
|
|
33
|
+
if isinstance(
|
|
34
|
+
module,
|
|
35
|
+
(
|
|
36
|
+
nn.Identity,
|
|
37
|
+
nn.Flatten,
|
|
38
|
+
nn.ReLU,
|
|
39
|
+
nn.ELU,
|
|
40
|
+
nn.LeakyReLU,
|
|
41
|
+
nn.ReLU6,
|
|
42
|
+
nn.Tanh,
|
|
43
|
+
nn.Sigmoid,
|
|
44
|
+
_BatchNorm,
|
|
45
|
+
nn.Dropout,
|
|
46
|
+
nn.Linear,
|
|
47
|
+
),
|
|
48
|
+
):
|
|
49
|
+
return 1.0, 1.0, 0.0
|
|
50
|
+
elif isinstance(module, _ConvTransposeNd):
|
|
51
|
+
return rf_convtransposend(module, inp, out)
|
|
52
|
+
elif isinstance(module, (_ConvNd, _MaxPoolNd, _AvgPoolNd)):
|
|
53
|
+
return rf_aggregnd(module, inp, out)
|
|
54
|
+
elif isinstance(module, (_AdaptiveMaxPoolNd, _AdaptiveAvgPoolNd)):
|
|
55
|
+
return rf_adaptive_poolnd(module, inp, out)
|
|
56
|
+
else:
|
|
57
|
+
warnings.warn(
|
|
58
|
+
f"Module type not supported: {module.__class__.__name__}", stacklevel=1
|
|
59
|
+
)
|
|
60
|
+
return 1.0, 1.0, 0.0
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
def rf_convtransposend(
|
|
64
|
+
module: _ConvTransposeNd, _: Tensor, __: Tensor
|
|
65
|
+
) -> Tuple[float, float, float]:
|
|
66
|
+
k = (
|
|
67
|
+
module.kernel_size[0]
|
|
68
|
+
if isinstance(module.kernel_size, tuple)
|
|
69
|
+
else module.kernel_size
|
|
70
|
+
)
|
|
71
|
+
s = module.stride[0] if isinstance(module.stride, tuple) else module.stride
|
|
72
|
+
return -k, 1.0 / s, 0.0
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
def rf_aggregnd(
|
|
76
|
+
module: Union[_ConvNd, _MaxPoolNd, _AvgPoolNd], _: Tensor, __: Tensor
|
|
77
|
+
) -> Tuple[float, float, float]:
|
|
78
|
+
k = (
|
|
79
|
+
module.kernel_size[0]
|
|
80
|
+
if isinstance(module.kernel_size, tuple)
|
|
81
|
+
else module.kernel_size
|
|
82
|
+
)
|
|
83
|
+
if hasattr(module, "dilation"):
|
|
84
|
+
d = (
|
|
85
|
+
module.dilation[0]
|
|
86
|
+
if isinstance(module.dilation, tuple)
|
|
87
|
+
else module.dilation
|
|
88
|
+
)
|
|
89
|
+
k = d * (k - 1) + 1
|
|
90
|
+
s = module.stride[0] if isinstance(module.stride, tuple) else module.stride
|
|
91
|
+
p = module.padding[0] if isinstance(module.padding, tuple) else module.padding
|
|
92
|
+
return k, s, p # type: ignore[return-value]
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
def rf_adaptive_poolnd(
|
|
96
|
+
_: Union[_AdaptiveMaxPoolNd, _AdaptiveAvgPoolNd], inp: Tensor, out: Tensor
|
|
97
|
+
) -> Tuple[int, int, float]:
|
|
98
|
+
stride = math.ceil(inp.shape[-1] / out.shape[-1])
|
|
99
|
+
kernel_size = stride
|
|
100
|
+
padding = (inp.shape[-1] - kernel_size * stride) / 2
|
|
101
|
+
|
|
102
|
+
return kernel_size, stride, padding
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"""Running stats submodule, used in the Zarr dataset."""
|
|
2
|
+
|
|
3
|
+
# from multiprocessing import Value
|
|
4
|
+
# from typing import Tuple
|
|
5
|
+
|
|
6
|
+
# import numpy as np
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
# class RunningStats:
|
|
10
|
+
# """Calculates running mean and std."""
|
|
11
|
+
|
|
12
|
+
# def __init__(self) -> None:
|
|
13
|
+
# self.reset()
|
|
14
|
+
|
|
15
|
+
# def reset(self) -> None:
|
|
16
|
+
# """Reset the running stats."""
|
|
17
|
+
# self.avg_mean = Value("d", 0)
|
|
18
|
+
# self.avg_std = Value("d", 0)
|
|
19
|
+
# self.m2 = Value("d", 0)
|
|
20
|
+
# self.count = Value("i", 0)
|
|
21
|
+
|
|
22
|
+
# def init(self, mean: float, std: float) -> None:
|
|
23
|
+
# """Initialize running stats."""
|
|
24
|
+
# with self.avg_mean.get_lock():
|
|
25
|
+
# self.avg_mean.value += mean
|
|
26
|
+
# with self.avg_std.get_lock():
|
|
27
|
+
# self.avg_std.value = std
|
|
28
|
+
|
|
29
|
+
# def compute_std(self) -> Tuple[float, float]:
|
|
30
|
+
# """Compute std."""
|
|
31
|
+
# if self.count.value >= 2:
|
|
32
|
+
# self.avg_std.value = np.sqrt(self.m2.value / self.count.value)
|
|
33
|
+
|
|
34
|
+
# def update(self, value: float) -> None:
|
|
35
|
+
# """Update running stats."""
|
|
36
|
+
# with self.count.get_lock():
|
|
37
|
+
# self.count.value += 1
|
|
38
|
+
# delta = value - self.avg_mean.value
|
|
39
|
+
# with self.avg_mean.get_lock():
|
|
40
|
+
# self.avg_mean.value += delta / self.count.value
|
|
41
|
+
# delta2 = value - self.avg_mean.value
|
|
42
|
+
# with self.m2.get_lock():
|
|
43
|
+
# self.m2.value += delta * delta2
|
careamics/utils/torch_utils.py
CHANGED
|
@@ -3,91 +3,124 @@ Convenience functions using torch.
|
|
|
3
3
|
|
|
4
4
|
These functions are used to control certain aspects and behaviours of PyTorch.
|
|
5
5
|
"""
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import sys
|
|
6
|
+
import inspect
|
|
7
|
+
from typing import Dict, Union
|
|
9
8
|
|
|
10
9
|
import torch
|
|
11
10
|
|
|
11
|
+
from careamics.config.support import SupportedOptimizer, SupportedScheduler
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
from ..utils.logging import get_logger
|
|
14
|
+
|
|
15
|
+
logger = get_logger(__name__) # TODO are logger still needed?
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
def filter_parameters(
|
|
19
|
+
func: type,
|
|
20
|
+
user_params: dict,
|
|
21
|
+
) -> dict:
|
|
14
22
|
"""
|
|
15
|
-
|
|
23
|
+
Filter parameters according to the function signature.
|
|
24
|
+
|
|
25
|
+
Parameters
|
|
26
|
+
----------
|
|
27
|
+
func : type
|
|
28
|
+
Class object.
|
|
29
|
+
user_params : Dict
|
|
30
|
+
User provided parameters.
|
|
16
31
|
|
|
17
32
|
Returns
|
|
18
33
|
-------
|
|
19
|
-
|
|
20
|
-
|
|
34
|
+
Dict
|
|
35
|
+
Parameters matching `func`'s signature.
|
|
21
36
|
"""
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
device = torch.device("cuda")
|
|
25
|
-
else:
|
|
26
|
-
logging.info("CUDA not available. Using CPU.")
|
|
27
|
-
device = torch.device("cpu")
|
|
28
|
-
return device
|
|
37
|
+
# Get the list of all default parameters
|
|
38
|
+
default_params = list(inspect.signature(func).parameters.keys())
|
|
29
39
|
|
|
40
|
+
# Filter matching parameters
|
|
41
|
+
params_to_be_used = set(user_params.keys()) & set(default_params)
|
|
30
42
|
|
|
31
|
-
|
|
43
|
+
return {key: user_params[key] for key in params_to_be_used}
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
def get_optimizer(name: str) -> torch.optim.Optimizer:
|
|
32
47
|
"""
|
|
33
|
-
|
|
48
|
+
Return the optimizer class given its name.
|
|
34
49
|
|
|
35
50
|
Parameters
|
|
36
51
|
----------
|
|
37
|
-
|
|
38
|
-
|
|
52
|
+
name : str
|
|
53
|
+
Optimizer name.
|
|
39
54
|
|
|
40
55
|
Returns
|
|
41
56
|
-------
|
|
42
|
-
torch.nn.
|
|
43
|
-
|
|
57
|
+
torch.nn.Optimizer
|
|
58
|
+
Optimizer class.
|
|
44
59
|
"""
|
|
45
|
-
if
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
60
|
+
if name not in SupportedOptimizer:
|
|
61
|
+
raise NotImplementedError(f"Optimizer {name} is not yet supported.")
|
|
62
|
+
|
|
63
|
+
return getattr(torch.optim, name)
|
|
49
64
|
|
|
50
65
|
|
|
51
|
-
def
|
|
66
|
+
def get_optimizers() -> Dict[str, str]:
|
|
52
67
|
"""
|
|
53
|
-
|
|
68
|
+
Return the list of all optimizers available in torch.optim.
|
|
69
|
+
|
|
70
|
+
Returns
|
|
71
|
+
-------
|
|
72
|
+
Dict
|
|
73
|
+
Optimizers available in torch.optim.
|
|
74
|
+
"""
|
|
75
|
+
optims = {}
|
|
76
|
+
for name, obj in inspect.getmembers(torch.optim):
|
|
77
|
+
if inspect.isclass(obj) and issubclass(obj, torch.optim.Optimizer):
|
|
78
|
+
if name != "Optimizer":
|
|
79
|
+
optims[name] = name
|
|
80
|
+
return optims
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
def get_scheduler(
|
|
84
|
+
name: str,
|
|
85
|
+
) -> Union[
|
|
86
|
+
torch.optim.lr_scheduler.LRScheduler,
|
|
87
|
+
torch.optim.lr_scheduler.ReduceLROnPlateau,
|
|
88
|
+
]:
|
|
89
|
+
"""
|
|
90
|
+
Return the scheduler class given its name.
|
|
54
91
|
|
|
55
92
|
Parameters
|
|
56
93
|
----------
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
"""
|
|
60
|
-
import random
|
|
94
|
+
name : str
|
|
95
|
+
Scheduler name.
|
|
61
96
|
|
|
62
|
-
|
|
97
|
+
Returns
|
|
98
|
+
-------
|
|
99
|
+
Union
|
|
100
|
+
Scheduler class.
|
|
101
|
+
"""
|
|
102
|
+
if name not in SupportedScheduler:
|
|
103
|
+
raise NotImplementedError(f"Scheduler {name} is not yet supported.")
|
|
63
104
|
|
|
64
|
-
|
|
65
|
-
np.random.seed(seed)
|
|
66
|
-
torch.manual_seed(seed)
|
|
67
|
-
torch.cuda.manual_seed_all(seed)
|
|
105
|
+
return getattr(torch.optim.lr_scheduler, name)
|
|
68
106
|
|
|
69
107
|
|
|
70
|
-
def
|
|
71
|
-
deterministic: bool = True, benchmark: bool = True
|
|
72
|
-
) -> None:
|
|
108
|
+
def get_schedulers() -> Dict[str, str]:
|
|
73
109
|
"""
|
|
74
|
-
|
|
110
|
+
Return the list of all schedulers available in torch.optim.lr_scheduler.
|
|
75
111
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
deterministic : bool
|
|
81
|
-
Deterministic mode, if running CuDNN backend.
|
|
82
|
-
benchmark : bool
|
|
83
|
-
If True, uses CuDNN heuristics to figure out which algorithm will be most
|
|
84
|
-
performant for your model architecture and input. False may slow down training.
|
|
112
|
+
Returns
|
|
113
|
+
-------
|
|
114
|
+
Dict
|
|
115
|
+
Schedulers available in torch.optim.lr_scheduler.
|
|
85
116
|
"""
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
117
|
+
schedulers = {}
|
|
118
|
+
for name, obj in inspect.getmembers(torch.optim.lr_scheduler):
|
|
119
|
+
if inspect.isclass(obj) and issubclass(
|
|
120
|
+
obj, torch.optim.lr_scheduler.LRScheduler
|
|
121
|
+
):
|
|
122
|
+
if "LRScheduler" not in name:
|
|
123
|
+
schedulers[name] = name
|
|
124
|
+
elif name == "ReduceLROnPlateau": # somewhat not a subclass of LRScheduler
|
|
125
|
+
schedulers[name] = name
|
|
126
|
+
return schedulers
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
Metadata-Version: 2.3
|
|
2
|
+
Name: careamics
|
|
3
|
+
Version: 0.1.0rc3
|
|
4
|
+
Summary: Toolbox for running N2V and friends.
|
|
5
|
+
Project-URL: homepage, https://careamics.github.io/
|
|
6
|
+
Project-URL: repository, https://github.com/CAREamics/careamics
|
|
7
|
+
Author-email: Igor Zubarev <igor.zubarev@fht.org>, Joran Deschamps <joran.deschamps@fht.org>
|
|
8
|
+
License: BSD-3-Clause
|
|
9
|
+
License-File: LICENSE
|
|
10
|
+
Classifier: Development Status :: 3 - Alpha
|
|
11
|
+
Classifier: License :: OSI Approved :: BSD License
|
|
12
|
+
Classifier: Programming Language :: Python :: 3
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
+
Classifier: Typing :: Typed
|
|
18
|
+
Requires-Python: >=3.8
|
|
19
|
+
Requires-Dist: albumentations
|
|
20
|
+
Requires-Dist: bioimageio-core>=0.6.0
|
|
21
|
+
Requires-Dist: psutil
|
|
22
|
+
Requires-Dist: pydantic>=2.5
|
|
23
|
+
Requires-Dist: pytorch-lightning>=2.2.0
|
|
24
|
+
Requires-Dist: pyyaml
|
|
25
|
+
Requires-Dist: scikit-image
|
|
26
|
+
Requires-Dist: tifffile
|
|
27
|
+
Requires-Dist: torch>=2.0.0
|
|
28
|
+
Requires-Dist: zarr
|
|
29
|
+
Provides-Extra: dev
|
|
30
|
+
Requires-Dist: pre-commit; extra == 'dev'
|
|
31
|
+
Requires-Dist: pytest; extra == 'dev'
|
|
32
|
+
Requires-Dist: pytest-cov; extra == 'dev'
|
|
33
|
+
Requires-Dist: sybil; extra == 'dev'
|
|
34
|
+
Provides-Extra: examples
|
|
35
|
+
Requires-Dist: careamics-portfolio; extra == 'examples'
|
|
36
|
+
Requires-Dist: jupyter; extra == 'examples'
|
|
37
|
+
Requires-Dist: matplotlib; extra == 'examples'
|
|
38
|
+
Provides-Extra: tensorboard
|
|
39
|
+
Requires-Dist: protobuf==3.20.3; extra == 'tensorboard'
|
|
40
|
+
Requires-Dist: tensorboard; extra == 'tensorboard'
|
|
41
|
+
Provides-Extra: wandb
|
|
42
|
+
Requires-Dist: wandb; extra == 'wandb'
|
|
43
|
+
Description-Content-Type: text/markdown
|
|
44
|
+
|
|
45
|
+
<p align="center">
|
|
46
|
+
<a href="https://careamics.github.io/">
|
|
47
|
+
<img src="https://raw.githubusercontent.com/CAREamics/.github/main/profile/images/banner_careamics.png">
|
|
48
|
+
</a>
|
|
49
|
+
</p>
|
|
50
|
+
|
|
51
|
+
# CAREamics Restoration
|
|
52
|
+
|
|
53
|
+
[](https://github.com/CAREamics/careamics/blob/main/LICENSE)
|
|
54
|
+
[](https://pypi.org/project/careamics)
|
|
55
|
+
[](https://python.org)
|
|
56
|
+
[](https://github.com/CAREamics/careamics/actions/workflows/ci.yml)
|
|
57
|
+
[](https://codecov.io/gh/CAREamics/careamics)
|
|
58
|
+
|
|
59
|
+
## Installation
|
|
60
|
+
|
|
61
|
+
``` bash
|
|
62
|
+
pip install careamics
|
|
63
|
+
```
|
|
64
|
+
For more details on the options please follow the installation [guide](https://careamics.github.io/careamics/).
|
|
65
|
+
|
|
66
|
+
## Usage
|
|
67
|
+
|
|
68
|
+
CAREamics uses the Engine object to construct the pipeline for both training and prediction. First we import the Engine.
|
|
69
|
+
```python
|
|
70
|
+
from careamics_restoration.engine import Engine
|
|
71
|
+
```
|
|
72
|
+
The Engine could be initialized in 2 ways:
|
|
73
|
+
1. Using the [yaml config](examples/n2v_2D_reference.yml) file
|
|
74
|
+
|
|
75
|
+
Specify the mandatory parameters in the config file
|
|
76
|
+
```yaml
|
|
77
|
+
experiment_name: Name of the experiment
|
|
78
|
+
working_directory: Path to the working directory, where all the outputs will be stored
|
|
79
|
+
|
|
80
|
+
algorithm:
|
|
81
|
+
loss: type of loss function, e.g. n2v for Noise2Void
|
|
82
|
+
model: model architecture, e.g. UNet
|
|
83
|
+
is_3D: True if 3D data, False if 2D data
|
|
84
|
+
|
|
85
|
+
training:
|
|
86
|
+
num_epochs: Number of training epochs
|
|
87
|
+
patch_size: Size of the patches, List of 2 or 3 elements
|
|
88
|
+
batch_size: Batch size for training
|
|
89
|
+
|
|
90
|
+
extraction_strategy: Controls how the patches are extracted from the data
|
|
91
|
+
|
|
92
|
+
data:
|
|
93
|
+
data_format: File extension, e.g. tif
|
|
94
|
+
axes: Defines the shape of the input data
|
|
95
|
+
```
|
|
96
|
+
Full description of the configuration parameters is in the [documentation](https://careamics.github.io/careamics/).
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
```python
|
|
100
|
+
engine = Engine(config_path="config.yml")
|
|
101
|
+
|
|
102
|
+
```
|
|
103
|
+
2. Using the path to the pretrained model
|
|
104
|
+
It's also possible to initialize the Engine using the model checkpoint, saved during the training or downloaded from the [BioImage Model Zoo](https://bioimage.io/#/).
|
|
105
|
+
Checkpoint must contain model_state_dict.
|
|
106
|
+
Read more abount saving and loading models in the [documentation](https://careamics.github.io/careamics/).
|
|
107
|
+
|
|
108
|
+
Once Engine is initialized, we can start training, providing the relative paths to train and validation data
|
|
109
|
+
|
|
110
|
+
```python
|
|
111
|
+
engine.train(train_path=train_path, val_path=val_path)
|
|
112
|
+
```
|
|
113
|
+
Training will run for the specified number of epochs and save the model checkpoint in the working directory.
|
|
114
|
+
|
|
115
|
+
Prediction could be done directly after the training or by loading the pretrained model checkpoint.
|
|
116
|
+
|
|
117
|
+
```python
|
|
118
|
+
predictions = engine.predict(pred_path=predict_path)
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
For more examples please take a look at the [notebooks](examples).
|
|
122
|
+
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
careamics/__init__.py,sha256=7Zfey0kcF5eSouzc0I1bnGg77wys7NyRy61s9BCU3Xs,676
|
|
2
|
+
careamics/careamist.py,sha256=44JhiyRsuPH_rmfoIdECpolp8bXnFBv3CUCm8pBb0zU,28336
|
|
3
|
+
careamics/conftest.py,sha256=WR_iw4Eebfq6r_sY1No4GfB-_XG5JMkpxXpoorWy8Eg,658
|
|
4
|
+
careamics/lightning_datamodule.py,sha256=MA6qwvCAf-Umz8fwJJgGEsXX76yVa_8BFEo4nsMBYuQ,28552
|
|
5
|
+
careamics/lightning_module.py,sha256=nxReAzoWBZZy2E8JMsef72hIC_4WTh0kvvVf5sgpcYM,10159
|
|
6
|
+
careamics/lightning_prediction_datamodule.py,sha256=yzJcfvhlN8k6ylOrTO-Y_NLSeQNTHklqhhjFxffLyiA,15053
|
|
7
|
+
careamics/lightning_prediction_loop.py,sha256=EcUSgM2BHkWhjR4zN0NNf2M8xQF_I3aQ9qAFk0slYYw,4483
|
|
8
|
+
careamics/py.typed,sha256=esB4cHc6c07uVkGtqf8at7ttEnprwRxwk8obY8Qumq4,187
|
|
9
|
+
careamics/callbacks/__init__.py,sha256=spxJlDByD-6QtMl9vcIty8Wb0tyHaSTKTItozHenI44,204
|
|
10
|
+
careamics/callbacks/hyperparameters_callback.py,sha256=CdOtxazXi6YXH3Fq4AahqBQ3Ai64YpAMkd8gFnAnkjc,1258
|
|
11
|
+
careamics/callbacks/progress_bar_callback.py,sha256=ojeat3wwaqq7uEAVZBren71CZtNiEch1FR7o8FiaEPg,1868
|
|
12
|
+
careamics/config/__init__.py,sha256=V8oV-QxJAGtjZRcyMIeSPqONJvzXroRB_-pA_uDEr70,886
|
|
13
|
+
careamics/config/algorithm_model.py,sha256=sBUX80tdnzlvdUYlPJ9m4dUAL8GKu22BcrUfZT6jQoE,5727
|
|
14
|
+
careamics/config/callback_model.py,sha256=h4q5tbjpauL5gQ1joeRvJw8Bes1s7Lp2dvcoHnFozqY,3225
|
|
15
|
+
careamics/config/configuration_factory.py,sha256=AeqVtnj-lAwkhNS-SatU4naoN-Oy2ewBpq8e0FM443k,14610
|
|
16
|
+
careamics/config/configuration_model.py,sha256=KK7r_JIgGt07CoK-HCrS-sb2wHMC6M9zLZ9OeVLNGc0,18730
|
|
17
|
+
careamics/config/data_model.py,sha256=hPdpX08B2_woGRnwKU6IQtUbTQ_br5upNsAPjbbkX-g,16806
|
|
18
|
+
careamics/config/inference_model.py,sha256=-iLrXlJbjFaCoy9jX1YDb2Afvl7xRj3rSeTt-oblzSE,8126
|
|
19
|
+
careamics/config/noise_models.py,sha256=1P6dXqqBhbVHT7EZ2hluO2aHKIywkAyl4BndrvtKRKU,4338
|
|
20
|
+
careamics/config/optimizer_models.py,sha256=Umu6O2qKv1o4ReWBuldAHmvF0u_DKS5eHCa7YdxvOaw,5266
|
|
21
|
+
careamics/config/tile_information.py,sha256=2bVLTvZfdjPOZVq7jYXVuAFLlPFmJ2DBiwtwm5n7K-U,2939
|
|
22
|
+
careamics/config/training_model.py,sha256=T0E0uu_u7dVQg5rZIynD-JhCVbKKzFO7EP-CboiFLsU,1557
|
|
23
|
+
careamics/config/architectures/__init__.py,sha256=CdnViydyTdQixus3uWHBIgbgxmu9t1_ADehqpjN_57U,444
|
|
24
|
+
careamics/config/architectures/architecture_model.py,sha256=EomNAhjuhu3uqEjzG6uvRclSQNVuGkcH_mt4R47yIHg,681
|
|
25
|
+
careamics/config/architectures/custom_model.py,sha256=2tMvr6XqFY8hY8Tfljba-kp1c61fDKaV4vylbg4AyUg,4473
|
|
26
|
+
careamics/config/architectures/register_model.py,sha256=sW6fvj54F6G1rg3fmXTwCAu_YcKs3xZTsdYnDGFRahY,2389
|
|
27
|
+
careamics/config/architectures/unet_model.py,sha256=8zV9W1x9lvSCWNgtXmnPMBqt7s_-AzsUex9sjjNTe9c,2788
|
|
28
|
+
careamics/config/architectures/vae_model.py,sha256=n1pvVmpelNqQXsXtxXPdmMBBkCLyMIlTQJbMqB-amCc,899
|
|
29
|
+
careamics/config/references/__init__.py,sha256=rZAQzmrciX5cNICcXaBH6sbE6N6L7_qYQUkasNy9y-c,763
|
|
30
|
+
careamics/config/references/algorithm_descriptions.py,sha256=LzY66zAtKj9705omjfhV0Ziq7vhWSZ4Tq_GPDwE2P-E,3540
|
|
31
|
+
careamics/config/references/references.py,sha256=vcbt9qfsdzOmzqizu8COjtIXlrAyH6UT6bgoJy8D5oo,1572
|
|
32
|
+
careamics/config/support/__init__.py,sha256=XMnPEPHVy63DDxAfczIFqFjuYrtDRrbzA5b0Ff1qmyU,1149
|
|
33
|
+
careamics/config/support/supported_activations.py,sha256=-KaTxdm8IJ9c6xkCVMw3SWjbw6wmvV-1WuoeSbyCdH4,476
|
|
34
|
+
careamics/config/support/supported_algorithms.py,sha256=wc3pTYhgoZ0W_O6jcJY0ZsVErYMSTmi24ptw3ezAuUw,316
|
|
35
|
+
careamics/config/support/supported_architectures.py,sha256=EDrh8eghqxWcwjXVhhJpfymV6dsmyaUxk2E397VXXbA,495
|
|
36
|
+
careamics/config/support/supported_data.py,sha256=AvdoWVLLpX5jzozJGUqeo5EJVkb6Z_OcQbaS8AkyHSg,2048
|
|
37
|
+
careamics/config/support/supported_extraction_strategies.py,sha256=oVSVbFBrVMvvtHGtK5_e306ef3splJZHialoSQM_0zs,578
|
|
38
|
+
careamics/config/support/supported_loggers.py,sha256=slbpUZSMdRMCKNAQfnCxh7n1Sql2NFoH79cIoiuavcU,159
|
|
39
|
+
careamics/config/support/supported_losses.py,sha256=fu0SPPhubMVq3zXJk8G8Av9ojWNw62EKm7WnUmapuRs,502
|
|
40
|
+
careamics/config/support/supported_optimizers.py,sha256=iUjxE6Yh3KV6u42kfXDe83pt8MbFaS-rm1OO7zwFLf8,1333
|
|
41
|
+
careamics/config/support/supported_pixel_manipulations.py,sha256=0lZfCwL9bwPK5E8qzi7l9UGOq41U2fCH9KpxnDEpznc,360
|
|
42
|
+
careamics/config/support/supported_struct_axis.py,sha256=VzyKEVwNARtF9HviAmsHqAjyenHCRFR5UObks6s6R9Y,378
|
|
43
|
+
careamics/config/support/supported_transforms.py,sha256=7lF2ZdWC7Fa7ExemQ6JzM9s9RXM0_tsGWilmmq-MoMw,889
|
|
44
|
+
careamics/config/transformations/__init__.py,sha256=FnLBxNyJ0cTPf8e1dhtkhks5vu_z8Wi48aBjvAPDErk,357
|
|
45
|
+
careamics/config/transformations/n2v_manipulate_model.py,sha256=OjZ2GK02BhNPR2U1wXSUE71p-zwn6Y6PERLk_2tR0og,1835
|
|
46
|
+
careamics/config/transformations/nd_flip_model.py,sha256=7ah1Dxav_BKShH3MO1Nh7QQ5dNwGq4wqXwrEtZHvWCM,845
|
|
47
|
+
careamics/config/transformations/normalize_model.py,sha256=zl7yCfaEzF0G19L7BLPT3Ke0t9y5aXQOqWTc3doIIGo,789
|
|
48
|
+
careamics/config/transformations/transform_model.py,sha256=HqCnZLr-K9d54CxK8M0UaXdPqnPYso5Wg1i2dK5dmBI,999
|
|
49
|
+
careamics/config/transformations/xy_random_rotate90_model.py,sha256=U0kIPWI4XU7KrDuVfyCHqq28TEqdp-KcHQDXuaH4uw8,775
|
|
50
|
+
careamics/config/validators/__init__.py,sha256=iv0nVI0W7j9DxFPwh0DjRCzM9P8oLQn4Gwi5rfuFrrI,180
|
|
51
|
+
careamics/config/validators/validator_utils.py,sha256=81t79useG0ZfwZdodLfSl_799hBMriiFrohStRHl9nc,2623
|
|
52
|
+
careamics/dataset/__init__.py,sha256=cUcqy1Nxa5WhDQim6948r3i1kGQ-HijUqAACyyM7cuU,174
|
|
53
|
+
careamics/dataset/in_memory_dataset.py,sha256=5qoMpHOw-9Fhb3y6QTHGvIALCd-uvxgctREFF6WT79U,12209
|
|
54
|
+
careamics/dataset/iterable_dataset.py,sha256=P4-yjZYAA_baw2_tjcr5F2FskHjAEYCneyoVBflx9dY,15030
|
|
55
|
+
careamics/dataset/zarr_dataset.py,sha256=cpouzhaWUOkqAjjliJhrtfqVvZEMaq1d9V3LDoEvJQA,5644
|
|
56
|
+
careamics/dataset/dataset_utils/__init__.py,sha256=nt3IzCFa8JstXbheNrA5D_wlJe0PNFpABmBA3f_Jsj0,447
|
|
57
|
+
careamics/dataset/dataset_utils/dataset_utils.py,sha256=bKAUvLrnS-zxCpJ7H56clJ2pGB3jYYh7F20ZkG7bDIQ,2666
|
|
58
|
+
careamics/dataset/dataset_utils/file_utils.py,sha256=VHK7__34keJfkYWfyrOApalFA0wyINLK7CB79T_Sqm4,4030
|
|
59
|
+
careamics/dataset/dataset_utils/read_tiff.py,sha256=KcO5pZXaXEGXlJoCLnFriAHmHACCPI5kRWZK-oovfBo,1648
|
|
60
|
+
careamics/dataset/dataset_utils/read_utils.py,sha256=hwb2pFr-ueusVf8hoTtDsD71V5HDVU-6eQ14cpPp6d4,547
|
|
61
|
+
careamics/dataset/dataset_utils/read_zarr.py,sha256=B75gaOsLctkonYqwouCDWBu-AVwy697mJbEXDC0ft3I,1635
|
|
62
|
+
careamics/dataset/patching/__init__.py,sha256=UJBR4X1H5B6BIcayesPGpWjxTkub1alf9Uzj_5mdnFE,130
|
|
63
|
+
careamics/dataset/patching/patch_transform.py,sha256=kgUNUuk5QbJ8sZ3CFmBq06kO0FuclICX97Sj4PqoxyQ,1375
|
|
64
|
+
careamics/dataset/patching/patching.py,sha256=aQbjJLa56x22WALV31K0SFvxFNtTZ-FX9EP1RiqTt0k,6258
|
|
65
|
+
careamics/dataset/patching/random_patching.py,sha256=93R5a56O4k6CxrWvRpTwkFDnw37tpDTaajcPAQbc4Nw,6025
|
|
66
|
+
careamics/dataset/patching/sequential_patching.py,sha256=Vm6em2ZPVUzqmrwLWJwD4jhI8hcSMjZ6YzpX7_nLUB8,5688
|
|
67
|
+
careamics/dataset/patching/tiled_patching.py,sha256=Kq0CENa8JNINMMTGySmCdYjBPieFQKgxa14WbntPbtk,5702
|
|
68
|
+
careamics/dataset/patching/validate_patch_dimension.py,sha256=cHiD2XNX44eArlRR7ZK7_4Mihv3DzjncthgN-nXqR4s,2001
|
|
69
|
+
careamics/losses/__init__.py,sha256=tpiq1pGabqGm8U0AxfMM5bUkgXVCwG_8vzyVf_XeEVU,216
|
|
70
|
+
careamics/losses/loss_factory.py,sha256=2gx5QkwLT79FlKpIj_-IZMoiH6VnzJ2KTo2Iy_cBwgI,991
|
|
71
|
+
careamics/losses/losses.py,sha256=a-8NLw0R86r2XxcHh97D7Mnhtbn0c5VFjZLPfttKCCM,2304
|
|
72
|
+
careamics/losses/noise_model_factory.py,sha256=zbRxlU3hTLJR9fM-PkeTthQ8idrwJD7-AelvXxaoHEQ,988
|
|
73
|
+
careamics/losses/noise_models.py,sha256=fRr4_mxP_jirC-UkQDVF09RcwqvZJES9JVCc8tccCFc,17801
|
|
74
|
+
careamics/model_io/__init__.py,sha256=x_wtgBZWoLWFLyrKmYFfc6rP-nLiRsBTqPBed3sT1Vo,156
|
|
75
|
+
careamics/model_io/bmz_io.py,sha256=aWA5vM_tbxxcaE0OSjDugEF8O9d7n6i5Gf-gL4NnhxA,6943
|
|
76
|
+
careamics/model_io/model_io_utils.py,sha256=0XHIhpzeY_8IkWlG_eto_x3IQ5z6y9hI3iUJ7l7ylH0,2108
|
|
77
|
+
careamics/model_io/bioimage/__init__.py,sha256=r94nu8WDAvj0Fbu4C-iJXdOhfSQXeZBvN3UKsLG0RNI,298
|
|
78
|
+
careamics/model_io/bioimage/_readme_factory.py,sha256=cXNu2ZZdlSM7sfYo16wKSfS8CDoBsvNBj96k0HSk8vw,3498
|
|
79
|
+
careamics/model_io/bioimage/bioimage_utils.py,sha256=YOaiaxFOvJYtrUZt9m447wgQr4nwZTcayVrqPbEopYg,1084
|
|
80
|
+
careamics/model_io/bioimage/model_description.py,sha256=AE0SPt3D0o5M0kGjqMNjWQ0X4vlWOOi0uYrC9jMOHQ8,9204
|
|
81
|
+
careamics/models/__init__.py,sha256=Wty5hwQb_As33pQOZqY5j-DpDOdh5ArBH4BhQDSuXTQ,133
|
|
82
|
+
careamics/models/activation.py,sha256=21g0isrf_SpY4MUQoxbcsc1hAP5luSmWgtzGOvXKzTw,936
|
|
83
|
+
careamics/models/layers.py,sha256=3KBGhOgiZH-vz-fzvmHcFjCSUypi8ttNh2KDIWmx3Tg,11557
|
|
84
|
+
careamics/models/model_factory.py,sha256=8jJHfY5tCkosmlfIaYy7DtMNW8wRJ0Ur2g54N1vjitY,1358
|
|
85
|
+
careamics/models/unet.py,sha256=E5zRIRpVv7CeMcMddmHGL5UCBm_DCnVR323UXNkjZT4,10925
|
|
86
|
+
careamics/prediction/__init__.py,sha256=-Bfc7UqPSqpGx0NGvHMkE-bHOkZYMn7EaxQ9tO6A3uU,118
|
|
87
|
+
careamics/prediction/stitch_prediction.py,sha256=IPTTJ8FA0j_vmUOfqiiLe3JF6v5NlSOD3fBL1ZTQkq0,2215
|
|
88
|
+
careamics/transforms/__init__.py,sha256=SRquA3XotroxiUF-AbUUkSeGVuX_BM8cauZplCwQqg4,1093
|
|
89
|
+
careamics/transforms/n2v_manipulate.py,sha256=c16grua6w33ZRVVfW7wAOJ6EyvgPt0cXprTgBLSpKOg,4191
|
|
90
|
+
careamics/transforms/nd_flip.py,sha256=NY0y2lrkF98XUE_twnPQ9z2xSxMvV2bYeVrJKKemjUU,2827
|
|
91
|
+
careamics/transforms/normalize.py,sha256=khmL2xKNWHEWVx2oJWH-_JCDv9d5krFJgBQtuufaYT4,2727
|
|
92
|
+
careamics/transforms/pixel_manipulation.py,sha256=FfTM7V2ql0vqRSFUsebBuIIPjcLo_rW8j74Lo2cUVaA,12776
|
|
93
|
+
careamics/transforms/struct_mask_parameters.py,sha256=tcxs_MHxZTD6PZE2q5gsGJYIMDF368X9Ggw8O9SkfP0,360
|
|
94
|
+
careamics/transforms/tta.py,sha256=4RqHwlOPpBDlHnv68XX_55ggxc2FHiepxRXIH1BfX30,1982
|
|
95
|
+
careamics/transforms/xy_random_rotate90.py,sha256=hvXrpgK-rb4l7quRX6kXeostWr6cS-l0CicRzX2xcac,2710
|
|
96
|
+
careamics/utils/__init__.py,sha256=vvrTq-DSqVwqrVlEDEgKygeN90ztn0aBKOcF88_t_Lo,335
|
|
97
|
+
careamics/utils/base_enum.py,sha256=eoMYdKpcEojJWXrIxzchY1U0W_AubLijMt27WMoSXoc,753
|
|
98
|
+
careamics/utils/context.py,sha256=S_c7PTNohilmnUVgWcKO1afVArHByKvJ2xTpAcXSUvs,1408
|
|
99
|
+
careamics/utils/logging.py,sha256=VP6QK4GqVGZiVCOHcFwrfOY6qrvMvqP6_Wj2sZpbvfc,10321
|
|
100
|
+
careamics/utils/metrics.py,sha256=nlZsewTQLTmmhvIHyio8lCDjXLkXSnWTEgzvqsBb64Q,2381
|
|
101
|
+
careamics/utils/path_utils.py,sha256=mYxqHxHNKLKPJrs4w7ncyvUsoDVRRZZCVl_SJLW0tRs,518
|
|
102
|
+
careamics/utils/ram.py,sha256=kI637_OtrOF0SoHfp_EcyszhlCwtufv1q4M-p0XUqgA,198
|
|
103
|
+
careamics/utils/receptive_field.py,sha256=uALb2oCh4C_xmejdOU2aqyo5fOO9W2713Xb8QGQZvaw,3027
|
|
104
|
+
careamics/utils/running_stats.py,sha256=GIPMPuH9EOUKD_cYBkJFPggXRKnQEiOXx68Pq9UCCVI,1384
|
|
105
|
+
careamics/utils/torch_utils.py,sha256=gPZvuiWDoq8DwQZ3sddM9td8-WAlbOOm8dwspqHe27I,3013
|
|
106
|
+
careamics-0.1.0rc3.dist-info/METADATA,sha256=dUyjgINtvSuWkPJalDPURT65eYcVMJQedEcyB_41TQU,4631
|
|
107
|
+
careamics-0.1.0rc3.dist-info/WHEEL,sha256=zEMcRr9Kr03x1ozGwg5v9NQBKn3kndp6LSoSlVg-jhU,87
|
|
108
|
+
careamics-0.1.0rc3.dist-info/licenses/LICENSE,sha256=6zdNW-k_xHRKYWUf9tDI_ZplUciFHyj0g16DYuZ2udw,1509
|
|
109
|
+
careamics-0.1.0rc3.dist-info/RECORD,,
|
careamics/bioimage/__init__.py
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"""Provide utilities for exporting models to BioImage model zoo."""
|
|
2
|
-
|
|
3
|
-
__all__ = [
|
|
4
|
-
"build_zip_model",
|
|
5
|
-
"import_bioimage_model",
|
|
6
|
-
"get_default_model_specs",
|
|
7
|
-
"PYTORCH_STATE_DICT",
|
|
8
|
-
]
|
|
9
|
-
|
|
10
|
-
from .io import (
|
|
11
|
-
PYTORCH_STATE_DICT,
|
|
12
|
-
build_zip_model,
|
|
13
|
-
get_default_model_specs,
|
|
14
|
-
import_bioimage_model,
|
|
15
|
-
)
|