Skip to content
This repository has been archived by the owner on Jul 1, 2024. It is now read-only.

added SA-1B dataset class #378

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

simoneangarano
Copy link

I noticed a custom PyTorch dataset class was missing, and I thought it could also be useful for other users.
The class simply inherits from ImageFolder and loads decoded masks as targets.
Enjoy!

Simone Angarano
PhD Student at Politecnico di Torino, Interdepartmental Center for Service Robotics (PIC4SeR)
Email: simone.angarano@polito.it
Website: simoneangarano.github.io

@facebook-github-bot
Copy link

Hi @simoneangarano!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks!

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label May 19, 2023
@FrankFundel
Copy link

SA-1B does not include classes. Should use custom Dataset instead of ImageFolder.

@simoneangarano
Copy link
Author

SA-1B does not include classes. Should use custom Dataset instead of ImageFolder.

It's up to you; this version returns the list of masks without any assigned class, and it does the job.

@sborse3
Copy link

sborse3 commented Jun 28, 2023

Hi @simoneangarano , I found initializing this dataloader quite slow, as SA-1B is huge. Any workaround you would suggest?

@simoneangarano
Copy link
Author

Hi @sborse3 ,
Unfortunately, the dataset is huge (11M images), so I don't think there's a workaround for that...
However, the DataLoader should load only a batch at a time in memory. Just use a smaller batch size to load fewer samples at a time.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants