Skip to content

Commit c2d0f3d

Browse files
lufre1anwai98
andauthored
added examples to clarify how to submit args (#1282)
* added examples to clarify how to submit args * Update micro_sam/automatic_segmentation.py * Update micro_sam/automatic_segmentation.py * Fix graph edge dtype for latest bioimage-cpp --------- Co-authored-by: Anwai Archit <anwai.archit@gmail.com>
1 parent 726715b commit c2d0f3d

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

micro_sam/automatic_segmentation.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -399,10 +399,12 @@ def main():
399399
"-c", "--checkpoint", default=None, type=str, help="Checkpoint from which the SAM model will be loaded."
400400
)
401401
parser.add_argument(
402-
"--tile_shape", nargs="+", type=int, help="The tile shape for using tiled prediction.", default=None
402+
"--tile_shape", nargs="+", type=int,
403+
help="The tile shape for using tiled prediction. Example: --tile_shape 384 384.", default=None
403404
)
404405
parser.add_argument(
405-
"--halo", nargs="+", type=int, help="The halo for using tiled prediction.", default=None
406+
"--halo", nargs="+", type=int,
407+
help="The halo for using tiled prediction. Example: --tile_shape 64 64.", default=None
406408
)
407409
parser.add_argument(
408410
"-n", "--ndim", default=None, type=int,

micro_sam/multi_dimensional_segmentation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ def merge_instance_segmentation_3d(
357357
if len(edges) == 0: # Nothing to merge.
358358
return slice_segmentation
359359

360-
uv_ids = np.array([[edge["source"], edge["target"]] for edge in edges])
360+
uv_ids = np.array([[edge["source"], edge["target"]] for edge in edges], dtype=np.uint64)
361361
overlaps = np.array([edge["score"] for edge in edges])
362362

363363
n_nodes = int(slice_segmentation.max() + 1)

0 commit comments

Comments
 (0)