Skip to content

Commit

Permalink
fixed bug on padding image
Browse files Browse the repository at this point in the history
  • Loading branch information
mese79 committed Feb 2, 2024
1 parent 0c3d7a2 commit 5c50209
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/napari_sam_labeling_tools/utils/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ def patchify(imgs, patch_size, target_size):
pad_right = patch_size - (new_width % patch_size)
pad_bottom = patch_size - (new_height % patch_size)
pad = (margin, pad_right + margin, margin, pad_bottom + margin)
pad = (margin, pad_right - margin, margin, pad_bottom - margin)
padded_imgs = F.pad(imgs, pad=pad, mode="reflect")
patches = padded_imgs.unfold(
2, patch_size, step=target_size).unfold(
Expand Down

0 comments on commit 5c50209

Please sign in to comment.