Task062_NIHPancreas.py #1249
vincentochs
started this conversation in
General
Replies: 1 comment
-
already fund the answer, thanks anyway ! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello!
I tried to replicate the Task06_NIHPancreas.py
I tried to run it but get the following error:
`python3 Task062_NIHPancreas.py
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 documentation/setting_up_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 documentation/setting_up_paths.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 documentation/setting_up_paths.md for information on how to set this up.
Traceback (most recent call last):
File "/home/vincent.ochs/nn_unet/nnUnetFrame/nnUNet/nnunet/dataset_conversion/Task062_NIHPancreas.py", line 49, in
out_base = join(nnUNet_raw_data, foldername)
File "/home/vincent.ochs/miniconda3/envs/nn_UNet/lib/python3.10/posixpath.py", line 76, in join
a = os.fspath(a)
TypeError: expected str, bytes or os.PathLike object, not NoneType
`
I have this setup of the json:
`from collections import OrderedDict
from nnunet.paths import nnUNet_raw_data
from batchgenerators.utilities.file_and_folder_operations import *
import shutil
from multiprocessing import Pool
import nibabel
def reorient(filename):
img = nibabel.load(filename)
img = nibabel.as_closest_canonical(img)
nibabel.save(img, filename)
if name == "main":
base = "/home/vincent.ochs/nn_unet/Pancreas-CT"
# reorient
p = Pool(8)
results = []
So the only thing I have changed was the "base" path.
Other than that I have donwloaded the dataset with the folder "Pancreas-CT" with the subfolders "data" and "TCIA_pancreas_labels-02-05-2017"
any idea what else I need to specify or what is going wrong?
Thank you very much!
Beta Was this translation helpful? Give feedback.
All reactions