Struggling to integrate SAM model to 3D slicer, need help

Hi,

I was wondering if anyone could help me with integrating the SAM model into the 3D slicer.

I have spent two days on it and am stuck.

Help will be highly appreciated.

Thanks

Thanks for reaching out and sorry to hear that you were not able to accomplish your goal.

To help us better understand your issue, would you provide some more context ?

I am trying this

First, I have enabled developer tools but I still don’t see the developer tools dropdown on the left.
I tried doing the extension wizard, and then it said install from a file.


But I am not sure what to upload here.

can you please guide me?

Thanks

I tried to zip the samm directory and install it from that but this is what I get

Maybe have a look at this work and see if it either addresses what you are trying to do or helps narrow down what’s not working for you.

Thank you for this Pieper. It is definitely something I would need next, but it doesn’t address how to import and integrate the model into the Slicer, where I am facing the problem.

It appears we need to improve documentation related to the topic of how to load scripted modules that are not available from the Extensions Manager.

The “Additional Module Paths” setting allows for specifying a scripted module’s directory for loading. See Application settings — 3D Slicer documentation. This is also described in GitHub - fsemerar/SlicerTomoSAM: An extension of 3D Slicer using the Segment Anything Model (SAM) to aid the segmentation of 3D data from tomography or other imaging techniques..

Additionally if using lates Slicer Preview, you can also drag-and-drop the directory into the Slicer main window and it will detect it as a new module to load. See ENH: Improve Python scripted module detection when drag-and-dropping · Slicer/Slicer@1f4ba1a · GitHub