wasserth / TotalSegmentator

Tool for robust segmentation of >100 important anatomical structures in CT and MR images
Apache License 2.0
1.53k stars 253 forks source link

Can't pickle local object 'starargs.<locals>.<lambda>' #335

Open ChekrounMohammed opened 4 months ago

ChekrounMohammed commented 4 months ago

File "/home/mchekrou/anaconda3/lib/python3.11/site-packages/totalsegmentator/python_api.py", line 467, in totalsegmentator seg_img, ct_img, stats = nnUNet_predict_image(input, output, task_id, model=model, folds=folds, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/mchekrou/anaconda3/lib/python3.11/site-packages/totalsegmentator/nnunet.py", line 638, in nnUNet_predictimage = p_map(partial(save_segmentation_nifti, tmp_dir=tmp_dir, file_out=file_out, nora_tag=nora_tag, header=new_header, task_name=task_name, quiet=quiet), ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/mchekrou/anaconda3/lib/python3.11/site-packages/p_tqdm/p_tqdm.py", line 65, in p_map result = list(generator) ^^^^^^^^^^^^^^^ File "/home/mchekrou/anaconda3/lib/python3.11/site-packages/p_tqdm/p_tqdm.py", line 54, in _parallel for item in tqdm_func(map_func(function, *iterables), total=length, **kwargs): File "/home/mchekrou/anaconda3/lib/python3.11/site-packages/tqdm/std.py", line 1181, in iter for obj in iterable: File "/home/mchekrou/anaconda3/lib/python3.11/multiprocessing/pool.py", line 873, in next raise value File "/home/mchekrou/anaconda3/lib/python3.11/multiprocessing/pool.py", line 540, in _handle_tasks put(task) File "/home/mchekrou/anaconda3/lib/python3.11/multiprocessing/connection.py", line 205, in send self._send_bytes(_ForkingPickler.dumps(obj)) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/mchekrou/anaconda3/lib/python3.11/multiprocessing/reduction.py", line 51, in dumps cls(buf, protocol).dump(obj) AttributeError: Can't pickle local object 'starargs..'