Adding extra weights/subtasks to TotalSegmentator

Do you want to run these tests in 3D Slicer and are you in for a complicated procedure?

:slight_smile:

Here you go:

To run the new test tasks from the extension, you must “git install” the latest TotalSegmentator tool in the 3D Slicer directory.

In 3D Slicers Python console run

slicer.util.pip_uninstall("TotalSegmentator")
slicer.util.pip_install("git+https://github.com/wasserth/TotalSegmentator.git")

Then, find your 3D Slicer Python script directory.

On my Windows system, this is:
C:\Users\Yourname\AppData\Local\NA-MIC\Slicer 5.2.2\lib\Python\Scripts

Open a PowerShell in this directory.
Copy your weights into this directory.

In order to update the TotalSegmentator weights (here: aortic branches, they are licensed and may not be shared), execute

python ./totalseg_import_weights -i ./Task435_Heart_vessels_118subj.zip

The next problem is that the TotelSegmentator 3D Slicer extension does not know yet about the newly installed tasks.

See the next post. @lassoan and I will find a way to integrate new test tasks as well as implement a way to add new or licensed weights in the extension. Until then, you can use my workaround.