GANDLF 0.1.4.dev20250707__py3-none-any.whl → 0.1.4.dev20250708__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/metrics/segmentation_panoptica.py +10 -15
- GANDLF/version.py +1 -1
- {gandlf-0.1.4.dev20250707.dist-info → gandlf-0.1.4.dev20250708.dist-info}/METADATA +1 -1
- {gandlf-0.1.4.dev20250707.dist-info → gandlf-0.1.4.dev20250708.dist-info}/RECORD +8 -8
- {gandlf-0.1.4.dev20250707.dist-info → gandlf-0.1.4.dev20250708.dist-info}/WHEEL +0 -0
- {gandlf-0.1.4.dev20250707.dist-info → gandlf-0.1.4.dev20250708.dist-info}/entry_points.txt +0 -0
- {gandlf-0.1.4.dev20250707.dist-info → gandlf-0.1.4.dev20250708.dist-info}/licenses/LICENSE +0 -0
- {gandlf-0.1.4.dev20250707.dist-info → gandlf-0.1.4.dev20250708.dist-info}/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
from pathlib import Path
|
|
2
|
-
import tempfile
|
|
3
2
|
|
|
3
|
+
from typing import Optional
|
|
4
4
|
import numpy as np
|
|
5
5
|
|
|
6
6
|
from panoptica import Panoptica_Evaluator
|
|
@@ -9,8 +9,8 @@ from panoptica import Panoptica_Evaluator
|
|
|
9
9
|
def generate_instance_segmentation(
|
|
10
10
|
prediction: np.ndarray,
|
|
11
11
|
target: np.ndarray,
|
|
12
|
-
parameters: dict
|
|
13
|
-
panoptica_config_path: str = None,
|
|
12
|
+
parameters: dict,
|
|
13
|
+
panoptica_config_path: Optional[str] = None,
|
|
14
14
|
) -> dict:
|
|
15
15
|
"""
|
|
16
16
|
Evaluate a single exam using Panoptica.
|
|
@@ -25,23 +25,18 @@ def generate_instance_segmentation(
|
|
|
25
25
|
dict: The evaluation results.
|
|
26
26
|
"""
|
|
27
27
|
|
|
28
|
-
cwd = Path(__file__).parent.absolute()
|
|
29
28
|
# the parameters dict takes precedence over the panoptica_config_path
|
|
30
|
-
|
|
31
|
-
if
|
|
29
|
+
evaluator = parameters.get("panoptica_config", None)
|
|
30
|
+
if evaluator is None:
|
|
31
|
+
cwd = Path(__file__).parent.absolute()
|
|
32
32
|
panoptica_config_path = (
|
|
33
|
-
cwd / "panoptica_config_brats.yaml"
|
|
33
|
+
str(cwd / "panoptica_config_brats.yaml")
|
|
34
34
|
if panoptica_config_path is None
|
|
35
35
|
else panoptica_config_path
|
|
36
36
|
)
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
mode="w", delete=False, suffix=".yaml"
|
|
41
|
-
).name
|
|
42
|
-
with open(panoptica_config_path, "w") as f:
|
|
43
|
-
f.write(panoptica_config)
|
|
44
|
-
evaluator = Panoptica_Evaluator.load_from_config(panoptica_config_path)
|
|
37
|
+
evaluator = Panoptica_Evaluator.load_from_config(panoptica_config_path)
|
|
38
|
+
|
|
39
|
+
assert evaluator is not None, "Panoptica evaluator could not be initialized."
|
|
45
40
|
|
|
46
41
|
# call evaluate
|
|
47
42
|
group2result = evaluator.evaluate(prediction_arr=prediction, reference_arr=target)
|
GANDLF/version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "0.1.4-
|
|
1
|
+
__version__ = "0.1.4-dev20250708"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: GANDLF
|
|
3
|
-
Version: 0.1.4.
|
|
3
|
+
Version: 0.1.4.dev20250708
|
|
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
|
|
@@ -5,7 +5,7 @@ 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
7
|
GANDLF/training_manager.py,sha256=AZlf-fl7KAwZgyre8-0M5lAyma6NvtiGX6XT51AJdxU,11436
|
|
8
|
-
GANDLF/version.py,sha256=
|
|
8
|
+
GANDLF/version.py,sha256=Vp_tNj87oFMUfhq8bFWjKKyDLtA1MUtjZq0tQppA5Vk,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
|
|
@@ -111,7 +111,7 @@ GANDLF/metrics/metric_calculators.py,sha256=c-NAl84yniTWjMKePBlf0TsCIJnYHODplt8H
|
|
|
111
111
|
GANDLF/metrics/panoptica_config_brats.yaml,sha256=mTGSQuJoENuy84gZd2tHV0Dfl7GX5nIeE_46q5Vczx4,2685
|
|
112
112
|
GANDLF/metrics/regression.py,sha256=Ca58jo9OL1GdjB2ZvQCcrKWz9F67iY5rcbnQxT-LpcU,4584
|
|
113
113
|
GANDLF/metrics/segmentation.py,sha256=zqWEI6LuphFM0Nsm0sG2XeqAxpNJnoK1Z9q4FJt58c8,25645
|
|
114
|
-
GANDLF/metrics/segmentation_panoptica.py,sha256=
|
|
114
|
+
GANDLF/metrics/segmentation_panoptica.py,sha256=fr9FDlXWXj0hesl6Fz_8EGyDgLvFUoHoCACjk3H3V3k,1434
|
|
115
115
|
GANDLF/metrics/synthesis.py,sha256=IfYit-R0O5ZUfmsWfLD6BqcLjjoEiotx0lUdsXWlbao,6730
|
|
116
116
|
GANDLF/models/MSDNet.py,sha256=mzBkw_kQigSDTxaR7tojhdI4ECIQ65i_qiCrNaZmBHI,3442
|
|
117
117
|
GANDLF/models/__init__.py,sha256=3SwskWonRW1AduPe6CYQWucU8ZBkkfJUpEF34I0NWP0,4286
|
|
@@ -182,9 +182,9 @@ GANDLF/utils/parameter_processing.py,sha256=DA7ZEsizWWLJZnCxBnDNh1NyA-bw5oirOvod
|
|
|
182
182
|
GANDLF/utils/pred_target_processors.py,sha256=aatXJ6jdJaNAHa_tPzHfC1gOQrPYJLtg-cYeUFvkM_s,2701
|
|
183
183
|
GANDLF/utils/tensor.py,sha256=AOwNTQfw9mnsomGwOF2Q_rdDS1WANlIatB0hhZN0gSg,21504
|
|
184
184
|
GANDLF/utils/write_parse.py,sha256=HROxskhet-uIdUJmz16z_7p9r0mf8hWsqQFygwZ8ap0,9202
|
|
185
|
-
gandlf-0.1.4.
|
|
186
|
-
gandlf-0.1.4.
|
|
187
|
-
gandlf-0.1.4.
|
|
188
|
-
gandlf-0.1.4.
|
|
189
|
-
gandlf-0.1.4.
|
|
190
|
-
gandlf-0.1.4.
|
|
185
|
+
gandlf-0.1.4.dev20250708.dist-info/licenses/LICENSE,sha256=GlZPAfA4eckod8IVayhBXkqCpESXf6cc9BGli_Jwims,11357
|
|
186
|
+
gandlf-0.1.4.dev20250708.dist-info/METADATA,sha256=ZiyoehdFd6nJ77jG_UXPG519t_rnNdupcTyR08H8wBs,9904
|
|
187
|
+
gandlf-0.1.4.dev20250708.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
188
|
+
gandlf-0.1.4.dev20250708.dist-info/entry_points.txt,sha256=agwocNI7Upi-sFDe1rMl71dGN8YhCBB7WJmtBHRF4jg,902
|
|
189
|
+
gandlf-0.1.4.dev20250708.dist-info/top_level.txt,sha256=i5D9wEbQhl085_9Lx2m7x-9Zu6nlx1tjYYbuSihG09E,7
|
|
190
|
+
gandlf-0.1.4.dev20250708.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|