Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VHR10 uses 'masks' as data_key, not 'mask' #2114

Open
robmarkcole opened this issue Jun 10, 2024 · 1 comment
Open

VHR10 uses 'masks' as data_key, not 'mask' #2114

robmarkcole opened this issue Jun 10, 2024 · 1 comment
Assignees
Labels
datasets Geospatial or benchmark datasets
Milestone

Comments

@robmarkcole
Copy link
Contributor

robmarkcole commented Jun 10, 2024

Description

As title. All other datasets uses mask and this is supported by kornia, and the segmentation trainer requires it. This should be addressed by converting references to masks to mask. I understand AugPipe will be removed in #1978 but collate_fn_detection is also affected.

Not sure how this is related but there appears to be a mask per box annotated:

image torch.Size([3, 563, 792])
boxes torch.Size([3, 4])
labels torch.Size([3])
mask torch.Size([3, 563, 792])

Appears the mask itself is not encoding the class value, so I gather this is not meant to be used with the segmentation trainer afterall

Steps to reproduce

NA

Version

main

@adamjstewart adamjstewart added this to the 0.5.3 milestone Jun 10, 2024
@adamjstewart adamjstewart added the datasets Geospatial or benchmark datasets label Jun 10, 2024
@ashnair1
Copy link
Collaborator

ashnair1 commented Jun 22, 2024

You're correct in that the masks field is not to be used with the segmentation trainer; you need to use the mask field for that. Currently, within torchgeo there is a distinction between masks and mask.

  • mask is used to denote semantic segmentation masks. These are tensors that encode class values.
  • masks are used to denote instance segmentation masks. These are (N, H, W) tensors where N is the number of unique objects/instances detected.

This distinction is present because kornia did not support instance masks, so there was no way to distinguish between the two. So, this was introduced in our custom AugmentationSequential to ensure both keys were handled appropriately.

This support is being added to kornia, and with it's next release, we should hopefully be able to finally remove the masks field and our custom AugmentationSequential.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
datasets Geospatial or benchmark datasets
Projects
None yet
Development

No branches or pull requests

3 participants