Skip to content

Conversation

pmeier
Copy link
Collaborator

@pmeier pmeier commented Oct 7, 2021

This fixes one bug and one inconsistency in the Caltech(101|256) datasets. See inline comments for details.

cc @pmeier

Comment on lines +185 to +191
n = len(
[
item
for item in os.listdir(os.path.join(self.root, "256_ObjectCategories", c))
if item.endswith(".jpg")
]
)
Copy link
Collaborator Author

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",
Copy link
Collaborator Author

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.

Copy link
Contributor

@prabhat00155 prabhat00155 left a 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.

@prabhat00155 prabhat00155 merged commit 32df801 into pytorch:main Oct 7, 2021
facebook-github-bot pushed a commit that referenced this pull request Oct 8, 2021
Summary: Co-authored-by: Prabhat Roy <prabhatroy@fb.com>

Reviewed By: NicolasHug

Differential Revision: D31505552

fbshipit-source-id: 1903c12ab14e3b87e82c4b926fed7e5455f9cd27
@pmeier pmeier deleted the fix-caltech branch October 18, 2021 06:35
mszhanyi pushed a commit to mszhanyi/vision that referenced this pull request Oct 19, 2021
Co-authored-by: Prabhat Roy <prabhatroy@fb.com>
cyyever pushed a commit to cyyever/vision that referenced this pull request Nov 16, 2021
Co-authored-by: Prabhat Roy <prabhatroy@fb.com>
@jdsgomes jdsgomes added the bug label Feb 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants