Run SAMM (Segment Any Medical Model) in 3D Slicer

Hello I am trying to use the SAMM module in 3-D slicer. I was unable to import it using the extensions manager and I saw that I can use this command to use any outside extension: Slicer.exe --additional-module-paths D:\Downloads\samm-main\samm-main\samm

When I run that command on cmd I get this:

'Slicer.exe' is not recognized as an internal or external command,
operable program or batch file.

What should I do? Is there a different method I should import modules?

You need to go the folder where Slicer.exe is. For example, using this command:

cd %LOCALAPPDATA%\\Slicer 5.4.0

Thank you that worked! But now I have a new problem:

After running this command:

Slicer.exe --additional-module-paths D:\Downloads\samm-main\samm-main\samm

Slicer opens, but the module doesn’t show up in 3-d slicer:

The SAMM folder looks like this:

Does anyone know what’s wrong? There were no errors in the console.

Try the paths with / instead of \

I used Slicer.exe --additional-module-paths D:/Downloads/samm-main/samm-main. But this still didn’t work.

What does this mean? :

I think you are missing the final /samm folder in your path.
like this:

Also instructions says you need to use extension wizard, did you try that? That might generate an error for you to understand why it is failing.

Thank You that worked!

I made some data of a segmented brain. What’s the best way to use this data and train using SAMM?

Not sure if anyone here has any experience using SAMM to train a segmentation model. If you have already created some labeled data, you can give MonaiLabel a try though…

I am trying to compare MONAILABEL and SAMM.

I might be wrong, but I believe SAMM Slicer extension only allows you to use the SAM tool for segmentation. I am not sure if it actually offers any retraining functionality.

You might have better luck contacting the extension developers, I am not sure if they are tracking this forum.

1 Like

Ok, thank you. I will ask in the github.