Did anybody meet this problem when using the baseline model? (ValueError: setting an array element with a sequence. The requested array would exceed the maximum number of dimension of 4.)

Did anybody meet this problem when using the baseline model? (ValueError: setting an array element with a sequence. The requested array would exceed the maximum number of dimension of 4.)  

  By: gpio on Oct. 19, 2024, 11:41 a.m.

Because I meet some problems when using ASAP backend on my Linux, so I use openslide. The preparation and training code works well. But when I implement the inference.ipynb

iterator = create_patch_iterator(image_path=image_path,
                               mask_path=mask_path,
                               patch_configuration=patch_configuration,
                               cpus=4,
                               backend='openslide')

Process ProducerForkProcess-4: Traceback (most recent call last): File "/home/xxj/anaconda3/envs/py38_pytorch2/lib/python3.8/multiprocessing/process.py", line 315, in _bootstrap self.run() File "/home/xxj/anaconda3/envs/py38_pytorch2/lib/python3.8/site-packages/concurrentbuffer/producer.py", line 76, in run buffer_memory.update_buffer(buffer_id=buffer_id, data=data[idx]) File "/home/xxj/anaconda3/envs/py38_pytorch2/lib/python3.8/site-packages/concurrentbuffer/memory.py", line 36, in update_buffer buffer[:] = data[:] ValueError: setting an array element with a sequence. The requested array would exceed the maximum number of dimension of 4.

Re: Did anybody meet this problem when using the baseline model? (ValueError: setting an array element with a sequence. The requested array would exceed the maximum number of dimension of 4.)  

  By: LindaSt on Oct. 25, 2024, 10:11 a.m.

Hi! It seems like the problem is within the wholeslidedata package, so maybe you want to open an issue in their repo? https://github.com/DIAGNijmegen/pathology-whole-slide-data

Otherwise, I suggest you check how the data is specifically loaded into the buffer, as there is most likely a mismatch with the shape it is expecting and what it's getting (maybe another channel or something).

Re: Did anybody meet this problem when using the baseline model? (ValueError: setting an array element with a sequence. The requested array would exceed the maximum number of dimension of 4.)  

  By: anushak00 on Oct. 31, 2024, 10:47 p.m.

Hi,
Just wanted to follow up to ask if you were able to find a work around for this?
Thank you!