first of all thanks for the great work and repository. I ran into a following issue:
When i am calling the inference_helper_optimized.py i am getting the followwing issue:
Traceback (most recent call last):
File "/home/reich/Coding/woundambit/src/main/medseg/tools/inference/inference_helper_optimized.py", line 316, in <module>
inference.run_inference()
File "/home/reich/Coding/woundambit/src/main/medseg/tools/inference/inference_helper_optimized.py", line 180, in run_inference
for _, (img_tensors, image_names, original_sizes, paddings) in enumerate(self.dataloader):
File "/home/reich/anaconda3/envs/woundambit/lib/python3.11/site-packages/torch/utils/data/dataloader.py", line 633, in __next__
data = self._next_data()
^^^^^^^^^^^^^^^^^
File "/home/reich/anaconda3/envs/woundambit/lib/python3.11/site-packages/torch/utils/data/dataloader.py", line 1345, in _next_data
return self._process_data(data)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/reich/anaconda3/envs/woundambit/lib/python3.11/site-packages/torch/utils/data/dataloader.py", line 1371, in _process_data
data.reraise()
File "/home/reich/anaconda3/envs/woundambit/lib/python3.11/site-packages/torch/_utils.py", line 644, in reraise
raise exception
TypeError: Caught TypeError in DataLoader worker process 0.
Original Traceback (most recent call last):
File "/home/reich/anaconda3/envs/woundambit/lib/python3.11/site-packages/torch/utils/data/_utils/worker.py", line 308, in _worker_loop
data = fetcher.fetch(index)
^^^^^^^^^^^^^^^^^^^^
File "/home/reich/anaconda3/envs/woundambit/lib/python3.11/site-packages/torch/utils/data/_utils/fetch.py", line 54, in fetch
return self.collate_fn(data)
^^^^^^^^^^^^^^^^^^^^^
File "/home/reich/anaconda3/envs/woundambit/lib/python3.11/site-packages/torch/utils/data/_utils/collate.py", line 265, in default_collate
return collate(batch, collate_fn_map=default_collate_fn_map)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/reich/anaconda3/envs/woundambit/lib/python3.11/site-packages/torch/utils/data/_utils/collate.py", line 142, in collate
return [collate(samples, collate_fn_map=collate_fn_map) for samples in transposed] # Backwards compatibility.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/reich/anaconda3/envs/woundambit/lib/python3.11/site-packages/torch/utils/data/_utils/collate.py", line 142, in <listcomp>
return [collate(samples, collate_fn_map=collate_fn_map) for samples in transposed] # Backwards compatibility.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/reich/anaconda3/envs/woundambit/lib/python3.11/site-packages/torch/utils/data/_utils/collate.py", line 150, in collate
raise TypeError(default_collate_err_msg_format.format(elem_type))
TypeError: default_collate: batch must contain tensors, numpy arrays, numbers, dicts or lists; found <class 'NoneType'>
Hello together,
first of all thanks for the great work and repository. I ran into a following issue:
When i am calling the inference_helper_optimized.py i am getting the followwing issue:
I am Using an Ubuntu-24.04 WSL Setup and solved the Issue via a Change in the getitem() function:
padding =(0, 0, 0, 0)
None