Skip to content

Commit

Permalink
Merge branch 'dev' into Add_dice_ce_metric
Browse files Browse the repository at this point in the history
  • Loading branch information
wyli authored Jul 12, 2023
2 parents 966c99a + 48a86b2 commit 1a4b133
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions docs/source/data.rst
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,10 @@ PILReader
.. autoclass:: PILReader
:members:

NrrdReader
~~~~~~~~~~
.. autoclass:: NrrdReader
:members:

Image writer
------------
Expand Down
2 changes: 1 addition & 1 deletion monai/apps/auto3dseg/bundle_gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def __init__(self, template_path: PathLike):
"n_devices": int(torch.cuda.device_count()),
"NUM_NODES": int(os.environ.get("NUM_NODES", 1)),
"MN_START_METHOD": os.environ.get("MN_START_METHOD", "bcprun"),
"CMD_PREFIX": os.environ.get("CMD_PREFIX", ""), # type: ignore
"CMD_PREFIX": os.environ.get("CMD_PREFIX", ""),
}

def pre_check_skip_algo(self, skip_bundlegen: bool = False, skip_info: str = "") -> tuple[bool, str]:
Expand Down
2 changes: 1 addition & 1 deletion monai/apps/auto3dseg/ensemble_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ def __init__(
"n_devices": torch.cuda.device_count(),
"NUM_NODES": int(os.environ.get("NUM_NODES", 1)),
"MN_START_METHOD": os.environ.get("MN_START_METHOD", "bcprun"),
"CMD_PREFIX": os.environ.get("CMD_PREFIX", ""), # type: ignore
"CMD_PREFIX": os.environ.get("CMD_PREFIX", ""),
}

def set_ensemble_method(self, ensemble_method_name: str = "AlgoEnsembleBestByFold", **kwargs: Any) -> None:
Expand Down
2 changes: 1 addition & 1 deletion monai/metrics/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ def get_mask_edges(
spatial_dims = len(spacing)
conv = torch.nn.functional.conv3d if spatial_dims == 3 else torch.nn.functional.conv2d
vol = torch.stack([seg_pred[None], seg_gt[None]], dim=0).float() # type: ignore
code_pred, code_gt = conv(vol, k.to(vol)) # type: ignore
code_pred, code_gt = conv(vol, k.to(vol))
# edges
all_ones = len(code_to_area_table) - 1
edges_pred = (code_pred != 0) & (code_pred != all_ones)
Expand Down

0 comments on commit 1a4b133

Please sign in to comment.