-
Notifications
You must be signed in to change notification settings - Fork 7.2k
fix Caltech datasets #4556
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
fix Caltech datasets #4556
Conversation
n = len( | ||
[ | ||
item | ||
for item in os.listdir(os.path.join(self.root, "256_ObjectCategories", c)) | ||
if item.endswith(".jpg") | ||
] | ||
) |
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.
The folders contain one rogue folder as well as one rogue file. Just going by the number of items in the folder and assuming everything is an image, will result in an error if we iterate over the complete dataset.
download_and_extract_archive( | ||
"http://www.vision.caltech.edu/Image_Datasets/Caltech101/Annotations.tar", | ||
self.root, | ||
filename="101_Annotations.tar", |
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.
For some (probably unintended) reason, we renamed this file instead of leaving it as is.
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 @pmeier, looks good to me.
Summary: Co-authored-by: Prabhat Roy <prabhatroy@fb.com> Reviewed By: NicolasHug Differential Revision: D31505552 fbshipit-source-id: 1903c12ab14e3b87e82c4b926fed7e5455f9cd27
Co-authored-by: Prabhat Roy <prabhatroy@fb.com>
Co-authored-by: Prabhat Roy <prabhatroy@fb.com>
This fixes one bug and one inconsistency in the
Caltech(101|256)
datasets. See inline comments for details.cc @pmeier