Skip to content

Commit

Permalink
Reduce autoseg cli tests to one image
Browse files Browse the repository at this point in the history
  • Loading branch information
anwai98 committed Nov 19, 2024
1 parent 4d6867a commit 83a3595
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions test/test_sam_annotator/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,10 @@ def test_image_series_annotator(self):
def test_precompute_embeddings(self):
self._test_command("micro_sam.precompute_embeddings")

# Create 2 images as testdata.
n_images = 2
for i in range(n_images):
im_path = os.path.join(self.tmp_folder, f"image-{i}.tif")
image_data = binary_blobs(512).astype("uint8") * 255
imageio.imwrite(im_path, image_data)
# Create 1 image as testdata.
im_path = os.path.join(self.tmp_folder, "image.tif")
image_data = binary_blobs(512).astype("uint8") * 255
imageio.imwrite(im_path, image_data)

# Test precomputation with a single image.
emb_path1 = os.path.join(self.tmp_folder, "embedddings1.zarr")
Expand Down

0 comments on commit 83a3595

Please sign in to comment.