Skip to content

Commit 691d26e

Browse files
Use bounding box projection as method in tracking
1 parent c759b44 commit 691d26e

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

micro_sam/sam_annotator/annotator_tracking.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -218,12 +218,9 @@ def track_objet_widget(
218218
):
219219
shape = v.layers["raw"].data.shape
220220

221-
# choose mask projection for square images and bounding box projection otherwise
222-
# (because mask projection does not work properly for non-square images yet)
223-
if projection == "default":
224-
projection_ = "mask" if shape[1] == shape[2] else "bounding_box"
225-
else:
226-
projection_ = projection
221+
# we use the bounding box projection method as default which generally seems to work better for larger changes
222+
# between frames (which is pretty tyipical for tracking compared to 3d segmentation)
223+
projection_ = "bounding_box" if projection == "default" else projection
227224

228225
with progress(total=shape[0]) as progress_bar:
229226
# step 1: segment all slices with prompts

0 commit comments

Comments
 (0)