Skip to content

What's the advantage of torchvision.datasets.ImageNet? #1504

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
Hou9612 opened this issue Oct 19, 2019 · 5 comments
Closed

What's the advantage of torchvision.datasets.ImageNet? #1504

Hou9612 opened this issue Oct 19, 2019 · 5 comments

Comments

@Hou9612
Copy link

Hou9612 commented Oct 19, 2019

Hi I use torchvision==0.2.2 now and I'm hesitant to update torchvision. I am worried that updating torchvision may bring some unexpected problems. so I want to know what's the advantage of torchvision.datasets.ImageNet comparing with torchvision.datasets.ImageFolder? Will it be faster when reading and processing ImageNet?

@surgan12
Copy link
Contributor

Have a look here #713 specifically #713 (comment).

@pmeier
Copy link
Collaborator

pmeier commented Oct 21, 2019

By using the ImageNet dataset you will have the following advantages:

  • After the download of the archives you don't need to manually prepare them for usage, i. e. you don't have to move the validation images in the appropriate folders
  • The ImageNet object has the functionality of ImageFolder.classes and ImageFolder.class_to_idx implemented under ImageNet.wnids and ImageNet.wnid_to_idx. ImageNet.classes and ImageNet.class_to_idx have to same functionality but refer to the human-readable classes rather than the WordNet IDs.

Other than that the ImageNet dataset has no advantages over the ImageFolder. If you don't need or want the above properties you don't need to upgrade.

@Hou9612
Copy link
Author

Hou9612 commented Oct 21, 2019

Have a look here #713 specifically #713 (comment).

Thanks, I'll have a look at it.

@Hou9612
Copy link
Author

Hou9612 commented Oct 21, 2019

By using the ImageNet dataset you will have the following advantages:

  • After the download of the archives you don't need to manually prepare them for usage, i. e. you don't have to move the validation images in the appropriate folders
  • The ImageNet object has the functionality of ImageFolder.classes and ImageFolder.class_to_idx implemented under ImageNet.wnids and ImageNet.wnid_to_idx. ImageNet.classes and ImageNet.class_to_idx have to same functionality but refer to the human-readable classes rather than the WordNet IDs.

Other than that the ImageNet dataset has no advantages over the ImageFolder. If you don't need or want the above properties you don't need to upgrade.

Thanks, I think maybe I don't need to update it.

@fmassa
Copy link
Member

fmassa commented Oct 21, 2019

Closing following @pmeier and @surgan12 comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants