Skip to content

Commit b43d44a

Browse files
Move instance segmentation script to development
1 parent 64968c1 commit b43d44a

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed
Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77

88

99
def mito_segmentation():
10-
input_path = "./data/Lucchi++/Test_In"
10+
input_path = "../examples/data/Lucchi++/Test_In"
1111
with open_file(input_path) as f:
1212
raw = f["*.png"][-1, :768, :768]
1313

1414
predictor = util.get_sam_model()
15-
image_embeddings = util.precompute_image_embeddings(predictor, raw, "./embeddings/embeddings-mito2d.zarr")
15+
image_embeddings = util.precompute_image_embeddings(predictor, raw, "../examples/embeddings/embeddings-mito2d.zarr")
1616
embedding_pca = compute_pca(image_embeddings["features"])
1717

1818
seg, initial_seg = segment_from_embeddings(predictor, image_embeddings=image_embeddings, return_initial_seg=True)
@@ -26,14 +26,16 @@ def mito_segmentation():
2626

2727

2828
def cell_segmentation():
29-
path = "./DIC-C2DH-HeLa/train/01"
29+
path = "../examples/data/DIC-C2DH-HeLa/train/01"
3030
with open_file(path, mode="r") as f:
3131
timeseries = f["*.tif"][:50]
3232

3333
frame = 11
3434

3535
predictor = util.get_sam_model()
36-
image_embeddings = util.precompute_image_embeddings(predictor, timeseries, "./embeddings/embeddings-ctc.zarr")
36+
image_embeddings = util.precompute_image_embeddings(
37+
predictor, timeseries, "../examples/embeddings/embeddings-ctc.zarr"
38+
)
3739
embedding_pca = compute_pca(image_embeddings["features"][frame])
3840

3941
seg, initial_seg = segment_from_embeddings(

0 commit comments

Comments
 (0)