DCBIA-OrthoLab / SlicerAutomatedDentalTools

A 3D Slicer extension to use AMASSS, ALI-CBCT and ALI-IOS
Other
86 stars 26 forks source link

AMASSS working problem #78

Open mohamedtolba97 opened 10 months ago

mohamedtolba97 commented 10 months ago

Hello everyone,I recently downloaded the automated dental tools. Although when I use AMASSS module and enter the input data and choose the output data and click on run prediction the software doesn’t respond. I don’t know what is the problem? However when I tried older versions like slicer 5.0.2 and 4.11 and when I press on run prediction it calculate the time and then stopped without any result. Any clue or better alternative? these are two different versions of 3d slicer software 8f1ac52aad6d5a0d954eb69f6d7610f1ef6750f5 4d1bd2fcdc9b76deac59a7906c0679b5434b1622

Thanks in advance

Jeanneclre commented 10 months ago

Hello Mohamed,

Could you please tell us a bit more about your machine (memory, processor, operating system, and graphics card)? Also, do you have any error messages in the Python console of Slicer? To find the Python Console, you need to click on the Python logo in the toolbar (refer to the attached screenshot for guidance) sreen_Slicer

Understanding these details will enable us to provide more targeted assistance and possibly identify the root cause of the problem. Thank you for reaching out.

Jeanne

mohamedtolba97 commented 10 months ago

Hi @Jeanneclre, Thank you so much for your quick reply. Memory: 8.00GB processor: Intel(R) Core(TM) i5-6200U CPU @ 2.30GHz 2.40 GHz Operating system: Windows 10 Pro Graphic Card: AMD Radeon (TM) R7 M360

This is what appeared in python console:

C:/Users/PC/Desktop/MG_test_scan(1).nii C:/Users/PC/Documents\Slicer_temp_AMASSS Processing started parameters : {'inputVolume': 'C:/Users/PC/Desktop/MG_test_scan(1).nii', 'modelDirectory': 'C:/Users/PC/Desktop/Automated dental tools/full face models', 'highDefinition': False, 'skullStructure': 'MAND', 'merge': 'MERGE', 'genVtk': False, 'save_in_folder': False, 'output_folder': 'C:/Users/PC/Desktop', 'precision': 50, 'vtk_smooth': 5, 'prediction_ID': 'Pred', 'gpu_usage': 1, 'cpu_usage': 1, 'temp_fold': 'C:/Users/PC/Documents\Slicer_temp_AMASSS', 'SegmentInput': False, 'DCMInput': False} AMASSS_CLI standard output:

