From 34c2381025853fae932b1e533f9fc44287f5ed64 Mon Sep 17 00:00:00 2001 From: aecelaya Date: Sun, 25 Feb 2024 20:58:55 -0600 Subject: [PATCH] Minor bug fix in preprocessor.py --- PyTorch/Segmentation/nnUNet/data_preprocessing/preprocessor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PyTorch/Segmentation/nnUNet/data_preprocessing/preprocessor.py b/PyTorch/Segmentation/nnUNet/data_preprocessing/preprocessor.py index 898135898..f780f5185 100644 --- a/PyTorch/Segmentation/nnUNet/data_preprocessing/preprocessor.py +++ b/PyTorch/Segmentation/nnUNet/data_preprocessing/preprocessor.py @@ -217,7 +217,7 @@ def collect_spacings(self): spacing = np.array(spacing) target_spacing = np.median(spacing, axis=0) if max(target_spacing) / min(target_spacing) >= 3: - lowres_axis = np.argmin(target_spacing) + lowres_axis = np.argmax(target_spacing) target_spacing[lowres_axis] = np.percentile(spacing[:, lowres_axis], 10) self.target_spacing = list(target_spacing)