Skip to content

Commit

Permalink
Coverage fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ashnair1 committed Jun 29, 2023
1 parent ee0df8a commit d83be5e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
2 changes: 0 additions & 2 deletions torchgeo/datamodules/vhr10.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
from ..transforms import AugmentationSequential
from .geo import NonGeoDataModule

# kornia DataKeys must accept MASKS


class _AugPipe(Module):
"""Pipeline for applying augmentations sequentially on select data keys."""
Expand Down
5 changes: 1 addition & 4 deletions torchgeo/datasets/vhr10.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,7 @@ def convert_coco_poly_to_mask(
mask = torch.as_tensor(mask, dtype=torch.uint8)
mask = mask.any(dim=2)
masks.append(mask)
if masks:
masks_tensor = torch.stack(masks, dim=0)
else:
masks_tensor = torch.zeros((0, height, width), dtype=torch.uint8)
masks_tensor = torch.stack(masks, dim=0)
return masks_tensor


Expand Down

0 comments on commit d83be5e

Please sign in to comment.