Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LIDC experiment preprocessing: target shape error #5

Open
tiulpin opened this issue May 5, 2020 · 0 comments
Open

LIDC experiment preprocessing: target shape error #5

tiulpin opened this issue May 5, 2020 · 0 comments

Comments

@tiulpin
Copy link

tiulpin commented May 5, 2020

I tried to run preprocessing.py for LIDC experiment and got the following error:

...
processing 0335a with GT(s) single_annotator and merged, spacing (0.71484375, 0.71484375, 1.0) and img shape (300, 512, 512).
multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
  File "preprocessing.py", line 63, in resample_array
    assert target_shape[i] > 0
AssertionError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.6/multiprocessing/pool.py", line 119, in worker
    result = (True, func(*args, **kwds))
  File "/usr/lib/python3.6/multiprocessing/pool.py", line 44, in mapstar
    return list(map(*args))
  File "preprocessing.py", line 394, in pp_patient
    img_arr = resample_array(img_arr, img.GetSpacing(), self.cf.target_spacing)
  File "preprocessing.py", line 65, in resample_array
    raise AssertionError("AssertionError:", src_imgs.shape, src_spacing, target_spacing)
AssertionError: ('AssertionError:', (1, 512, 512), array([ 2., 30.,  1.]), (0.7, 0.7, 1.25))
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "preprocessing.py", line 470, in <module>
    pp.iterate_patients(processes=8)
  File "preprocessing.py", line 412, in iterate_patients
    pool.map(self.pp_patient, self.paths, chunksize=1)
  File "/usr/lib/python3.6/multiprocessing/pool.py", line 266, in map
    return self._map_async(func, iterable, mapstar, chunksize).get()
  File "/usr/lib/python3.6/multiprocessing/pool.py", line 644, in get
    raise self._value
AssertionError: ('AssertionError:', (1, 512, 512), array([ 2., 30.,  1.]), (0.7, 0.7, 1.25))

Got preprocessed data with https://github.com/MIC-DKFZ/LIDC-IDRI-processing/tree/v1.0.1.

What am I doing wrong?

@tiulpin tiulpin changed the title LIDC experiment preprocessing run target shape error LIDC experiment preprocessing: target shape error May 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant