Elriggs commited on
Commit
d8574c2
·
verified ·
1 Parent(s): 3d4b5d2

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +162 -77
README.md CHANGED
@@ -1,80 +1,165 @@
1
  ---
2
  dataset_info:
3
- features:
4
- - name: image
5
- dtype: image
6
- - name: label
7
- dtype:
8
- class_label:
9
- names:
10
- '0': tench
11
- '1': goldfish
12
- '2': great white shark
13
- '3': tiger shark
14
- '4': hammerhead
15
- '5': electric ray
16
- '6': stingray
17
- '7': cock
18
- '8': hen
19
- '9': ostrich
20
- '10': brambling
21
- '11': goldfinch
22
- '12': house finch
23
- '13': junco
24
- '14': indigo bunting
25
- '15': robin
26
- '16': bulbul
27
- '17': jay
28
- '18': magpie
29
- '19': chickadee
30
- '20': water ouzel
31
- '21': kite
32
- '22': bald eagle
33
- '23': vulture
34
- '24': great grey owl
35
- '25': European fire salamander
36
- '26': common newt
37
- '27': eft
38
- '28': spotted salamander
39
- '29': axolotl
40
- '30': bullfrog
41
- '31': tree frog
42
- '32': tailed frog
43
- '33': loggerhead
44
- '34': leatherback turtle
45
- '35': mud turtle
46
- '36': terrapin
47
- '37': box turtle
48
- '38': banded gecko
49
- '39': common iguana
50
- '40': American chameleon
51
- '41': whiptail
52
- '42': agama
53
- '43': frilled lizard
54
- '44': alligator lizard
55
- '45': Gila monster
56
- '46': green lizard
57
- '47': African chameleon
58
- '48': Komodo dragon
59
- '49': African crocodile
60
- - name: wnid
61
- dtype: string
62
- - name: class_name
63
- dtype: string
64
- splits:
65
- - name: train
66
- num_bytes: 5311045365.0
67
- num_examples: 45000
68
- - name: validation
69
- num_bytes: 610425193.0
70
- num_examples: 5000
71
- download_size: 6271612635
72
- dataset_size: 5921470558.0
73
- configs:
74
- - config_name: default
75
- data_files:
76
- - split: train
77
- path: data/train-*
78
- - split: validation
79
- path: data/validation-*
80
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  dataset_info:
3
+ dataset_name: imagenet-50-subset
4
+ dataset_size: 50 classes, 50000 images
5
+ task_categories:
6
+ - image-classification
7
+ language:
8
+ - en
9
+ size_categories:
10
+ - 10K<n<100K
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11
  ---
