nnUNet icon indicating copy to clipboard operation
nnUNet copied to clipboard

Strange problem with preprocessing

Open JesseZZZZZ opened this issue 10 months ago • 2 comments

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: image 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!

JesseZZZZZ avatar Apr 09 '24 16:04 JesseZZZZZ

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

constantinulrich avatar Apr 10 '24 10:04 constantinulrich

Did this help? Can i close the issue?

constantinulrich avatar Apr 26 '24 08:04 constantinulrich