GANDLF 0.1.3.dev20250202__py3-none-any.whl → 0.1.6.dev20251109__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 GANDLF might be problematic. Click here for more details.
- GANDLF/cli/deploy.py +2 -2
- GANDLF/cli/generate_metrics.py +35 -1
- GANDLF/cli/main_run.py +4 -10
- GANDLF/compute/__init__.py +0 -2
- GANDLF/compute/forward_pass.py +0 -1
- GANDLF/compute/generic.py +107 -2
- GANDLF/compute/inference_loop.py +4 -4
- GANDLF/compute/loss_and_metric.py +1 -2
- GANDLF/compute/training_loop.py +10 -10
- GANDLF/config_manager.py +33 -717
- GANDLF/configuration/__init__.py +0 -0
- GANDLF/configuration/default_config.py +73 -0
- GANDLF/configuration/differential_privacy_config.py +16 -0
- GANDLF/configuration/exclude_parameters.py +1 -0
- GANDLF/configuration/model_config.py +82 -0
- GANDLF/configuration/nested_training_config.py +25 -0
- GANDLF/configuration/optimizer_config.py +121 -0
- GANDLF/configuration/parameters_config.py +10 -0
- GANDLF/configuration/patch_sampler_config.py +11 -0
- GANDLF/configuration/post_processing_config.py +10 -0
- GANDLF/configuration/pre_processing_config.py +94 -0
- GANDLF/configuration/scheduler_config.py +92 -0
- GANDLF/configuration/user_defined_config.py +131 -0
- GANDLF/configuration/utils.py +96 -0
- GANDLF/configuration/validators.py +479 -0
- GANDLF/data/__init__.py +14 -16
- GANDLF/data/lightning_datamodule.py +119 -0
- GANDLF/entrypoints/run.py +36 -31
- GANDLF/inference_manager.py +69 -25
- GANDLF/losses/__init__.py +23 -1
- GANDLF/losses/loss_calculators.py +79 -0
- GANDLF/losses/segmentation.py +3 -2
- GANDLF/metrics/__init__.py +26 -0
- GANDLF/metrics/generic.py +1 -1
- GANDLF/metrics/metric_calculators.py +102 -0
- GANDLF/metrics/panoptica_config_brats.yaml +56 -0
- GANDLF/metrics/segmentation_panoptica.py +49 -0
- GANDLF/models/__init__.py +8 -3
- GANDLF/models/lightning_module.py +2102 -0
- GANDLF/optimizers/__init__.py +4 -8
- GANDLF/privacy/opacus/opacus_anonymization_manager.py +243 -0
- GANDLF/schedulers/__init__.py +11 -4
- GANDLF/schedulers/wrap_torch.py +15 -3
- GANDLF/training_manager.py +160 -50
- GANDLF/utils/__init__.py +5 -3
- GANDLF/utils/imaging.py +176 -35
- GANDLF/utils/modelio.py +12 -8
- GANDLF/utils/pred_target_processors.py +71 -0
- GANDLF/utils/tensor.py +2 -1
- GANDLF/utils/write_parse.py +1 -1
- GANDLF/version.py +1 -1
- {GANDLF-0.1.3.dev20250202.dist-info → gandlf-0.1.6.dev20251109.dist-info}/METADATA +16 -11
- {GANDLF-0.1.3.dev20250202.dist-info → gandlf-0.1.6.dev20251109.dist-info}/RECORD +57 -34
- {GANDLF-0.1.3.dev20250202.dist-info → gandlf-0.1.6.dev20251109.dist-info}/WHEEL +1 -1
- {GANDLF-0.1.3.dev20250202.dist-info → gandlf-0.1.6.dev20251109.dist-info}/entry_points.txt +0 -0
- {GANDLF-0.1.3.dev20250202.dist-info → gandlf-0.1.6.dev20251109.dist-info/licenses}/LICENSE +0 -0
- {GANDLF-0.1.3.dev20250202.dist-info → gandlf-0.1.6.dev20251109.dist-info}/top_level.txt +0 -0
GANDLF/utils/imaging.py
CHANGED
|
@@ -5,6 +5,7 @@ import numpy as np
|
|
|
5
5
|
import SimpleITK as sitk
|
|
6
6
|
import torchio
|
|
7
7
|
import cv2
|
|
8
|
+
from skimage.io import imsave
|
|
8
9
|
|
|
9
10
|
from .generic import get_filename_extension_sanitized
|
|
10
11
|
|
|
@@ -122,6 +123,56 @@ def softer_sanity_check(
|
|
|
122
123
|
return result
|
|
123
124
|
|
|
124
125
|
|
|
126
|
+
def sanity_check_on_file_readers(
|
|
127
|
+
file_reader_0: Union[str, sitk.ImageFileReader],
|
|
128
|
+
file_reader_1: Union[str, sitk.ImageFileReader],
|
|
129
|
+
subject_id: Optional[str] = "",
|
|
130
|
+
threshold: Optional[float] = 0.00001,
|
|
131
|
+
) -> bool:
|
|
132
|
+
"""
|
|
133
|
+
This function performs a sanity check on the file readers to ensure that the properties of the images are consistent.
|
|
134
|
+
|
|
135
|
+
Args:
|
|
136
|
+
file_reader_0 (Union[str, sitk.ImageFileReader]): The first file reader.
|
|
137
|
+
file_reader_1 (Union[str, sitk.ImageFileReader]): The second file reader.
|
|
138
|
+
threshold (Optional[float], optional): The threshold for comparison. Defaults to 0.00001.
|
|
139
|
+
|
|
140
|
+
Returns:
|
|
141
|
+
bool: True if the sanity check passes.
|
|
142
|
+
"""
|
|
143
|
+
|
|
144
|
+
if isinstance(file_reader_0, str):
|
|
145
|
+
temp_file = file_reader_0
|
|
146
|
+
file_reader_0 = sitk.ImageFileReader()
|
|
147
|
+
file_reader_0.SetFileName(temp_file)
|
|
148
|
+
file_reader_0.ReadImageInformation()
|
|
149
|
+
|
|
150
|
+
if isinstance(file_reader_1, str):
|
|
151
|
+
temp_file = file_reader_1
|
|
152
|
+
file_reader_1 = sitk.ImageFileReader()
|
|
153
|
+
file_reader_1.SetFileName(temp_file)
|
|
154
|
+
file_reader_1.ReadImageInformation()
|
|
155
|
+
# this check needs to be absolute
|
|
156
|
+
assert file_reader_0.GetDimension() == file_reader_1.GetDimension(), (
|
|
157
|
+
"Dimensions for Subject '" + subject_id + "' are not consistent."
|
|
158
|
+
)
|
|
159
|
+
|
|
160
|
+
# other checks can be softer
|
|
161
|
+
assert softer_sanity_check(
|
|
162
|
+
file_reader_0.GetOrigin(), file_reader_1.GetOrigin(), threshold=threshold
|
|
163
|
+
), ("Origin for Subject '" + subject_id + "' are not consistent.")
|
|
164
|
+
|
|
165
|
+
assert softer_sanity_check(
|
|
166
|
+
file_reader_0.GetDirection(), file_reader_1.GetDirection(), threshold=threshold
|
|
167
|
+
), ("Orientation for Subject '" + subject_id + "' are not consistent.")
|
|
168
|
+
|
|
169
|
+
assert softer_sanity_check(
|
|
170
|
+
file_reader_0.GetSpacing(), file_reader_1.GetSpacing(), threshold=threshold
|
|
171
|
+
), ("Spacing for Subject '" + subject_id + "' are not consistent.")
|
|
172
|
+
|
|
173
|
+
return True
|
|
174
|
+
|
|
175
|
+
|
|
125
176
|
def perform_sanity_check_on_subject(subject: torchio.Subject, parameters: dict) -> bool:
|
|
126
177
|
"""
|
|
127
178
|
This function performs a sanity check on the image modalities in input subject to ensure that they are consistent.
|
|
@@ -168,39 +219,11 @@ def perform_sanity_check_on_subject(subject: torchio.Subject, parameters: dict)
|
|
|
168
219
|
else:
|
|
169
220
|
file_reader_current = _get_itkimage_or_filereader(subject[str(key)])
|
|
170
221
|
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
"Dimensions for Subject '"
|
|
177
|
-
+ subject["subject_id"]
|
|
178
|
-
+ "' are not consistent."
|
|
179
|
-
)
|
|
180
|
-
|
|
181
|
-
# other checks can be softer
|
|
182
|
-
assert softer_sanity_check(
|
|
183
|
-
file_reader_base.GetOrigin(), file_reader_current.GetOrigin()
|
|
184
|
-
), (
|
|
185
|
-
"Origin for Subject '"
|
|
186
|
-
+ subject["subject_id"]
|
|
187
|
-
+ "' are not consistent."
|
|
188
|
-
)
|
|
189
|
-
|
|
190
|
-
assert softer_sanity_check(
|
|
191
|
-
file_reader_base.GetDirection(), file_reader_current.GetDirection()
|
|
192
|
-
), (
|
|
193
|
-
"Orientation for Subject '"
|
|
194
|
-
+ subject["subject_id"]
|
|
195
|
-
+ "' are not consistent."
|
|
196
|
-
)
|
|
197
|
-
|
|
198
|
-
assert softer_sanity_check(
|
|
199
|
-
file_reader_base.GetSpacing(), file_reader_current.GetSpacing()
|
|
200
|
-
), (
|
|
201
|
-
"Spacing for Subject '"
|
|
202
|
-
+ subject["subject_id"]
|
|
203
|
-
+ "' are not consistent."
|
|
222
|
+
sanity_check_on_file_readers(
|
|
223
|
+
file_reader_base,
|
|
224
|
+
file_reader_current,
|
|
225
|
+
subject_id=subject["subject_id"],
|
|
226
|
+
threshold=parameters.get("sanity_check_threshold", 0.00001),
|
|
204
227
|
)
|
|
205
228
|
|
|
206
229
|
return True
|
|
@@ -230,7 +253,7 @@ def write_training_patches(subject: torchio.Subject, params: dict) -> None:
|
|
|
230
253
|
ext = get_filename_extension_sanitized(subject["path_to_metadata"][0])
|
|
231
254
|
for key in params["channel_keys"]:
|
|
232
255
|
img_to_write = torchio.ScalarImage(
|
|
233
|
-
tensor=subject[key][torchio.DATA][0], affine=subject[key]["affine"][0]
|
|
256
|
+
tensor=subject[key][torchio.DATA][0].cpu(), affine=subject[key]["affine"][0]
|
|
234
257
|
).as_sitk()
|
|
235
258
|
sitk.WriteImage(
|
|
236
259
|
img_to_write,
|
|
@@ -239,7 +262,7 @@ def write_training_patches(subject: torchio.Subject, params: dict) -> None:
|
|
|
239
262
|
|
|
240
263
|
if params["label_keys"] is not None:
|
|
241
264
|
img_to_write = torchio.ScalarImage(
|
|
242
|
-
tensor=subject[params["label_keys"][0]][torchio.DATA][0],
|
|
265
|
+
tensor=subject[params["label_keys"][0]][torchio.DATA][0].cpu(),
|
|
243
266
|
affine=subject[key]["affine"][0],
|
|
244
267
|
).as_sitk()
|
|
245
268
|
sitk.WriteImage(
|
|
@@ -285,3 +308,121 @@ def applyCustomColorMap(im_gray: np.ndarray) -> np.ndarray:
|
|
|
285
308
|
lut[:, 0, 1] = np.zeros((256)).tolist()
|
|
286
309
|
lut[:, 0, 2] = np.arange(0, 256, 1).tolist()
|
|
287
310
|
return cv2.LUT(img_bgr, lut)
|
|
311
|
+
|
|
312
|
+
|
|
313
|
+
class MapSaver:
|
|
314
|
+
ALLOWED_COLORMAPS = ["jet", "turbo", "angi"]
|
|
315
|
+
|
|
316
|
+
def __init__(
|
|
317
|
+
self,
|
|
318
|
+
num_classes: int,
|
|
319
|
+
slide_level: int,
|
|
320
|
+
blending_alpha: float,
|
|
321
|
+
level_width: int,
|
|
322
|
+
level_height: int,
|
|
323
|
+
):
|
|
324
|
+
self.num_classes = num_classes
|
|
325
|
+
self.slide_level = slide_level
|
|
326
|
+
self.blending_alpha = blending_alpha
|
|
327
|
+
self.level_width = level_width
|
|
328
|
+
self.level_height = level_height
|
|
329
|
+
|
|
330
|
+
def save_count_map(self, count_map, save_dir):
|
|
331
|
+
count_map = np.array(count_map * 255, dtype=np.uint16)
|
|
332
|
+
save_path = os.path.join(save_dir, "count_map.png")
|
|
333
|
+
imsave(save_path, count_map)
|
|
334
|
+
|
|
335
|
+
def save_probability_and_segmentation_maps(
|
|
336
|
+
self, probability_map, openslide_image, save_dir
|
|
337
|
+
):
|
|
338
|
+
(
|
|
339
|
+
heatmaps,
|
|
340
|
+
segmentation_maps,
|
|
341
|
+
) = self._create_heatmaps_and_segmentation_from_probability_map(probability_map)
|
|
342
|
+
self._save_segmentation_maps(segmentation_maps, save_dir)
|
|
343
|
+
self._save_heatmaps(heatmaps, save_dir)
|
|
344
|
+
self._save_heatmaps_overlaid_on_slide(heatmaps, openslide_image, save_dir)
|
|
345
|
+
|
|
346
|
+
def _create_heatmaps_and_segmentation_from_probability_map(self, probability_map):
|
|
347
|
+
heatmaps = {}
|
|
348
|
+
segmentation_maps = {}
|
|
349
|
+
for class_id in range(self.num_classes):
|
|
350
|
+
heatmap_gray = self._create_grey_heatmap(probability_map, class_id)
|
|
351
|
+
heatmap_turbo = self._apply_colormap(heatmap_gray, "turbo")
|
|
352
|
+
heatmap_jet = self._apply_colormap(heatmap_gray, "jet")
|
|
353
|
+
heatmap_angi = self._apply_colormap(heatmap_gray, "angi")
|
|
354
|
+
|
|
355
|
+
heatmaps[f"{class_id}_turbo"] = heatmap_turbo
|
|
356
|
+
heatmaps[f"{class_id}_jet"] = heatmap_jet
|
|
357
|
+
heatmaps[f"{class_id}_angi"] = heatmap_angi
|
|
358
|
+
|
|
359
|
+
segmap = ((probability_map[class_id, ...] > 0.5).astype(np.uint8)) * 255
|
|
360
|
+
segmentation_maps[class_id] = segmap
|
|
361
|
+
|
|
362
|
+
return heatmaps, segmentation_maps
|
|
363
|
+
|
|
364
|
+
def _save_segmentation_maps(self, segmentation_maps, save_dir):
|
|
365
|
+
for class_id, seg_map in segmentation_maps.items():
|
|
366
|
+
save_path = os.path.join(save_dir, f"seg_map_{class_id}.png")
|
|
367
|
+
cv2.imwrite(save_path, seg_map)
|
|
368
|
+
|
|
369
|
+
def _save_heatmaps(self, heatmaps, save_dir):
|
|
370
|
+
for class_id_and_colormap, heatmap in heatmaps.items():
|
|
371
|
+
save_path = os.path.join(
|
|
372
|
+
save_dir, f"probability_map_{class_id_and_colormap}.png"
|
|
373
|
+
)
|
|
374
|
+
cv2.imwrite(save_path, heatmap)
|
|
375
|
+
|
|
376
|
+
def _save_heatmaps_overlaid_on_slide(self, heatmaps, openslide_image, save_dir):
|
|
377
|
+
for class_id_and_colormap, heatmap in heatmaps.items():
|
|
378
|
+
save_path = os.path.join(
|
|
379
|
+
save_dir, f"probability_map_blended_{class_id_and_colormap}.png"
|
|
380
|
+
)
|
|
381
|
+
blended_heatmap = self._blend_heatmap_with_slide(heatmap, openslide_image)
|
|
382
|
+
cv2.imwrite(save_path, blended_heatmap)
|
|
383
|
+
|
|
384
|
+
def _blend_heatmap_with_slide(self, heatmap, openslide_image):
|
|
385
|
+
openslide_image_as_array = np.array(
|
|
386
|
+
openslide_image.read_region(
|
|
387
|
+
(0, 0), self.slide_level, (self.level_width, self.level_height)
|
|
388
|
+
).convert("RGB")
|
|
389
|
+
)
|
|
390
|
+
blended_heatmap = cv2.addWeighted(
|
|
391
|
+
openslide_image_as_array,
|
|
392
|
+
self.blending_alpha,
|
|
393
|
+
heatmap,
|
|
394
|
+
1 - self.blending_alpha,
|
|
395
|
+
0,
|
|
396
|
+
)
|
|
397
|
+
return blended_heatmap
|
|
398
|
+
|
|
399
|
+
def _create_grey_heatmap(self, probability_map, class_id):
|
|
400
|
+
heatmap_gray = np.array(probability_map[class_id, ...] * 255, dtype=np.uint8)
|
|
401
|
+
return heatmap_gray
|
|
402
|
+
|
|
403
|
+
def _apply_colormap(self, heatmap_gray, colormap_type):
|
|
404
|
+
colormap = colormap_type.lower()
|
|
405
|
+
assert (
|
|
406
|
+
colormap in self.ALLOWED_COLORMAPS
|
|
407
|
+
), f"Colormap {colormap} not supported. Supported colormaps are {self.ALLOWED_COLORMAPS}"
|
|
408
|
+
|
|
409
|
+
if colormap == "jet":
|
|
410
|
+
return self._apply_jet_colormap(heatmap_gray)
|
|
411
|
+
elif colormap == "turbo":
|
|
412
|
+
return self._apply_turbo_colormap(heatmap_gray)
|
|
413
|
+
|
|
414
|
+
return self._apply_angi_colormap(heatmap_gray)
|
|
415
|
+
|
|
416
|
+
def _apply_jet_colormap(self, heatmap_gray):
|
|
417
|
+
return cv2.applyColorMap(heatmap_gray, cv2.COLORMAP_JET)
|
|
418
|
+
|
|
419
|
+
def _apply_turbo_colormap(self, heatmap_gray):
|
|
420
|
+
return cv2.applyColorMap(heatmap_gray, cv2.COLORMAP_TURBO)
|
|
421
|
+
|
|
422
|
+
def _apply_angi_colormap(self, heatmap_gray):
|
|
423
|
+
img_bgr = cv2.cvtColor(heatmap_gray.astype(np.uint8), cv2.COLOR_BGR2RGB)
|
|
424
|
+
lut = np.zeros((256, 1, 3), dtype=np.uint8)
|
|
425
|
+
lut[:, 0, 0] = np.zeros((256)).tolist()
|
|
426
|
+
lut[:, 0, 1] = np.zeros((256)).tolist()
|
|
427
|
+
lut[:, 0, 2] = np.arange(0, 256, 1).tolist()
|
|
428
|
+
return cv2.LUT(img_bgr, lut)
|
GANDLF/utils/modelio.py
CHANGED
|
@@ -20,9 +20,9 @@ model_dict_full = {
|
|
|
20
20
|
|
|
21
21
|
model_dict_required = {"model_state_dict": None, "optimizer_state_dict": None}
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
BEST_MODEL_PATH_END = "_best.pth.tar"
|
|
24
|
+
LATEST_MODEL_PATH_END = "_latest.pth.tar"
|
|
25
|
+
INITIAL_MODEL_PATH_END = "_initial.pth.tar"
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
def optimize_and_save_model(
|
|
@@ -96,10 +96,12 @@ def optimize_and_save_model(
|
|
|
96
96
|
from openvino.tools.mo import convert_model
|
|
97
97
|
from openvino.runtime import get_version
|
|
98
98
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
99
|
+
# debugging
|
|
100
|
+
openvino_present = True
|
|
101
|
+
# openvino_present = False
|
|
102
|
+
# # check for the correct openvino version to prevent inadvertent api breaks
|
|
103
|
+
# if "2024.1.0" in get_version():
|
|
104
|
+
# openvino_present = True
|
|
103
105
|
except ImportError:
|
|
104
106
|
print("WARNING: OpenVINO is not present.")
|
|
105
107
|
|
|
@@ -173,7 +175,9 @@ def load_model(
|
|
|
173
175
|
Returns:
|
|
174
176
|
dict: Model dictionary containing model parameters and metadata.
|
|
175
177
|
"""
|
|
176
|
-
|
|
178
|
+
# For PyTorch 2.7+, use weights_only=False to maintain backward compatibility
|
|
179
|
+
# This prevents the new security warning in PyTorch 2.7+
|
|
180
|
+
model_dict = torch.load(path, map_location=device, weights_only=False)
|
|
177
181
|
|
|
178
182
|
# check if the model dictionary is complete
|
|
179
183
|
if full_sanity_check:
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import torch
|
|
2
|
+
import torch.nn.functional as F
|
|
3
|
+
from abc import ABC, abstractmethod
|
|
4
|
+
from GANDLF.utils.tensor import reverse_one_hot, get_linear_interpolation_mode, one_hot
|
|
5
|
+
|
|
6
|
+
from typing import Tuple
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class AbstractPredictionTargetProcessor(ABC):
|
|
10
|
+
def __init__(self, params: dict):
|
|
11
|
+
"""
|
|
12
|
+
Interface for classes that perform specific processing on the target and/or prediction tensors.
|
|
13
|
+
Useful for example for metrics or loss calculations, where some architectures require specific
|
|
14
|
+
processing of the target and/or prediction tensors before the metric or loss can be calculated.
|
|
15
|
+
"""
|
|
16
|
+
super().__init__()
|
|
17
|
+
self.params = params
|
|
18
|
+
|
|
19
|
+
@abstractmethod
|
|
20
|
+
def __call__(
|
|
21
|
+
self, prediction: torch.Tensor, target: torch.Tensor, *args
|
|
22
|
+
) -> Tuple[torch.Tensor, torch.Tensor]:
|
|
23
|
+
pass
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
class DeepSupervisionPredictionTargetProcessor(AbstractPredictionTargetProcessor):
|
|
27
|
+
def __init__(self, params: dict):
|
|
28
|
+
"""
|
|
29
|
+
Processor for deep supervision architectures.
|
|
30
|
+
"""
|
|
31
|
+
super().__init__(params)
|
|
32
|
+
|
|
33
|
+
def __call__(self, prediction: torch.Tensor, target: torch.Tensor, *args):
|
|
34
|
+
target = one_hot(target, self.params["model"]["class_list"])
|
|
35
|
+
target_resampled = []
|
|
36
|
+
target_prev = target.detach()
|
|
37
|
+
for i, _ in enumerate(prediction):
|
|
38
|
+
if target_prev[0].shape != prediction[i][0].shape:
|
|
39
|
+
expected_shape = reverse_one_hot(
|
|
40
|
+
prediction[i][0].detach(), self.params["model"]["class_list"]
|
|
41
|
+
).shape
|
|
42
|
+
target_prev = F.interpolate(
|
|
43
|
+
target_prev,
|
|
44
|
+
size=expected_shape,
|
|
45
|
+
mode=get_linear_interpolation_mode(len(expected_shape)),
|
|
46
|
+
align_corners=False,
|
|
47
|
+
)
|
|
48
|
+
target_resampled.append(target_prev)
|
|
49
|
+
return prediction, target_resampled
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
class IdentityPredictionTargetProcessor(AbstractPredictionTargetProcessor):
|
|
53
|
+
def __init__(self, params: dict):
|
|
54
|
+
"""
|
|
55
|
+
No-op processor that returns the input target and prediction tensors.
|
|
56
|
+
Used when no processing is needed.
|
|
57
|
+
"""
|
|
58
|
+
super().__init__(params)
|
|
59
|
+
|
|
60
|
+
def __call__(self, prediction: torch.Tensor, target: torch.Tensor, *args):
|
|
61
|
+
return prediction, target
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
class PredictionTargetProcessorFactory:
|
|
65
|
+
def __init__(self, params: dict):
|
|
66
|
+
self.params = params
|
|
67
|
+
|
|
68
|
+
def get_prediction_target_processor(self) -> AbstractPredictionTargetProcessor:
|
|
69
|
+
if "deep" in self.params["model"]["architecture"].lower():
|
|
70
|
+
return DeepSupervisionPredictionTargetProcessor(self.params)
|
|
71
|
+
return IdentityPredictionTargetProcessor(self.params)
|
GANDLF/utils/tensor.py
CHANGED
|
@@ -290,7 +290,8 @@ def get_class_imbalance_weights_classification(
|
|
|
290
290
|
np.fromiter(penalty_dict.values(), dtype=np.float64).sum()
|
|
291
291
|
+ sys.float_info.epsilon
|
|
292
292
|
)
|
|
293
|
-
for
|
|
293
|
+
# Only normalize penalties for classes that actually exist in penalty_dict
|
|
294
|
+
for i in penalty_dict.keys():
|
|
294
295
|
penalty_dict[i] /= penalty_sum
|
|
295
296
|
|
|
296
297
|
# passing None for sampling_weights because there is no clear way to calculate this for classification tasks which do not have a label
|
GANDLF/utils/write_parse.py
CHANGED
|
@@ -100,7 +100,7 @@ def parseTrainingCSV(
|
|
|
100
100
|
|
|
101
101
|
for col in data_full.columns:
|
|
102
102
|
# add appropriate headers to read here, as needed
|
|
103
|
-
col_lower = col.lower()
|
|
103
|
+
col_lower = str(col).lower()
|
|
104
104
|
currentHeaderLoc = data_full.columns.get_loc(col)
|
|
105
105
|
if (
|
|
106
106
|
("channel" in col_lower)
|
GANDLF/version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "0.1.
|
|
1
|
+
__version__ = "0.1.6-dev20251109"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: GANDLF
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.6.dev20251109
|
|
4
4
|
Summary: PyTorch-based framework that handles segmentation/regression/classification using various DL architectures for medical imaging.
|
|
5
5
|
Author: MLCommons
|
|
6
6
|
Author-email: gandlf@mlcommons.org
|
|
@@ -13,13 +13,15 @@ Classifier: Natural Language :: English
|
|
|
13
13
|
Classifier: Operating System :: OS Independent
|
|
14
14
|
Classifier: Programming Language :: Python :: 3.10
|
|
15
15
|
Classifier: Programming Language :: Python :: 3.11
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
16
17
|
Classifier: Topic :: Scientific/Engineering :: Medical Science Apps.
|
|
17
|
-
Requires-Python: >3.
|
|
18
|
+
Requires-Python: >3.9, <3.13
|
|
18
19
|
Description-Content-Type: text/markdown
|
|
19
20
|
License-File: LICENSE
|
|
20
|
-
Requires-Dist: torch==2.
|
|
21
|
+
Requires-Dist: torch==2.7.1
|
|
21
22
|
Requires-Dist: black==23.11.0
|
|
22
|
-
Requires-Dist:
|
|
23
|
+
Requires-Dist: lightning==2.5.2
|
|
24
|
+
Requires-Dist: numpy==1.26.4
|
|
23
25
|
Requires-Dist: scipy
|
|
24
26
|
Requires-Dist: SimpleITK!=2.0.*
|
|
25
27
|
Requires-Dist: SimpleITK!=2.2.1
|
|
@@ -31,9 +33,10 @@ Requires-Dist: scikit-learn>=0.23.2
|
|
|
31
33
|
Requires-Dist: scikit-image>=0.19.1
|
|
32
34
|
Requires-Dist: setuptools
|
|
33
35
|
Requires-Dist: seaborn
|
|
34
|
-
Requires-Dist: pyyaml
|
|
36
|
+
Requires-Dist: pyyaml
|
|
35
37
|
Requires-Dist: matplotlib
|
|
36
38
|
Requires-Dist: gdown==5.1.0
|
|
39
|
+
Requires-Dist: overrides==7.7.0
|
|
37
40
|
Requires-Dist: pytest
|
|
38
41
|
Requires-Dist: coverage
|
|
39
42
|
Requires-Dist: pytest-cov
|
|
@@ -42,28 +45,29 @@ Requires-Dist: medcam
|
|
|
42
45
|
Requires-Dist: opencv-python
|
|
43
46
|
Requires-Dist: torchmetrics==1.1.2
|
|
44
47
|
Requires-Dist: zarr==2.10.3
|
|
48
|
+
Requires-Dist: numcodecs<0.16.0
|
|
45
49
|
Requires-Dist: pydicom
|
|
46
50
|
Requires-Dist: onnx
|
|
47
51
|
Requires-Dist: torchinfo==1.7.0
|
|
48
|
-
Requires-Dist: segmentation-models-pytorch==0.
|
|
52
|
+
Requires-Dist: segmentation-models-pytorch==0.4.0
|
|
49
53
|
Requires-Dist: ACSConv==0.1.1
|
|
50
54
|
Requires-Dist: requests>=2.32.2
|
|
51
55
|
Requires-Dist: docker
|
|
52
56
|
Requires-Dist: dicom-anonymizer==1.0.12
|
|
53
57
|
Requires-Dist: twine
|
|
54
|
-
Requires-Dist: zarr
|
|
55
58
|
Requires-Dist: keyring
|
|
56
|
-
Requires-Dist: monai==1.
|
|
57
|
-
Requires-Dist: click
|
|
59
|
+
Requires-Dist: monai==1.4.0
|
|
60
|
+
Requires-Dist: click==8.1.8
|
|
58
61
|
Requires-Dist: deprecated
|
|
59
62
|
Requires-Dist: packaging==24.0
|
|
60
|
-
Requires-Dist: typer==0.9.0
|
|
61
63
|
Requires-Dist: colorlog
|
|
62
64
|
Requires-Dist: opacus==1.5.2
|
|
63
65
|
Requires-Dist: huggingface-hub==0.25.1
|
|
64
66
|
Requires-Dist: openslide-bin
|
|
65
67
|
Requires-Dist: openslide-python==1.4.1
|
|
66
68
|
Requires-Dist: lion-pytorch==0.2.2
|
|
69
|
+
Requires-Dist: pydantic==2.10.6
|
|
70
|
+
Requires-Dist: panoptica>=1.4.1
|
|
67
71
|
Dynamic: author
|
|
68
72
|
Dynamic: author-email
|
|
69
73
|
Dynamic: classifier
|
|
@@ -71,6 +75,7 @@ Dynamic: description
|
|
|
71
75
|
Dynamic: description-content-type
|
|
72
76
|
Dynamic: keywords
|
|
73
77
|
Dynamic: license
|
|
78
|
+
Dynamic: license-file
|
|
74
79
|
Dynamic: requires-dist
|
|
75
80
|
Dynamic: requires-python
|
|
76
81
|
Dynamic: summary
|
|
@@ -1,34 +1,50 @@
|
|
|
1
1
|
GANDLF/__init__.py,sha256=8Zq1qibZtNL7X2kaR0yNLoB3j1z9p-MotzJ_fctWAoE,112
|
|
2
|
-
GANDLF/config_manager.py,sha256=
|
|
3
|
-
GANDLF/inference_manager.py,sha256=
|
|
2
|
+
GANDLF/config_manager.py,sha256=fHCmqn0aus7W4KrKGlI-CIJrfPKhbQ4B2W4R6bw__fM,2566
|
|
3
|
+
GANDLF/inference_manager.py,sha256=5tCsAxJ88uafPPHz8NTPrbwLfxCFL15uiF2nJ3HgcP0,6116
|
|
4
4
|
GANDLF/logger.py,sha256=oamQ1SOTTpAnC8vQ67o211Q6_bExGg_hAuqlHGlJfAI,2951
|
|
5
5
|
GANDLF/logging_config.yaml,sha256=9XxRxAKtLn5ehT1khpR8wEiJGW64sx1lylAspM5KaWk,1337
|
|
6
6
|
GANDLF/parseConfig.py,sha256=jO-ybIPxLw23OWDvFdTukbft0ZM8UOofGnoL2C5CEps,754
|
|
7
|
-
GANDLF/training_manager.py,sha256=
|
|
8
|
-
GANDLF/version.py,sha256=
|
|
7
|
+
GANDLF/training_manager.py,sha256=AZlf-fl7KAwZgyre8-0M5lAyma6NvtiGX6XT51AJdxU,11436
|
|
8
|
+
GANDLF/version.py,sha256=T_UNbVsixOTPH9NDpzIMB22zTro3LXJA38K5KwO3KJI,34
|
|
9
9
|
GANDLF/anonymize/__init__.py,sha256=Nxig-jM-a-aKlK09PNi1zhNulEpLTyjnsY_oGQKdjhQ,1953
|
|
10
10
|
GANDLF/anonymize/convert_to_nifti.py,sha256=MOfSDncFGJGb-EQP9sFGn0yuKpX010Ioi2KNwttaex8,1339
|
|
11
11
|
GANDLF/cli/__init__.py,sha256=F05eyL2HKyWkHczRZuPE_Z2Yg685P9ARYxTwz6njGeQ,784
|
|
12
12
|
GANDLF/cli/config_generator.py,sha256=_j0aRV3puiIItJ1WOHRNVII_TkGJuH9ep6SuwPblcnc,4502
|
|
13
13
|
GANDLF/cli/data_split_saver.py,sha256=72ygy9s3INt2NFAfSW4j9dxxmuuvfzfBTF0Hwh0nYBU,1720
|
|
14
|
-
GANDLF/cli/deploy.py,sha256=
|
|
15
|
-
GANDLF/cli/generate_metrics.py,sha256=
|
|
14
|
+
GANDLF/cli/deploy.py,sha256=7yPqRox6e5MB-VzHxmA4kt-W5dWwElxDm1mm019jN74,15155
|
|
15
|
+
GANDLF/cli/generate_metrics.py,sha256=ySQ5s0sGajXbr__HLOzsDtULhuZ3x7plqaC1Lz1oZto,20429
|
|
16
16
|
GANDLF/cli/huggingface_hub_handler.py,sha256=vGQYwDiT3Y8yk_xLNkB8DgW1rYpEcwYp0TCdCO5oWTs,4631
|
|
17
|
-
GANDLF/cli/main_run.py,sha256=
|
|
17
|
+
GANDLF/cli/main_run.py,sha256=gYNJQGvmwqBjj3ARRxj-y3R1PMOP4qTwcwFSRBbkh0k,4352
|
|
18
18
|
GANDLF/cli/patch_extraction.py,sha256=30RpBfjpwE9GLRSSD7JRqwoHngESQL0eOt09n_5r18Q,3555
|
|
19
19
|
GANDLF/cli/post_training_model_optimization.py,sha256=cuPqUGrFcTIfhT67lAxpnywt8t9yrlqyHUl6wjr18qo,2111
|
|
20
20
|
GANDLF/cli/preprocess_and_save.py,sha256=pvOI5oaM-GLDF2TdK9F9j_KMyvypNh155Hut_AvZphg,8814
|
|
21
21
|
GANDLF/cli/recover_config.py,sha256=mQb9WkyyoGArkYluTCmnM9vTBeDaRSuT2I1AI4REwQQ,1828
|
|
22
|
-
GANDLF/compute/__init__.py,sha256=
|
|
23
|
-
GANDLF/compute/forward_pass.py,sha256=
|
|
24
|
-
GANDLF/compute/generic.py,sha256=
|
|
25
|
-
GANDLF/compute/inference_loop.py,sha256=
|
|
26
|
-
GANDLF/compute/loss_and_metric.py,sha256=
|
|
22
|
+
GANDLF/compute/__init__.py,sha256=y9-astlukrCNOXcCDz68opEvyuNCjtGqB2P4yybi3MY,44
|
|
23
|
+
GANDLF/compute/forward_pass.py,sha256=npSdxKSXKgoqdutFnVF3X0cBo8xnIVq5FHpLHUqw-4Q,22464
|
|
24
|
+
GANDLF/compute/generic.py,sha256=vM18DoZV0cBjX8NMP-MpRqd9ufcB77pWkRDHAHCTLTI,8022
|
|
25
|
+
GANDLF/compute/inference_loop.py,sha256=7yhGzxMztVxqjHIeI_lNky1CL76_4iSMdXF6BRvYFKE,15365
|
|
26
|
+
GANDLF/compute/loss_and_metric.py,sha256=vKta--M_2cvsqDfeGLFcE5UZNyfHYkOyjqxlc3xZWK8,6680
|
|
27
27
|
GANDLF/compute/step.py,sha256=di8zk8EgRKu5y0-Aq0aBTgrKo30SWM8wdLsnVeDaZqU,4765
|
|
28
|
-
GANDLF/compute/training_loop.py,sha256=
|
|
28
|
+
GANDLF/compute/training_loop.py,sha256=TI0aDov1K2OjbmB1LxDVtuZzbB99_wIiTu22tsH4GS0,24871
|
|
29
|
+
GANDLF/configuration/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
30
|
+
GANDLF/configuration/default_config.py,sha256=S2h1SI2gHJbKdYtfc8fQBsB1dMIfLmYLRIcbus7p3GE,3069
|
|
31
|
+
GANDLF/configuration/differential_privacy_config.py,sha256=nvLoBt11VTD_pGsQD8cmmgv-XMVZR5s0I-dkKrLhRXE,584
|
|
32
|
+
GANDLF/configuration/exclude_parameters.py,sha256=rg754BoaWBMmdKVgrmFSmtsw9uw7V9Yi-VXcXPp1edY,46
|
|
33
|
+
GANDLF/configuration/model_config.py,sha256=CFlTU7ypX5FzPDj-UMDDQXThHkgLeqvPEtPy79dZwdU,3313
|
|
34
|
+
GANDLF/configuration/nested_training_config.py,sha256=-8jygtu2ku2amSPXZ95AZTYPoqmw1O3wWH2apcsceFg,974
|
|
35
|
+
GANDLF/configuration/optimizer_config.py,sha256=58MApzpHQLyTvVqNM8wHRruM4PxNK8gRfvVuUEDbcGw,3325
|
|
36
|
+
GANDLF/configuration/parameters_config.py,sha256=p31KVVwWVjOSifWoXPuUKynzyeeUoTSTVdkmGHGgqpk,284
|
|
37
|
+
GANDLF/configuration/patch_sampler_config.py,sha256=1CFjhB7Idfdw0ckXlyVwK-dDBKYlcuXrDi-uRdJjPA4,357
|
|
38
|
+
GANDLF/configuration/post_processing_config.py,sha256=Wx1YYuKnuxP0bgN5j9rQWUk3cD4-XJ_hE3cB-7xvTpg,349
|
|
39
|
+
GANDLF/configuration/pre_processing_config.py,sha256=qjaSzdsDn3M5W5j4eUN21GknTTPSFlR8b9_69dbl-m8,3322
|
|
40
|
+
GANDLF/configuration/scheduler_config.py,sha256=QLuXbgpdeJrDmW5sgku2f1Qn4Q0AQtCSTeK6JQBjBno,3414
|
|
41
|
+
GANDLF/configuration/user_defined_config.py,sha256=_-OejzxteociR4NM7xrtOKfWBfUmjRvNr_SMmdcZCYc,5179
|
|
42
|
+
GANDLF/configuration/utils.py,sha256=p0bzaOKRvGi-beB99dBfkfl4rTDJ1F9xar78YJbii4U,3247
|
|
43
|
+
GANDLF/configuration/validators.py,sha256=Mz0SmVQhF2cTyUs5Otxn_7T6L0MoaPRHPoOYimks96o,19875
|
|
29
44
|
GANDLF/data/ImagesFromDataFrame.py,sha256=d4zwJbvBGxiReVw_WsWsV1v0cWKw3qKRrGXZqygOH10,13106
|
|
30
|
-
GANDLF/data/__init__.py,sha256
|
|
45
|
+
GANDLF/data/__init__.py,sha256=-ikaFkwMzI67_e1k6e-zMiF2bjGb-y8hVXeNlPWKreI,2292
|
|
31
46
|
GANDLF/data/inference_dataloader_histopath.py,sha256=dOSuOnEFOcA2nPeRuUunSHIz65ea7w-iv3VTdp8E4sE,6009
|
|
47
|
+
GANDLF/data/lightning_datamodule.py,sha256=Nd3NDh4T57lpW5up5ax1WHL8MYot6BCptIt_mmWshBQ,4443
|
|
32
48
|
GANDLF/data/augmentation/__init__.py,sha256=fylJfhi-trBMstGTcvkwYDT6zBVXrkaobNI21ItaiGU,2255
|
|
33
49
|
GANDLF/data/augmentation/blur_enhanced.py,sha256=JB-vmkE8xplx2pWOAAw1zXf7Ys8gWhC1tep0QfteyWI,2576
|
|
34
50
|
GANDLF/data/augmentation/hed_augs.py,sha256=BQihsQPIlWw4LeS29RLJp0w2boCzvrw-zc3wkADKWoc,12443
|
|
@@ -71,7 +87,7 @@ GANDLF/entrypoints/optimize_model.py,sha256=w3A1n2jvH5s2bp9m3E3rUX1wd1J4Tt_zfOD3
|
|
|
71
87
|
GANDLF/entrypoints/patch_miner.py,sha256=StrdmbAiECPpsN1AoZo75Mc1y-UAmKFyNfFmJrnHOg4,3095
|
|
72
88
|
GANDLF/entrypoints/preprocess.py,sha256=-2XbLmRkQossOpZCU0HvvWWuKbefq6OE_Bf2HeHoYNk,5571
|
|
73
89
|
GANDLF/entrypoints/recover_config.py,sha256=3eyYbQJMPcgZz6NDZFpJadbgUdnMF6chudRKqmBaJ4E,3712
|
|
74
|
-
GANDLF/entrypoints/run.py,sha256=
|
|
90
|
+
GANDLF/entrypoints/run.py,sha256=V9z9Ad7EV_nehK6z9wpnic1TDMMv0KPmnmw0VPIHGJQ,8914
|
|
75
91
|
GANDLF/entrypoints/split_csv.py,sha256=TZMpYjzPXD8koOdB7kokJYStQcfMzQD0z_Nysxvuxwo,3662
|
|
76
92
|
GANDLF/entrypoints/subcommands.py,sha256=LyYgN5bOAF5K6laGWChe_CBi02RmPhIS7nYpiojOC0w,1768
|
|
77
93
|
GANDLF/entrypoints/verify_install.py,sha256=E204smRPuH7Fv4rBPkjVXmxMPB_Tzd2lTAdVxp2hNhY,1370
|
|
@@ -79,22 +95,26 @@ GANDLF/grad_clipping/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hS
|
|
|
79
95
|
GANDLF/grad_clipping/adaptive_gradient_clipping.py,sha256=ABt2sBLVFkW_5ffA-GkrFaxCFi2AkEOT3WjroUif2fI,2896
|
|
80
96
|
GANDLF/grad_clipping/clip_gradients.py,sha256=bXXyy0suMmc0P3bj7odHVYX18w--IZ6Mu1cseFQ9F7U,1157
|
|
81
97
|
GANDLF/grad_clipping/grad_scaler.py,sha256=Uwc37zkGs_513U-QOYRVNc1VUOW6rd1aGYsaXmoXPaw,3013
|
|
82
|
-
GANDLF/losses/__init__.py,sha256=
|
|
98
|
+
GANDLF/losses/__init__.py,sha256=CEZPbqjjj3w9eCPhifmtgU1JjsVR5xnT1HCbF0cVLqo,1533
|
|
83
99
|
GANDLF/losses/hybrid.py,sha256=mYR3oYsz9I3GcVKsrY7uiafAvyunfCx3rlgZPk-M9zo,1599
|
|
84
100
|
GANDLF/losses/hybrid_new.py,sha256=aC_2mGrDGPQKw9pgtvwhIvsT8a9-0Y8mQo7KSBP7XbE,795
|
|
101
|
+
GANDLF/losses/loss_calculators.py,sha256=U_uDyVRhBeZ0wPjDNTR39zLBE0o1hWaSU3jLSmrCmzo,2733
|
|
85
102
|
GANDLF/losses/loss_interface.py,sha256=3iI9DVP5M1zrYMGEqfS3vDx46-A5Uuf73H123P2LeNo,5497
|
|
86
103
|
GANDLF/losses/regression.py,sha256=iB40tuexbQS4O2WzgBtTEYYmgLpARhC_yCMi8K-IQn8,8711
|
|
87
104
|
GANDLF/losses/regression_new.py,sha256=WMfJkoRRAHa2Jpjr8Zex-pHMqiiszNUnnq9H4XZQYFs,1992
|
|
88
|
-
GANDLF/losses/segmentation.py,sha256=
|
|
105
|
+
GANDLF/losses/segmentation.py,sha256=txyVEgCl9mDWXxBqlHYhZI7nAwzDAelQj0MA__HBJN4,12341
|
|
89
106
|
GANDLF/losses/segmentation_new.py,sha256=GK1F-5x2aaVr8zQFNUIUw5rlGydXhoXKWitiEcSctAY,6936
|
|
90
|
-
GANDLF/metrics/__init__.py,sha256=
|
|
107
|
+
GANDLF/metrics/__init__.py,sha256=k8xcpujpUg22R33keOUNetzrLnGSHsEAmClkFeDHZxc,4470
|
|
91
108
|
GANDLF/metrics/classification.py,sha256=6rVZjXxHwfJFqw19UiRMYK3uF656QgfMwWDz-LOHUaw,4692
|
|
92
|
-
GANDLF/metrics/generic.py,sha256=
|
|
109
|
+
GANDLF/metrics/generic.py,sha256=N-h9sDwuAsskK7AdZ2N0otcbFTmKxh9kdyi6MQkDO60,4983
|
|
110
|
+
GANDLF/metrics/metric_calculators.py,sha256=c-NAl84yniTWjMKePBlf0TsCIJnYHODplt8HeEk9Uac,3610
|
|
111
|
+
GANDLF/metrics/panoptica_config_brats.yaml,sha256=mTGSQuJoENuy84gZd2tHV0Dfl7GX5nIeE_46q5Vczx4,2685
|
|
93
112
|
GANDLF/metrics/regression.py,sha256=Ca58jo9OL1GdjB2ZvQCcrKWz9F67iY5rcbnQxT-LpcU,4584
|
|
94
113
|
GANDLF/metrics/segmentation.py,sha256=zqWEI6LuphFM0Nsm0sG2XeqAxpNJnoK1Z9q4FJt58c8,25645
|
|
114
|
+
GANDLF/metrics/segmentation_panoptica.py,sha256=TNphTIU4C3e-hu62sDpRDW_h6_za9g_7TgEjEgaRclE,1598
|
|
95
115
|
GANDLF/metrics/synthesis.py,sha256=IfYit-R0O5ZUfmsWfLD6BqcLjjoEiotx0lUdsXWlbao,6730
|
|
96
116
|
GANDLF/models/MSDNet.py,sha256=mzBkw_kQigSDTxaR7tojhdI4ECIQ65i_qiCrNaZmBHI,3442
|
|
97
|
-
GANDLF/models/__init__.py,sha256=
|
|
117
|
+
GANDLF/models/__init__.py,sha256=3SwskWonRW1AduPe6CYQWucU8ZBkkfJUpEF34I0NWP0,4286
|
|
98
118
|
GANDLF/models/brain_age.py,sha256=itV27Bzh7a9er3WsenntvlnzCM0ZLBw1Xents4-wuAc,2084
|
|
99
119
|
GANDLF/models/deep_unet.py,sha256=VyzwuEcjunO5dwU28NYyZ3XlqXszy18fGT8Kd6J_2bQ,9722
|
|
100
120
|
GANDLF/models/densenet.py,sha256=9o-vJaKNfxtdhc8u71TfKelwL1d_2pn702mqj19lI5o,11848
|
|
@@ -105,6 +125,7 @@ GANDLF/models/imagenet_unet.py,sha256=vTAuckJ0Bs9nfe2G0nKISqgxWArIYdM4poGpTk56QY
|
|
|
105
125
|
GANDLF/models/imagenet_vgg.py,sha256=FrMNLIxCtaMHWZ9JO7pWtoXTT1f8eVDuREx9108Aw2g,10367
|
|
106
126
|
GANDLF/models/light_unet.py,sha256=jzcTHH7kv_ikriYxIe7fbQJkmwOQZzePW4KLCW2FGWM,6645
|
|
107
127
|
GANDLF/models/light_unet_multilayer.py,sha256=xrKy--lljbCX7U2eYjpFZA69C6qlHmA5W-fEckPBll4,4534
|
|
128
|
+
GANDLF/models/lightning_module.py,sha256=QLBL-QKp5DADHn8PpGjAJO4l3J7M4WI95kymPFvfGOk,83332
|
|
108
129
|
GANDLF/models/modelBase.py,sha256=NFmKcEylNchm0LVqwRoD_iIMFj36IsaKwVCPJPLux3g,5752
|
|
109
130
|
GANDLF/models/resnet.py,sha256=0PB7sGSLHUq2F6tyHYqxepmU1eBccSwCzBrD7Qmc280,16987
|
|
110
131
|
GANDLF/models/sdnet.py,sha256=uhHvOHRTAx4ANxv2lKXfBn6Bg4Broqzb77qekVjXeFI,14528
|
|
@@ -132,7 +153,7 @@ GANDLF/models/seg_modules/add_conv_block.py,sha256=ww8pWBq6r_DYwe8DHLZM2oPXmJOIU
|
|
|
132
153
|
GANDLF/models/seg_modules/add_downsample_conv_block.py,sha256=UUvMjFZSvfwSxEqwS1uonhPaFHc1Y39aKx56tWWrrqk,410
|
|
133
154
|
GANDLF/models/seg_modules/average_pool.py,sha256=8TRsq5ScmofJXumS-MEWZ0We0EpYVX44rzKqLad9uEg,1980
|
|
134
155
|
GANDLF/models/seg_modules/out_conv.py,sha256=mOfHlIaznx8pauMkAiu_Ni57383YYJtm5E1ut7--ks0,3379
|
|
135
|
-
GANDLF/optimizers/__init__.py,sha256=
|
|
156
|
+
GANDLF/optimizers/__init__.py,sha256=cJiIvV0zT-b0grrXnvFm8NOOXgX2cPgGoyc8fdn9cYE,1281
|
|
136
157
|
GANDLF/optimizers/wrap_monai.py,sha256=bDB055PZYj44wyBNXU3oYxjBPa4fyv_5BsRpPtkIUf0,782
|
|
137
158
|
GANDLF/optimizers/wrap_torch.py,sha256=phDMJ-BPSH8nsfqcJLUndhQEb021Uf1CicpAB5C-gvY,8785
|
|
138
159
|
GANDLF/optimizers/thirdparty/__init__.py,sha256=o9R9I2dpsd0pPKf7x-idATt5eadhoIX00Zj6p8IUhYs,105
|
|
@@ -143,25 +164,27 @@ GANDLF/privacy/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
|
143
164
|
GANDLF/privacy/opacus/__init__.py,sha256=8FkYz9ViiEUIF9JF3t5rbJjjOVUnNomnYR-bd500kZI,173
|
|
144
165
|
GANDLF/privacy/opacus/config_parsing.py,sha256=1x9XTrRA-zVJI8dieVDECL-RWd4SlOsk639gNObZMnI,2367
|
|
145
166
|
GANDLF/privacy/opacus/model_handling.py,sha256=LSFo_TtCHwFhThJ9i7agWFjxVx1aABHC3bIUVLReFPs,6437
|
|
167
|
+
GANDLF/privacy/opacus/opacus_anonymization_manager.py,sha256=8VzMtezagKlkaI6x-UL7NPiXIIFQ014Iw9atsCy_46w,9549
|
|
146
168
|
GANDLF/privacy/opacus/training_utils.py,sha256=ejXUIhLNjRzTebF-7uCYUluK7jyINDOpLe2yhOKacJg,3683
|
|
147
|
-
GANDLF/schedulers/__init__.py,sha256=
|
|
169
|
+
GANDLF/schedulers/__init__.py,sha256=2Uni-hJKqzoRoo7B_4hhbGW1nvudhGBZc6EPBVYJnn8,1475
|
|
148
170
|
GANDLF/schedulers/wrap_monai.py,sha256=_kP3ArUIFK3x3u0nQV8Gi2oPruMIGGTSZxa4bSygGPs,400
|
|
149
|
-
GANDLF/schedulers/wrap_torch.py,sha256=
|
|
150
|
-
GANDLF/utils/__init__.py,sha256=
|
|
171
|
+
GANDLF/schedulers/wrap_torch.py,sha256=S0Aoo3vHEYlumgngANKGlM86fE3W15ReaWxmb4KthD8,7165
|
|
172
|
+
GANDLF/utils/__init__.py,sha256=F74QIQ6dZL8cOIsZkU-VfDdcHewUW959GXRvDfphGCk,1725
|
|
151
173
|
GANDLF/utils/data_splitter.py,sha256=IBVsLYo4y28G6LedbLPYWyiAUiaLxD4wWZD4EZC2D6I,10174
|
|
152
174
|
GANDLF/utils/exceptions.py,sha256=SmEGzCbc5mXxjylmA9XE4PXZdmkkfOjrEh473cWTAvA,100
|
|
153
175
|
GANDLF/utils/gandlf_logging.py,sha256=a1yV4244BGO5gp4OuAIKJUZgR21U1OPdovJ5nH1uUrs,2162
|
|
154
176
|
GANDLF/utils/generic.py,sha256=NyJgaeCdryBlHMziPPLmWtIk450u042NWQgs_qh7knw,11744
|
|
155
177
|
GANDLF/utils/handle_collisions.py,sha256=UFgfrddQqeipOdpKk0Mo-wwJ-TYTESNZyXzEyQeaLdI,3082
|
|
156
|
-
GANDLF/utils/imaging.py,sha256=
|
|
178
|
+
GANDLF/utils/imaging.py,sha256=_qCgvIXHZW_k_IUYLU95G5L5yoozxCRCYxo65TI-95U,15983
|
|
157
179
|
GANDLF/utils/modelbase.py,sha256=MJ1ufJGQ-ZgfYWTg7o4f-Iz78d7SYiyxN7MT8bnNDaw,950
|
|
158
|
-
GANDLF/utils/modelio.py,sha256=
|
|
180
|
+
GANDLF/utils/modelio.py,sha256=xmzAn7P0kqJd_Gcf17nMcV784poW2qpi3AY483Tk2ko,8247
|
|
159
181
|
GANDLF/utils/parameter_processing.py,sha256=DA7ZEsizWWLJZnCxBnDNh1NyA-bw5oirOvodiZZWbIk,5675
|
|
160
|
-
GANDLF/utils/
|
|
161
|
-
GANDLF/utils/
|
|
162
|
-
GANDLF
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
182
|
+
GANDLF/utils/pred_target_processors.py,sha256=aatXJ6jdJaNAHa_tPzHfC1gOQrPYJLtg-cYeUFvkM_s,2701
|
|
183
|
+
GANDLF/utils/tensor.py,sha256=SbcTyWs_qaFTnxpFlJHiq9xNKesDu7t0YZsm9eUnDSk,21565
|
|
184
|
+
GANDLF/utils/write_parse.py,sha256=HROxskhet-uIdUJmz16z_7p9r0mf8hWsqQFygwZ8ap0,9202
|
|
185
|
+
gandlf-0.1.6.dev20251109.dist-info/licenses/LICENSE,sha256=GlZPAfA4eckod8IVayhBXkqCpESXf6cc9BGli_Jwims,11357
|
|
186
|
+
gandlf-0.1.6.dev20251109.dist-info/METADATA,sha256=OwoTI2uOcWtOPKnPAMJcAcJkq7QxpplOvVT0-nEPnpI,9904
|
|
187
|
+
gandlf-0.1.6.dev20251109.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
188
|
+
gandlf-0.1.6.dev20251109.dist-info/entry_points.txt,sha256=agwocNI7Upi-sFDe1rMl71dGN8YhCBB7WJmtBHRF4jg,902
|
|
189
|
+
gandlf-0.1.6.dev20251109.dist-info/top_level.txt,sha256=i5D9wEbQhl085_9Lx2m7x-9Zu6nlx1tjYYbuSihG09E,7
|
|
190
|
+
gandlf-0.1.6.dev20251109.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|