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 your dataset contains multiple timepoints, these must be processed separately because Micro-SAM does not sup1port timepoints directly.
Organize your dataset so that each timepoint is stored as an independent TIFF file containing all Z slices.
If your data is originally saved as T-Z stacks, you must first split them into individual TIFF files for each timepoint (for example using ImageJ/Fiji).
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
Import your image stack:
Load the TIFF file corresponding to one timepoint.
File > Open File(s)
Select the TIFF file containing the Z-stack for a single timepoint.
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 containing the embeddings for the processed timepoint.
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.