TotalSegmentator icon indicating copy to clipboard operation
TotalSegmentator copied to clipboard

RuntimeError("One or more background workers are no longer alive.

Open SameerShanbhogue opened this issue 9 months ago • 2 comments

Hi

I am getting following error. I system is GPU enabled. It works in fast - checked mode, but in unchecked and cpu mode give below error. Fresh install of 3D slicer and extension

yTorch Python package is required. Installing... (it may take several minutes) TotalSegmentator Python package is required. Installing it from https://github.com/wasserth/TotalSegmentator/archive/bbc1e7b3df64339e67acbebe2cf3c739098aabf4.zip... (it may take several minutes)

  • Installing numpy...
  • Installing psutil...
  • Installing nibabel>=2.3.0...
  • Installing tqdm>=4.45.0...
  • Installing p-tqdm...
  • Installing xvfbwrapper...
  • Installing fury...
  • Installing rt-utils...
  • Installing dicom2nifti... nnunetv2 Python package is required. Installing nnunetv2==2.1 ...
  • Installing acvl-utils>=0.2...
  • Installing dynamic-network-architectures>=0.2...
  • Installing tqdm...
  • Installing dicom2nifti...
  • Installing scikit-image>=0.14...
  • Installing medpy...
  • Installing scipy...
  • Installing batchgenerators>=0.25...
  • Installing numpy...
  • Installing scikit-learn...
  • Installing scikit-image>=0.19.3...
  • Installing pandas...
  • Installing graphviz...
  • Installing tifffile...
  • Installing nibabel...
  • Installing matplotlib...
  • Installing seaborn...
  • Installing imagecodecs...
  • Installing yacs... TotalSegmentator installation completed successfully. Processing started Writing input file to /tmp/Slicer-/__SlicerTemp__2024-05-03_11+57+45.166/total-segmentator-input.nii Creating segmentations with TotalSegmentator AI... Total Segmentator arguments: ['-i', '/tmp/Slicer-/__SlicerTemp__2024-05-03_11+57+45.166/total-segmentator-input.nii', '-o', '/tmp/Slicer-/__SlicerTemp__2024-05-03_11+57+45.166/segmentation', '--ml', '--task', 'total']

If you use this tool please cite: https://pubs.rsna.org/doi/10.1148/ryai.230024

TotalSegmentator sends anonymous usage statistics. If you want to disable it check the documentation. Downloading model for Task 291 ...

Download finished. Extracting... Downloading model for Task 292 ...

Download finished. Extracting... Downloading model for Task 293 ...

Download finished. Extracting... Downloading model for Task 294 ...

Download finished. Extracting... Downloading model for Task 295 ...

Exception in thread Thread-6: Traceback (most recent call last): File "/opt/slicer/lib/Python/lib/python3.9/threading.py", line 973, in _bootstrap_inner self.run() File "/opt/slicer/lib/Python/lib/python3.9/threading.py", line 910, in run self._target(*self._args, **self._kwargs) File "/opt/slicer/lib/Python/lib/python3.9/site-packages/batchgenerators/dataloading/multi_threaded_augmenter.py", line 92, in results_loop raise RuntimeError("One or more background workers are no longer alive. Exiting. Please check the print" RuntimeError: One or more background workers are no longer alive. Exiting. Please check the print statements above for the actual error message Traceback (most recent call last): File "/opt/slicer/lib/Python/bin/TotalSegmentator", line 8, in sys.exit(main()) File "/opt/slicer/lib/Python/lib/python3.9/site-packages/totalsegmentator/bin/TotalSegmentator.py", line 127, in main totalsegmentator(args.input, args.output, args.ml, args.nr_thr_resamp, args.nr_thr_saving, File "/opt/slicer/lib/Python/lib/python3.9/site-packages/totalsegmentator/python_api.py", line 293, in totalsegmentator seg_img, ct_img = nnUNet_predict_image(input, output, task_id, model=model, folds=folds, File "/opt/slicer/lib/Python/lib/python3.9/site-packages/totalsegmentator/nnunet.py", line 375, in nnUNet_predict_image nnUNetv2_predict(tmp_dir, tmp_dir, tid, model, folds, trainer, tta, File "/opt/slicer/lib/Python/lib/python3.9/site-packages/totalsegmentator/nnunet.py", line 178, in nnUNetv2_predict predict_from_raw_data(dir_in, File "/opt/slicer/lib/Python/lib/python3.9/site-packages/nnunetv2/inference/predict_from_raw_data.py", line 236, in predict_from_raw_data for preprocessed in mta: File "/opt/slicer/lib/Python/lib/python3.9/site-packages/batchgenerators/dataloading/multi_threaded_augmenter.py", line 204, in next item = self.__get_next_item() File "/opt/slicer/lib/Python/lib/python3.9/site-packages/batchgenerators/dataloading/multi_threaded_augmenter.py", line 189, in __get_next_item raise RuntimeError("One or more background workers are no longer alive. Exiting. Please check the " RuntimeError: One or more background workers are no longer alive. Exiting. Please check the print statements above for the actual error message Exception ignored in: <totalsegmentator.libs.DummyFile object at 0x7a343a11ff70> AttributeError: 'DummyFile' object has no attribute 'flush' Download finished. Extracting... Resampling... Resampled in 16.77s Predicting part 1 of 5 ...

SameerShanbhogue avatar May 03 '24 12:05 SameerShanbhogue