nnUNet
nnUNet copied to clipboard
Strange problem with preprocessing
Hi! This is the problem I face:
Traceback (most recent call last):
File "/usr/lib/python3.11/multiprocessing/pool.py", line 125, in worker
result = (True, func(*args, **kwds))
^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/multiprocessing/pool.py", line 51, in starmapstar
return list(itertools.starmap(args[0], args[1]))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/hy-tmp/nnUNet/nnunetv2/experiment_planning/dataset_fingerprint/fingerprint_extractor.py", line 86, in analyze_case
images, properties_images = rw.read_images(image_files)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/hy-tmp/nnUNet/nnunetv2/imageio/simpleitk_reader_writer.py", line 106, in read_images
stacked_images = np.vstack(images)
^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/numpy/core/shape_base.py", line 289, in vstack
return _nx.concatenate(arrs, 0, dtype=dtype, casting=casting)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: need at least one array to concatenate
Considering that this error appears when function "analyze_case", I used this measure trying to handle it:
The strange thing is, the error still appears but no "bug" was printed... Is this a problem about multi-processing? I'm not familiar with multi-processing, so can anyone help me? THX!
Hi, try "except ValueError".
But the error trace is already quite expressive. It seems that you dont read any images. I would recommend to check the filepaths.
Best Constantin
Did this help? Can i close the issue?