Step-by-step Protocol for Using MicroSAM
Micro-SAM Usage in Napari:
Once Micro-SAM is installed, follow these steps to segment your datasets:
Organize your data:
If you have multiple timepoints, these have to be processed separately. Organize your time-lapse datasets by grouping TIFF images by time points into separate folders. Each folder should contain all images for a single frame.
Launch Micro-SAM from command line:
Open the command prompt and type the following commands to activate Micro-SAM:
conda activate micro-sam
napari
Access the Micro-SAM Plugin in Napari:
Within Napari, navigate to:
Plugins > SegmentAnything for Microscopy > Annotator 3D
Open and Preprocess your stack:
Specify the model to use and select the directory where embeddings will be saved by clicking Select Directory.
Compute Embeddings:
Click on Compute Embeddings.
A new folder will be created for the output of each time frame.
Automatic Segmentation:
Click on the Automatic Segmentation button to generate the initial segmentations.
You can then adjust the parameters to optimize the segmentation results.
Manual Segmentation Correction:
After automatic segmentation, you may need to manually correct errors.
To delete unwanted surfaces, use the syringe tool to click on the background and then select the surface to remove.
To create new cells, use prompts (e.g., rectangles or points), click on the cell of interest, and then apply changes across all Z slices by clicking Segment All Slices.
Exporting Images:
To export the image with labels in image format follow:
Select File > Save Selected Layers > Choose the following format “napari builtins labels (*.tif *.tiff *.bsdf. *im .*lsm .*npz .*pbm .*pcx .*pgm .*ppm .*stk)”.
(Optionally) Combine Segmented Time Points:
After segmenting all frames, combine the segmented time points into a single folder.
Import this folder into ImageJ to combine the time points into a single stack.