Skip to content

Add ImageFolderWithoutTargets #47

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

Closed
wants to merge 2 commits into from

Conversation

desimone
Copy link

@desimone desimone commented Jan 25, 2017

Useful data loading in instances where you need data from disk, but don't have labels, or the labels aren't in the form of {root}/{category}/{image}.

Don't love the class name.

@apaszke
Copy link
Contributor

apaszke commented Jan 25, 2017

I think we should revert the class naming i.e. have ImageFolder be something that just globs the images and ImageClassFolder (or similar) to load the currently supported structure.

@desimone
Copy link
Author

I think that makes sense. It would be cool if we could also have a flag on ImageFolder to allow recursive directory walking too.

I'm happy to make those changes but know it would break some existing code in examples and in other places as well.

@apaszke
Copy link
Contributor

apaszke commented Jan 25, 2017

Yeah, we wanted to make that change before the release but we didn't make it. If you make this change I can go over examples. We'll put that as an API change for the next release.

@soumith
Copy link
Member

soumith commented Jan 25, 2017

hmmm, not a good idea to change the name now. ImageFolder is being used everywhere (many projects outside of examples). Best we can do is give a keyword argument to ImageFolder that add the behavior in this PR

@yanghuanflc
Copy link
Contributor

I maintained my own version with a dataset class named as ImageReference, which using a reference txt file to indicate the image paths and labels, then you can load images from anywhere you want only with a reference file. I can setup a PR with it if needed.

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.

4 participants