MIC-DKFZ / batchgenerators

A framework for data augmentation for 2D and 3D image classification and segmentation
Apache License 2.0
1.09k stars 221 forks source link

Incompatible with nnU-Net? #109

Closed stevenkboyd closed 1 year ago

stevenkboyd commented 1 year ago

Apologies if I'm missing something obvious, but it seems the latest version of batch generators will not import MultiThreadedAugmenter when running the nnU-Net. I'm running this on ubuntu. Please see error below:

(base) ubuntu@nnunet-ubuntu-01:~$ conda activate nnunet (nnunet) ubuntu@nnunet-ubuntu-01:~$ nnUNet_train -h

Please cite the following paper when using nnUNet:

Isensee, F., Jaeger, P.F., Kohl, S.A.A. et al. "nnU-Net: a self-configuring method for deep learning-based biomedical image segmentation." Nat Methods (2020). https://doi.org/10.1038/s41592-020-01008-z

If you have questions or suggestions, feel free to open an issue at https://github.com/MIC-DKFZ/nnUNet

nnUNet_raw_data_base is not defined and nnU-Net can only be used on data for which preprocessed files are already present on your system. nnU-Net cannot be used for experiment planning and preprocessing like this. If this is not intended, please read nnunet/paths.md for information on how to set this up properly. nnUNet_preprocessed is not defined and nnU-Net can not be used for preprocessing or training. If this is not intended, please read nnunet/pathy.md for information on how to set this up. RESULTS_FOLDER is not defined and nnU-Net cannot be used for training or inference. If this is not intended behavior, please read nnunet/paths.md for information on how to set this up Traceback (most recent call last): File "/home/ubuntu/.local/bin/nnUNet_train", line 11, in load_entry_point('nnunet', 'console_scripts', 'nnUNet_train')() File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 490, in load_entry_point return get_distribution(dist).load_entry_point(group, name) File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 2854, in load_entry_point return ep.load() File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 2445, in load return self.resolve() File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 2451, in resolve module = import(self.module_name, fromlist=['name'], level=0) File "/home/ubuntu/.local/lib/python3.8/site-packages/nnunet/run/run_training.py", line 18, in from nnunet.run.default_configuration import get_default_configuration File "/home/ubuntu/.local/lib/python3.8/site-packages/nnunet/run/default_configuration.py", line 20, in from nnunet.training.model_restore import recursive_find_python_class File "/home/ubuntu/.local/lib/python3.8/site-packages/nnunet/training/model_restore.py", line 20, in from nnunet.training.network_training.nnUNetTrainer import nnUNetTrainer File "/home/ubuntu/.local/lib/python3.8/site-packages/nnunet/training/network_training/nnUNetTrainer.py", line 34, in from nnunet.training.data_augmentation.default_data_augmentation import default_3D_augmentation_params, \ File "/home/ubuntu/.local/lib/python3.8/site-packages/nnunet/training/data_augmentation/default_data_augmentation.py", line 19, in from batchgenerators.dataloading import MultiThreadedAugmenter ImportError: cannot import name 'MultiThreadedAugmenter' from 'batchgenerators.dataloading' (/home/ubuntu/.local/lib/python3.8/site-packages/batchgenerators/dataloading/init.py) (nnunet) ubuntu@nnunet-ubuntu-01:~$ conda list batchgenerators

packages in environment at /data/shared/skboyd/software/miniconda3/envs/nnunet:

#

Name Version Build Channel

batchgenerators 0.24 dev_0 (nnunet) ubuntu@nnunet-ubuntu-01:~$ uname -a Linux nnunet-ubuntu-01 3.10.0-1160.el7.x86_64 #1 SMP Mon Oct 19 16:18:59 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

stevenkboyd commented 1 year ago

Disregard.