GANDLF 0.1.3.dev20250319__py3-none-any.whl → 0.1.4.dev20250503__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.

Files changed (55) hide show
  1. GANDLF/cli/deploy.py +2 -2
  2. GANDLF/cli/generate_metrics.py +21 -0
  3. GANDLF/cli/main_run.py +4 -12
  4. GANDLF/compute/__init__.py +0 -2
  5. GANDLF/compute/forward_pass.py +0 -1
  6. GANDLF/compute/generic.py +107 -2
  7. GANDLF/compute/inference_loop.py +4 -4
  8. GANDLF/compute/loss_and_metric.py +1 -2
  9. GANDLF/compute/training_loop.py +10 -10
  10. GANDLF/config_manager.py +26 -716
  11. GANDLF/configuration/__init__.py +0 -0
  12. GANDLF/configuration/default_config.py +73 -0
  13. GANDLF/configuration/differential_privacy_config.py +16 -0
  14. GANDLF/configuration/exclude_parameters.py +1 -0
  15. GANDLF/configuration/model_config.py +82 -0
  16. GANDLF/configuration/nested_training_config.py +25 -0
  17. GANDLF/configuration/optimizer_config.py +121 -0
  18. GANDLF/configuration/parameters_config.py +10 -0
  19. GANDLF/configuration/patch_sampler_config.py +11 -0
  20. GANDLF/configuration/post_processing_config.py +10 -0
  21. GANDLF/configuration/pre_processing_config.py +94 -0
  22. GANDLF/configuration/scheduler_config.py +90 -0
  23. GANDLF/configuration/user_defined_config.py +131 -0
  24. GANDLF/configuration/utils.py +96 -0
  25. GANDLF/configuration/validators.py +479 -0
  26. GANDLF/data/__init__.py +14 -16
  27. GANDLF/data/lightning_datamodule.py +119 -0
  28. GANDLF/entrypoints/run.py +29 -35
  29. GANDLF/inference_manager.py +69 -25
  30. GANDLF/losses/__init__.py +23 -1
  31. GANDLF/losses/loss_calculators.py +79 -0
  32. GANDLF/losses/segmentation.py +3 -2
  33. GANDLF/metrics/__init__.py +26 -0
  34. GANDLF/metrics/generic.py +1 -1
  35. GANDLF/metrics/metric_calculators.py +102 -0
  36. GANDLF/metrics/panoptica_config_brats.yaml +50 -0
  37. GANDLF/metrics/segmentation_panoptica.py +35 -0
  38. GANDLF/models/__init__.py +8 -3
  39. GANDLF/models/lightning_module.py +2102 -0
  40. GANDLF/optimizers/__init__.py +4 -8
  41. GANDLF/privacy/opacus/opacus_anonymization_manager.py +243 -0
  42. GANDLF/schedulers/__init__.py +6 -2
  43. GANDLF/training_manager.py +159 -69
  44. GANDLF/utils/__init__.py +4 -3
  45. GANDLF/utils/imaging.py +121 -2
  46. GANDLF/utils/modelio.py +9 -7
  47. GANDLF/utils/pred_target_processors.py +71 -0
  48. GANDLF/utils/write_parse.py +1 -1
  49. GANDLF/version.py +1 -1
  50. {gandlf-0.1.3.dev20250319.dist-info → gandlf-0.1.4.dev20250503.dist-info}/METADATA +14 -8
  51. {gandlf-0.1.3.dev20250319.dist-info → gandlf-0.1.4.dev20250503.dist-info}/RECORD +55 -32
  52. {gandlf-0.1.3.dev20250319.dist-info → gandlf-0.1.4.dev20250503.dist-info}/WHEEL +1 -1
  53. {gandlf-0.1.3.dev20250319.dist-info → gandlf-0.1.4.dev20250503.dist-info}/entry_points.txt +0 -0
  54. {gandlf-0.1.3.dev20250319.dist-info → gandlf-0.1.4.dev20250503.dist-info/licenses}/LICENSE +0 -0
  55. {gandlf-0.1.3.dev20250319.dist-info → gandlf-0.1.4.dev20250503.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
 
@@ -230,7 +231,7 @@ def write_training_patches(subject: torchio.Subject, params: dict) -> None:
230
231
  ext = get_filename_extension_sanitized(subject["path_to_metadata"][0])
231
232
  for key in params["channel_keys"]:
232
233
  img_to_write = torchio.ScalarImage(
233
- tensor=subject[key][torchio.DATA][0], affine=subject[key]["affine"][0]
234
+ tensor=subject[key][torchio.DATA][0].cpu(), affine=subject[key]["affine"][0]
234
235
  ).as_sitk()
235
236
  sitk.WriteImage(
236
237
  img_to_write,
@@ -239,7 +240,7 @@ def write_training_patches(subject: torchio.Subject, params: dict) -> None:
239
240
 
240
241
  if params["label_keys"] is not None:
241
242
  img_to_write = torchio.ScalarImage(
242
- tensor=subject[params["label_keys"][0]][torchio.DATA][0],
243
+ tensor=subject[params["label_keys"][0]][torchio.DATA][0].cpu(),
243
244
  affine=subject[key]["affine"][0],
244
245
  ).as_sitk()
245
246
  sitk.WriteImage(
@@ -285,3 +286,121 @@ def applyCustomColorMap(im_gray: np.ndarray) -> np.ndarray:
285
286
  lut[:, 0, 1] = np.zeros((256)).tolist()
286
287
  lut[:, 0, 2] = np.arange(0, 256, 1).tolist()
287
288
  return cv2.LUT(img_bgr, lut)
289
+
290
+
291
+ class MapSaver:
292
+ ALLOWED_COLORMAPS = ["jet", "turbo", "angi"]
293
+
294
+ def __init__(
295
+ self,
296
+ num_classes: int,
297
+ slide_level: int,
298
+ blending_alpha: float,
299
+ level_width: int,
300
+ level_height: int,
301
+ ):
302
+ self.num_classes = num_classes
303
+ self.slide_level = slide_level
304
+ self.blending_alpha = blending_alpha
305
+ self.level_width = level_width
306
+ self.level_height = level_height
307
+
308
+ def save_count_map(self, count_map, save_dir):
309
+ count_map = np.array(count_map * 255, dtype=np.uint16)
310
+ save_path = os.path.join(save_dir, "count_map.png")
311
+ imsave(save_path, count_map)
312
+
313
+ def save_probability_and_segmentation_maps(
314
+ self, probability_map, openslide_image, save_dir
315
+ ):
316
+ (
317
+ heatmaps,
318
+ segmentation_maps,
319
+ ) = self._create_heatmaps_and_segmentation_from_probability_map(probability_map)
320
+ self._save_segmentation_maps(segmentation_maps, save_dir)
321
+ self._save_heatmaps(heatmaps, save_dir)
322
+ self._save_heatmaps_overlaid_on_slide(heatmaps, openslide_image, save_dir)
323
+
324
+ def _create_heatmaps_and_segmentation_from_probability_map(self, probability_map):
325
+ heatmaps = {}
326
+ segmentation_maps = {}
327
+ for class_id in range(self.num_classes):
328
+ heatmap_gray = self._create_grey_heatmap(probability_map, class_id)
329
+ heatmap_turbo = self._apply_colormap(heatmap_gray, "turbo")
330
+ heatmap_jet = self._apply_colormap(heatmap_gray, "jet")
331
+ heatmap_angi = self._apply_colormap(heatmap_gray, "angi")
332
+
333
+ heatmaps[f"{class_id}_turbo"] = heatmap_turbo
334
+ heatmaps[f"{class_id}_jet"] = heatmap_jet
335
+ heatmaps[f"{class_id}_angi"] = heatmap_angi
336
+
337
+ segmap = ((probability_map[class_id, ...] > 0.5).astype(np.uint8)) * 255
338
+ segmentation_maps[class_id] = segmap
339
+
340
+ return heatmaps, segmentation_maps
341
+
342
+ def _save_segmentation_maps(self, segmentation_maps, save_dir):
343
+ for class_id, seg_map in segmentation_maps.items():
344
+ save_path = os.path.join(save_dir, f"seg_map_{class_id}.png")
345
+ cv2.imwrite(save_path, seg_map)
346
+
347
+ def _save_heatmaps(self, heatmaps, save_dir):
348
+ for class_id_and_colormap, heatmap in heatmaps.items():
349
+ save_path = os.path.join(
350
+ save_dir, f"probability_map_{class_id_and_colormap}.png"
351
+ )
352
+ cv2.imwrite(save_path, heatmap)
353
+
354
+ def _save_heatmaps_overlaid_on_slide(self, heatmaps, openslide_image, save_dir):
355
+ for class_id_and_colormap, heatmap in heatmaps.items():
356
+ save_path = os.path.join(
357
+ save_dir, f"probability_map_blended_{class_id_and_colormap}.png"
358
+ )
359
+ blended_heatmap = self._blend_heatmap_with_slide(heatmap, openslide_image)
360
+ cv2.imwrite(save_path, blended_heatmap)
361
+
362
+ def _blend_heatmap_with_slide(self, heatmap, openslide_image):
363
+ openslide_image_as_array = np.array(
364
+ openslide_image.read_region(
365
+ (0, 0), self.slide_level, (self.level_width, self.level_height)
366
+ ).convert("RGB")
367
+ )
368
+ blended_heatmap = cv2.addWeighted(
369
+ openslide_image_as_array,
370
+ self.blending_alpha,
371
+ heatmap,
372
+ 1 - self.blending_alpha,
373
+ 0,
374
+ )
375
+ return blended_heatmap
376
+
377
+ def _create_grey_heatmap(self, probability_map, class_id):
378
+ heatmap_gray = np.array(probability_map[class_id, ...] * 255, dtype=np.uint8)
379
+ return heatmap_gray
380
+
381
+ def _apply_colormap(self, heatmap_gray, colormap_type):
382
+ colormap = colormap_type.lower()
383
+ assert (
384
+ colormap in self.ALLOWED_COLORMAPS
385
+ ), f"Colormap {colormap} not supported. Supported colormaps are {self.ALLOWED_COLORMAPS}"
386
+
387
+ if colormap == "jet":
388
+ return self._apply_jet_colormap(heatmap_gray)
389
+ elif colormap == "turbo":
390
+ return self._apply_turbo_colormap(heatmap_gray)
391
+
392
+ return self._apply_angi_colormap(heatmap_gray)
393
+
394
+ def _apply_jet_colormap(self, heatmap_gray):
395
+ return cv2.applyColorMap(heatmap_gray, cv2.COLORMAP_JET)
396
+
397
+ def _apply_turbo_colormap(self, heatmap_gray):
398
+ return cv2.applyColorMap(heatmap_gray, cv2.COLORMAP_TURBO)
399
+
400
+ def _apply_angi_colormap(self, heatmap_gray):
401
+ img_bgr = cv2.cvtColor(heatmap_gray.astype(np.uint8), cv2.COLOR_BGR2RGB)
402
+ lut = np.zeros((256, 1, 3), dtype=np.uint8)
403
+ lut[:, 0, 0] = np.zeros((256)).tolist()
404
+ lut[:, 0, 1] = np.zeros((256)).tolist()
405
+ lut[:, 0, 2] = np.arange(0, 256, 1).tolist()
406
+ 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
- best_model_path_end = "_best.pth.tar"
24
- latest_model_path_end = "_latest.pth.tar"
25
- initial_model_path_end = "_initial.pth.tar"
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
- openvino_present = False
100
- # check for the correct openvino version to prevent inadvertent api breaks
101
- if "2023.0.1" in get_version():
102
- openvino_present = True
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
 
@@ -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)
@@ -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.3-dev20250319"
1
+ __version__ = "0.1.4-dev20250503"
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.2
1
+ Metadata-Version: 2.4
2
2
  Name: GANDLF
3
- Version: 0.1.3.dev20250319
3
+ Version: 0.1.4.dev20250503
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.8, <3.12
18
+ Requires-Python: >3.9, <3.13
18
19
  Description-Content-Type: text/markdown
19
20
  License-File: LICENSE
20
21
  Requires-Dist: torch==2.5.0
21
22
  Requires-Dist: black==23.11.0
22
- Requires-Dist: numpy==1.25.0
23
+ Requires-Dist: lightning==2.4.0
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==6.0.1
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,18 +45,18 @@ 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.3.3
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.3.0
59
+ Requires-Dist: monai==1.4.0
57
60
  Requires-Dist: click>=8.0.0
58
61
  Requires-Dist: deprecated
59
62
  Requires-Dist: packaging==24.0
@@ -64,6 +67,8 @@ Requires-Dist: huggingface-hub==0.25.1
64
67
  Requires-Dist: openslide-bin
65
68
  Requires-Dist: openslide-python==1.4.1
66
69
  Requires-Dist: lion-pytorch==0.2.2
70
+ Requires-Dist: pydantic==2.10.6
71
+ Requires-Dist: panoptica>=1.3.3
67
72
  Dynamic: author
68
73
  Dynamic: author-email
69
74
  Dynamic: classifier
@@ -71,6 +76,7 @@ Dynamic: description
71
76
  Dynamic: description-content-type
72
77
  Dynamic: keywords
73
78
  Dynamic: license
79
+ Dynamic: license-file
74
80
  Dynamic: requires-dist
75
81
  Dynamic: requires-python
76
82
  Dynamic: summary
@@ -1,34 +1,50 @@
1
1
  GANDLF/__init__.py,sha256=8Zq1qibZtNL7X2kaR0yNLoB3j1z9p-MotzJ_fctWAoE,112
2
- GANDLF/config_manager.py,sha256=fglvns0FTkMQDcuhH3dXm8dqzpXzGq3-9rJ85AtFk1o,34385
3
- GANDLF/inference_manager.py,sha256=ncT8HFo46IIpD_mw8i2mmOnMkhvPrWJITfiNQ1uBIco,4048
2
+ GANDLF/config_manager.py,sha256=OzillTYjIzkBE3Xb3jExU1RifIUQqt6PC5HR3Qp-_dk,2340
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=t7zcOVdgu5AhOhY544joxfTNR00ixnXQfQ4GWLk2o6Y,8058
8
- GANDLF/version.py,sha256=Bb4h93p7WC0T4d727du_nd8jFuIOo6zdW1NBqCmjNbE,34
7
+ GANDLF/training_manager.py,sha256=AZlf-fl7KAwZgyre8-0M5lAyma6NvtiGX6XT51AJdxU,11436
8
+ GANDLF/version.py,sha256=ZAXGLHkALqlnbxjHW0NwNNV_mWbVfN8L8YylfTOAhmc,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=55mnId66_-KOWROwPj9OEePENWm58BYFBvn_kWOdil8,15153
15
- GANDLF/cli/generate_metrics.py,sha256=t9Ecr8Vva03JBX_Og70QRnvJtmSXQg1q8YxlyoC_9DY,18981
14
+ GANDLF/cli/deploy.py,sha256=7yPqRox6e5MB-VzHxmA4kt-W5dWwElxDm1mm019jN74,15155
15
+ GANDLF/cli/generate_metrics.py,sha256=TxKJsDHtGBgKc-Fyx4F_tc_CMu5hSsO8xlc5Te86DGk,19973
16
16
  GANDLF/cli/huggingface_hub_handler.py,sha256=vGQYwDiT3Y8yk_xLNkB8DgW1rYpEcwYp0TCdCO5oWTs,4631
17
- GANDLF/cli/main_run.py,sha256=Du14psJsqS2wUe8XkfmdlQQutlNO7RYqoK-VNOslA0I,4488
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=xOpuMrg2jvQ8DDXsdkhS1WcNpCj9XIYyeMt1X89JlUI,128
23
- GANDLF/compute/forward_pass.py,sha256=2W_a9rCfy5TkxUXwerSxqmwARfqZuUQcCyjX6pHMeWw,22465
24
- GANDLF/compute/generic.py,sha256=bqhRC5SQLgIMo62YYxBrDTkMGaZ6pRPR7mjNV5J2T-4,4295
25
- GANDLF/compute/inference_loop.py,sha256=JFh-7c7kiPwO3Qey5973co-wWm2n3gYNhpuDXMzv1DY,15365
26
- GANDLF/compute/loss_and_metric.py,sha256=dWGVPUdl76DBQsaFnrmfxYalBmwsOoOCsgJQGIYQnX8,6689
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=O31kQtQ3LMoOnh6yq1jiV68Yb7yDBMd6B9vvkK8gNUA,24835
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=utmsmxTzyNSOz_E7SNQCxXMjbQ3H9RII-e9iBFALrb8,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=OKhXBrDKAM1YFROnrDy7H_V5Zs2GRkUWzaVkWTVfEu0,3308
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=m-jDpE3EFxj0K4eJN7WUrJMoZkP0htIfoAOeAHXB-q4,2412
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=6A3OQw7DEeuJ_tPYnz4QovnI2sem09taAsq82gPZ6b8,9570
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=tt1xh66FhuYqLCx8qvjwoVZJkyUhQyqRiWDVQxhS7so,887
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=jZauVnYDcavt1PIuxe6UZYfRSdGZe1nlfz3oHbGaJ-w,12248
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=4CK3J0nHk_2zrhkKFki1CIJOeEHOB8yfpp7SdzJY2Kg,3549
107
+ GANDLF/metrics/__init__.py,sha256=k8xcpujpUg22R33keOUNetzrLnGSHsEAmClkFeDHZxc,4470
91
108
  GANDLF/metrics/classification.py,sha256=6rVZjXxHwfJFqw19UiRMYK3uF656QgfMwWDz-LOHUaw,4692
92
- GANDLF/metrics/generic.py,sha256=VnHRvMgKM4M_aOuZ3oYugnK7v_vkaJkH5KS4ns2eRuU,4984
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=W2EBe-NRHNYc7vRZdxnAyKy0SgXQ21F3K3Nzb0EvwE0,2368
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=QpdYdHMsZhwVo9hOqB2FFEXItEu2dEn9cPw6vB5cZwU,1025
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=PJIbBtICuERaXCbK5u7BvEGFTje44FaDkCLpHLltthw,4063
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=kZhlCSD_JLJFFqVRGUEz1CgvENWHqVgc418_fvbQdkk,83347
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=dri2oPKH6VYSqJyEgkjBQP9_jFibbWjmzZwJgHwF8kg,1433
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=y70gA0v8DTNYYCEr8zbc3WB-x2xkZ7VzUvdSznTCTMI,1123
169
+ GANDLF/schedulers/__init__.py,sha256=jMTea7kX7zawFrtjVDKHDLIfBgt7GD-G2z9_eKjI1_A,1320
148
170
  GANDLF/schedulers/wrap_monai.py,sha256=_kP3ArUIFK3x3u0nQV8Gi2oPruMIGGTSZxa4bSygGPs,400
149
171
  GANDLF/schedulers/wrap_torch.py,sha256=NuCAmYMKgYeFzO1PEiHfnFaHpzuQU0DsK5NOi-gVxOo,6746
150
- GANDLF/utils/__init__.py,sha256=yAXxhPgSu0FdUcvocaW2cGSljBwrIjRMjALpJcMWjbY,1677
172
+ GANDLF/utils/__init__.py,sha256=QpNBl-fTrFUDyChAnaidPXdT-pY080pMG9kUTrlJ9OY,1691
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=qetUoX7hfgvwtIkSkOIgaCdcHZIkuT5NR2A0fnJ_PHc,10354
178
+ GANDLF/utils/imaging.py,sha256=FZYtRXMHYUkL_7bzVtwsnrYyrYAm6Hvs5R-tFnEbYkY,15083
157
179
  GANDLF/utils/modelbase.py,sha256=MJ1ufJGQ-ZgfYWTg7o4f-Iz78d7SYiyxN7MT8bnNDaw,950
158
- GANDLF/utils/modelio.py,sha256=tWeTwVTvQy5I5hydxNZz4N8xEU3lHMayMa9gx5-Vr7Q,8016
180
+ GANDLF/utils/modelio.py,sha256=9koLUn3wCODtNOYA2abtxkqxfLgEG07Bhh-NYIrtWOc,8084
159
181
  GANDLF/utils/parameter_processing.py,sha256=DA7ZEsizWWLJZnCxBnDNh1NyA-bw5oirOvodiZZWbIk,5675
182
+ GANDLF/utils/pred_target_processors.py,sha256=aatXJ6jdJaNAHa_tPzHfC1gOQrPYJLtg-cYeUFvkM_s,2701
160
183
  GANDLF/utils/tensor.py,sha256=AOwNTQfw9mnsomGwOF2Q_rdDS1WANlIatB0hhZN0gSg,21504
161
- GANDLF/utils/write_parse.py,sha256=bTBNxIaIGgjusq1mlHA8hioKZ6XmEJWFhfZWAQz2a9I,9197
162
- gandlf-0.1.3.dev20250319.dist-info/LICENSE,sha256=GlZPAfA4eckod8IVayhBXkqCpESXf6cc9BGli_Jwims,11357
163
- gandlf-0.1.3.dev20250319.dist-info/METADATA,sha256=jre8HnA6_GaaUkvo5WtgmBikrNfI36H616f7-kp3z0c,9726
164
- gandlf-0.1.3.dev20250319.dist-info/WHEEL,sha256=beeZ86-EfXScwlR_HKu4SllMC9wUEj_8Z_4FJ3egI2w,91
165
- gandlf-0.1.3.dev20250319.dist-info/entry_points.txt,sha256=agwocNI7Upi-sFDe1rMl71dGN8YhCBB7WJmtBHRF4jg,902
166
- gandlf-0.1.3.dev20250319.dist-info/top_level.txt,sha256=i5D9wEbQhl085_9Lx2m7x-9Zu6nlx1tjYYbuSihG09E,7
167
- gandlf-0.1.3.dev20250319.dist-info/RECORD,,
184
+ GANDLF/utils/write_parse.py,sha256=HROxskhet-uIdUJmz16z_7p9r0mf8hWsqQFygwZ8ap0,9202
185
+ gandlf-0.1.4.dev20250503.dist-info/licenses/LICENSE,sha256=GlZPAfA4eckod8IVayhBXkqCpESXf6cc9BGli_Jwims,11357
186
+ gandlf-0.1.4.dev20250503.dist-info/METADATA,sha256=y7Nz_2o6DcvEYOsUlI-3rMOx26iJZvzLq8owya8Ltsc,9932
187
+ gandlf-0.1.4.dev20250503.dist-info/WHEEL,sha256=7ciDxtlje1X8OhobNuGgi1t-ACdFSelPnSmDPrtlobY,91
188
+ gandlf-0.1.4.dev20250503.dist-info/entry_points.txt,sha256=agwocNI7Upi-sFDe1rMl71dGN8YhCBB7WJmtBHRF4jg,902
189
+ gandlf-0.1.4.dev20250503.dist-info/top_level.txt,sha256=i5D9wEbQhl085_9Lx2m7x-9Zu6nlx1tjYYbuSihG09E,7
190
+ gandlf-0.1.4.dev20250503.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (76.1.0)
2
+ Generator: setuptools (80.2.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5