Skip to content

Added the DTD dataset #743

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 5 commits into from
Closed

Added the DTD dataset #743

wants to merge 5 commits into from

Conversation

pmeier
Copy link
Collaborator

@pmeier pmeier commented Feb 13, 2019

This adds the DTD dataset. At its core it is a ImageFolder dataset. Next to a split into train, val and test sets, it contains 10 predefined folds of each partial set.

I've sub-classed ImageFolder class and added support to download it from scratch. I can verify the downloaded archive, but I couldn't think of a way to do this for the extracted content. Thus, the download flag defaults to False.

The index of each image within self.imgs depends on split and fold. I've implemented a converter, which converts the indices between the complete and partial sets. Since the images are only loaded at runtime, split and fold can also be changed at runtime, which triggers a re-initialization of the converter.

@codecov-io
Copy link

codecov-io commented Feb 14, 2019

Codecov Report

Merging #743 into master will increase coverage by 0.22%.
The diff coverage is 25.71%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #743      +/-   ##
==========================================
+ Coverage   39.72%   39.95%   +0.22%     
==========================================
  Files          29       30       +1     
  Lines        2724     2816      +92     
  Branches      430      437       +7     
==========================================
+ Hits         1082     1125      +43     
- Misses       1568     1615      +47     
- Partials       74       76       +2
Impacted Files Coverage Δ
torchvision/datasets/__init__.py 100% <100%> (ø) ⬆️
torchvision/datasets/dtd.py 24.63% <24.63%> (ø)
torchvision/models/alexnet.py 38.09% <0%> (-4.02%) ⬇️
torchvision/models/vgg.py 18.18% <0%> (-0.38%) ⬇️
torchvision/models/inception.py 14.41% <0%> (-0.07%) ⬇️
torchvision/datasets/mnist.py 29.19% <0%> (+0.81%) ⬆️
torchvision/transforms/transforms.py 83.41% <0%> (+3.93%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 680c745...4bb9f6d. Read the comment docs.

@pmeier
Copy link
Collaborator Author

pmeier commented Feb 14, 2019

I've split the implementation into the overall DTD dataset and subsets which are characterized by the split and fold. Furthermore I removed the ability to change the split and fold at runtime, since its probably mess up the iteration if changed within an epoch.

@fmassa
Copy link
Member

fmassa commented Feb 19, 2019

Hi,

This looks generally good, thanks!

There are a few linter errors, can you fix them?

./torchvision/datasets/dtd.py:138:72: E128 continuation line under-indented for visual indent
./torchvision/datasets/dtd.py:147:1: W391 blank line at end of file

@pmeier
Copy link
Collaborator Author

pmeier commented Feb 25, 2021

Closing this as the DTD dataset does not fit our current understanding of which datasets should be added to torchvision.

@pmeier pmeier closed this Feb 25, 2021
@pmeier pmeier deleted the dtd_dataset branch February 25, 2021 07:26
@pmeier pmeier mentioned this pull request Dec 19, 2021
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.

4 participants