From 58f401bd7478daa58bc540a26f96b5eb47e10417 Mon Sep 17 00:00:00 2001 From: eolika Date: Wed, 6 Mar 2024 23:59:21 +0300 Subject: [PATCH] add 3d_fullres_no_resampling --- .../default_experiment_planner.py | 24 ++++++++++--------- scripts/del_npy.ipynb | 5 ++-- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/nnunetv2/experiment_planning/experiment_planners/default_experiment_planner.py b/nnunetv2/experiment_planning/experiment_planners/default_experiment_planner.py index a79a1d4b4..cc2085e90 100644 --- a/nnunetv2/experiment_planning/experiment_planners/default_experiment_planner.py +++ b/nnunetv2/experiment_planning/experiment_planners/default_experiment_planner.py @@ -538,17 +538,25 @@ def plan_experiment(self): 'previous_stage': '3d_lowres' } - plans['configurations']['3d_fullres_mosaic_spacing'] = { + plans['configurations']['3d_fullres_no_resampling'] = { 'inherits_from': '3d_fullres', + "resampling_fn_data": "no_resampling_data_or_seg_to_shape", + "resampling_fn_seg": "no_resampling_data_or_seg_to_shape", + "resampling_fn_probabilities": "no_resampling_data_or_seg_to_shape", + "data_identifier": "3d_fullres_no_resampling" + } + + plans['configurations']['3d_fullres_mosaic_spacing_NoRsmp'] = { + 'inherits_from': '3d_fullres_no_resampling', "spacing": [1.0, 1.0, 1.0], - "data_identifier": "3d_fullres_mosaic_spacing" + "data_identifier": "3d_fullres_mosaic_spacing_NoRsmp" } print('3D fullres Mosaic spacing U-Net configuration:') - print(plans['configurations']['3d_fullres_mosaic_spacing']) + print(plans['configurations']['3d_fullres_mosaic_spacing_NoRsmp']) print() plans['configurations']['3d_fullres_mosaic_arch2_NoRsmp'] = { - 'inherits_from': '3d_fullres', + 'inherits_from': '3d_fullres_no_resampling', 'batch_size': 2, "spacing": [1.0, 1.0, 1.0], "patch_size": [192, 192, 192], @@ -575,10 +583,7 @@ def plan_experiment(self): "unet_max_num_features": 320, "normalization_schemes": ["CTNormalization"], "batch_dice": False, - "resampling_fn_data": "no_resampling_data_or_seg_to_shape", - "resampling_fn_seg": "no_resampling_data_or_seg_to_shape", - "resampling_fn_probabilities": "no_resampling_data_or_seg_to_shape", - "data_identifier": "3d_fullres_mosaic_arch2" + "data_identifier": "3d_fullres_mosaic_arch2_NoRsmp" } print('3D fullres Mosaic ARCH2 U-Net configuration:') print(plans['configurations']['3d_fullres_mosaic_arch2_NoRsmp']) @@ -604,9 +609,6 @@ def plan_experiment(self): 1, 1 ], - "resampling_fn_data": "no_resampling_data_or_seg_to_shape", - "resampling_fn_seg": "no_resampling_data_or_seg_to_shape", - "resampling_fn_probabilities": "no_resampling_data_or_seg_to_shape", "data_identifier": "3d_fullres_mosaic_resenc_NoRsmp" } diff --git a/scripts/del_npy.ipynb b/scripts/del_npy.ipynb index 64f1b234f..7aa697e99 100755 --- a/scripts/del_npy.ipynb +++ b/scripts/del_npy.ipynb @@ -2,14 +2,13 @@ "cells": [ { "cell_type": "code", - "execution_count": 1, + "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "import os\n", "\n", - "dir = \"/media/eolika/49755d50-5426-4672-87cc-2d1a5a3747ad/nnUNet/nnUNet_preprocessed/Dataset101_mosaic_skeleton/3d_fullres_mosaic_spacing\"\n", - "\n", + "dir = \"/media/eolika/49755d50-5426-4672-87cc-2d1a5a3747ad/nnUNet/nnUNet_preprocessed/Dataset101_mosaic_skeleton/3d_fullres_mosaic_resenc_NoRsmp\"\n", "files = os.listdir(dir)\n", "\n", "for file in files:\n",