MIC-DKFZ / nnUNet

Apache License 2.0
5.34k stars 1.63k forks source link

Problem with preprocessing #2007

Open EastChen2 opened 3 months ago

EastChen2 commented 3 months ago

when I run: nnUNet_plan_and_preprocess -t 515 --verify_dataset_integrity It says: Task515_Mytask number of threads: (8, 8)

Are we using the nonzero mask for normalization? OrderedDict([(0, False)]) Traceback (most recent call last): File "\?\D:\Segmentation\venv\Scripts\nnUNet_plan_and_preprocess-script.py", line 33, in sys.exit(load_entry_point('nnunet', 'console_scripts', 'nnUNet_plan_and_preprocess')()) File "d:\segmentation\nnunet\nnunet\experiment_planning\nnUNet_plan_and_preprocess.py", line 159, in main exp_planner.plan_experiment() File "d:\segmentation\nnunet\nnunet\experiment_planning\experiment_planner_baseline_3DUNet.py", line 257, in plan_experiment target_spacing = self.get_target_spacing() File "d:\segmentation\nnunet\nnunet\experiment_planning\experiment_planner_baseline_3DUNet_v21.py", line 51, in get_target_spacing target = np.percentile(np.vstack(spacings), self.target_spacing_percentile, 0) File "D:\Segmentation\venv\lib\site-packages\numpy\core\shape_base.py", line 290, in vstack return _nx.concatenate(arrs, 0, dtype=dtype, casting=casting) ValueError: need at least one array to concatenate

I thought the problem is the mask has no voxel spacing. But I can read it by nibeal: Voxel spacing: (1.0, 1.0, 1.0)

So I dont know where the problem is.

EastChen2 commented 3 months ago

the content in dataset_properties.pkl = {'all_sizes': [], 'all_spacings': [], 'all_classes': [1, 2, 3, 4, 5, 6], 'modalities': {0: 'CT'}, 'intensityproperties': OrderedDict([(0, OrderedDict([('local_props', OrderedDict()), ('median', nan), ('mean', nan), ('sd', nan), ('mn', nan), ('mx', nan), ('percentile_99_5', nan), ('percentile_00_5', nan)]))]), 'size_reductions': OrderedDict()} So I think there must be some problems about generating this file.

dojoh commented 1 month ago

did you resolve the problem by now? to me it looks like there is a problem with the data. with nibeal, do you mean nibabel? as everthing in the dataset_properties.pkl file is set to nan I believe that no data was found. are all the paths set correctly?

865979216 commented 1 week ago

I have encountered the same problem. Have you resolved it