Importing librairies... No module named 'logic' ERROR: Exception: Traceback (most recent call last): File "C:\Users\PC\AppData\Local\NA-MIC\Slicer 5.0.2\lib\Python\Lib\site-packages\pip_internal\cli\base_command.py", line 167, in exc_logging_wrapper status = run_func(*args) File "C:\Users\PC\AppData\Local\NA-MIC\Slicer 5.0.2\lib\Python\Lib\site-packages\pip_internal\cli\req_command.py", line 205, in wrapper return func(self, options, args) File "C:\Users\PC\AppData\Local\NA-MIC\Slicer 5.0.2\lib\Python\Lib\site-packages\pip_internal\commands\install.py", line 339, in run requirement_set = resolver.resolve( File "C:\Users\PC\AppData\Local\NA-MIC\Slicer 5.0.2\lib\Python\Lib\site-packages\pip_internal\resolution\resolvelib\resolver.py", line 94, in resolve result = self._result = resolver.resolve( File "C:\Users\PC\AppData\Local\NA-MIC\Slicer 5.0.2\lib\Python\Lib\site-packages\pip_vendor\resolvelib\resolvers.py", line 481, in resolve state = resolution.resolve(requirements, max_rounds=max_rounds) File "C:\Users\PC\AppData\Local\NA-MIC\Slicer 5.0.2\lib\Python\Lib\site-packages\pip_vendor\resolvelib\resolvers.py", line 348, in resolve self._add_to_criteria(self.state.criteria, r, parent=None) File "C:\Users\PC\AppData\Local\NA-MIC\Slicer 5.0.2\lib\Python\Lib\site-packages\pip_vendor\resolvelib\resolvers.py", line 172, in _add_to_criteria if not criterion.candidates: File "C:\Users\PC\AppData\Local\NA-MIC\Slicer 5.0.2\lib\Python\Lib\site-packages\pip_vendor\resolvelib\structs.py", line 151, in bool return bool(self._sequence) File "C:\Users\PC\AppData\Local\NA-MIC\Slicer 5.0.2\lib\Python\Lib\site-packages\pip_internal\resolution\resolvelib\found_candidates.py", line 155, in bool return any(self) File "C:\Users\PC\AppData\Local\NA-MIC\Slicer 5.0.2\lib\Python\Lib\site-packages\pip_internal\resolution\resolvelib\found_candidates.py", line 143, in return (c for c in iterator if id(c) not in self._incompatible_ids) File "C:\Users\PC\AppData\Local\NA-MIC\Slicer 5.0.2\lib\Python\Lib\site-packages\pip_internal\resolution\resolvelib\found_candidates.py", line 47, in _iter_built candidate = func() File "C:\Users\PC\AppData\Local\NA-MIC\Slicer 5.0.2\lib\Python\Lib\site-packages\pip_internal\resolution\resolvelib\factory.py", line 215, in _make_candidate_from_link self._link_candidate_cache[link] = LinkCandidate( File "C:\Users\PC\AppData\Local\NA-MIC\Slicer 5.0.2\lib\Python\Lib\site-packages\pip_internal\resolution\resolvelib\candidates.py", line 288, in init super().init( File "C:\Users\PC\AppData\Local\NA-MIC\Slicer 5.0.2\lib\Python\Lib\site-packages\pip_internal\resolution\resolvelib\candidates.py", line 158, in init self.dist = self._prepare() File "C:\Users\PC\AppData\Local\NA-MIC\Slicer 5.0.2\lib\Python\Lib\site-packages\pip_internal\resolution\resolvelib\candidates.py", line 227, in _prepare dist = self._prepare_distribution() File "C:\Users\PC\AppData\Local\NA-MIC\Slicer 5.0.2\lib\Python\Lib\site-packages\pip_internal\resolution\resolvelib\candidates.py", line 299, in _prepare_distribution return preparer.prepare_linked_requirement(self._ireq, parallel_builds=True) File "C:\Users\PC\AppData\Local\NA-MIC\Slicer 5.0.2\lib\Python\Lib\site-packages\pip_internal\operations\prepare.py", line 487, in prepare_linked_requirement return self._prepare_linked_requirement(req, parallel_builds) File "C:\Users\PC\AppData\Local\NA-MIC\Slicer 5.0.2\lib\Python\Lib\site-packages\pip_internal\operations\prepare.py", line 532, in _prepare_linked_requirement local_file = unpack_url( File "C:\Users\PC\AppData\Local\NA-MIC\Slicer 5.0.2\lib\Python\Lib\site-packages\pip_internal\operations\prepare.py", line 214, in unpack_url file = get_http_url( File "C:\Users\PC\AppData\Local\NA-MIC\Slicer 5.0.2\lib\Python\Lib\site-packages\pip_internal\operations\prepare.py", line 94, in get_http_url from_path, content_type = download(link, temp_dir.path) File "C:\Users\PC\AppData\Local\NA-MIC\Slicer 5.0.2\lib\Python\Lib\site-packages\pip_internal\network\download.py", line 133, in call resp = _http_get_download(self._session, link) File "C:\Users\PC\AppData\Local\NA-MIC\Slicer 5.0.2\lib\Python\Lib\site-packages\pip_internal\network\download.py", line 116, in _http_get_download resp = session.get(target_url, headers=HEADERS, stream=True) File "C:\Users\PC\AppData\Local\NA-MIC\Slicer 5.0.2\lib\Python\Lib\site-packages\pip_vendor\requests\sessions.py", line 542, in get return self.request('GET', url, *kwargs) File "C:\Users\PC\AppData\Local\NA-MIC\Slicer 5.0.2\lib\Python\Lib\site-packages\pip_internal\network\session.py", line 454, in request return super().request(method, url, args, kwargs) File "C:\Users\PC\AppData\Local\NA-MIC\Slicer 5.0.2\lib\Python\Lib\site-packages\pip_vendor\requests\sessions.py", line 529, in request resp = self.send(prep, send_kwargs) File "C:\Users\PC\AppData\Local\NA-MIC\Slicer 5.0.2\lib\Python\Lib\site-packages\pip_vendor\requests\sessions.py", line 645, in send r = adapter.send(request, **kwargs) File "C:\Users\PC\AppData\Local\NA-MIC\Slicer 5.0.2\lib\Python\Lib\site-packages\pip_vendor\cachecontrol\adapter.py", line 48, in send cached_response = self.controller.cached_request(request) File "C:\Users\PC\AppData\Local\NA-MIC\Slicer 5.0.2\lib\Python\Lib\site-packages\pip_vendor\cachecontrol\controller.py", line 151, in cached_request resp = self.serializer.loads(request, cache_data) File "C:\Users\PC\AppData\Local\NA-MIC\Slicer 5.0.2\lib\Python\Lib\site-packages\pip_vendor\cachecontrol\serialize.py", line 95, in loads return getattr(self, "_loads_v{}".format(ver))(request, data) File "C:\Users\PC\AppData\Local\NA-MIC\Slicer 5.0.2\lib\Python\Lib\site-packages\pip_vendor\cachecontrol\serialize.py", line 182, in _loads_v4 cached = msgpack.loads(data, raw=False) File "C:\Users\PC\AppData\Local\NA-MIC\Slicer 5.0.2\lib\Python\Lib\site-packages\pip_vendor\msgpack\fallback.py", line 128, in unpackb ret = unpacker._unpack()

Jeanneclre commented 10 months ago

@mohamedtolba97

Thank you for the detailed specifications of your machine. It appears the issue might be related to memory constraints, particularly GPU memory. Your current setup has less than the required 12 GB of GPU memory needed for your task. We discussed about these problems in the issue #66 and I did a pull request #75 to try to fix it.

Maybe wait a bit for the PR to be merged, the extension to be updated and try again with enabling the "Use CPU memory".

mohamedtolba97 commented 10 months ago

Okay thanks a lot for your help

tschreiner commented 10 months ago

@mohamedtolba97 Maybe you should also try updating to 3D Slicer version 5.6.0 Revision 32390 (https://download.slicer.org/?revision=32390). You would manually need to edit the files in #75 (AMASSS_CLI.py) though. Then you can try it with the instructions from @Jeanneclre

But I doubt that it will work. The 8GB of RAM also is not enough (besides the already mentioned GPU memory). Which will probably also make the workaround not effective. And you need a NVIDIA graphics card. AMDs are not supported.

Try to get another machine with NVIDIA graphics (min. 8GB VRAM, better 12GB), for example NVIDIA GeForce RTX 3060 12GB, Intel i7 or i9 Processor, and min 16GB or 32GB system memory.

mauigna06 commented 10 months ago

Hi

Thanks for such a great tool.

It does not work for me though:

image And the clock stopped increasing.

My system specs:

Here are the python interactor contents:

Python 3.9.10 (main, Feb  1 2024, 04:05:18) 
[GCC 7.3.1 20180303 (Red Hat 7.3.1-5)] on linux2
>>> 
/media/mauro/Nuevo_vol/AI/AIModels/test_data3/test_CT_head.nii.gz
/home/mauro/Slicer_temp_AMASSS
parameters :  {'inputVolume': '/media/mauro/Nuevo_vol/AI/AIModels/test_data3/test_CT_head.nii.gz', 'modelDirectory': '/media/mauro/Nuevo_vol/AI/AIModels/mand', 'highDefinition': True, 'skullStructure': 'MAND', 'merge': 'MERGE', 'genVtk': False, 'save_in_folder': False, 'output_folder': '/media/mauro/Nuevo_vol/AI/AIModels/test_data3', 'precision': 50, 'vtk_smooth': 5, 'prediction_ID': 'Pred', 'gpu_usage': 5, 'host_memory': True, 'temp_fold': '/home/mauro/Slicer_temp_AMASSS', 'SegmentInput': False, 'DCMInput': False}
[VTK] AMASSS_CLI standard error:
[VTK] Traceback (most recent call last):
[VTK]   File "/media/mauro/Nuevo_vol/Lin/Desktop/Slicer_new/Slicer-5.7.0-2024-01-28-linux-amd64/slicer.org/Extensions-32700/SlicerAutomatedDentalTools/lib/Slicer-5.7/cli-modules/AMASSS_CLI.py", line 1199, in <module>
[VTK]     main(args)
[VTK]   File "/media/mauro/Nuevo_vol/Lin/Desktop/Slicer_new/Slicer-5.7.0-2024-01-28-linux-amd64/slicer.org/Extensions-32700/SlicerAutomatedDentalTools/lib/Slicer-5.7/cli-modules/AMASSS_CLI.py", line 869, in main
[VTK]     for step, batch in enumerate(pred_loader):
[VTK]   File "/media/mauro/Nuevo_vol/Lin/Desktop/Slicer_new/Slicer-5.7.0-2024-01-28-linux-amd64/lib/Python/lib/python3.9/site-packages/torch/utils/data/dataloader.py", line 631, in __next__
[VTK]     data = self._next_data()
[VTK]   File "/media/mauro/Nuevo_vol/Lin/Desktop/Slicer_new/Slicer-5.7.0-2024-01-28-linux-amd64/lib/Python/lib/python3.9/site-packages/torch/utils/data/dataloader.py", line 1346, in _next_data
[VTK]     return self._process_data(data)
[VTK]   File "/media/mauro/Nuevo_vol/Lin/Desktop/Slicer_new/Slicer-5.7.0-2024-01-28-linux-amd64/lib/Python/lib/python3.9/site-packages/torch/utils/data/dataloader.py", line 1372, in _process_data
[VTK]     data.reraise()
[VTK]   File "/media/mauro/Nuevo_vol/Lin/Desktop/Slicer_new/Slicer-5.7.0-2024-01-28-linux-amd64/lib/Python/lib/python3.9/site-packages/torch/_utils.py", line 722, in reraise
[VTK]     raise exception
[VTK] RuntimeError: Caught RuntimeError in DataLoader worker process 0.
[VTK] Original Traceback (most recent call last):
[VTK]   File "/media/mauro/Nuevo_vol/Lin/Desktop/Slicer_new/Slicer-5.7.0-2024-01-28-linux-amd64/lib/Python/lib/python3.9/site-packages/monai/transforms/transform.py", line 92, in apply_transform
[VTK]     return _apply_transform(transform, data, unpack_items)
[VTK]   File "/media/mauro/Nuevo_vol/Lin/Desktop/Slicer_new/Slicer-5.7.0-2024-01-28-linux-amd64/lib/Python/lib/python3.9/site-packages/monai/transforms/transform.py", line 60, in _apply_transform
[VTK]     return transform(parameters)
[VTK]   File "/media/mauro/Nuevo_vol/Lin/Desktop/Slicer_new/Slicer-5.7.0-2024-01-28-linux-amd64/lib/Python/lib/python3.9/site-packages/monai/transforms/spatial/dictionary.py", line 228, in __call__
[VTK]     d[key], old_affine, new_affine = self.spacing_transform(
[VTK]   File "/media/mauro/Nuevo_vol/Lin/Desktop/Slicer_new/Slicer-5.7.0-2024-01-28-linux-amd64/lib/Python/lib/python3.9/site-packages/monai/transforms/spatial/array.py", line 212, in __call__
[VTK]     output_data = affine_xform(
[VTK]   File "/media/mauro/Nuevo_vol/Lin/Desktop/Slicer_new/Slicer-5.7.0-2024-01-28-linux-amd64/lib/Python/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1511, in _wrapped_call_impl
[VTK]     return self._call_impl(*args, **kwargs)
[VTK]   File "/media/mauro/Nuevo_vol/Lin/Desktop/Slicer_new/Slicer-5.7.0-2024-01-28-linux-amd64/lib/Python/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1520, in _call_impl
[VTK]     return forward_call(*args, **kwargs)
[VTK]   File "/media/mauro/Nuevo_vol/Lin/Desktop/Slicer_new/Slicer-5.7.0-2024-01-28-linux-amd64/lib/Python/lib/python3.9/site-packages/monai/networks/layers/spatial_transforms.py", line 542, in forward
[VTK]     grid = nn.functional.affine_grid(theta=theta[:, :sr], size=list(dst_size), align_corners=self.align_corners)
[VTK]   File "/media/mauro/Nuevo_vol/Lin/Desktop/Slicer_new/Slicer-5.7.0-2024-01-28-linux-amd64/lib/Python/lib/python3.9/site-packages/torch/nn/functional.py", line 4418, in affine_grid
[VTK]     return torch.affine_grid_generator(theta, size, align_corners)
[VTK] RuntimeError: [enforce fail at alloc_cpu.cpp:117] err == 0. DefaultCPUAllocator: can't allocate memory: you tried to allocate 73178040800 bytes. Error code 12 (Cannot allocate memory)
[VTK] The above exception was the direct cause of the following exception:
[VTK] Traceback (most recent call last):
[VTK]   File "/media/mauro/Nuevo_vol/Lin/Desktop/Slicer_new/Slicer-5.7.0-2024-01-28-linux-amd64/lib/Python/lib/python3.9/site-packages/monai/transforms/transform.py", line 92, in apply_transform
[VTK]     return _apply_transform(transform, data, unpack_items)
[VTK]   File "/media/mauro/Nuevo_vol/Lin/Desktop/Slicer_new/Slicer-5.7.0-2024-01-28-linux-amd64/lib/Python/lib/python3.9/site-packages/monai/transforms/transform.py", line 60, in _apply_transform
[VTK]     return transform(parameters)
[VTK]   File "/media/mauro/Nuevo_vol/Lin/Desktop/Slicer_new/Slicer-5.7.0-2024-01-28-linux-amd64/lib/Python/lib/python3.9/site-packages/monai/transforms/compose.py", line 160, in __call__
[VTK]     input_ = apply_transform(_transform, input_, self.map_items, self.unpack_items)
[VTK]   File "/media/mauro/Nuevo_vol/Lin/Desktop/Slicer_new/Slicer-5.7.0-2024-01-28-linux-amd64/lib/Python/lib/python3.9/site-packages/monai/transforms/transform.py", line 116, in apply_transform
[VTK]     raise RuntimeError(f"applying transform {transform}") from e
[VTK] RuntimeError: applying transform <monai.transforms.spatial.dictionary.Spacingd object at 0x7fa2c55eca90>
[VTK] The above exception was the direct cause of the following exception:
[VTK] Traceback (most recent call last):
[VTK]   File "/media/mauro/Nuevo_vol/Lin/Desktop/Slicer_new/Slicer-5.7.0-2024-01-28-linux-amd64/lib/Python/lib/python3.9/site-packages/torch/utils/data/_utils/worker.py", line 308, in _worker_loop
[VTK]     data = fetcher.fetch(index)
[VTK]   File "/media/mauro/Nuevo_vol/Lin/Desktop/Slicer_new/Slicer-5.7.0-2024-01-28-linux-amd64/lib/Python/lib/python3.9/site-packages/torch/utils/data/_utils/fetch.py", line 51, in fetch
[VTK]     data = [self.dataset[idx] for idx in possibly_batched_index]
[VTK]   File "/media/mauro/Nuevo_vol/Lin/Desktop/Slicer_new/Slicer-5.7.0-2024-01-28-linux-amd64/lib/Python/lib/python3.9/site-packages/torch/utils/data/_utils/fetch.py", line 51, in <listcomp>
[VTK]     data = [self.dataset[idx] for idx in possibly_batched_index]
[VTK]   File "/media/mauro/Nuevo_vol/Lin/Desktop/Slicer_new/Slicer-5.7.0-2024-01-28-linux-amd64/lib/Python/lib/python3.9/site-packages/monai/data/dataset.py", line 95, in __getitem__
[VTK]     return self._transform(index)
[VTK]   File "/media/mauro/Nuevo_vol/Lin/Desktop/Slicer_new/Slicer-5.7.0-2024-01-28-linux-amd64/lib/Python/lib/python3.9/site-packages/monai/data/dataset.py", line 81, in _transform
[VTK]     return apply_transform(self.transform, data_i) if self.transform is not None else data_i
[VTK]   File "/media/mauro/Nuevo_vol/Lin/Desktop/Slicer_new/Slicer-5.7.0-2024-01-28-linux-amd64/lib/Python/lib/python3.9/site-packages/monai/transforms/transform.py", line 116, in apply_transform
[VTK]     raise RuntimeError(f"applying transform {transform}") from e
[VTK] RuntimeError: applying transform <monai.transforms.compose.Compose object at 0x7fa2c55b1880>
[VTK] AMASSS_CLI completed with errors
Importing librairies...
Starting
['/media/mauro/Nuevo_vol/Lin/Desktop/Slicer_new/Slicer-5.7.0-2024-01-28-linux-amd64/slicer.org/Extensions-32700/SlicerAutomatedDentalTools/lib/Slicer-5.7/cli-modules/AMASSS_CLI.py', '/media/mauro/Nuevo_vol/AI/AIModels/test_data3/test_CT_head.nii.gz', '/media/mauro/Nuevo_vol/AI/AIModels/mand', 'true', 'MAND', 'MERGE', 'false', 'false', '/media/mauro/Nuevo_vol/AI/AIModels/test_data3', '50', '5', 'Pred', '5', 'true', '/home/mauro/Slicer_temp_AMASSS', 'false', 'false']
{'input': '/media/mauro/Nuevo_vol/AI/AIModels/test_data3/test_CT_head.nii.gz', 'dir_models': '/media/mauro/Nuevo_vol/AI/AIModels/mand', 'high_def': True, 'skul_structure': ['MAND'], 'merge': ['MERGE'], 'gen_vtk': False, 'save_in_folder': False, 'output_dir': '/media/mauro/Nuevo_vol/AI/AIModels/test_data3', 'precision': 0.5, 'vtk_smooth': 5, 'prediction_ID': 'Pred', 'nbr_GPU_worker': 5, 'host_memory': 'true', 'temp_fold': '/home/mauro/Slicer_temp_AMASSS', 'isSegmentInput': False, 'isDCMInput': False, 'merging_order': ['SKIN', 'CV', 'UAW', 'CB', 'MAX', 'MAND', 'CAN', 'RC', 'CBMASK', 'MANDMASK', 'MAXMASK']}
Start
Loading models from /media/mauro/Nuevo_vol/AI/AIModels/mand
Available models: {'HD-MAND': '/media/mauro/Nuevo_vol/AI/AIModels/mand/seg_HD-MAND_model.pth'}
{'HD-MAND': '/media/mauro/Nuevo_vol/AI/AIModels/mand/seg_HD-MAND_model.pth'}
Loading scan : /media/mauro/Nuevo_vol/AI/AIModels/test_data3/test_CT_head.nii.gz
=== Transform input info -- Spacingd ===
scan statistics:
Type: <class 'numpy.ndarray'>
Shape: (1, 512, 512, 601)
Value range: (0.0, 1.0)
name statistics:
Type: <class 'str'>
Value: /media/mauro/Nuevo_vol/AI/AIModels/test_data3/test_CT_head.nii.gz
temp_path statistics:
Type: <class 'str'>
Value: /home/mauro/Slicer_temp_AMASSS/temp_Pred.nii.gz
scan_meta_dict statistics:
Type: <class 'dict'>
Value: {'sizeof_hdr': array(348, dtype=int32), 'extents': array(0, dtype=int32), 'session_error': array(0, dtype=int16), 'dim_info': array(0, dtype=uint8), 'dim': array([  3, 512, 512, 601,   1,   1,   1,   1], dtype=int16), 'intent_p1': array(0., dtype=float32), 'intent_p2': array(0., dtype=float32), 'intent_p3': array(0., dtype=float32), 'intent_code': array(0, dtype=int16), 'datatype': array(4, dtype=int16), 'bitpix': array(16, dtype=int16), 'slice_start': array(0, dtype=int16), 'pixdim': array([1.   , 0.546, 0.546, 0.4  , 0.   , 0.   , 0.   , 0.   ],
      dtype=float32), 'vox_offset': array(0., dtype=float32), 'scl_slope': array(nan, dtype=float32), 'scl_inter': array(nan, dtype=float32), 'slice_end': array(0, dtype=int16), 'slice_code': array(0, dtype=uint8), 'xyzt_units': array(2, dtype=uint8), 'cal_max': array(0., dtype=float32), 'cal_min': array(0., dtype=float32), 'slice_duration': array(0., dtype=float32), 'toffset': array(0., dtype=float32), 'glmax': array(0, dtype=int32), 'glmin': array(0, dtype=int32), 'qform_code': array(1, dtype=int16), 'sform_code': array(1, dtype=int16), 'quatern_b': array(0., dtype=float32), 'quatern_c': array(0., dtype=float32), 'quatern_d': array(1., dtype=float32), 'qoffset_x': array(139.726, dtype=float32), 'qoffset_y': array(139.7265, dtype=float32), 'qoffset_z': array(-758., dtype=float32), 'srow_x': array([ -0.546,   0.   ,   0.   , 139.726], dtype=float32), 'srow_y': array([  0.    ,  -0.546 ,   0.    , 139.7265], dtype=float32), 'srow_z': array([ 0.00e+00,  0.00e+00,  4.00e-01, -7.58e+02], dtype=float32), 'affine': array([[-5.46000004e-01,  0.00000000e+00,  0.00000000e+00,
         1.39725998e+02],
       [ 0.00000000e+00, -5.46000004e-01,  0.00000000e+00,
         1.39726501e+02],
       [ 0.00000000e+00,  0.00000000e+00,  4.00000006e-01,
        -7.58000000e+02],
       [ 0.00000000e+00,  0.00000000e+00,  0.00000000e+00,
         1.00000000e+00]]), 'original_affine': array([[-5.46000004e-01,  0.00000000e+00,  0.00000000e+00,
         1.39725998e+02],
       [ 0.00000000e+00, -5.46000004e-01,  0.00000000e+00,
         1.39726501e+02],
       [ 0.00000000e+00,  0.00000000e+00,  4.00000006e-01,
        -7.58000000e+02],
       [ 0.00000000e+00,  0.00000000e+00,  0.00000000e+00,
         1.00000000e+00]]), 'as_closest_canonical': False, 'spatial_shape': array([512, 512, 601], dtype=int16), 'original_channel_dim': 'no_channel', 'filename_or_obj': '/home/mauro/Slicer_temp_AMASSS/test_CT_head.nii.gz'}

 ========= ERROR ========= 

CLI execution failed: 

Traceback (most recent call last):
  File "/media/mauro/Nuevo_vol/Lin/Desktop/Slicer_new/Slicer-5.7.0-2024-01-28-linux-amd64/slicer.org/Extensions-32700/SlicerAutomatedDentalTools/lib/Slicer-5.7/cli-modules/AMASSS_CLI.py", line 1199, in <module>
    main(args)
  File "/media/mauro/Nuevo_vol/Lin/Desktop/Slicer_new/Slicer-5.7.0-2024-01-28-linux-amd64/slicer.org/Extensions-32700/SlicerAutomatedDentalTools/lib/Slicer-5.7/cli-modules/AMASSS_CLI.py", line 869, in main
    for step, batch in enumerate(pred_loader):
  File "/media/mauro/Nuevo_vol/Lin/Desktop/Slicer_new/Slicer-5.7.0-2024-01-28-linux-amd64/lib/Python/lib/python3.9/site-packages/torch/utils/data/dataloader.py", line 631, in __next__
    data = self._next_data()
  File "/media/mauro/Nuevo_vol/Lin/Desktop/Slicer_new/Slicer-5.7.0-2024-01-28-linux-amd64/lib/Python/lib/python3.9/site-packages/torch/utils/data/dataloader.py", line 1346, in _next_data
    return self._process_data(data)
  File "/media/mauro/Nuevo_vol/Lin/Desktop/Slicer_new/Slicer-5.7.0-2024-01-28-linux-amd64/lib/Python/lib/python3.9/site-packages/torch/utils/data/dataloader.py", line 1372, in _process_data
    data.reraise()
  File "/media/mauro/Nuevo_vol/Lin/Desktop/Slicer_new/Slicer-5.7.0-2024-01-28-linux-amd64/lib/Python/lib/python3.9/site-packages/torch/_utils.py", line 722, in reraise
    raise exception
RuntimeError: Caught RuntimeError in DataLoader worker process 0.
Original Traceback (most recent call last):
  File "/media/mauro/Nuevo_vol/Lin/Desktop/Slicer_new/Slicer-5.7.0-2024-01-28-linux-amd64/lib/Python/lib/python3.9/site-packages/monai/transforms/transform.py", line 92, in apply_transform
    return _apply_transform(transform, data, unpack_items)
  File "/media/mauro/Nuevo_vol/Lin/Desktop/Slicer_new/Slicer-5.7.0-2024-01-28-linux-amd64/lib/Python/lib/python3.9/site-packages/monai/transforms/transform.py", line 60, in _apply_transform
    return transform(parameters)
  File "/media/mauro/Nuevo_vol/Lin/Desktop/Slicer_new/Slicer-5.7.0-2024-01-28-linux-amd64/lib/Python/lib/python3.9/site-packages/monai/transforms/spatial/dictionary.py", line 228, in __call__
    d[key], old_affine, new_affine = self.spacing_transform(
  File "/media/mauro/Nuevo_vol/Lin/Desktop/Slicer_new/Slicer-5.7.0-2024-01-28-linux-amd64/lib/Python/lib/python3.9/site-packages/monai/transforms/spatial/array.py", line 212, in __call__
    output_data = affine_xform(
  File "/media/mauro/Nuevo_vol/Lin/Desktop/Slicer_new/Slicer-5.7.0-2024-01-28-linux-amd64/lib/Python/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1511, in _wrapped_call_impl
    return self._call_impl(*args, **kwargs)
  File "/media/mauro/Nuevo_vol/Lin/Desktop/Slicer_new/Slicer-5.7.0-2024-01-28-linux-amd64/lib/Python/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1520, in _call_impl
    return forward_call(*args, **kwargs)
  File "/media/mauro/Nuevo_vol/Lin/Desktop/Slicer_new/Slicer-5.7.0-2024-01-28-linux-amd64/lib/Python/lib/python3.9/site-packages/monai/networks/layers/spatial_transforms.py", line 542, in forward
    grid = nn.functional.affine_grid(theta=theta[:, :sr], size=list(dst_size), align_corners=self.align_corners)
  File "/media/mauro/Nuevo_vol/Lin/Desktop/Slicer_new/Slicer-5.7.0-2024-01-28-linux-amd64/lib/Python/lib/python3.9/site-packages/torch/nn/functional.py", line 4418, in affine_grid
    return torch.affine_grid_generator(theta, size, align_corners)
RuntimeError: [enforce fail at alloc_cpu.cpp:117] err == 0. DefaultCPUAllocator: can't allocate memory: you tried to allocate 73178040800 bytes. Error code 12 (Cannot allocate memory)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/media/mauro/Nuevo_vol/Lin/Desktop/Slicer_new/Slicer-5.7.0-2024-01-28-linux-amd64/lib/Python/lib/python3.9/site-packages/monai/transforms/transform.py", line 92, in apply_transform
    return _apply_transform(transform, data, unpack_items)
  File "/media/mauro/Nuevo_vol/Lin/Desktop/Slicer_new/Slicer-5.7.0-2024-01-28-linux-amd64/lib/Python/lib/python3.9/site-packages/monai/transforms/transform.py", line 60, in _apply_transform
    return transform(parameters)
  File "/media/mauro/Nuevo_vol/Lin/Desktop/Slicer_new/Slicer-5.7.0-2024-01-28-linux-amd64/lib/Python/lib/python3.9/site-packages/monai/transforms/compose.py", line 160, in __call__
    input_ = apply_transform(_transform, input_, self.map_items, self.unpack_items)
  File "/media/mauro/Nuevo_vol/Lin/Desktop/Slicer_new/Slicer-5.7.0-2024-01-28-linux-amd64/lib/Python/lib/python3.9/site-packages/monai/transforms/transform.py", line 116, in apply_transform
    raise RuntimeError(f"applying transform {transform}") from e
RuntimeError: applying transform <monai.transforms.spatial.dictionary.Spacingd object at 0x7fa2c55eca90>

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/media/mauro/Nuevo_vol/Lin/Desktop/Slicer_new/Slicer-5.7.0-2024-01-28-linux-amd64/lib/Python/lib/python3.9/site-packages/torch/utils/data/_utils/worker.py", line 308, in _worker_loop
    data = fetcher.fetch(index)
  File "/media/mauro/Nuevo_vol/Lin/Desktop/Slicer_new/Slicer-5.7.0-2024-01-28-linux-amd64/lib/Python/lib/python3.9/site-packages/torch/utils/data/_utils/fetch.py", line 51, in fetch
    data = [self.dataset[idx] for idx in possibly_batched_index]
  File "/media/mauro/Nuevo_vol/Lin/Desktop/Slicer_new/Slicer-5.7.0-2024-01-28-linux-amd64/lib/Python/lib/python3.9/site-packages/torch/utils/data/_utils/fetch.py", line 51, in <listcomp>
    data = [self.dataset[idx] for idx in possibly_batched_index]
  File "/media/mauro/Nuevo_vol/Lin/Desktop/Slicer_new/Slicer-5.7.0-2024-01-28-linux-amd64/lib/Python/lib/python3.9/site-packages/monai/data/dataset.py", line 95, in __getitem__
    return self._transform(index)
  File "/media/mauro/Nuevo_vol/Lin/Desktop/Slicer_new/Slicer-5.7.0-2024-01-28-linux-amd64/lib/Python/lib/python3.9/site-packages/monai/data/dataset.py", line 81, in _transform
    return apply_transform(self.transform, data_i) if self.transform is not None else data_i
  File "/media/mauro/Nuevo_vol/Lin/Desktop/Slicer_new/Slicer-5.7.0-2024-01-28-linux-amd64/lib/Python/lib/python3.9/site-packages/monai/transforms/transform.py", line 116, in apply_transform
    raise RuntimeError(f"applying transform {transform}") from e
RuntimeError: applying transform <monai.transforms.compose.Compose object at 0x7fa2c55b1880>