Skip to content

Latest commit

 

History

History
82 lines (68 loc) · 5.48 KB

TOOL_USAGE.md

File metadata and controls

82 lines (68 loc) · 5.48 KB

Tool Usage for Interactive Annotation

1. micro-sam (napari-based annotation tool):

Recommended Tool for Best Compatibility

  • When installing the medico_sam library, you will have access to micro-sam without any further installation.
  • In terminal, open napari.
  • Go to the top Plugins menu -> Segment Anything for Microscopy -> choice of annotator (Annotator 2d for annotating 2d images and Annotator 3d for annotating 3d images)
  • Provide the filepath to downloaded model checkpoints to Embedding Settings drop-down -> custom weights path and start annotating your images.
  • Visit the documentation for more details on annotation workflows.

NOTE: We plan to integrate our model with micro-sam soon!

2. napari-sam (napari-based annotation tool):

Expects some minor code changes to provide custom filepaths to finetuned models.

The dictionary after changes should look like:

 SAM_MODELS = {
     "default": {"filename": "sam_vit_h_4b8939.pth", "url": "https://dl.fbaipublicfiles.com/segment_anything/sam_vit_h_4b8939.pth", "model": build_sam_vit_h},
     "vit_h": {"filename": "sam_vit_h_4b8939.pth", "url": "https://dl.fbaipublicfiles.com/segment_anything/sam_vit_h_4b8939.pth", "model": build_sam_vit_h},
     "vit_l": {"filename": "sam_vit_l_0b3195.pth", "url": "https://dl.fbaipublicfiles.com/segment_anything/sam_vit_l_0b3195.pth", "model": build_sam_vit_l},
     "vit_b": {"filename": "sam_vit_b_01ec64.pth", "url": "https://dl.fbaipublicfiles.com/segment_anything/sam_vit_b_01ec64.pth", "model": build_sam_vit_b},
     "MedSAM": {"filename": "sam_vit_b_01ec64_medsam.pth", "url": "https://syncandshare.desy.de/index.php/s/yLfdFbpfEGSHJWY/download/medsam_20230423_vit_b_0.0.1.pth", "model": build_sam_vit_b},
     "MedicoSAM": {"filename": "<MODEL_NAME>.pt", "url": None, "model": build_sam_vit_b},  # NEW LINE
 }

3. samm: Segment Any Medical-Model (Slicer-based annotation tool):

Expects some code changes to provide custom filepaths to finetuned models and a few minor adaptation to run on CPU resources.

4. SlicerSegmentWithSAM (Slicer-based annotation tool):

Expects some code changes in the extension API.