Skip to content

Commit

Permalink
add 'pynrrd' to README
Browse files Browse the repository at this point in the history
  • Loading branch information
mese79 committed Jan 21, 2024
1 parent 3d6ee3e commit 52168d1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ conda env create -f ./env.yml
- `pytorch`
- `tochvision`
- `timm`
- `pynrrd`

### Installing The Plugin
To install the plugin, open the command prompt in the plugin directory, and run the following command:
Expand Down
6 changes: 3 additions & 3 deletions src/napari_sam_labeling_tools/utils/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,6 @@ def unpatchify(
batch_patches = embed_patches.reshape(
batch_size, num_patches_h, num_patches_w, c, patch_size, patch_size
).contiguous()
padded_images = torch.zeros((
batch_size, c, img_h + pad_bottom, img_w + pad_right
))
# print(padded_images.shape)
target_patches = batch_patches[
:, :, :, :, margin: margin + target_size, margin: margin + target_size
Expand All @@ -60,6 +57,9 @@ def unpatchify(
batch_size, c, num_patches_h * target_size, num_patches_w * target_size
)
# print(target_patches.shape)
padded_images = torch.zeros((
batch_size, c, img_h + pad_bottom, img_w + pad_right
))
padded_images[
:, :, : num_patches_h * target_size, : num_patches_w * target_size
] = target_patches
Expand Down

0 comments on commit 52168d1

Please sign in to comment.