-
Notifications
You must be signed in to change notification settings - Fork 7k
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
Add VGGface2 dataset #1193
Add VGGface2 dataset #1193
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1193 +/- ##
==========================================
- Coverage 65.74% 64.99% -0.76%
==========================================
Files 79 75 -4
Lines 5827 5842 +15
Branches 887 898 +11
==========================================
- Hits 3831 3797 -34
- Misses 1727 1778 +51
+ Partials 269 267 -2
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR!
About the tests, can you create some fake images following imagenet, and also some random csv files?
Check test/test_datasets.py
for more details.
About the structure of the dataset, I'm thinking if we should always return the full image plus a dict with the id
/ box
/ landmarks
.
Even though some datasets already provide options in the constructor to define how the output should look like, I think it might just be better to always return the same thing consistently, and let the transform / user code handle the data they want.
Thoughts?
This might not be a good idea, since it will require the user to download all the optional metadata files to use the dataset. If all the metadata came from one file, this would have been good. Also, having to provide additional data only to remove it using a target_transform feels wrong. What do you think? |
But the metadata is much smaller than the images in size, right? So this should not be a problem I think. And we could provide the download function in the dataset itself.
I'm not 100% sure. Having the type of output of the dataset depend on a constructor argument doesn't sound like the best thing to me. I'll let others give their opinion in here. cc @soumith @cpuhrsch @zhangguanheng66 what do you think? |
@fmassa what should we do? |
I'm very sorry for the delay in replying, it was sent just after I came back from holidays and I missed your message from a pile of notifications. I still think that returning a dict with all the metadata would make more sense, if it's what the dataset provides by default. As I mentioned before, having the return values depend on a constructor argument adds a lot less structure to the datasets, and is done only for convenience with the current transforms. Plus, we would probably also want to handle the empty case as well, as discussed in #1351 I'll ping @cpuhrsch @zhangguanheng66 and @vincentqb again on thoughts about it. |
I second that, with maybe a minor tweak. Do we have an example of a dataset returning more than one tensor? I'd say a dict is a good idea, but the tensors returned could be part of it to address such case. This however pushes the organization of a dataset into how we structure the dict itself. :) Thoughts?
Can you clarify this @dakshjotwani? Could the dict only contain the fields that were downloaded? |
Sorry for the late reply, I just saw these messages buried in my email!
Yes we can. I think that's a good way to avoid returning extra data that would later end up being removed with a target_transform. @fmassa I agree that returning a dict is a good idea as long as we construct the dict based on the metadata/fields files provided as args to the constructor. What do you think? |
Is this PR still being worked? |
I can pick it up again. @fmassa @jgbradley1 should I close this PR and open a new one? This one's about a year old and a lot of things have changed since then. |
Since 2 files are only impacted by this change, it seems simpler to just update the branch from I'm interested in seeing this dataset get added. A couple suggestions I have:
|
Since this PR has been open for awhile, I wrote a quick updated version of what the dataset could look like here. It matches the design of the CelebA Dataset. |
Given that @dakshjotwani wrote:
and @jgbradley1 already send the update in #2910, I'm going to close this PR. |
PR for adding VGGFace2 dataset.
Questions:
CelebA
test cases to use as reference and didn't see any test cases for that dataset either.