Home

Awesome

napari-segment-anything

License Apache Software License 2.0 PyPI Python Version tests codecov napari hub

Napari plugin of Segment Anything Model (SAM)

Download the network weights here

https://user-images.githubusercontent.com/21022743/230456433-2fa7bc40-a735-4d73-8d87-ecf776bbe2be.mp4


This napari plugin was generated with Cookiecutter using @napari's cookiecutter-napari-plugin template.

Installation

You can install napari-segment-anything via pip:

pip install napari-segment-anything

We recommend installing the latest development version because this package is being developed:

pip install git+https://github.com/jookuma/napari-segment-anything.git

IMPORTANT: napari won't work if you don't have pyqt5 or pyside2 installed.

Instructions

Opening napari-segment-anything

This software is napari plugin, so once you have napari installed you can open it using the command line:

napari <your image path> -w napari-segment-anything 'Segment Anything'

I noticed that sometimes napari fails to load the plugin widget from the command line, go to step 2 from below to load it.

If you prefer the user interface you need to:

  1. Drag and drop your image into napari to load it;
  2. Go to the "Plugins" file menu in the upper right corner and select the "Segment Anything" plugin.
  3. Follow the instructions below for usage.

IMPORTANT: If you get an error make sure you have pyqt5 or pyside2 installed.

Usage

Contributing

Contributions are very welcome. Tests can be run with tox, please ensure the coverage at least stays the same before you submit a pull request.

License

Distributed under the terms of the Apache Software License 2.0 license, "napari-segment-anything" is a free and open source software

Issues

If you encounter any problems, please file an issue along with a detailed description.