Skip to content

Commit 2b403ad

Browse files
Fix shrink_labels for 1D face strips in 2D distributed segmentation.
Drop test file; keep minimal change in shrink_labels only. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent de77465 commit 2b403ad

2 files changed

Lines changed: 0 additions & 27 deletions

File tree

cellpose/contrib/distributed_segmentation.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -884,8 +884,6 @@ def shrink_labels(plane, threshold):
884884
"""Shrink labels in plane by some distance from their boundary"""
885885
squeezed = plane.squeeze()
886886
grads = np.gradient(squeezed)
887-
# 1D face strips (2D image tiling): np.gradient returns a bare array, not a list.
888-
# np.linalg.norm(1d_array, axis=0) is a scalar and would zero every pixel.
889887
if not isinstance(grads, tuple):
890888
grads = (grads,)
891889
gradmag = np.linalg.norm(grads, axis=0)

tests/test_distributed_segmentation.py

Lines changed: 0 additions & 25 deletions
This file was deleted.

0 commit comments

Comments
 (0)