Hi Lukas,
I got another error when I tried running segmentation:
Thank you!
This is the log:
root@3d0c86b2bed5:/workspace/trustworthy-ai-fetal-brain-segmentation# python run_segment.py --input '/data/te80-15t-iFIND00134_T2-brain_SVR-output.nii.gz' --mask '/data/te80-15t-iFIND00134_T2-brain_SVR-output-mask-brain_bet-2.nii.gz' --output_folder '/data/pw' --ga 28 --condition 'Neurotypical' --bfc > /data/log.txt
Traceback (most recent call last):
File "/opt/conda/lib/python3.8/site-packages/pkg_resources/init.py", line 568, in _build_master
ws.require(requires)
File "/opt/conda/lib/python3.8/site-packages/pkg_resources/init.py", line 886, in require
needed = self.resolve(parse_requirements(requirements))
File "/opt/conda/lib/python3.8/site-packages/pkg_resources/init.py", line 777, in resolve
raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (scipy 1.6.3 (/opt/conda/lib/python3.8/site-packages), Requirement.parse('scipy<1.9.2,>=1.8; python_version <= "3.9"'), {'scikit-image'})
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/conda/bin/nnUNet_predict", line 33, in
sys.exit(load_entry_point('nnunet', 'console_scripts', 'nnUNet_predict')())
File "/opt/conda/bin/nnUNet_predict", line 25, in importlib_load_entry_point
return next(matches).load()
File "/opt/conda/lib/python3.8/importlib/metadata.py", line 77, in load
module = import_module(match.group('module'))
File "/opt/conda/lib/python3.8/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 975, in _find_and_load_unlocked
File "", line 671, in _load_unlocked
File "", line 848, in exec_module
File "", line 219, in _call_with_frames_removed
File "/workspace/third-party/nnUNet/nnunet/inference/predict_simple.py", line 17, in
import torch
File "/opt/conda/lib/python3.8/site-packages/torch/init.py", line 29, in
from .torch_version import version as version
File "/opt/conda/lib/python3.8/site-packages/torch/torch_version.py", line 4, in
from pkg_resources import packaging # type: ignore[attr-defined]
File "/opt/conda/lib/python3.8/site-packages/pkg_resources/init.py", line 3243, in
def _initialize_master_working_set():
File "/opt/conda/lib/python3.8/site-packages/pkg_resources/init.py", line 3226, in _call_aside
f(*args, **kwargs)
File "/opt/conda/lib/python3.8/site-packages/pkg_resources/init.py", line 3255, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File "/opt/conda/lib/python3.8/site-packages/pkg_resources/init.py", line 570, in _build_master
return cls._build_from_requirements(requires)
File "/opt/conda/lib/python3.8/site-packages/pkg_resources/init.py", line 583, in _build_from_requirements
dists = ws.resolve(reqs, Environment())
File "/opt/conda/lib/python3.8/site-packages/pkg_resources/init.py", line 777, in resolve
raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (scipy 1.6.3 (/opt/conda/lib/python3.8/site-packages), Requirement.parse('scipy<1.9.2,>=1.8; python_version <= "3.9"'), {'scikit-image'})
Traceback (most recent call last):
File "/opt/conda/lib/python3.8/site-packages/pkg_resources/init.py", line 568, in _build_master
ws.require(requires)
File "/opt/conda/lib/python3.8/site-packages/pkg_resources/init.py", line 886, in require
needed = self.resolve(parse_requirements(requirements))
File "/opt/conda/lib/python3.8/site-packages/pkg_resources/init.py", line 777, in resolve
raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (scipy 1.6.3 (/opt/conda/lib/python3.8/site-packages), Requirement.parse('scipy<1.9.2,>=1.8; python_version <= "3.9"'), {'scikit-image'})
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/conda/bin/nnUNet_predict", line 33, in
sys.exit(load_entry_point('nnunet', 'console_scripts', 'nnUNet_predict')())
File "/opt/conda/bin/nnUNet_predict", line 25, in importlib_load_entry_point
return next(matches).load()
File "/opt/conda/lib/python3.8/importlib/metadata.py", line 77, in load
module = import_module(match.group('module'))
File "/opt/conda/lib/python3.8/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 975, in _find_and_load_unlocked
File "", line 671, in _load_unlocked
File "", line 848, in exec_module
File "", line 219, in _call_with_frames_removed
File "/workspace/third-party/nnUNet/nnunet/inference/predict_simple.py", line 17, in
import torch
File "/opt/conda/lib/python3.8/site-packages/torch/init.py", line 29, in
from .torch_version import version as version
File "/opt/conda/lib/python3.8/site-packages/torch/torch_version.py", line 4, in
from pkg_resources import packaging # type: ignore[attr-defined]
File "/opt/conda/lib/python3.8/site-packages/pkg_resources/init.py", line 3243, in
def _initialize_master_working_set():
File "/opt/conda/lib/python3.8/site-packages/pkg_resources/init.py", line 3226, in _call_aside
f(*args, **kwargs)
File "/opt/conda/lib/python3.8/site-packages/pkg_resources/init.py", line 3255, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File "/opt/conda/lib/python3.8/site-packages/pkg_resources/init.py", line 570, in _build_master
return cls._build_from_requirements(requires)
File "/opt/conda/lib/python3.8/site-packages/pkg_resources/init.py", line 583, in _build_from_requirements
dists = ws.resolve(reqs, Environment())
File "/opt/conda/lib/python3.8/site-packages/pkg_resources/init.py", line 777, in resolve
raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (scipy 1.6.3 (/opt/conda/lib/python3.8/site-packages), Requirement.parse('scipy<1.9.2,>=1.8; python_version <= "3.9"'), {'scikit-image'})
Traceback (most recent call last):
File "/opt/conda/lib/python3.8/site-packages/pkg_resources/init.py", line 568, in _build_master
ws.require(requires)
File "/opt/conda/lib/python3.8/site-packages/pkg_resources/init.py", line 886, in require
needed = self.resolve(parse_requirements(requirements))
File "/opt/conda/lib/python3.8/site-packages/pkg_resources/init.py", line 777, in resolve
raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (scipy 1.6.3 (/opt/conda/lib/python3.8/site-packages), Requirement.parse('scipy<1.9.2,>=1.8; python_version <= "3.9"'), {'scikit-image'})
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/conda/bin/nnUNet_predict", line 33, in
sys.exit(load_entry_point('nnunet', 'console_scripts', 'nnUNet_predict')())
File "/opt/conda/bin/nnUNet_predict", line 25, in importlib_load_entry_point
return next(matches).load()
File "/opt/conda/lib/python3.8/importlib/metadata.py", line 77, in load
module = import_module(match.group('module'))
File "/opt/conda/lib/python3.8/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 975, in _find_and_load_unlocked
File "", line 671, in _load_unlocked
File "", line 848, in exec_module
File "", line 219, in _call_with_frames_removed
File "/workspace/third-party/nnUNet/nnunet/inference/predict_simple.py", line 17, in
import torch
File "/opt/conda/lib/python3.8/site-packages/torch/init.py", line 29, in
from .torch_version import version as version
File "/opt/conda/lib/python3.8/site-packages/torch/torch_version.py", line 4, in
from pkg_resources import packaging # type: ignore[attr-defined]
File "/opt/conda/lib/python3.8/site-packages/pkg_resources/init.py", line 3243, in
def _initialize_master_working_set():
File "/opt/conda/lib/python3.8/site-packages/pkg_resources/init.py", line 3226, in _call_aside
f(*args, **kwargs)
File "/opt/conda/lib/python3.8/site-packages/pkg_resources/init.py", line 3255, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File "/opt/conda/lib/python3.8/site-packages/pkg_resources/init.py", line 570, in _build_master
return cls._build_from_requirements(requires)
File "/opt/conda/lib/python3.8/site-packages/pkg_resources/init.py", line 583, in _build_from_requirements
dists = ws.resolve(reqs, Environment())
File "/opt/conda/lib/python3.8/site-packages/pkg_resources/init.py", line 777, in resolve
raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (scipy 1.6.3 (/opt/conda/lib/python3.8/site-packages), Requirement.parse('scipy<1.9.2,>=1.8; python_version <= "3.9"'), {'scikit-image'})
Traceback (most recent call last):
File "/opt/conda/lib/python3.8/site-packages/pkg_resources/init.py", line 568, in _build_master
ws.require(requires)
File "/opt/conda/lib/python3.8/site-packages/pkg_resources/init.py", line 886, in require
needed = self.resolve(parse_requirements(requirements))
File "/opt/conda/lib/python3.8/site-packages/pkg_resources/init.py", line 777, in resolve
raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (scipy 1.6.3 (/opt/conda/lib/python3.8/site-packages), Requirement.parse('scipy<1.9.2,>=1.8; python_version <= "3.9"'), {'scikit-image'})
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/conda/bin/nnUNet_predict", line 33, in
sys.exit(load_entry_point('nnunet', 'console_scripts', 'nnUNet_predict')())
File "/opt/conda/bin/nnUNet_predict", line 25, in importlib_load_entry_point
return next(matches).load()
File "/opt/conda/lib/python3.8/importlib/metadata.py", line 77, in load
module = import_module(match.group('module'))
File "/opt/conda/lib/python3.8/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 975, in _find_and_load_unlocked
File "", line 671, in _load_unlocked
File "", line 848, in exec_module
File "", line 219, in _call_with_frames_removed
File "/workspace/third-party/nnUNet/nnunet/inference/predict_simple.py", line 17, in
import torch
File "/opt/conda/lib/python3.8/site-packages/torch/init.py", line 29, in
from .torch_version import version as version
File "/opt/conda/lib/python3.8/site-packages/torch/torch_version.py", line 4, in
from pkg_resources import packaging # type: ignore[attr-defined]
File "/opt/conda/lib/python3.8/site-packages/pkg_resources/init.py", line 3243, in
def _initialize_master_working_set():
File "/opt/conda/lib/python3.8/site-packages/pkg_resources/init.py", line 3226, in _call_aside
f(*args, **kwargs)
File "/opt/conda/lib/python3.8/site-packages/pkg_resources/init.py", line 3255, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File "/opt/conda/lib/python3.8/site-packages/pkg_resources/init.py", line 570, in _build_master
return cls._build_from_requirements(requires)
File "/opt/conda/lib/python3.8/site-packages/pkg_resources/init.py", line 583, in _build_from_requirements
dists = ws.resolve(reqs, Environment())
File "/opt/conda/lib/python3.8/site-packages/pkg_resources/init.py", line 777, in resolve
raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (scipy 1.6.3 (/opt/conda/lib/python3.8/site-packages), Requirement.parse('scipy<1.9.2,>=1.8; python_version <= "3.9"'), {'scikit-image'})
Traceback (most recent call last):
File "/opt/conda/lib/python3.8/site-packages/pkg_resources/init.py", line 568, in _build_master
ws.require(requires)
File "/opt/conda/lib/python3.8/site-packages/pkg_resources/init.py", line 886, in require
needed = self.resolve(parse_requirements(requirements))
File "/opt/conda/lib/python3.8/site-packages/pkg_resources/init.py", line 777, in resolve
raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (scipy 1.6.3 (/opt/conda/lib/python3.8/site-packages), Requirement.parse('scipy<1.9.2,>=1.8; python_version <= "3.9"'), {'scikit-image'})
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/conda/bin/nnUNet_predict", line 33, in
sys.exit(load_entry_point('nnunet', 'console_scripts', 'nnUNet_predict')())
File "/opt/conda/bin/nnUNet_predict", line 25, in importlib_load_entry_point
return next(matches).load()
File "/opt/conda/lib/python3.8/importlib/metadata.py", line 77, in load
module = import_module(match.group('module'))
File "/opt/conda/lib/python3.8/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 975, in _find_and_load_unlocked
File "", line 671, in _load_unlocked
File "", line 848, in exec_module
File "", line 219, in _call_with_frames_removed
File "/workspace/third-party/nnUNet/nnunet/inference/predict_simple.py", line 17, in
import torch
File "/opt/conda/lib/python3.8/site-packages/torch/init.py", line 29, in
from .torch_version import version as version
File "/opt/conda/lib/python3.8/site-packages/torch/torch_version.py", line 4, in
from pkg_resources import packaging # type: ignore[attr-defined]
File "/opt/conda/lib/python3.8/site-packages/pkg_resources/init.py", line 3243, in
def _initialize_master_working_set():
File "/opt/conda/lib/python3.8/site-packages/pkg_resources/init.py", line 3226, in _call_aside
f(*args, **kwargs)
File "/opt/conda/lib/python3.8/site-packages/pkg_resources/init.py", line 3255, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File "/opt/conda/lib/python3.8/site-packages/pkg_resources/init.py", line 570, in _build_master
return cls._build_from_requirements(requires)
File "/opt/conda/lib/python3.8/site-packages/pkg_resources/init.py", line 583, in _build_from_requirements
dists = ws.resolve(reqs, Environment())
File "/opt/conda/lib/python3.8/site-packages/pkg_resources/init.py", line 777, in resolve
raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (scipy 1.6.3 (/opt/conda/lib/python3.8/site-packages), Requirement.parse('scipy<1.9.2,>=1.8; python_version <= "3.9"'), {'scikit-image'})
Traceback (most recent call last):
File "/opt/conda/lib/python3.8/site-packages/pkg_resources/init.py", line 568, in _build_master
ws.require(requires)
File "/opt/conda/lib/python3.8/site-packages/pkg_resources/init.py", line 886, in require
needed = self.resolve(parse_requirements(requirements))
File "/opt/conda/lib/python3.8/site-packages/pkg_resources/init.py", line 777, in resolve
raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (scipy 1.6.3 (/opt/conda/lib/python3.8/site-packages), Requirement.parse('scipy<1.9.2,>=1.8; python_version <= "3.9"'), {'scikit-image'})
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/conda/bin/nnUNet_ensemble", line 33, in
sys.exit(load_entry_point('nnunet', 'console_scripts', 'nnUNet_ensemble')())
File "/opt/conda/bin/nnUNet_ensemble", line 25, in importlib_load_entry_point
return next(matches).load()
File "/opt/conda/lib/python3.8/importlib/metadata.py", line 77, in load
module = import_module(match.group('module'))
File "/opt/conda/lib/python3.8/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 975, in _find_and_load_unlocked
File "", line 671, in _load_unlocked
File "", line 848, in exec_module
File "", line 219, in _call_with_frames_removed
File "/workspace/third-party/nnUNet/nnunet/inference/ensemble_predictions.py", line 19, in
from nnunet.inference.segmentation_export import save_segmentation_nifti_from_softmax
File "/workspace/third-party/nnUNet/nnunet/inference/segmentation_export.py", line 22, in
from batchgenerators.augmentations.utils import resize_segmentation
File "/opt/conda/lib/python3.8/site-packages/batchgenerators/init.py", line 6, in
import batchgenerators.dataloading
File "/opt/conda/lib/python3.8/site-packages/batchgenerators/dataloading/init.py", line 3, in
from .multi_threaded_augmenter import MultiThreadedAugmenter
File "/opt/conda/lib/python3.8/site-packages/batchgenerators/dataloading/multi_threaded_augmenter.py", line 36, in
import torch
File "/opt/conda/lib/python3.8/site-packages/torch/init.py", line 29, in
from .torch_version import version as version
File "/opt/conda/lib/python3.8/site-packages/torch/torch_version.py", line 4, in
from pkg_resources import packaging # type: ignore[attr-defined]
File "/opt/conda/lib/python3.8/site-packages/pkg_resources/init.py", line 3243, in
def _initialize_master_working_set():
File "/opt/conda/lib/python3.8/site-packages/pkg_resources/init.py", line 3226, in _call_aside
f(*args, **kwargs)
File "/opt/conda/lib/python3.8/site-packages/pkg_resources/init.py", line 3255, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File "/opt/conda/lib/python3.8/site-packages/pkg_resources/init.py", line 570, in _build_master
return cls._build_from_requirements(requires)
File "/opt/conda/lib/python3.8/site-packages/pkg_resources/init.py", line 583, in _build_from_requirements
dists = ws.resolve(reqs, Environment())
File "/opt/conda/lib/python3.8/site-packages/pkg_resources/init.py", line 777, in resolve
raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (scipy 1.6.3 (/opt/conda/lib/python3.8/site-packages), Requirement.parse('scipy<1.9.2,>=1.8; python_version <= "3.9"'), {'scikit-image'})
Traceback (most recent call last):
File "run_segment.py", line 169, in
main(args)
File "run_segment.py", line 95, in main
softmax = load_softmax(pred_softmax_path, volume_info_path)
File "/workspace/trustworthy-ai-fetal-brain-segmentation/src/deep_learning/inference_nnunet.py", line 33, in load_softmax
softmax_cropped = np.load(softmax_path)['softmax'][None][0,...]
File "/opt/conda/lib/python3.8/site-packages/numpy/lib/npyio.py", line 417, in load
fid = stack.enter_context(open(os_fspath(file), "rb"))
FileNotFoundError: [Errno 2] No such file or directory: '/data/pw/backboneAI/pw.npz'