Skip to content

Commit

Permalink
Fix automatic segmentation cli - check tile shape and return expected…
Browse files Browse the repository at this point in the history
… segmenter (#767)
  • Loading branch information
anwai98 authored Oct 29, 2024
1 parent 13ecbb5 commit b9f3f87
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions micro_sam/automatic_segmentation.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import os
from pathlib import Path
from typing import Optional, Union, Tuple, Dict
from typing import Optional, Union, Tuple

import numpy as np
import imageio.v3 as imageio
Expand Down Expand Up @@ -229,7 +229,10 @@ def _convert_argval(value):
}

predictor, segmenter = get_predictor_and_segmenter(
model_type=args.model_type, checkpoint=args.checkpoint, device=args.device,
model_type=args.model_type,
checkpoint=args.checkpoint,
device=args.device,
is_tiled=args.tile_shape is not None,
)

automatic_instance_segmentation(
Expand Down

0 comments on commit b9f3f87

Please sign in to comment.