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

Core data loader #1

Closed
talmo opened this issue Jul 5, 2023 · 0 comments · Fixed by #4
Closed

Core data loader #1

talmo opened this issue Jul 5, 2023 · 0 comments · Fixed by #4

Comments

@talmo
Copy link
Contributor

talmo commented Jul 5, 2023

  • PyTorch (PTL?) Dataset
  • Support loading SLP files using sleap_io
  • Be able to return individual LabeledFrames and the corresponding Instances and image in a dictionary of numpy arrays

This should be analogous to LabelsReader in main SLEAP.

Notes:

  • Be mindful of tensor ordering! PyTorch expects channel-first ordering (frames, channels, width, height), so we should use that ordering as soon as possible (but check what the augmentation backends prefer in Augmentation pipeline block #2). The idea is to minimize the number of times we do permutations -- more specifically, we want to minimize the number of copies we have to make of the large image arrays. It might be possible to get around this with Tensor Views though see the notes on this:

    Taking a view of a contiguous tensor could potentially produce a non-contiguous tensor. Users should pay additional attention as contiguity might have implicit performance impact.

  • Use multiprocessing/concurrency if possible at this step (but might need to happen at the DataLoader level later?)
@davidasamy davidasamy linked a pull request Jul 6, 2023 that will close this issue
@talmo talmo closed this as completed in #4 Jul 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant