软件版本:5.2.2
问题描述:Total segmentator模块中如果不点fast是进行分割就会报错
If you have questions or suggestions, feel free to open an issue at https://github.com/MIC-DKFZ/nnUNet
force_separate_z: None interpolation order: 0
Traceback (most recent call last):
File “D:\medical image\image\3Dslicer\Slicer 5.2.2\lib\Python\Scripts\TotalSegmentator”, line 93, in
main()
File “D:\medical image\image\3Dslicer\Slicer 5.2.2\lib\Python\Scripts\TotalSegmentator”, line 86, in main
totalsegmentator(args.input, args.output, args.ml, args.nr_thr_resamp, args.nr_thr_saving,
File “D:\medical image\image\3Dslicer\Slicer 5.2.2\lib\Python\Lib\site-packages\totalsegmentator\python_api.py”, line 173, in totalsegmentator
seg = nnUNet_predict_image(input, output, task_id, model=model, folds=folds,
File “D:\medical image\image\3Dslicer\Slicer 5.2.2\lib\Python\Lib\site-packages\totalsegmentator\nnunet.py”, line 238, in nnUNet_predict_image
nnUNet_predict(tmp_dir, tmp_dir, tid, model, folds, trainer, tta)
File “D:\medical image\image\3Dslicer\Slicer 5.2.2\lib\Python\Lib\site-packages\totalsegmentator\nnunet.py”, line 106, in nnUNet_predict
predict_from_folder(model_folder_name, dir_in, dir_out, folds, save_npz, num_threads_preprocessing,
File “D:\medical image\image\3Dslicer\Slicer 5.2.2\lib\Python\Lib\site-packages\nnunet\inference\predict.py”, line 668, in predict_from_folder
return predict_cases_fastest(model, list_of_lists[part_id::num_parts], output_files[part_id::num_parts], folds,
File “D:\medical image\image\3Dslicer\Slicer 5.2.2\lib\Python\Lib\site-packages\nnunet\inference\predict.py”, line 468, in predict_cases_fastest
trainer, params = load_model_and_checkpoint_files(model, folds, mixed_precision=mixed_precision, checkpoint_name=checkpoint_name)
File “D:\medical image\image\3Dslicer\Slicer 5.2.2\lib\Python\Lib\site-packages\nnunet\training\model_restore.py”, line 140, in load_model_and_checkpoint_files
trainer = restore_model(join(folds[0], “%s.model.pkl” % checkpoint_name), fp16=mixed_precision)
File “D:\medical image\image\3Dslicer\Slicer 5.2.2\lib\Python\Lib\site-packages\nnunet\training\model_restore.py”, line 56, in restore_model
info = load_pickle(pkl_file)
File “D:\medical image\image\3Dslicer\Slicer 5.2.2\lib\Python\Lib\site-packages\batchgenerators\utilities\file_and_folder_operations.py”, line 49, in load_pickle
with open(file, mode) as f:
FileNotFoundError: [Errno 2] No such file or directory: ‘C:\Users\xiebin\.totalsegmentator\nnunet\results\nnUNet\3d_fullres\Task254_TotalSegmentator_part4_muscles_1139subj\nnUNetTrainerV2_ep4000_nomirror__nnUNetPlansv2.1\fold_0\model_final_checkpoint.model.pkl’
Exception ignored in: <totalsegmentator.libs.DummyFile object at 0x00000222F6463B20>
AttributeError: ‘DummyFile’ object has no attribute ‘flush’