Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

datasets.rst 3.8 KB

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
  1. .. _datasets:
  2. Datasets
  3. ========
  4. Torchvision provides many built-in datasets in the ``torchvision.datasets``
  5. module, as well as utility classes for building your own datasets.
  6. Built-in datasets
  7. -----------------
  8. All datasets are subclasses of :class:`torch.utils.data.Dataset`
  9. i.e, they have ``__getitem__`` and ``__len__`` methods implemented.
  10. Hence, they can all be passed to a :class:`torch.utils.data.DataLoader`
  11. which can load multiple samples in parallel using ``torch.multiprocessing`` workers.
  12. For example: ::
  13. imagenet_data = torchvision.datasets.ImageNet('path/to/imagenet_root/')
  14. data_loader = torch.utils.data.DataLoader(imagenet_data,
  15. batch_size=4,
  16. shuffle=True,
  17. num_workers=args.nThreads)
  18. .. currentmodule:: torchvision.datasets
  19. All the datasets have almost similar API. They all have two common arguments:
  20. ``transform`` and ``target_transform`` to transform the input and target respectively.
  21. You can also create your own datasets using the provided :ref:`base classes <base_classes_datasets>`.
  22. .. warning::
  23. When a dataset object is created with ``download=True``, the files are first
  24. downloaded and extracted in the root directory. This download logic is not
  25. multi-process safe, so it may lead to conflicts / race conditions if it is
  26. run within a distributed setting. In distributed mode, we recommend creating
  27. a dummy dataset object to trigger the download logic *before* setting up
  28. distributed mode.
  29. Image classification
  30. ~~~~~~~~~~~~~~~~~~~~
  31. .. autosummary::
  32. :toctree: generated/
  33. :template: class_dataset.rst
  34. Caltech101
  35. Caltech256
  36. CelebA
  37. CIFAR10
  38. CIFAR100
  39. Country211
  40. DTD
  41. EMNIST
  42. EuroSAT
  43. FakeData
  44. FashionMNIST
  45. FER2013
  46. FGVCAircraft
  47. Flickr8k
  48. Flickr30k
  49. Flowers102
  50. Food101
  51. GTSRB
  52. INaturalist
  53. ImageNet
  54. Imagenette
  55. KMNIST
  56. LFWPeople
  57. LSUN
  58. MNIST
  59. Omniglot
  60. OxfordIIITPet
  61. Places365
  62. PCAM
  63. QMNIST
  64. RenderedSST2
  65. SEMEION
  66. SBU
  67. StanfordCars
  68. STL10
  69. SUN397
  70. SVHN
  71. USPS
  72. Image detection or segmentation
  73. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  74. .. autosummary::
  75. :toctree: generated/
  76. :template: class_dataset.rst
  77. CocoDetection
  78. CelebA
  79. Cityscapes
  80. Kitti
  81. OxfordIIITPet
  82. SBDataset
  83. VOCSegmentation
  84. VOCDetection
  85. WIDERFace
  86. Optical Flow
  87. ~~~~~~~~~~~~
  88. .. autosummary::
  89. :toctree: generated/
  90. :template: class_dataset.rst
  91. FlyingChairs
  92. FlyingThings3D
  93. HD1K
  94. KittiFlow
  95. Sintel
  96. Stereo Matching
  97. ~~~~~~~~~~~~~~~
  98. .. autosummary::
  99. :toctree: generated/
  100. :template: class_dataset.rst
  101. CarlaStereo
  102. Kitti2012Stereo
  103. Kitti2015Stereo
  104. CREStereo
  105. FallingThingsStereo
  106. SceneFlowStereo
  107. SintelStereo
  108. InStereo2k
  109. ETH3DStereo
  110. Middlebury2014Stereo
  111. Image pairs
  112. ~~~~~~~~~~~
  113. .. autosummary::
  114. :toctree: generated/
  115. :template: class_dataset.rst
  116. LFWPairs
  117. PhotoTour
  118. Image captioning
  119. ~~~~~~~~~~~~~~~~
  120. .. autosummary::
  121. :toctree: generated/
  122. :template: class_dataset.rst
  123. CocoCaptions
  124. Video classification
  125. ~~~~~~~~~~~~~~~~~~~~
  126. .. autosummary::
  127. :toctree: generated/
  128. :template: class_dataset.rst
  129. HMDB51
  130. Kinetics
  131. UCF101
  132. Video prediction
  133. ~~~~~~~~~~~~~~~~~~~~
  134. .. autosummary::
  135. :toctree: generated/
  136. :template: class_dataset.rst
  137. MovingMNIST
  138. .. _base_classes_datasets:
  139. Base classes for custom datasets
  140. --------------------------------
  141. .. autosummary::
  142. :toctree: generated/
  143. :template: class.rst
  144. DatasetFolder
  145. ImageFolder
  146. VisionDataset
  147. Transforms v2
  148. -------------
  149. .. autosummary::
  150. :toctree: generated/
  151. :template: function.rst
  152. wrap_dataset_for_transforms_v2
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...