Skip to content

Commit

Permalink
Ensure embedding cache dir exists in examples and fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
constantinpape committed Nov 18, 2023
1 parent 1c79323 commit d8457fc
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
3 changes: 2 additions & 1 deletion examples/annotator_2d.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
from micro_sam.util import get_cache_directory

DATA_CACHE = os.path.join(get_cache_directory(), "sample_data")
EMBEDDING_CACHE = os.path.join(get_cache_directory, "embeddings")
EMBEDDING_CACHE = os.path.join(get_cache_directory(), "embeddings")
os.makedirs(EMBEDDING_CACHE, exist_ok=True)


def livecell_annotator(use_finetuned_model):
Expand Down
3 changes: 2 additions & 1 deletion examples/annotator_3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
from micro_sam.util import get_cache_directory

DATA_CACHE = os.path.join(get_cache_directory(), "sample_data")
EMBEDDING_CACHE = os.path.join(get_cache_directory, "embeddings")
EMBEDDING_CACHE = os.path.join(get_cache_directory(), "embeddings")
os.makedirs(EMBEDDING_CACHE, exist_ok=True)


def em_3d_annotator(use_finetuned_model):
Expand Down
3 changes: 2 additions & 1 deletion examples/annotator_tracking.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
from micro_sam.util import get_cache_directory

DATA_CACHE = os.path.join(get_cache_directory(), "sample_data")
EMBEDDING_CACHE = os.path.join(get_cache_directory, "embeddings")
EMBEDDING_CACHE = os.path.join(get_cache_directory(), "embeddings")
os.makedirs(EMBEDDING_CACHE, exist_ok=True)


def track_ctc_data(use_finetuned_model):
Expand Down
3 changes: 2 additions & 1 deletion examples/image_series_annotator.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
from micro_sam.util import get_cache_directory

DATA_CACHE = os.path.join(get_cache_directory(), "sample_data")
EMBEDDING_CACHE = os.path.join(get_cache_directory, "embeddings")
EMBEDDING_CACHE = os.path.join(get_cache_directory(), "embeddings")
os.makedirs(EMBEDDING_CACHE, exist_ok=True)


def series_annotation(use_finetuned_model):
Expand Down

0 comments on commit d8457fc

Please sign in to comment.