careamics 0.0.11__py3-none-any.whl → 0.0.12__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/careamist.py +20 -4
- careamics/config/configuration.py +10 -5
- careamics/config/data/data_model.py +38 -1
- careamics/config/optimizer_models.py +1 -3
- careamics/config/training_model.py +0 -2
- careamics/dataset_ng/README.md +212 -0
- careamics/dataset_ng/dataset.py +233 -0
- careamics/dataset_ng/demos/bsd68_demo.ipynb +356 -0
- careamics/dataset_ng/demos/care_U2OS_demo.ipynb +330 -0
- careamics/dataset_ng/demos/demo_custom_image_stack.ipynb +734 -0
- careamics/dataset_ng/demos/demo_datamodule.ipynb +443 -0
- careamics/dataset_ng/{demo_dataset.ipynb → demos/demo_dataset.ipynb} +39 -15
- careamics/dataset_ng/{demo_patch_extractor.py → demos/demo_patch_extractor.py} +7 -9
- careamics/dataset_ng/demos/mouse_nuclei_demo.ipynb +292 -0
- careamics/dataset_ng/factory.py +408 -0
- careamics/dataset_ng/legacy_interoperability.py +168 -0
- careamics/dataset_ng/patch_extractor/__init__.py +3 -8
- careamics/dataset_ng/patch_extractor/demo_custom_image_stack_loader.py +6 -4
- careamics/dataset_ng/patch_extractor/image_stack/__init__.py +2 -1
- careamics/dataset_ng/patch_extractor/image_stack/image_stack_protocol.py +5 -1
- careamics/dataset_ng/patch_extractor/image_stack_loader.py +5 -75
- careamics/dataset_ng/patch_extractor/patch_extractor.py +5 -4
- careamics/dataset_ng/patch_extractor/patch_extractor_factory.py +73 -106
- careamics/dataset_ng/patching_strategies/__init__.py +6 -1
- careamics/dataset_ng/patching_strategies/patching_strategy_protocol.py +31 -0
- careamics/dataset_ng/patching_strategies/random_patching.py +3 -1
- careamics/dataset_ng/patching_strategies/tiling_strategy.py +171 -0
- careamics/dataset_ng/patching_strategies/whole_sample.py +36 -0
- careamics/lightning/dataset_ng/data_module.py +488 -0
- careamics/lightning/dataset_ng/lightning_modules/__init__.py +9 -0
- careamics/lightning/dataset_ng/lightning_modules/care_module.py +58 -0
- careamics/lightning/dataset_ng/lightning_modules/n2v_module.py +67 -0
- careamics/lightning/dataset_ng/lightning_modules/unet_module.py +143 -0
- careamics/lightning/lightning_module.py +3 -0
- careamics/lvae_training/dataset/__init__.py +8 -3
- careamics/lvae_training/dataset/config.py +3 -3
- careamics/lvae_training/dataset/ms_dataset_ref.py +1067 -0
- careamics/lvae_training/dataset/multich_dataset.py +46 -17
- careamics/lvae_training/dataset/multicrop_dset.py +196 -0
- careamics/lvae_training/dataset/types.py +3 -3
- careamics/lvae_training/dataset/utils/index_manager.py +259 -0
- careamics/lvae_training/eval_utils.py +93 -3
- careamics/transforms/compose.py +1 -0
- careamics/transforms/normalize.py +18 -7
- careamics/utils/lightning_utils.py +25 -11
- {careamics-0.0.11.dist-info → careamics-0.0.12.dist-info}/METADATA +3 -3
- {careamics-0.0.11.dist-info → careamics-0.0.12.dist-info}/RECORD +50 -35
- careamics/dataset_ng/dataset/__init__.py +0 -3
- careamics/dataset_ng/dataset/dataset.py +0 -184
- careamics/dataset_ng/demo_patch_extractor_factory.py +0 -37
- {careamics-0.0.11.dist-info → careamics-0.0.12.dist-info}/WHEEL +0 -0
- {careamics-0.0.11.dist-info → careamics-0.0.12.dist-info}/entry_points.txt +0 -0
- {careamics-0.0.11.dist-info → careamics-0.0.12.dist-info}/licenses/LICENSE +0 -0
|
@@ -129,16 +129,27 @@ class Normalize(Transform):
|
|
|
129
129
|
norm_patch = self._apply(patch, means, stds)
|
|
130
130
|
|
|
131
131
|
# same for the target patch
|
|
132
|
-
if
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
132
|
+
if target is None:
|
|
133
|
+
norm_target = None
|
|
134
|
+
else:
|
|
135
|
+
if not self.target_means or not self.target_stds:
|
|
136
|
+
raise ValueError(
|
|
137
|
+
"Target means and standard deviations must be provided "
|
|
138
|
+
"if target is not None."
|
|
139
|
+
)
|
|
140
|
+
if len(self.target_means) == 0 and len(self.target_stds) == 0:
|
|
141
|
+
raise ValueError(
|
|
142
|
+
"Target means and standard deviations must be provided "
|
|
143
|
+
"if target is not None."
|
|
144
|
+
)
|
|
145
|
+
if len(self.target_means) != target.shape[0]:
|
|
146
|
+
raise ValueError(
|
|
147
|
+
"Target means and standard deviations must have the same length "
|
|
148
|
+
"as the target."
|
|
149
|
+
)
|
|
137
150
|
target_means = _reshape_stats(self.target_means, target.ndim)
|
|
138
151
|
target_stds = _reshape_stats(self.target_stds, target.ndim)
|
|
139
152
|
norm_target = self._apply(target, target_means, target_stds)
|
|
140
|
-
else:
|
|
141
|
-
norm_target = None
|
|
142
153
|
|
|
143
154
|
return norm_patch, norm_target, additional_arrays
|
|
144
155
|
|
|
@@ -28,26 +28,40 @@ def read_csv_logger(experiment_name: str, log_folder: Union[str, Path]) -> dict:
|
|
|
28
28
|
|
|
29
29
|
path_log = path / f"version_{version}" / "metrics.csv"
|
|
30
30
|
|
|
31
|
-
epochs = []
|
|
32
|
-
train_losses_tmp = []
|
|
33
|
-
val_losses_tmp = []
|
|
34
31
|
with open(path_log) as f:
|
|
35
32
|
lines = f.readlines()
|
|
36
33
|
|
|
34
|
+
header = lines[0].strip().split(",")
|
|
35
|
+
metrics = {value: [] for value in header}
|
|
36
|
+
print(metrics)
|
|
37
|
+
|
|
37
38
|
for single_line in lines[1:]:
|
|
38
|
-
|
|
39
|
+
values = single_line.strip().split(",")
|
|
39
40
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
val_losses_tmp.append(val_loss)
|
|
41
|
+
for k, v in zip(header, values):
|
|
42
|
+
metrics[k].append(v)
|
|
43
43
|
|
|
44
44
|
# train and val are not logged on the same row and can have different lengths
|
|
45
45
|
train_epoch = [
|
|
46
|
-
int(
|
|
46
|
+
int(metrics["epoch"][i])
|
|
47
|
+
for i in range(len(metrics["epoch"]))
|
|
48
|
+
if metrics["train_loss_epoch"][i] != ""
|
|
49
|
+
]
|
|
50
|
+
val_epoch = [
|
|
51
|
+
int(metrics["epoch"][i])
|
|
52
|
+
for i in range(len(metrics["epoch"]))
|
|
53
|
+
if metrics["val_loss"][i] != ""
|
|
54
|
+
]
|
|
55
|
+
train_losses = [
|
|
56
|
+
float(metrics["train_loss_epoch"][i])
|
|
57
|
+
for i in range(len(metrics["train_loss_epoch"]))
|
|
58
|
+
if metrics["train_loss_epoch"][i] != ""
|
|
59
|
+
]
|
|
60
|
+
val_losses = [
|
|
61
|
+
float(metrics["val_loss"][i])
|
|
62
|
+
for i in range(len(metrics["val_loss"]))
|
|
63
|
+
if metrics["val_loss"][i] != ""
|
|
47
64
|
]
|
|
48
|
-
val_epoch = [int(epochs[i]) for i in range(len(epochs)) if val_losses_tmp[i] != ""]
|
|
49
|
-
train_losses = [float(loss) for loss in train_losses_tmp if loss != ""]
|
|
50
|
-
val_losses = [float(loss) for loss in val_losses_tmp if loss != ""]
|
|
51
65
|
|
|
52
66
|
return {
|
|
53
67
|
"train_epoch": train_epoch,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: careamics
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.12
|
|
4
4
|
Summary: Toolbox for running N2V and friends.
|
|
5
5
|
Project-URL: homepage, https://careamics.github.io/
|
|
6
6
|
Project-URL: repository, https://github.com/CAREamics/careamics
|
|
@@ -19,9 +19,9 @@ Requires-Python: >=3.9
|
|
|
19
19
|
Requires-Dist: bioimageio-core==0.7
|
|
20
20
|
Requires-Dist: matplotlib<=3.10.1
|
|
21
21
|
Requires-Dist: numpy<2.0.0
|
|
22
|
-
Requires-Dist: pillow<=11.1
|
|
22
|
+
Requires-Dist: pillow<=11.2.1
|
|
23
23
|
Requires-Dist: psutil<=7.0.0
|
|
24
|
-
Requires-Dist: pydantic
|
|
24
|
+
Requires-Dist: pydantic<=2.12,>=2.11
|
|
25
25
|
Requires-Dist: pytorch-lightning<=2.5.0.post0,>=2.2
|
|
26
26
|
Requires-Dist: pyyaml!=6.0.0,<=6.0.2
|
|
27
27
|
Requires-Dist: scikit-image<=0.25.2
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
careamics/__init__.py,sha256=eHsl7oE8HTKmi7yLMj8Yyp0RbdtN3QDmQQb-4Sn9d8M,475
|
|
2
|
-
careamics/careamist.py,sha256=
|
|
2
|
+
careamics/careamist.py,sha256=4iLyet4XLk2GWsWB3v0HzEaS97GQECXn3PnhdJEWklQ,38301
|
|
3
3
|
careamics/conftest.py,sha256=Od4WcaaP0UP-XUMrFr_oo4e6c2hi_RvNbuaRTopwlmI,911
|
|
4
4
|
careamics/py.typed,sha256=esB4cHc6c07uVkGtqf8at7ttEnprwRxwk8obY8Qumq4,187
|
|
5
5
|
careamics/cli/__init__.py,sha256=LbM9bVtU1dy-khmdiIDXwvKy2v8wPBCEUuWqV_8rosA,106
|
|
@@ -8,16 +8,16 @@ careamics/cli/main.py,sha256=S4B3c1ZN-OQK0l2_W42CaW0KmF_Pe_y4pKgn_UOuyDg,6564
|
|
|
8
8
|
careamics/cli/utils.py,sha256=q_dmG7lxg_FT62qX9fPilIWL1M8ibhLnnhUKqa4knPI,660
|
|
9
9
|
careamics/config/__init__.py,sha256=K0N1GIqFCYhpPjalZG-Ygap6Ew_dDAC0uw5Npzhg9Lk,1524
|
|
10
10
|
careamics/config/callback_model.py,sha256=EeYHqpMIPQwyNxLRzzX32Uncl5mZuB1bJO76RHpNymg,4555
|
|
11
|
-
careamics/config/configuration.py,sha256=
|
|
11
|
+
careamics/config/configuration.py,sha256=cZ8u0Lqs0Zrz9DbWJYZWLRhhfZEuSiVhgDjNEQdS8yk,11471
|
|
12
12
|
careamics/config/configuration_factories.py,sha256=NhheOPkVhIF1cwz0FGNLQrxOByRQGrw-aZ_vGNIE8UE,34599
|
|
13
13
|
careamics/config/configuration_io.py,sha256=P-bP1kzkXxJWOEFP02dEZFNmpuLAPJfJtYhX4bFeaKk,2324
|
|
14
14
|
careamics/config/inference_model.py,sha256=UE_-ZmCX6LFCbDBOwyGnvuAboF_JNX2m2LcF0WiwgCI,6961
|
|
15
15
|
careamics/config/likelihood_model.py,sha256=VorUtc0_-xIWNxwVrd1kBba-003ICdVMtxpcDCxH4Io,2259
|
|
16
16
|
careamics/config/loss_model.py,sha256=yYcUBS90Qyon1MxeaHiVP3dJHPJFC0GUvWKGcAb3IHk,2036
|
|
17
17
|
careamics/config/nm_model.py,sha256=5dAhDBLa4WPfKaNEK6ATNsSUwtlH8u8gYweEA4gZP6g,4758
|
|
18
|
-
careamics/config/optimizer_models.py,sha256=
|
|
18
|
+
careamics/config/optimizer_models.py,sha256=9qxcLjtDp5LjYX52u21Rom4F3_GZUV2GJimrK3un574,5717
|
|
19
19
|
careamics/config/tile_information.py,sha256=c-_xrVPOgcnjiEzQ-9A_GhNPamObkMANbeHaRP29R-4,2059
|
|
20
|
-
careamics/config/training_model.py,sha256=
|
|
20
|
+
careamics/config/training_model.py,sha256=VfK2bk_1FHaamKZw5S8UDPVxasyUqz1rY1ahcaxYZ7s,3114
|
|
21
21
|
careamics/config/algorithms/__init__.py,sha256=on5D6zBO9Lu-Tf5To8xpF6owIFqdN7RSmZdpyXDOaNw,404
|
|
22
22
|
careamics/config/algorithms/care_algorithm_model.py,sha256=ncf89BC2aFPFSquJ65-Y7NpwVbvgPE0BKH6Up1OHa1s,3238
|
|
23
23
|
careamics/config/algorithms/n2n_algorithm_model.py,sha256=OZbRis9jhRKWNK1-Z_aw2tfJRuGdlJiYEYlH4Hr1FRs,3066
|
|
@@ -29,7 +29,7 @@ careamics/config/architectures/architecture_model.py,sha256=gXn4gdLrQP3bmTQxIhzk
|
|
|
29
29
|
careamics/config/architectures/lvae_model.py,sha256=lwOiJYNUqPrZFl9SpPLYon77EiRbe2eI7pmpx45rO78,7606
|
|
30
30
|
careamics/config/architectures/unet_model.py,sha256=HJJWf-wuYTv8KXMwikdjeB8htg1QOt0IyQbMuBt1LUI,3556
|
|
31
31
|
careamics/config/data/__init__.py,sha256=ijNcvrKQtKljmBuZ6DDxh86PMzpRob2l2JMqbPQLqPk,111
|
|
32
|
-
careamics/config/data/data_model.py,sha256=
|
|
32
|
+
careamics/config/data/data_model.py,sha256=Cz-ELguEdLwDFtRSZSiTEbS3gTdG1Q9GZrZaU6hKtkA,13431
|
|
33
33
|
careamics/config/support/__init__.py,sha256=ktWvxbTkRXnQPS_N84l9E2B5kTZVdd64SIjsJIQKB-k,1041
|
|
34
34
|
careamics/config/support/supported_activations.py,sha256=CqOWoziIK5jZZXJO7G7cGg3TTid1POqv8FXqxjXxyME,535
|
|
35
35
|
careamics/config/support/supported_algorithms.py,sha256=w6YzcIqGZ_bS85Tw1s7TEltBDXLt4SzgN3Tc6s19dGU,946
|
|
@@ -73,24 +73,32 @@ careamics/dataset/tiling/__init__.py,sha256=aW_AMB9rzm0VmooUpjcyqv6sQP69RlPQMEdP
|
|
|
73
73
|
careamics/dataset/tiling/collate_tiles.py,sha256=XK0BsDQE7XwIwmOoCHJIpVC3kqjSN6nDhrJ4POVeHS8,965
|
|
74
74
|
careamics/dataset/tiling/lvae_tiled_patching.py,sha256=LYEEdjKuKaxIGFtOkhfpsE7hruBnIsD5HcW9aVH6WHI,13019
|
|
75
75
|
careamics/dataset/tiling/tiled_patching.py,sha256=6vxsqlccUqIl4Ys92JWIPs0Kn95VzaHoAYMSGcp2dh8,5956
|
|
76
|
-
careamics/dataset_ng/
|
|
77
|
-
careamics/dataset_ng/
|
|
78
|
-
careamics/dataset_ng/
|
|
79
|
-
careamics/dataset_ng/
|
|
80
|
-
careamics/dataset_ng/
|
|
81
|
-
careamics/dataset_ng/
|
|
82
|
-
careamics/dataset_ng/
|
|
83
|
-
careamics/dataset_ng/
|
|
84
|
-
careamics/dataset_ng/
|
|
85
|
-
careamics/dataset_ng/
|
|
86
|
-
careamics/dataset_ng/
|
|
87
|
-
careamics/dataset_ng/patch_extractor/
|
|
76
|
+
careamics/dataset_ng/README.md,sha256=489sMnra-cVotBBWNL-jhb9H4eLO1FFa3b5zhfkK34g,9856
|
|
77
|
+
careamics/dataset_ng/dataset.py,sha256=ds7Sow3QtvtrfCDDqEL5SQDZ5OCuL54H-pdYzqZScaY,9025
|
|
78
|
+
careamics/dataset_ng/factory.py,sha256=XDVfqcQFNcd7waurP8aA14uuN4Kr4-0Wk8mWAg3hdk0,13640
|
|
79
|
+
careamics/dataset_ng/legacy_interoperability.py,sha256=ROD7fSvbpxl3wEJpkwT8uCU9KwEtEiyK6yWgwiUqcZQ,5531
|
|
80
|
+
careamics/dataset_ng/demos/bsd68_demo.ipynb,sha256=LQfDCv97SV7Me66tXiDWk8Olx8q7_vGhVLxKpsZdic8,10310
|
|
81
|
+
careamics/dataset_ng/demos/care_U2OS_demo.ipynb,sha256=hYoUj6Ak0DvoFJIk5KifrWl_fek70ShUqUUwCsHO8BU,9487
|
|
82
|
+
careamics/dataset_ng/demos/demo_custom_image_stack.ipynb,sha256=ktkhAZZ2QnaaNe8o3fuA8CiQqcr1-JTB9WbnZMN0qtw,25184
|
|
83
|
+
careamics/dataset_ng/demos/demo_datamodule.ipynb,sha256=dkIca5vPawZ1QmF1-mTy4R_83SML6OMuYj1ah0ygmZY,12619
|
|
84
|
+
careamics/dataset_ng/demos/demo_dataset.ipynb,sha256=LQXGk8MCi2AWhi7WhZk_4uIiNwCJtGdk1qfz9cDRyvg,7629
|
|
85
|
+
careamics/dataset_ng/demos/demo_patch_extractor.py,sha256=2guz1iRqBzue4GLAVh9-K8sXCgsygtsJS-wzeHctY34,1419
|
|
86
|
+
careamics/dataset_ng/demos/mouse_nuclei_demo.ipynb,sha256=Afd-_T848z3ZCDAL8vMfP6CJR8CbUg0xLAurBxg-fuc,8278
|
|
87
|
+
careamics/dataset_ng/patch_extractor/__init__.py,sha256=U27Gxp6dk6DUc-MiDMPvdh2aoWlM7jU-bjueqa7elPg,207
|
|
88
|
+
careamics/dataset_ng/patch_extractor/demo_custom_image_stack_loader.py,sha256=v6p4JNr8dqhaclsYd59SLDqlYPM-NG0SroxRDzn3Pb8,2973
|
|
89
|
+
careamics/dataset_ng/patch_extractor/image_stack_loader.py,sha256=Gq1KbqZWCX8fR4ZCcFysXPK6LoJJJvb4Cig_KYeGyqs,2490
|
|
90
|
+
careamics/dataset_ng/patch_extractor/patch_extractor.py,sha256=nGN5TrmmSo5KeQoXJ-wrVQtQlYadaR8onH7TOWXhVy4,824
|
|
91
|
+
careamics/dataset_ng/patch_extractor/patch_extractor_factory.py,sha256=kTXaE4pcpubJX_69P9i-HQidBENJvcnQW1GLqmDEPU4,4658
|
|
92
|
+
careamics/dataset_ng/patch_extractor/image_stack/__init__.py,sha256=Mgl-qv0WUmL0A8W_1FyqiEKEveqNhVqbI3zq_vXmwbw,269
|
|
93
|
+
careamics/dataset_ng/patch_extractor/image_stack/image_stack_protocol.py,sha256=NnhqyDmZPuQgU_gjNugNWNX9_NetRguwLg9LfTmd7U8,1649
|
|
88
94
|
careamics/dataset_ng/patch_extractor/image_stack/in_memory_image_stack.py,sha256=FS9dEY5GXKEf0oeNe7Vb005HTby4thUvzTzWwCxe3Zk,1927
|
|
89
95
|
careamics/dataset_ng/patch_extractor/image_stack/zarr_image_stack.py,sha256=hmNOl6-FMUNQS65YMSa4eAz3Rp_2es98p1_UY6S8B50,6590
|
|
90
|
-
careamics/dataset_ng/patching_strategies/__init__.py,sha256=
|
|
91
|
-
careamics/dataset_ng/patching_strategies/patching_strategy_protocol.py,sha256=
|
|
92
|
-
careamics/dataset_ng/patching_strategies/random_patching.py,sha256=
|
|
96
|
+
careamics/dataset_ng/patching_strategies/__init__.py,sha256=2KwdY_TeD9WQju150WbV2IF19TincHU3lbcL0fqZF5o,549
|
|
97
|
+
careamics/dataset_ng/patching_strategies/patching_strategy_protocol.py,sha256=ukw5G9hIOPEJz-DEFDMuJsGYou7wUeRjALNU8qdgn9g,3475
|
|
98
|
+
careamics/dataset_ng/patching_strategies/random_patching.py,sha256=cNUt9iM7_j_P3OdN5iQ3K1OGNeAl61Zglem9DQU1GUc,13497
|
|
93
99
|
careamics/dataset_ng/patching_strategies/sequential_patching.py,sha256=fngTPpY6D93guFwSdHuCakDebin7eEtK7Y2OFmJ1IG8,2485
|
|
100
|
+
careamics/dataset_ng/patching_strategies/tiling_strategy.py,sha256=NI48Qg3L-YqtXZXNhusbzX8QWGtGOLAXMGRbTo_Sm1w,6367
|
|
101
|
+
careamics/dataset_ng/patching_strategies/whole_sample.py,sha256=o1Z4iHKveq9X--LRV-gdUQqB-TPVxr2RvaKHmgDnCx0,1249
|
|
94
102
|
careamics/file_io/__init__.py,sha256=vgMI77X820VOWywAEW5W20FXfmbqBzx4V63D3V3_HhI,334
|
|
95
103
|
careamics/file_io/read/__init__.py,sha256=wf8O_o80ghrlWQ-RGEuSqcc2LU55P1B-oxTacDToygo,259
|
|
96
104
|
careamics/file_io/read/get_func.py,sha256=O_pdymjh2mc-JZ1je3ZnPAcsHc7Je3a005AMgAa0xuw,1388
|
|
@@ -100,7 +108,7 @@ careamics/file_io/write/__init__.py,sha256=CUt33cRjG9hm18L9a7XqaUKWQ_3xiuQ9ztz4A
|
|
|
100
108
|
careamics/file_io/write/get_func.py,sha256=hyGHe1RX-lfa9QFAnwRCz_gS0NRiRnXEtg4Bdeh2Esc,1627
|
|
101
109
|
careamics/file_io/write/tiff.py,sha256=tBGIgl-I1sMyBivgx-dOTBykXBODkgwPH8MT3_4KAE8,1050
|
|
102
110
|
careamics/lightning/__init__.py,sha256=ATCVAGnX08Ik4TxbIv0-cXb52UinR42JgvZh_GIMSpc,588
|
|
103
|
-
careamics/lightning/lightning_module.py,sha256
|
|
111
|
+
careamics/lightning/lightning_module.py,sha256=-uGXKMJxFRsowIuFjh2mz5tSvVyEyeS5DfyE4DolCkA,24357
|
|
104
112
|
careamics/lightning/predict_data_module.py,sha256=JNwujK6QwObSx6P25ghpGl2f2gGT3KVgYMTlonZzH20,12745
|
|
105
113
|
careamics/lightning/train_data_module.py,sha256=HyXeDZ_u3JLzyh1tqRBIH93spMj0iQhAP4nmHPEI4aM,26554
|
|
106
114
|
careamics/lightning/callbacks/__init__.py,sha256=eA5ltzYNzuO0uMEr1jG4wP01b0s29s5I03WGJ290qkw,312
|
|
@@ -111,6 +119,11 @@ careamics/lightning/callbacks/prediction_writer_callback/file_path_utils.py,sha2
|
|
|
111
119
|
careamics/lightning/callbacks/prediction_writer_callback/prediction_writer_callback.py,sha256=8HHUSKcG7G0FSCVPnpGQHLfpara5mnKAwsiiyWp2wzo,8210
|
|
112
120
|
careamics/lightning/callbacks/prediction_writer_callback/write_strategy.py,sha256=lxsLjLskRpYnzdyWCdOICUJxF9YzuUi1RH0LJnOCVgo,12594
|
|
113
121
|
careamics/lightning/callbacks/prediction_writer_callback/write_strategy_factory.py,sha256=F1IpbNNgkv5eK8Xpqp7wqv2lsqEdP1wMRlBL7RBn93U,7114
|
|
122
|
+
careamics/lightning/dataset_ng/data_module.py,sha256=gb0dhuV-ROd-3o1FNIL57gZkK23Og_LFPf9CNVhkbHw,19126
|
|
123
|
+
careamics/lightning/dataset_ng/lightning_modules/__init__.py,sha256=Kx7NkwAS9rqfozxamMWcJa3U8zw47HT5T8R1E0Uk8Rc,164
|
|
124
|
+
careamics/lightning/dataset_ng/lightning_modules/care_module.py,sha256=W1DfXrpFVTvBncyxK0RZ8IZ_iFdkdIKPAPeznnX8THc,2030
|
|
125
|
+
careamics/lightning/dataset_ng/lightning_modules/n2v_module.py,sha256=8XTBGxFbG1N3g8HAa230NE2NZ8Nn7CnpMV4MVRvQc-4,2174
|
|
126
|
+
careamics/lightning/dataset_ng/lightning_modules/unet_module.py,sha256=tx48pcuj3CdsQf7tIP-00BtB9kGEnAUX8wnyZh_3lBw,4780
|
|
114
127
|
careamics/losses/__init__.py,sha256=nSWbkBcFhkyUkIT2wVcULqpieyY2Oro39NXZTtfQpXo,351
|
|
115
128
|
careamics/losses/loss_factory.py,sha256=oPacrkwiabsmiW_r--IxX-XPRbzezZUvOuWKbUw5LiI,1518
|
|
116
129
|
careamics/losses/fcn/__init__.py,sha256=kf92MKFGHr6upiztZVgWwtGPf734DZyub92Rn8uEq8o,18
|
|
@@ -120,22 +133,24 @@ careamics/losses/lvae/loss_utils.py,sha256=QxzA2N1TglR4H0X0uyTWWytDagE1lA9IB_TK1
|
|
|
120
133
|
careamics/losses/lvae/losses.py,sha256=wHT1dx04BZ_OI-_S7cFQ5hFmMetm6FSnuZfwZBBtIpY,17977
|
|
121
134
|
careamics/lvae_training/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
122
135
|
careamics/lvae_training/calibration.py,sha256=xHbiLcY2csYos3s7rRSqp7P7G-9wzULcSo1JfVzfIjE,7239
|
|
123
|
-
careamics/lvae_training/eval_utils.py,sha256=
|
|
136
|
+
careamics/lvae_training/eval_utils.py,sha256=PWKlG2XrvdfZTG0_brcADaAA0owTeNRT1g673gYtk5k,34410
|
|
124
137
|
careamics/lvae_training/get_config.py,sha256=dwVfaQS7nzjQss0E1gGLUpQpjPcOWwLgIhbu3Z0I1rg,3068
|
|
125
138
|
careamics/lvae_training/lightning_module.py,sha256=ryr7iHqCMzCl5esi6_gEcnKFDQkMrw0EXK9Zfgv1Nek,27186
|
|
126
139
|
careamics/lvae_training/metrics.py,sha256=KTDAKhe3vh-YxzGibjtkIG2nnUyujbnwqX4xGwaRXwE,6718
|
|
127
140
|
careamics/lvae_training/train_lvae.py,sha256=lJEBlBGdISVkZBcEnPNRYgJ7VbapYzZHRaFOrZ0xYGE,11080
|
|
128
141
|
careamics/lvae_training/train_utils.py,sha256=e-d4QsF-li8MmAPkAmB1daHpkuU16nBTnQFZYqpTjn4,3567
|
|
129
|
-
careamics/lvae_training/dataset/__init__.py,sha256=
|
|
130
|
-
careamics/lvae_training/dataset/config.py,sha256=
|
|
142
|
+
careamics/lvae_training/dataset/__init__.py,sha256=TcsPOoeYXWZh2mTEOodYf4u5dd12TzzkxAaxLzBrMyA,538
|
|
143
|
+
careamics/lvae_training/dataset/config.py,sha256=upMx0NvYtKBi0SHH6WHMfVDzwLzgIk3Nw7z5vRoEvj0,4392
|
|
131
144
|
careamics/lvae_training/dataset/lc_dataset.py,sha256=r4PffRXzuTJ0tLWei4B3wq6f1Q34raaZQzZ0IQXi8OI,10762
|
|
132
|
-
careamics/lvae_training/dataset/
|
|
145
|
+
careamics/lvae_training/dataset/ms_dataset_ref.py,sha256=uyyz9RjiV3iszQAmavhLhU6PT2B_n6pch3F22ZS4M0o,40892
|
|
146
|
+
careamics/lvae_training/dataset/multich_dataset.py,sha256=kw2gFZPDEp6WdsJwjQ-2EFvxZHe-HI83FhI4C5k39b4,42593
|
|
147
|
+
careamics/lvae_training/dataset/multicrop_dset.py,sha256=MJNUwZmWXszEvr15zX-M9oW9VRxRhMVfh8bTHwFNqWQ,6419
|
|
133
148
|
careamics/lvae_training/dataset/multifile_dataset.py,sha256=hJBs6iBrf_FcyUYzg8rDjvKEICHxDYyXVOj-5L0F6FE,10273
|
|
134
|
-
careamics/lvae_training/dataset/types.py,sha256=
|
|
149
|
+
careamics/lvae_training/dataset/types.py,sha256=7uCrbL_FQeQfAPz-mHnqHKpZC1x4sdvq9wswmBvOPO0,616
|
|
135
150
|
careamics/lvae_training/dataset/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
136
151
|
careamics/lvae_training/dataset/utils/data_utils.py,sha256=8PvRPqSbYHPCl87cycZHxXIFOT_EoBV-8XCt3ZLh36s,3125
|
|
137
152
|
careamics/lvae_training/dataset/utils/empty_patch_fetcher.py,sha256=OFjeqhZ6vFULJsF5tnoByhEhE8aLHujFToU_yyqMCP4,2266
|
|
138
|
-
careamics/lvae_training/dataset/utils/index_manager.py,sha256=
|
|
153
|
+
careamics/lvae_training/dataset/utils/index_manager.py,sha256=rihMe5zOfXvPFvM_2paP0EzK4WhaG6RhRFLy8TxnNas,21654
|
|
139
154
|
careamics/lvae_training/dataset/utils/index_switcher.py,sha256=ZoMi8LsaIkm8MFqIFaxN4oQGyzCcwOlCom8SYNus15E,6716
|
|
140
155
|
careamics/model_io/__init__.py,sha256=khMIkk107LL5JGze0OVfl5Lfi14R3_e4W21tW0iJ1kE,155
|
|
141
156
|
careamics/model_io/bmz_io.py,sha256=XQvRUxM4keEiYlnWNTZUxeLgLl3_c-_drOZcH4mjEDo,7801
|
|
@@ -163,10 +178,10 @@ careamics/prediction_utils/lvae_tiling_manager.py,sha256=SI-JaJvLrKWBSHdm-FjcqWd
|
|
|
163
178
|
careamics/prediction_utils/prediction_outputs.py,sha256=fw-bJ2szWJD7BgZlECmxy5sgeXGFJl4T8cRNzLR1aUQ,4069
|
|
164
179
|
careamics/prediction_utils/stitch_prediction.py,sha256=8YRW2rea-is5tYI0Q1bw3bpX7VMFmbpxSP_y6x9Yfug,3893
|
|
165
180
|
careamics/transforms/__init__.py,sha256=n7D3SbcVSRaMOl5F5Rozo2_lY8dn0DH28ywYIdbXxBo,561
|
|
166
|
-
careamics/transforms/compose.py,sha256=
|
|
181
|
+
careamics/transforms/compose.py,sha256=ETnI_Z4ZfBWNA12D-KEtr_P8wKeyBQVHvostGG2f_SI,5395
|
|
167
182
|
careamics/transforms/n2v_manipulate.py,sha256=t9rtMbYV6P1IVp4yzuJfq5-giWyfGrxL8ZhzP29Pp8k,5686
|
|
168
183
|
careamics/transforms/n2v_manipulate_torch.py,sha256=Lxi94cbE0aEZ1fFD0m4T7VDrDSt3cbHPdYISa8XYemw,4830
|
|
169
|
-
careamics/transforms/normalize.py,sha256=
|
|
184
|
+
careamics/transforms/normalize.py,sha256=sVa6uiI2vB1CZJBdgJ6KOlujRmsOQ72YXnhPuQ1QGuE,8314
|
|
170
185
|
careamics/transforms/pixel_manipulation.py,sha256=WSx2sqcZ2wUkm6qPi4pG3Ai0sE8ONPOpYLSvkW5M3bY,13393
|
|
171
186
|
careamics/transforms/pixel_manipulation_torch.py,sha256=W2sTQrM00TwmcoFf1bcYapAwE66pKIVVeAtBIW6ovK4,14343
|
|
172
187
|
careamics/transforms/struct_mask_parameters.py,sha256=jE29Li9sx3olaRnqYfJsSlKi2t0WQzJmCm9aCbIQEsA,421
|
|
@@ -178,7 +193,7 @@ careamics/utils/__init__.py,sha256=mLwBQ7wTL2EwDwL3NcX53EHPNklojU45Jcc728y4EWQ,4
|
|
|
178
193
|
careamics/utils/autocorrelation.py,sha256=M_WYzrEOQngc5iSXWar4S3-EOnK6DfYHPC2vVMeu_Bs,945
|
|
179
194
|
careamics/utils/base_enum.py,sha256=bz1D8mDx5V5hdnJ3WAzJXWHJTbgwAky5FprUt9F5cMA,1387
|
|
180
195
|
careamics/utils/context.py,sha256=SoTZfzG6fO4SDOGHOTL2Xlm1n1CSgb9B57GVhrEkFls,1436
|
|
181
|
-
careamics/utils/lightning_utils.py,sha256=
|
|
196
|
+
careamics/utils/lightning_utils.py,sha256=LXzsNiItm8b7yc4NlbEoUEw6_re0SBY8_cmQk1jkf_o,2036
|
|
182
197
|
careamics/utils/logging.py,sha256=5U4VsQ4m4OajtirLH6qUjrM1CAc-oXeCsd6JyROjkWE,10337
|
|
183
198
|
careamics/utils/metrics.py,sha256=i9TQNzVF6lUL9c6OwRZFFDhelZfinkEDpWSCKeduscc,10853
|
|
184
199
|
careamics/utils/path_utils.py,sha256=8AugiG5DOmzgSnTCJI8vypXaPE0XhnR-9pzeiFUZ-0I,554
|
|
@@ -188,8 +203,8 @@ careamics/utils/receptive_field.py,sha256=Y2h4c8S6glX3qcx5KHDmO17Kkuyey9voxfoXyq
|
|
|
188
203
|
careamics/utils/serializers.py,sha256=mILUhz75IMpGKnEzcYu9hlOPG8YIiIW09fk6eZM7Y8k,1427
|
|
189
204
|
careamics/utils/torch_utils.py,sha256=_Cf3HdlIRl5hxfpUg9aofCSlcW7GSsIJxsbSORXko0U,3010
|
|
190
205
|
careamics/utils/version.py,sha256=WKtMlrNmXymJqzMfguBX558D6tb6aoAZfbABRh_ViIs,1142
|
|
191
|
-
careamics-0.0.
|
|
192
|
-
careamics-0.0.
|
|
193
|
-
careamics-0.0.
|
|
194
|
-
careamics-0.0.
|
|
195
|
-
careamics-0.0.
|
|
206
|
+
careamics-0.0.12.dist-info/METADATA,sha256=9novknFJRrDqqO-HD55Wk5TXC7hrZT2sFU1Pt4M0WTI,3919
|
|
207
|
+
careamics-0.0.12.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
208
|
+
careamics-0.0.12.dist-info/entry_points.txt,sha256=2fSNVXJWDJgFLATVj7MkjFNvpl53amG8tUzC3jf7G1s,53
|
|
209
|
+
careamics-0.0.12.dist-info/licenses/LICENSE,sha256=6zdNW-k_xHRKYWUf9tDI_ZplUciFHyj0g16DYuZ2udw,1509
|
|
210
|
+
careamics-0.0.12.dist-info/RECORD,,
|
|
@@ -1,184 +0,0 @@
|
|
|
1
|
-
from collections.abc import Sequence
|
|
2
|
-
from enum import Enum
|
|
3
|
-
from pathlib import Path
|
|
4
|
-
from typing import Literal, NamedTuple, Optional, Union
|
|
5
|
-
|
|
6
|
-
import numpy as np
|
|
7
|
-
from numpy.typing import NDArray
|
|
8
|
-
from torch.utils.data import Dataset
|
|
9
|
-
from typing_extensions import ParamSpec
|
|
10
|
-
|
|
11
|
-
from careamics.config import DataConfig, InferenceConfig
|
|
12
|
-
from careamics.config.support import SupportedData
|
|
13
|
-
from careamics.dataset.patching.patching import Stats
|
|
14
|
-
from careamics.dataset_ng.patch_extractor import (
|
|
15
|
-
ImageStackLoader,
|
|
16
|
-
PatchExtractor,
|
|
17
|
-
create_patch_extractor,
|
|
18
|
-
)
|
|
19
|
-
from careamics.dataset_ng.patching_strategies import (
|
|
20
|
-
FixedRandomPatchingStrategy,
|
|
21
|
-
PatchingStrategy,
|
|
22
|
-
PatchSpecs,
|
|
23
|
-
RandomPatchingStrategy,
|
|
24
|
-
)
|
|
25
|
-
from careamics.transforms import Compose
|
|
26
|
-
|
|
27
|
-
P = ParamSpec("P")
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
class Mode(str, Enum):
|
|
31
|
-
TRAINING = "training"
|
|
32
|
-
VALIDATING = "validating"
|
|
33
|
-
PREDICTING = "predicting"
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
class ImageRegionData(NamedTuple):
|
|
37
|
-
data: NDArray
|
|
38
|
-
source: Union[Path, Literal["array"]]
|
|
39
|
-
data_shape: Sequence[int]
|
|
40
|
-
dtype: str # dtype should be str for collate
|
|
41
|
-
axes: str
|
|
42
|
-
region_spec: PatchSpecs
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
InputType = Union[Sequence[np.ndarray], Sequence[Path]]
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
class CareamicsDataset(Dataset):
|
|
49
|
-
def __init__(
|
|
50
|
-
self,
|
|
51
|
-
data_config: Union[DataConfig, InferenceConfig],
|
|
52
|
-
mode: Mode,
|
|
53
|
-
inputs: InputType,
|
|
54
|
-
targets: Optional[InputType] = None,
|
|
55
|
-
image_stack_loader: Optional[ImageStackLoader[P]] = None,
|
|
56
|
-
*args: P.args,
|
|
57
|
-
**kwargs: P.kwargs,
|
|
58
|
-
):
|
|
59
|
-
self.config = data_config
|
|
60
|
-
self.mode = mode
|
|
61
|
-
|
|
62
|
-
data_type_enum = SupportedData(self.config.data_type)
|
|
63
|
-
self.input_extractor = create_patch_extractor(
|
|
64
|
-
inputs,
|
|
65
|
-
self.config.axes,
|
|
66
|
-
data_type_enum,
|
|
67
|
-
image_stack_loader,
|
|
68
|
-
*args,
|
|
69
|
-
**kwargs,
|
|
70
|
-
)
|
|
71
|
-
if targets is not None:
|
|
72
|
-
self.target_extractor: Optional[PatchExtractor] = create_patch_extractor(
|
|
73
|
-
targets,
|
|
74
|
-
self.config.axes,
|
|
75
|
-
data_type_enum,
|
|
76
|
-
image_stack_loader,
|
|
77
|
-
*args,
|
|
78
|
-
**kwargs,
|
|
79
|
-
)
|
|
80
|
-
else:
|
|
81
|
-
self.target_extractor = None
|
|
82
|
-
|
|
83
|
-
self.patching_strategy = self._initialize_patching_strategy()
|
|
84
|
-
|
|
85
|
-
self.input_stats, self.target_stats = self._initialize_statistics()
|
|
86
|
-
|
|
87
|
-
self.transforms = self._initialize_transforms()
|
|
88
|
-
|
|
89
|
-
def _initialize_patching_strategy(self) -> PatchingStrategy:
|
|
90
|
-
patching_strategy: PatchingStrategy
|
|
91
|
-
if self.mode == Mode.TRAINING:
|
|
92
|
-
if isinstance(self.config, InferenceConfig):
|
|
93
|
-
raise ValueError("Inference config cannot be used for training.")
|
|
94
|
-
patching_strategy = RandomPatchingStrategy(
|
|
95
|
-
data_shapes=self.input_extractor.shape,
|
|
96
|
-
patch_size=self.config.patch_size,
|
|
97
|
-
# TODO: Add random seed to dataconfig
|
|
98
|
-
seed=getattr(self.config, "random_seed", None),
|
|
99
|
-
)
|
|
100
|
-
elif self.mode == Mode.VALIDATING:
|
|
101
|
-
if isinstance(self.config, InferenceConfig):
|
|
102
|
-
raise ValueError("Inference config cannot be used for validating.")
|
|
103
|
-
patching_strategy = FixedRandomPatchingStrategy(
|
|
104
|
-
data_shapes=self.input_extractor.shape,
|
|
105
|
-
patch_size=self.config.patch_size,
|
|
106
|
-
# TODO: Add random seed to dataconfig
|
|
107
|
-
seed=getattr(self.config, "random_seed", None),
|
|
108
|
-
)
|
|
109
|
-
elif self.mode == Mode.PREDICTING:
|
|
110
|
-
# TODO: patching strategy will be tilingStrategy in upcoming PR
|
|
111
|
-
raise NotImplementedError(
|
|
112
|
-
"Prediction mode for the CAREamicsDataset has not been implemented yet."
|
|
113
|
-
)
|
|
114
|
-
else:
|
|
115
|
-
raise ValueError(f"Unrecognised dataset mode {self.mode}.")
|
|
116
|
-
|
|
117
|
-
return patching_strategy
|
|
118
|
-
|
|
119
|
-
def _initialize_transforms(self) -> Optional[Compose]:
|
|
120
|
-
if isinstance(self.config, DataConfig):
|
|
121
|
-
return Compose(
|
|
122
|
-
transform_list=list(self.config.transforms),
|
|
123
|
-
)
|
|
124
|
-
# TODO: add TTA
|
|
125
|
-
return None
|
|
126
|
-
|
|
127
|
-
def _initialize_statistics(self) -> tuple[Stats, Optional[Stats]]:
|
|
128
|
-
# TODO: add running stats
|
|
129
|
-
# Currently assume that stats are provided in the configuration
|
|
130
|
-
input_stats = Stats(self.config.image_means, self.config.image_stds)
|
|
131
|
-
target_stats = None
|
|
132
|
-
if isinstance(self.config, DataConfig):
|
|
133
|
-
target_means = self.config.target_means
|
|
134
|
-
target_stds = self.config.target_stds
|
|
135
|
-
if target_means is not None and target_stds is not None:
|
|
136
|
-
target_stats = Stats(target_means, target_stds)
|
|
137
|
-
return input_stats, target_stats
|
|
138
|
-
|
|
139
|
-
def __len__(self):
|
|
140
|
-
return self.patching_strategy.n_patches
|
|
141
|
-
|
|
142
|
-
def _create_image_region(
|
|
143
|
-
self, patch: np.ndarray, patch_spec: PatchSpecs, extractor: PatchExtractor
|
|
144
|
-
) -> ImageRegionData:
|
|
145
|
-
data_idx = patch_spec["data_idx"]
|
|
146
|
-
return ImageRegionData(
|
|
147
|
-
data=patch,
|
|
148
|
-
source=extractor.image_stacks[data_idx].source,
|
|
149
|
-
dtype=str(extractor.image_stacks[data_idx].data_dtype),
|
|
150
|
-
data_shape=extractor.image_stacks[data_idx].data_shape,
|
|
151
|
-
# TODO: should it be axes of the original image instead?
|
|
152
|
-
axes=self.config.axes,
|
|
153
|
-
region_spec=patch_spec,
|
|
154
|
-
)
|
|
155
|
-
|
|
156
|
-
def __getitem__(
|
|
157
|
-
self, index: int
|
|
158
|
-
) -> tuple[ImageRegionData, Optional[ImageRegionData]]:
|
|
159
|
-
patch_spec = self.patching_strategy.get_patch_spec(index)
|
|
160
|
-
input_patch = self.input_extractor.extract_patch(**patch_spec)
|
|
161
|
-
|
|
162
|
-
target_patch = (
|
|
163
|
-
self.target_extractor.extract_patch(**patch_spec)
|
|
164
|
-
if self.target_extractor is not None
|
|
165
|
-
else None
|
|
166
|
-
)
|
|
167
|
-
|
|
168
|
-
if self.transforms is not None:
|
|
169
|
-
input_patch, target_patch = self.transforms(input_patch, target_patch)
|
|
170
|
-
|
|
171
|
-
input_data = self._create_image_region(
|
|
172
|
-
patch=input_patch, patch_spec=patch_spec, extractor=self.input_extractor
|
|
173
|
-
)
|
|
174
|
-
|
|
175
|
-
if target_patch is not None and self.target_extractor is not None:
|
|
176
|
-
target_data = self._create_image_region(
|
|
177
|
-
patch=target_patch,
|
|
178
|
-
patch_spec=patch_spec,
|
|
179
|
-
extractor=self.target_extractor,
|
|
180
|
-
)
|
|
181
|
-
else:
|
|
182
|
-
target_data = None
|
|
183
|
-
|
|
184
|
-
return input_data, target_data
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
# %%
|
|
2
|
-
import numpy as np
|
|
3
|
-
|
|
4
|
-
from careamics.config import create_n2n_configuration
|
|
5
|
-
from careamics.config.support import SupportedData
|
|
6
|
-
from careamics.dataset_ng.patch_extractor.patch_extractor_factory import (
|
|
7
|
-
create_patch_extractors,
|
|
8
|
-
)
|
|
9
|
-
|
|
10
|
-
rng = np.random.default_rng()
|
|
11
|
-
|
|
12
|
-
# %%
|
|
13
|
-
# define example data
|
|
14
|
-
array1 = np.arange(36).reshape(1, 6, 6)
|
|
15
|
-
array2 = np.arange(50).reshape(2, 5, 5)
|
|
16
|
-
target1 = rng.integers(0, 1, size=array1.shape, endpoint=True)
|
|
17
|
-
target2 = rng.integers(0, 1, size=array2.shape, endpoint=True)
|
|
18
|
-
|
|
19
|
-
# %%
|
|
20
|
-
config = create_n2n_configuration(
|
|
21
|
-
"test_exp",
|
|
22
|
-
data_type="array",
|
|
23
|
-
axes="SYX",
|
|
24
|
-
patch_size=[8, 8],
|
|
25
|
-
batch_size=1,
|
|
26
|
-
num_epochs=1,
|
|
27
|
-
)
|
|
28
|
-
data_config = config.data_config
|
|
29
|
-
|
|
30
|
-
# %%
|
|
31
|
-
data_type = SupportedData(data_config.data_type)
|
|
32
|
-
train_inputs, train_targets = create_patch_extractors(
|
|
33
|
-
[array1, array2], [target1, target2], axes=data_config.axes, data_type=data_type
|
|
34
|
-
)
|
|
35
|
-
|
|
36
|
-
# %%
|
|
37
|
-
train_inputs.extract_patch(data_idx=0, sample_idx=0, coords=(2, 2), patch_size=(3, 3))
|
|
File without changes
|
|
File without changes
|
|
File without changes
|