From 9a83a2ed5b822c2a1c6c6076ac5e7db2e356bdda Mon Sep 17 00:00:00 2001 From: "Wald, Tassilo" Date: Wed, 11 Oct 2023 14:44:34 +0200 Subject: [PATCH] Fix id assumption --- nnunetv2/training/dataloading/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nnunetv2/training/dataloading/utils.py b/nnunetv2/training/dataloading/utils.py index 55cdb8bf6..f78208b5e 100644 --- a/nnunetv2/training/dataloading/utils.py +++ b/nnunetv2/training/dataloading/utils.py @@ -22,7 +22,7 @@ def find_broken_image_and_labels( :returns: Tuple of a set containing the case ids of the broken npy images and a set of the case ids of broken npy segmentations. """ content = os.listdir(path_to_data_dir) - unique_ids = [c.split("_")[0] for c in content if c.endswith("_seg.npy")] + unique_ids = [c[:-4] for c in content if c.endswith(".npz")] failed_data_ids = set() failed_seg_ids = set() for unique_id in unique_ids: