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
  • Loading branch information
anwai98 authored and titusgriebel committed Nov 22, 2024
1 parent 7ca5fa9 commit b8c0fcd
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 b8c0fcd

Please sign in to comment.