12
+
13
+ # ImageNet-50 Subset
14
+
15
+ This dataset contains the first 50 classes from ImageNet-1K with up to 1,000 images per class (where available).
16
+
17
+ ## Dataset Statistics
18
+
19
+ - **Total Classes**: 50
20
+ - **Total Images**: 50000
21
+ - **Train/Val Split**: 90%/10%
22
+ - **Max Images per Class**: 1000
23
+
24
+ ## Dataset Structure
25
+
26
+ ```
27
+ imagenet-50-subset/
28
+ ├── train/
29
+ │ ├── n01440764/ # tench
30
+ │ │ ├── n01440764_1234.JPEG
31
+ │ │ └── ...
32
+ │ ├── n01443537/ # goldfish
33
+ │ └── ...
34
+ ├── val/
35
+ │ ├── n01440764/
36
+ │ ├── n01443537/
37
+ │ └── ...
38
+ ├── metadata.json
39
+ ├── wnid_to_class.txt
40
+ └── README.md
41
+ ```
42
+
43
+ ## Classes Included
44
+
45
+ | WordNet ID | Class Name | Train Images | Val Images | Total |
46
+ |------------|------------|--------------|------------|-------|
47
+ | n01440764 | tench | 900 | 100 | 1000 |
48
+ | n01443537 | goldfish | 900 | 100 | 1000 |
49
+ | n01484850 | great white shark | 900 | 100 | 1000 |
50
+ | n01491361 | tiger shark | 900 | 100 | 1000 |
51
+ | n01494475 | hammerhead | 900 | 100 | 1000 |
52
+ | n01496331 | electric ray | 900 | 100 | 1000 |
53
+ | n01498041 | stingray | 900 | 100 | 1000 |
54
+ | n01514668 | cock | 900 | 100 | 1000 |
55
+ | n01514859 | hen | 900 | 100 | 1000 |
56
+ | n01518878 | ostrich | 900 | 100 | 1000 |
57
+ | n01530575 | brambling | 900 | 100 | 1000 |
58
+ | n01531178 | goldfinch | 900 | 100 | 1000 |
59
+ | n01532829 | house finch | 900 | 100 | 1000 |
60
+ | n01534433 | junco | 900 | 100 | 1000 |
61
+ | n01537544 | indigo bunting | 900 | 100 | 1000 |
62
+ | n01558993 | robin | 900 | 100 | 1000 |
63
+ | n01560419 | bulbul | 900 | 100 | 1000 |
64
+ | n01580077 | jay | 900 | 100 | 1000 |
65
+ | n01582220 | magpie | 900 | 100 | 1000 |
66
+ | n01592084 | chickadee | 900 | 100 | 1000 |
67
+ | n01601694 | water ouzel | 900 | 100 | 1000 |
68
+ | n01608432 | kite | 900 | 100 | 1000 |
69
+ | n01614925 | bald eagle | 900 | 100 | 1000 |
70
+ | n01616318 | vulture | 900 | 100 | 1000 |
71
+ | n01622779 | great grey owl | 900 | 100 | 1000 |
72
+ | n01629819 | European fire salamander | 900 | 100 | 1000 |
73
+ | n01630670 | common newt | 900 | 100 | 1000 |
74
+ | n01631663 | eft | 900 | 100 | 1000 |
75
+ | n01632458 | spotted salamander | 900 | 100 | 1000 |
76
+ | n01632777 | axolotl | 900 | 100 | 1000 |
77
+ | n01641577 | bullfrog | 900 | 100 | 1000 |
78
+ | n01644373 | tree frog | 900 | 100 | 1000 |
79
+ | n01644900 | tailed frog | 900 | 100 | 1000 |
80
+ | n01664065 | loggerhead | 900 | 100 | 1000 |
81
+ | n01665541 | leatherback turtle | 900 | 100 | 1000 |
82
+ | n01667114 | mud turtle | 900 | 100 | 1000 |
83
+ | n01667778 | terrapin | 900 | 100 | 1000 |
84
+ | n01669191 | box turtle | 900 | 100 | 1000 |
85
+ | n01675722 | banded gecko | 900 | 100 | 1000 |
86
+ | n01677366 | common iguana | 900 | 100 | 1000 |
87
+ | n01682714 | American chameleon | 900 | 100 | 1000 |
88
+ | n01685808 | whiptail | 900 | 100 | 1000 |
89
+ | n01687978 | agama | 900 | 100 | 1000 |
90
+ | n01688243 | frilled lizard | 900 | 100 | 1000 |
91
+ | n01689811 | alligator lizard | 900 | 100 | 1000 |
92
+ | n01692333 | Gila monster | 900 | 100 | 1000 |
93
+ | n01693334 | green lizard | 900 | 100 | 1000 |
94
+ | n01694178 | African chameleon | 900 | 100 | 1000 |
95
+ | n01695060 | Komodo dragon | 900 | 100 | 1000 |
96
+ | n01697457 | African crocodile | 900 | 100 | 1000 |
97
+
98
+
99
+ ## Usage with Hugging Face Datasets
100
+
101
+ ```python
102
+ from datasets import load_dataset
103
+
104
+ # Load the dataset
105
+ dataset = load_dataset("your-username/imagenet-50-subset")
106
+
107
+ # Access train and validation splits
108
+ train_dataset = dataset['train']
109
+ val_dataset = dataset['validation']
110
+
111
+ # Example: Load and display an image
112
+ from PIL import Image
113
+ import matplotlib.pyplot as plt
114
+
115
+ sample = train_dataset[0]
116
+ image = Image.open(sample['image'])
117
+ label = sample['label']
118
+ plt.imshow(image)
119
+ plt.title(f"Class: {label}")
120
+ plt.show()
121
+ ```
122
+
123
+ ## Usage with PyTorch
124
+
125
+ ```python
126
+ from torchvision import datasets, transforms
127
+ from torch.utils.data import DataLoader
128
+
129
+ # Define transforms
130
+ transform = transforms.Compose([
131
+ transforms.Resize(256),
132
+ transforms.CenterCrop(224),
133
+ transforms.ToTensor(),
134
+ transforms.Normalize(mean=[0.485, 0.456, 0.406],
135
+ std=[0.229, 0.224, 0.225])
136
+ ])
137
+
138
+ # Load datasets
139
+ train_dataset = datasets.ImageFolder('./imagenet-50-subset/train', transform=transform)
140
+ val_dataset = datasets.ImageFolder('./imagenet-50-subset/val', transform=transform)
141
+
142
+ # Create data loaders
143
+ train_loader = DataLoader(train_dataset, batch_size=32, shuffle=True)
144
+ val_loader = DataLoader(val_dataset, batch_size=32, shuffle=False)
145
+ ```
146
+
147
+ ## License
148
+
149
+ This subset inherits the ImageNet license. Please ensure you have the right to use ImageNet data.
150
+ The original ImageNet dataset is available at http://www.image-net.org/
151
+
152
+ ## Citation
153
+
154
+ If you use this dataset, please cite the original ImageNet paper:
155
+
156
+ ```bibtex
157
+ @article{deng2009imagenet,
158
+ title={Imagenet: A large-scale hierarchical image database},
159
+ author={Deng, Jia and Dong, Wei and Socher, Richard and Li, Li-Jia and Li, Kai and Fei-Fei, Li},
160
+ journal={2009 IEEE conference on computer vision and pattern recognition},
161
+ pages={248--255},
162
+ year={2009},
163
+ organization={IEEE}
164
+ }
165
+ ```