Skip to content
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

Added CUB2011 dataset #147

Closed
wants to merge 1 commit into from
Closed

Added CUB2011 dataset #147

wants to merge 1 commit into from

Conversation

vadimkantorov
Copy link

@vadimkantorov vadimkantorov commented Apr 15, 2017

For testing some metric learning methods I created a wrapper for CUB2011 dataset (inheriting from CIFAR10 for download functionality and from ImageFolder for directory parsing).

The dataset is small, so it'd be possible to serve it from memory, but haven't needed it yet. Also not sure about the good practice on integrity hashes, just put there whole archive hash and a few image hashes.

Let me know what you think!

from torchvision.datasets import ImageFolder
from torchvision.datasets import CIFAR10

class Cub2011(ImageFolder, CIFAR10):

This comment was marked as off-topic.

This comment was marked as off-topic.

@szagoruyko
Copy link
Contributor

can you add annotations?

@vadimkantorov
Copy link
Author

vadimkantorov commented Apr 16, 2017

I'll rename the class and will fix lint errors.

About the annotations, every image seems to have "15 Part Locations, 312 Binary Attributes, 1 Bounding Box".
Do we have an accepted format for bounding boxes? (x1-y1-x2-y2?)

I will check if an image always have 15 part locations, that would simplify the encoding.

@vadimkantorov
Copy link
Author

VOC pull request indeed uses "[xmin, ymin, xmax, ymax, ind]" format so I'll stick to it.

from torchvision.datasets import ImageFolder
from torchvision.datasets import CIFAR10

class Cub2011(ImageFolder, CIFAR10):

This comment was marked as off-topic.

tgz_md5 = '97eceeb196236b17998738112f37df78'

train_list = [
['001.Black_footed_Albatross/Black_Footed_Albatross_0001_796111.jpg', '4c84da568f89519f84640c54b7fba7c2'],

This comment was marked as off-topic.

['001.Black_footed_Albatross/Black_Footed_Albatross_0001_796111.jpg', '4c84da568f89519f84640c54b7fba7c2'],
['002.Laysan_Albatross/Laysan_Albatross_0001_545.jpg', 'e7db63424d0e384dba02aacaf298cdc0'],
]
test_list = [

This comment was marked as off-topic.

@varunagrawal
Copy link
Contributor

Is this PR still relevant? @vadimkantorov seems to have deleted his torchvision fork.

@vadimkantorov
Copy link
Author

I am not working on this. Please go ahead if you wish to pick this up (my original CUB2011 dataset code is here: https://github.com/vadimkantorov/metriclearningbench/blob/master/cub2011.py )

Some things you may want to look at:

  1. Refactor super-hacky class CUB2011(ImageFolder, CIFAR10) way to reuse dataset download steps. Maybe now there's a better API for that.
  2. Actually implement "15 Part Locations, 312 Binary Attributes, 1 Bounding Box" loading (but maybe the CUB2011MetricLearning would suffice?)

@pmeier
Copy link
Collaborator

pmeier commented Jun 28, 2021

@vadimkantorov

I am not working on this.

Closing this in favor of #4126.

@pmeier pmeier closed this Jun 28, 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.

5 participants