ge-xing / Diff-UNet

Diff-UNet: A Diffusion Embedded Network for Volumetric Segmentation. (using diffusion for 3D medical image segmentation)
Apache License 2.0
139 stars 19 forks source link

testing problem in Diff-UNet-main\BraTS2020\dataset\brats_data_utils_multi_label.py #36

Open lad02837 opened 1 month ago

lad02837 commented 1 month ago

Hello, I tested the model after training, but I encountered a error stating that "maximum recursion depth exceeded while calling a Python object". 屏幕截图 2024-05-11 143043 屏幕截图 2024-05-11 143117 Could you help me with the problem? Thanks a lot!

ge-xing commented 1 month ago

You can check your dataset path and see why the data loading process is wrong.

lad02837 commented 1 month ago

thank you! I have solved the problem. But there is another problem when testing BTCV dataset: Runtime Error: Expected all tensors to be on the same device,but found at least two devices, cuda:0 and cpu! In the code, I only modified num_gpus to 1(since I have only 1), why there are two devices?

ge-xing commented 1 month ago

You need to ensure that your monai and my monai have the same version. Monai is a python package for medical image processing.