# totalsegmentator models connection

**URL:** <https://discourse.slicer.org/t/totalsegmentator-models-connection/42725>\
**Category:** Support\
**Created:** [April 28, 2025, 5:22pm UTC](https://discourse.slicer.org/t/totalsegmentator-models-connection/42725 "2025-04-28T17:22:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![yoyo1](https://avatars.discourse-cdn.com/v4/letter/y/a8b319/32.png) [@yoyo1](https://discourse.slicer.org/u/yoyo1)\
**Post date:** [April 28, 2025, 5:22pm UTC](https://discourse.slicer.org/t/totalsegmentator-models-connection/42725/1 "2025-04-28T17:22:43Z")

</div>

Hi, I’m trying to activate the totalsegmentator on one of the examples of CT there’s in the slicer.  
I get an error that the ml models are not connected and the result failes.  
Thanks

---

<div class="post-metadata">

**Author:** ![rbumm](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/rbumm/32/9404_2.png) [@rbumm](https://discourse.slicer.org/u/rbumm)\
**Post date:** [April 29, 2025, 12:17pm UTC](https://discourse.slicer.org/t/totalsegmentator-models-connection/42725/2 "2025-04-29T12:17:22Z")

</div>

just tested and it works great in SLICER 5.8.1.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/9/d/9dac9b88db742185ebbe9d18501e9f2814db22be.png)

---

<div class="post-metadata">

**Author:** ![yoyo1](https://avatars.discourse-cdn.com/v4/letter/y/a8b319/32.png) [@yoyo1](https://discourse.slicer.org/u/yoyo1)\
**Post date:** [April 30, 2025, 6:56am UTC](https://discourse.slicer.org/t/totalsegmentator-models-connection/42725/3 "2025-04-30T06:56:34Z")

</div>

Thanks for the reply, I’m pasting the error I got, hope you could help me solve it.

Processing started  
Writing input file to C:/Users/assaf/slicer.org/\_\_SlicerTemp\_\_2025-04-30\_09+51+06.674/total-segmentator-input.nii  
Creating segmentations with TotalSegmentator AI…  
Total Segmentator arguments: [‘-i’, ‘C:/Users/assaf/slicer.org/\_\_SlicerTemp\_\_2025-04-30\_09+51+06.674/total-segmentator-input.nii’, ‘-o’, ‘C:/Users/assaf/slicer.org/\_\_SlicerTemp\_\_2025-04-30\_09+51+06.674/segmentation’, ‘–ml’, ‘–task’, ‘total’, ‘–fast’]  
Traceback (most recent call last):  
File “C:\Users\assaf\slicer.org\Slicer 5.8.1\lib\Python\Lib\runpy.py”, line 197, in \_run\_module\_as\_main  
return \_run\_code(code, main\_globals, None,  
File “C:\Users\assaf\slicer.org\Slicer 5.8.1\lib\Python\Lib\runpy.py”, line 87, in _run\_code  
exec(code, run\_globals)  
File "C:\Users\assaf\slicer.org\Slicer 5.8.1\lib\Python\Scripts\TotalSegmentator.exe\_main_.py", line 7, in   
File “C:\Users\assaf\slicer.org\Slicer 5.8.1\lib\Python\Lib\site-packages\totalsegmentator\bin\TotalSegmentator.py”, line 143, in main  
totalsegmentator(args.input, args.output, args.ml, args.nr\_thr\_resamp, args.nr\_thr\_saving,  
File “C:\Users\assaf\slicer.org\Slicer 5.8.1\lib\Python\Lib\site-packages\totalsegmentator\python\_api.py”, line 137, in totalsegmentator  
from totalsegmentator.nnunet import nnUNet\_predict\_image # this has to be after setting new env vars  
File “C:\Users\assaf\slicer.org\Slicer 5.8.1\lib\Python\Lib\site-packages\totalsegmentator\nnunet.py”, line 29, in   
from totalsegmentator.custom\_trainers import nnUNetTrainer\_MOSAIC\_1k\_QuarterLR\_NoMirroring  
File “C:\Users\assaf\slicer.org\Slicer 5.8.1\lib\Python\Lib\site-packages\totalsegmentator\custom\_trainers.py”, line 2, in   
from nnunetv2.training.nnUNetTrainer.variants.data\_augmentation.nnUNetTrainerNoMirroring import nnUNetTrainerNoMirroring  
File “C:\Users\assaf\slicer.org\Slicer 5.8.1\lib\Python\Lib\site-packages\nnunetv2\training\nnUNetTrainer\variants\data\_augmentation\nnUNetTrainerNoMirroring.py”, line 5, in   
from batchgeneratorsv2.helpers.scalar\_type import RandomScalar  
ModuleNotFoundError: No module named ‘batchgeneratorsv2’
