A napari plugin for cell segmentation using the Segment Anything Model (SAM) foundation model.

SAMCell-napari provides an intuitive interface for segmenting cells in microscopy images using deep learning. It leverages the power of the Segment Anything Model (SAM) adapted specifically for biological cell segmentation, providing accurate results with minimal tuning.
.pt, .bin, .safetensors).pt, .bin, .safetensors)You can install samcell-napari via [pip]:
pip install samcell-napari
To install latest development version:
pip install git+https://github.com/saahilsanganeriya/samcell-napari.git
Start napari
napari
Load your image in napari
Open the SAMCell plugin:
Plugins > samcell-napari > SAMCell Segmentation
Provide the path to your SAMCell model file (supports .pt, .bin, or .safetensors formats)
Adjust parameters if needed:
Click "Run Segmentation"
View the segmentation results in napari as a Labels layer
The plugin is compatible with SAMCell model files in multiple formats:
.pt).bin) - including the standard pytorch_model.bin.safetensors) - a safer alternative to PyTorch's pickle-based formatThe plugin supports models based on:
Pre-trained models can be downloaded from the official SAMCell release page.
Recommended models include:
These models are part of the release assets for the paper "SAMCell: Generalized Label-Free Biological Cell Segmentation with Segment Anything".
SAMCell operates using an enhanced sliding window approach to process large images:
The plugin intelligently determines the appropriate SAM model architecture:
The plugin uses an advanced sliding window algorithm that:
For researchers who want to optimize segmentation parameters, the plugin includes a batch processing capability to test multiple threshold combinations at once (available via the API).
Contributions are very welcome! Please feel free to submit a Pull Request.
Distributed under the MIT License. See LICENSE for more information.
If you use this plugin in your research, please cite:
@article{samcell2023,
title={SAMCell: Generalized Label-Free Biological Cell Segmentation with Segment Anything},
author={...},
journal={...},
year={2023}
}
5 commits
Python
100.0%
A napari plugin for cell segmentation using the Segment Anything Model (SAM) foundation model.

SAMCell-napari provides an intuitive interface for segmenting cells in microscopy images using deep learning. It leverages the power of the Segment Anything Model (SAM) adapted specifically for biological cell segmentation, providing accurate results with minimal tuning.
.pt, .bin, .safetensors).pt, .bin, .safetensors)You can install samcell-napari via [pip]:
pip install samcell-napari
To install latest development version:
pip install git+https://github.com/saahilsanganeriya/samcell-napari.git
Start napari
napari
Load your image in napari
Open the SAMCell plugin:
Plugins > samcell-napari > SAMCell Segmentation
Provide the path to your SAMCell model file (supports .pt, .bin, or .safetensors formats)
Adjust parameters if needed:
Click "Run Segmentation"
View the segmentation results in napari as a Labels layer
The plugin is compatible with SAMCell model files in multiple formats:
.pt).bin) - including the standard pytorch_model.bin.safetensors) - a safer alternative to PyTorch's pickle-based formatThe plugin supports models based on:
Pre-trained models can be downloaded from the official SAMCell release page.
Recommended models include:
These models are part of the release assets for the paper "SAMCell: Generalized Label-Free Biological Cell Segmentation with Segment Anything".
SAMCell operates using an enhanced sliding window approach to process large images:
The plugin intelligently determines the appropriate SAM model architecture:
The plugin uses an advanced sliding window algorithm that:
For researchers who want to optimize segmentation parameters, the plugin includes a batch processing capability to test multiple threshold combinations at once (available via the API).
Contributions are very welcome! Please feel free to submit a Pull Request.
Distributed under the MIT License. See LICENSE for more information.
If you use this plugin in your research, please cite:
@article{samcell2023,
title={SAMCell: Generalized Label-Free Biological Cell Segmentation with Segment Anything},
author={...},
journal={...},
year={2023}
}
5 commits
Python
100.0%