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

custom dataset from directory #214

Closed
wants to merge 3 commits into from
Closed

custom dataset from directory #214

wants to merge 3 commits into from

Conversation

Data-Iab
Copy link
Collaborator

@Data-Iab Data-Iab commented Aug 22, 2022

  • New feature : Create image data iterator from path. Useful for:
    • Calibration: when the dataset iterator is not defined.
    • testing: when you need to test with some images stored is a folder.

caution : the iterator does not take into consideration frames synchronization when the class is instantiated with a dict

from alodataset import FromDirectoryDataset


# You can either pass a dict or a list of paths
# from list of paths.
path1 = "/PATH/TO/DATA/DIR1"
path2 = "/PATH/TO/DATA/DIR2"

data = FromDirectoryDataset(dirs=[path1, path2])
img = data[0]

# from dict of list of paths.
path0 = "/PATH/TO/DATA/DIR0"
path1 = "/PATH/TO/DATA/DIR1"
path2 = "/PATH/TO/DATA/DIR2"
path3 = "/PATH/TO/DATA/DIR3"

data = FromDirectoryDataset(dirs={"key1": [path0, path1], "key2": [path2, path3]])
img_key1 = data[0]["key1"]
img_key2 = data[0]["key2"]

This pull request includes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

@Data-Iab Data-Iab self-assigned this Aug 22, 2022
@Data-Iab Data-Iab marked this pull request as draft August 22, 2022 13:26
@thibo73800
Copy link
Contributor

Is this MR still in progressDRAFT ?

@Data-Iab
Copy link
Collaborator Author

Data-Iab commented Oct 3, 2022

@thibo73800 yes, few tiny changes needed

@Data-Iab
Copy link
Collaborator Author

to alobugs

@Data-Iab Data-Iab closed this Nov 17, 2022
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 this pull request may close these issues.

None yet

2 participants