Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions GANDLF/metrics/segmentation_panoptica.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from pathlib import Path
import os

from typing import Optional
import numpy as np
Expand All @@ -19,12 +20,15 @@ def generate_instance_segmentation(
prediction (np.ndarray): The input prediction containing objects.
label_path (str): The path to the reference label.
target (np.ndarray): The input target containing objects.
parameters (dict): The GaNDLF parameters from which panoptica config is to be extracted.
panoptica_config_path (str): The path to the Panoptica configuration file.

Returns:
dict: The evaluation results.
"""

os.environ["PANOPTICA_CITATION_REMINDER"] = "False"

# the parameters dict takes precedence over the panoptica_config_path
evaluator = parameters.get("panoptica_config", None)
if evaluator is None:
Expand Down
2 changes: 1 addition & 1 deletion GANDLF/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
# -*- coding: UTF-8 -*-

# check GaNDLF wiki for versioning and release guidelines: https://github.com/mlcommons/GaNDLF/wiki
__version__ = "0.1.4-dev"
__version__ = "0.1.4"
4 changes: 2 additions & 2 deletions samples/config_all_options.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# affix version
version:
{
minimum: 0.1.4-dev,
maximum: 0.1.4-dev # this should NOT be made a variable, but should be tested after every tag is created
minimum: 0.1.4,
maximum: 0.1.4 # this should NOT be made a variable, but should be tested after every tag is created
}
## Choose the model parameters here
model:
Expand Down
4 changes: 2 additions & 2 deletions samples/config_classification.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# affix version
version:
{
minimum: 0.1.4-dev,
maximum: 0.1.4-dev # this should NOT be made a variable, but should be tested after every tag is created
minimum: 0.1.4,
maximum: 0.1.4 # this should NOT be made a variable, but should be tested after every tag is created
}
# Choose the model parameters here
model:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,6 @@ scheduler:
track_memory_usage: false
verbose: false
version:
maximum: 0.1.4-dev
maximum: 0.1.4
minimum: 0.0.14
weighted_loss: true
2 changes: 1 addition & 1 deletion samples/config_getting_started_classification_rad3d.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,6 @@ scheduler:
track_memory_usage: false
verbose: false
version:
maximum: 0.1.4-dev
maximum: 0.1.4
minimum: 0.0.14
weighted_loss: true
2 changes: 1 addition & 1 deletion samples/config_getting_started_regression_histo2d.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,6 @@ scheduler:
track_memory_usage: false
verbose: false
version:
maximum: 0.1.4-dev
maximum: 0.1.4
minimum: 0.0.14
weighted_loss: true
2 changes: 1 addition & 1 deletion samples/config_getting_started_regression_rad3d.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,6 @@ scheduler:
track_memory_usage: false
verbose: false
version:
maximum: 0.1.4-dev
maximum: 0.1.4
minimum: 0.0.14
weighted_loss: false
2 changes: 1 addition & 1 deletion samples/config_getting_started_segmentation_histo2d.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,6 @@ scheduler:
track_memory_usage: false
verbose: true
version:
maximum: 0.1.4-dev
maximum: 0.1.4
minimum: 0.0.14
weighted_loss: true
4 changes: 2 additions & 2 deletions samples/config_regression.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# affix version
version:
{
minimum: 0.1.4-dev,
maximum: 0.1.4-dev # this should NOT be made a variable, but should be tested after every tag is created
minimum: 0.1.4,
maximum: 0.1.4 # this should NOT be made a variable, but should be tested after every tag is created
}
# Choose the model parameters here
model:
Expand Down
4 changes: 2 additions & 2 deletions samples/config_segmentation_brats.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# affix version
version:
{
minimum: 0.1.4-dev,
maximum: 0.1.4-dev # this should NOT be made a variable, but should be tested after every tag is created
minimum: 0.1.4,
maximum: 0.1.4 # this should NOT be made a variable, but should be tested after every tag is created
}
# Choose the model parameters here
model:
Expand Down
4 changes: 2 additions & 2 deletions samples/config_segmentation_histology.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# affix version
version:
{
minimum: 0.1.4-dev,
maximum: 0.1.4-dev # this should NOT be made a variable, but should be tested after every tag is created
minimum: 0.1.4,
maximum: 0.1.4 # this should NOT be made a variable, but should be tested after every tag is created
}
# Choose the model parameters here
model:
Expand Down
9 changes: 6 additions & 3 deletions samples/config_segmentation_metrics_brats_default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -144,18 +144,21 @@ panoptica_config: !Panoptica_Evaluator
save_group_times: false
segmentation_class_groups: !SegmentationClassGroups
groups:
ed: !LabelGroup
snfh: !LabelGroup
single_instance: false
value_labels: [2]
et: !LabelGroup
single_instance: false
value_labels: [3]
net: !LabelGroup
netc: !LabelGroup
single_instance: false
value_labels: [1]
rc: !LabelGroup
single_instance: false
value_labels: [4]
tc: !LabelMergeGroup
single_instance: false
value_labels: [1, 3]
value_labels: [1, 3, 4]
wt: !LabelMergeGroup
single_instance: false
value_labels: [1, 2, 3, 4]
Expand Down
2 changes: 1 addition & 1 deletion testing/config_classification.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ save_output: false
scaling_factor: 1
scheduler: triangle
version:
maximum: 0.1.4-dev
maximum: 0.1.4
minimum: 0.0.14
weighted_loss: True

2 changes: 1 addition & 1 deletion testing/config_regression.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ save_output: false
scaling_factor: 1
scheduler: triangle
version:
maximum: 0.1.4-dev
maximum: 0.1.4
minimum: 0.0.14
weighted_loss: false

2 changes: 1 addition & 1 deletion testing/config_segmentation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
version:
{
minimum: 0.0.14,
maximum: 0.1.4-dev
maximum: 0.1.4
}
model:
{
Expand Down
Loading