Skip to content

Commit 8b32c09

Browse files
Merge pull request #105 from computational-cell-analytics/multi-object-point-prompts
Minor changes
2 parents 996ff1c + 544b1e8 commit 8b32c09

File tree

4 files changed

+20
-8
lines changed

4 files changed

+20
-8
lines changed

.github/workflows/build_docs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
activate-environment: sam
2525
mamba-version: "*"
2626
auto-update-conda: true
27-
environment-file: .github/workflows/doc_env.yaml
27+
environment-file: .github/doc_env.yaml
2828
python-version: ${{ matrix.python-version }}
2929
auto-activate-base: false
3030
env:

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,12 @@ If you are using this repository in your research please cite
4545

4646
## Related Projects
4747

48-
There are two other napari plugins build around segment anything:
48+
There are a few other napari plugins build around Segment Anything:
4949
- https://github.com/MIC-DKFZ/napari-sam (2d and 3d support)
5050
- https://github.com/JoOkuma/napari-segment-anything (only 2d support)
51+
- https://github.com/hiroalchem/napari-SAM4IS
5152

52-
Compared to these we support more applications (2d, 3d and tracking), and provide finetuned models for microscopy data.
53+
Compared to these we support more applications (2d, 3d and tracking), and provide finetuning methods and finetuned models for microscopy data.
5354
[WebKnossos](https://webknossos.org/) also offers integration of SegmentAnything for interactive segmentation.
5455

5556

examples/image_series_annotator.py

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,29 @@
22
from micro_sam.sample_data import fetch_image_series_example_data
33

44

5-
def series_annotation():
6-
"""Annotate a series of images. Example runs for three different example images.
5+
def series_annotation(use_finetuned_model):
6+
"""Annotate a series of images. Example runs for three different images.
77
"""
8+
9+
if use_finetuned_model:
10+
embedding_path = "./embeddings/series-embeddings-vit_h_lm"
11+
model_type = "vit_h_lm"
12+
else:
13+
embedding_path = "./embeddings/series-embeddings"
14+
model_type = "vit_h"
15+
816
example_data = fetch_image_series_example_data("./data")
917
image_folder_annotator(
10-
example_data, "./data/series-segmentation-result", embedding_path="./embeddings/series-embeddings",
11-
pattern="*.tif", model_type="vit_b"
18+
example_data, "./data/series-segmentation-result", embedding_path=embedding_path,
19+
pattern="*.tif", model_type=model_type
1220
)
1321

1422

1523
def main():
16-
series_annotation()
24+
# whether to use the fine-tuned SAM model
25+
# this feature is still experimental!
26+
use_finetuned_model = False
27+
series_annotation(use_finetuned_model)
1728

1829

1930
if __name__ == "__main__":

0 commit comments

Comments
 (0)