HugoMarkoff commited on
Commit
af6a58f
·
verified ·
1 Parent(s): d47e95c

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +197 -230
README.md CHANGED
@@ -1,230 +1,197 @@
1
- # ViT Animal Dataset
2
-
3
- This dataset contains 139,111 cropped images of 60+ animal species organized by taxonomic class (Aves and Mammals), optimized for streaming and efficient access.
4
-
5
- ## Dataset Structure
6
-
7
- The dataset is stored in Parquet format to enable:
8
- - **Streaming**: Load data without downloading the entire dataset
9
- - **Efficient updates**: Update metadata without re-uploading images
10
- - **Fast access**: Optimized columnar storage
11
-
12
- ### Splits
13
- - `aves`: 73,528 images of 30 bird species
14
- - `mammals`: 65,583 images of 30 mammal species
15
-
16
- ### Columns
17
- - `image`: PIL Image object
18
- - `label`: Taxonomic class (Aves or Mammals)
19
- - `filename`: Original filename with species identifier (e.g., "american-crow_0001.jpg")
20
-
21
- ### Species Organization
22
- Filenames follow the pattern: `{species-name}_{number}.jpg` or `uncertain_{species-name}_{number}.jpg`
23
- - Species names use lowercase with hyphens (e.g., "american-crow", "red-fox")
24
- - "uncertain_" prefix indicates cases where manual validation was uncertain of the given class
25
-
26
- ## Usage
27
-
28
- ### Streaming (recommended for large datasets)
29
- ```python
30
- from datasets import load_dataset
31
-
32
- # Load with streaming enabled
33
- dataset = load_dataset("AI-EcoNet/ViT_animal_data", split="aves", streaming=True)
34
-
35
- # Iterate through samples
36
- for sample in dataset:
37
- image = sample['image']
38
- label = sample['label']
39
- filename = sample['filename']
40
- # Process your data
41
- ```
42
-
43
- ### Filter by species (streaming)
44
- ```python
45
- from datasets import load_dataset
46
-
47
- # Stream and filter for specific species
48
- ds = load_dataset("AI-EcoNet/ViT_animal_data", split="aves", streaming=True)
49
- crows_only = ds.filter(lambda x: x['filename'].startswith('american-crow'))
50
-
51
- for sample in crows_only:
52
- print(sample['filename'])
53
- ```
54
-
55
- ### Load specific subset
56
- ```python
57
- from datasets import load_dataset
58
-
59
- # Load only first 1000 images from aves
60
- dataset = load_dataset("AI-EcoNet/ViT_animal_data", split="aves[:1000]")
61
-
62
- # Load 10% of mammals
63
- dataset = load_dataset("AI-EcoNet/ViT_animal_data", split="mammals[:10%]")
64
- ```
65
-
66
- ### Load exactly 200 images per species (validated only)
67
- ```python
68
- from datasets import load_dataset
69
- from collections import defaultdict
70
-
71
- # Load with streaming
72
- ds = load_dataset("AI-EcoNet/ViT_animal_data", split="aves", streaming=True)
73
-
74
- # Collect 200 validated images per species
75
- species_list = ['american-crow', 'australian-magpie', 'kea']
76
- species_counts = defaultdict(int)
77
- species_samples = defaultdict(list)
78
-
79
- for sample in ds:
80
- filename = sample['filename']
81
-
82
- # Skip uncertain images
83
- if filename.startswith('uncertain_'):
84
- continue
85
-
86
- # Extract species name
87
- species = filename.rsplit('_', 1)[0]
88
-
89
- # Collect if we need more
90
- if species in species_list and species_counts[species] < 200:
91
- species_samples[species].append(sample)
92
- species_counts[species] += 1
93
-
94
- # Stop when we have 200 of each
95
- if all(species_counts[s] >= 200 for s in species_list):
96
- break
97
-
98
- print(f"Collected: {dict(species_counts)}")
99
- # Output: {'american-crow': 200, 'australian-magpie': 200, 'kea': 200}
100
- ```
101
-
102
- ### Full download
103
- ```python
104
- from datasets import load_dataset
105
-
106
- # Download full dataset
107
- dataset = load_dataset("AI-EcoNet/ViT_animal_data")
108
-
109
- # Access by split
110
- aves_data = dataset['aves']
111
- mammals_data = dataset['mammals']
112
- ```
113
-
114
- ## Dataset Details
115
- - **Format**: Parquet (optimized for streaming)
116
- - **Total Images**: 139,111
117
- - **Species Count**: 61 species (31 birds, 30 mammals)
118
- - **Image Format**: RGB images, variable sizes (cropped from original images)
119
- - **License**: MIT
120
- - **Source**: Images from 23 camera trap datasets from LILA BC
121
-
122
- ### Complete Species List
123
-
124
- #### Aves (Birds) - 31 Species, 73,528 Images
125
-
126
- | Species | Total | Validated | Uncertain |
127
- |---------|-------|-----------|-----------|
128
- | American crow | 1,240 | 1,234 | 6 |
129
- | Australasian swamphen | 2,772 | 2,772 | 0 |
130
- | Australian magpie | 2,739 | 2,733 | 6 |
131
- | Black curassow | 1,949 | 1,939 | 10 |
132
- | Blue whistling thrush | 2,157 | 2,128 | 29 |
133
- | Brown quail | 2,662 | 2,652 | 10 |
134
- | Chicken | 1,647 | 1,629 | 18 |
135
- | Common chafflinch | 2,384 | 2,370 | 14 |
136
- | Common myna | 2,707 | 2,704 | 3 |
137
- | Dunnock | 2,066 | 2,055 | 11 |
138
- | European starling | 1,876 | 1,867 | 9 |
139
- | Fantails | 2,127 | 2,121 | 6 |
140
- | Greenfinch | 2,503 | 2,483 | 20 |
141
- | Kea | 2,833 | 2,814 | 19 |
142
- | Kiwi | 1,634 | 1,620 | 14 |
143
- | Kori bustard | 1,485 | 1,484 | 1 |
144
- | Mountain quail | 2,337 | 2,337 | 0 |
145
- | New Zealand robin | 2,753 | 2,719 | 34 |
146
- | Ostrich | 3,727 | 3,722 | 5 |
147
- | Petrel | 2,370 | 2,354 | 16 |
148
- | Pipit | 2,316 | 2,238 | 78 |
149
- | Quail | 44 | 0 | 44 |
150
- | Red junglefowl | 2,684 | 2,671 | 13 |
151
- | Spix's guan | 3,032 | 3,022 | 10 |
152
- | Swamp harrier | 2,917 | 2,917 | 0 |
153
- | Takahē | 2,085 | 2,073 | 12 |
154
- | Tūī | 2,767 | 2,747 | 20 |
155
- | Vulturine guineafowl | 4,420 | 4,404 | 16 |
156
- | Weka | 2,421 | 2,407 | 14 |
157
- | Wild turkey | 2,057 | 2,057 | 0 |
158
- | Yellow-eyed penguin | 2,817 | 2,815 | 2 |
159
-
160
- #### Mammals - 30 Species, 65,583 Images
161
-
162
- | Species | Total | Validated | Uncertain |
163
- |---------|-------|-----------|-----------|
164
- | Alpaca | 1,864 | 1,864 | 0 |
165
- | American black bear | 2,912 | 2,797 | 115 |
166
- | Black-backed jackal | 2,067 | 2,053 | 14 |
167
- | Black rhinoceros | 1,428 | 1,419 | 9 |
168
- | Bushpig | 1,241 | 1,230 | 11 |
169
- | Common brushtail possum | 1,365 | 1,358 | 7 |
170
- | Crab-eating mongoose | 2,364 | 2,316 | 48 |
171
- | Crested porcupine | 1,449 | 1,449 | 0 |
172
- | Dromedary camel | 1,809 | 1,798 | 11 |
173
- | Eastern gray squirrel | 2,434 | 2,414 | 20 |
174
- | Ferret badger | 1,743 | 1,671 | 72 |
175
- | Gemsbok | 3,963 | 3,944 | 19 |
176
- | Giant armadillo | 463 | 461 | 2 |
177
- | Giraffe | 2,985 | 2,974 | 11 |
178
- | Greater kudu | 4,410 | 4,375 | 35 |
179
- | Hippopotamus | 2,319 | 2,314 | 5 |
180
- | Jaguar | 6,855 | 6,831 | 24 |
181
- | L'Hoest's monkey | 2,941 | 2,921 | 20 |
182
- | Least weasel | 1,869 | 1,869 | 0 |
183
- | Northern treeshrew | 699 | 687 | 12 |
184
- | NZ sea lion | 2,296 | 2,277 | 19 |
185
- | Raccoon | 2,700 | 2,577 | 123 |
186
- | Serval | 625 | 625 | 0 |
187
- | Ship rat | 822 | 822 | 0 |
188
- | Spotted paca | 1,715 | 1,673 | 42 |
189
- | Stump-tailed macaque | 3,558 | 3,535 | 23 |
190
- | Sun bear | 713 | 709 | 4 |
191
- | Warthog | 1,671 | 1,666 | 5 |
192
- | White-nosed coati | 1,996 | 1,982 | 14 |
193
- | Wolf | 2,307 | 2,307 | 0 |
194
-
195
- **Note**: "Uncertain" indicates cases where manual validation was uncertain of the given class due to occlusion, blur, or ambiguous features.
196
-
197
- ## Downloading Specific Species
198
-
199
- **Note**: The current Parquet structure contains mixed species in each file. To download only specific species efficiently, use streaming mode with filtering:
200
-
201
- ```python
202
- import pandas as pd
203
- from datasets import load_dataset
204
-
205
- # Option 1: Use streaming with filter
206
- ds = load_dataset("AI-EcoNet/ViT_animal_data", split="aves", streaming=True)
207
- filtered = ds.filter(lambda x: x['filename'].startswith('american-crow'))
208
-
209
- # Option 2: Use lookup table (download from dataset repository)
210
- # The lookup table allows you to identify which samples to load
211
- # without downloading the full dataset
212
- ```
213
-
214
- ## Citation
215
-
216
- If you use this dataset, please cite appropriately. Each species folder contains the original image source and datasets from LILA BC.
217
-
218
- ```bibtex
219
- @dataset{markoff2025vit_animal_dataset,
220
- title={ViT Animal Dataset: Camera Trap Images for Vision Transformer Evaluation},
221
- author={Markoff, Hugo and Galaktionovs, Jurijs},
222
- year={2025},
223
- publisher={Hugging Face},
224
- howpublished={\url{https://huggingface.co/datasets/AI-EcoNet/ViT_animal_data}}
225
- }
226
- ```
227
-
228
- ## Acknowledgments
229
-
230
- This dataset aggregates cropped images from 23 camera trap datasets available through LILA BC (Labeled Information Library of Alexandria: Biology and Conservation). We thank all the organizations and researchers who contributed to the original camera trap projects.
 
1
+ # ViT Animal Dataset
2
+
3
+ This dataset contains 139,111 cropped images of 60 animal species organized Aves and Mammalia.
4
+ The raw image data was derived from 23 different projects across LILA BC, filtered and cropped to only include the detected species.
5
+ The data has been used to benchmark different ViT models, combined with dimension reduction & clustering methods.
6
+
7
+ ## Dataset Details
8
+ - **Format**: Parquet (optimized for streaming)
9
+ - **Total Images**: 139,111
10
+ - **Species Count**: 60 species (30 birds, 30 mammals)
11
+ - **License**: MIT
12
+
13
+ ### Splits
14
+ - `aves`: 73,528 images of 30 bird species
15
+ - `mammals`: 65,583 images of 30 mammal species
16
+
17
+ ### Columns
18
+ - `image`: PIL Image object
19
+ - `label`: Taxonomic class (Aves or Mammals)
20
+ - `filename`: Original filename with species identifier (e.g., "american-crow_0001.jpg")
21
+
22
+ ### Species Organization
23
+ Filenames follow the pattern: `{species-name}_{number}.jpg` or `uncertain_{species-name}_{number}.jpg`
24
+ - Species names use lowercase with hyphens (e.g., "american-crow", "red-fox")
25
+ - "uncertain_" prefix indicates cases where manual validation was uncertain of the given class
26
+
27
+ ## Usage
28
+
29
+ ### Streaming (recommended for large datasets)
30
+ ```python
31
+ from datasets import load_dataset
32
+
33
+ # Load with streaming enabled
34
+ dataset = load_dataset("AI-EcoNet/ViT_animal_data", split="aves", streaming=True)
35
+
36
+ # Iterate through samples
37
+ for sample in dataset:
38
+ image = sample['image']
39
+ label = sample['label']
40
+ filename = sample['filename']
41
+ # Process your data
42
+ ```
43
+
44
+ ### Filter by species (streaming)
45
+ ```python
46
+ from datasets import load_dataset
47
+
48
+ # Stream and filter for specific species
49
+ ds = load_dataset("AI-EcoNet/ViT_animal_data", split="aves", streaming=True)
50
+ crows_only = ds.filter(lambda x: x['filename'].startswith('american-crow'))
51
+
52
+ for sample in crows_only:
53
+ print(sample['filename'])
54
+ ```
55
+
56
+ ### Load specific subset
57
+ ```python
58
+ from datasets import load_dataset
59
+
60
+ # Load only first 1000 images from aves
61
+ dataset = load_dataset("AI-EcoNet/ViT_animal_data", split="aves[:1000]")
62
+
63
+ # Load 10% of mammals
64
+ dataset = load_dataset("AI-EcoNet/ViT_animal_data", split="mammals[:10%]")
65
+ ```
66
+
67
+ ### Load exactly 200 images per species (validated only)
68
+ ```python
69
+ from datasets import load_dataset
70
+ from collections import defaultdict
71
+
72
+ # Load with streaming
73
+ ds = load_dataset("AI-EcoNet/ViT_animal_data", split="aves", streaming=True)
74
+
75
+ # Collect 200 validated images per species
76
+ species_list = ['american-crow', 'australian-magpie', 'kea']
77
+ species_counts = defaultdict(int)
78
+ species_samples = defaultdict(list)
79
+
80
+ for sample in ds:
81
+ filename = sample['filename']
82
+
83
+ # Skip uncertain images
84
+ if filename.startswith('uncertain_'):
85
+ continue
86
+
87
+ # Extract species name
88
+ species = filename.rsplit('_', 1)[0]
89
+
90
+ # Collect if we need more
91
+ if species in species_list and species_counts[species] < 200:
92
+ species_samples[species].append(sample)
93
+ species_counts[species] += 1
94
+
95
+ # Stop when we have 200 of each
96
+ if all(species_counts[s] >= 200 for s in species_list):
97
+ break
98
+
99
+ print(f"Collected: {dict(species_counts)}")
100
+ # Output: {'american-crow': 200, 'australian-magpie': 200, 'kea': 200}
101
+ ```
102
+
103
+ ### Full download
104
+ ```python
105
+ from datasets import load_dataset
106
+
107
+ # Download full dataset
108
+ dataset = load_dataset("AI-EcoNet/ViT_animal_data")
109
+
110
+ # Access by split
111
+ aves_data = dataset['aves']
112
+ mammals_data = dataset['mammals']
113
+ ```
114
+
115
+ ### Complete Species List
116
+
117
+ #### Aves (Birds) - 30 Species, 73,528 Images
118
+
119
+ | Species | Total | Validated | Uncertain |
120
+ |---------|-------|-----------|-----------|
121
+ | American crow | 1,240 | 1,234 | 6 |
122
+ | Australasian swamphen | 2,772 | 2,772 | 0 |
123
+ | Australian magpie | 2,739 | 2,733 | 6 |
124
+ | Black curassow | 1,949 | 1,939 | 10 |
125
+ | Blue whistling thrush | 2,157 | 2,128 | 29 |
126
+ | Brown quail | 2,662 | 2,652 | 10 |
127
+ | Chicken | 1,647 | 1,629 | 18 |
128
+ | Common chafflinch | 2,384 | 2,370 | 14 |
129
+ | Common myna | 2,707 | 2,704 | 3 |
130
+ | Dunnock | 2,066 | 2,055 | 11 |
131
+ | European starling | 1,876 | 1,867 | 9 |
132
+ | Fantails | 2,127 | 2,121 | 6 |
133
+ | Greenfinch | 2,503 | 2,483 | 20 |
134
+ | Kea | 2,833 | 2,814 | 19 |
135
+ | Kiwi | 1,634 | 1,620 | 14 |
136
+ | Kori bustard | 1,485 | 1,484 | 1 |
137
+ | Mountain quail | 2,381 | 2,337 | 44 |
138
+ | New Zealand robin | 2,753 | 2,719 | 34 |
139
+ | Ostrich | 3,727 | 3,722 | 5 |
140
+ | Petrel | 2,370 | 2,354 | 16 |
141
+ | Pipit | 2,316 | 2,238 | 78 |
142
+ | Quail | 44 | 0 | 44 |
143
+ | Red junglefowl | 2,684 | 2,671 | 13 |
144
+ | Spix's guan | 3,032 | 3,022 | 10 |
145
+ | Swamp harrier | 2,917 | 2,917 | 0 |
146
+ | Takahē | 2,085 | 2,073 | 12 |
147
+ | Tūī | 2,767 | 2,747 | 20 |
148
+ | Vulturine guineafowl | 4,420 | 4,404 | 16 |
149
+ | Weka | 2,421 | 2,407 | 14 |
150
+ | Wild turkey | 2,057 | 2,057 | 0 |
151
+ | Yellow-eyed penguin | 2,817 | 2,815 | 2 |
152
+
153
+ #### Mammals - 30 Species, 65,583 Images
154
+
155
+ | Species | Total | Validated | Uncertain |
156
+ |---------|-------|-----------|-----------|
157
+ | Alpaca | 1,864 | 1,864 | 0 |
158
+ | American black bear | 2,912 | 2,797 | 115 |
159
+ | Black-backed jackal | 2,067 | 2,053 | 14 |
160
+ | Black rhinoceros | 1,428 | 1,419 | 9 |
161
+ | Bushpig | 1,241 | 1,230 | 11 |
162
+ | Common brushtail possum | 1,365 | 1,358 | 7 |
163
+ | Crab-eating mongoose | 2,364 | 2,316 | 48 |
164
+ | Crested porcupine | 1,449 | 1,449 | 0 |
165
+ | Dromedary camel | 1,809 | 1,798 | 11 |
166
+ | Eastern gray squirrel | 2,434 | 2,414 | 20 |
167
+ | Ferret badger | 1,743 | 1,671 | 72 |
168
+ | Gemsbok | 3,963 | 3,944 | 19 |
169
+ | Giant armadillo | 463 | 461 | 2 |
170
+ | Giraffe | 2,985 | 2,974 | 11 |
171
+ | Greater kudu | 4,410 | 4,375 | 35 |
172
+ | Hippopotamus | 2,319 | 2,314 | 5 |
173
+ | Jaguar | 6,855 | 6,831 | 24 |
174
+ | L'Hoest's monkey | 2,941 | 2,921 | 20 |
175
+ | Least weasel | 1,869 | 1,869 | 0 |
176
+ | Northern treeshrew | 699 | 687 | 12 |
177
+ | NZ sea lion | 2,296 | 2,277 | 19 |
178
+ | Raccoon | 2,700 | 2,577 | 123 |
179
+ | Serval | 625 | 625 | 0 |
180
+ | Ship rat | 822 | 822 | 0 |
181
+ | Spotted paca | 1,715 | 1,673 | 42 |
182
+ | Stump-tailed macaque | 3,558 | 3,535 | 23 |
183
+ | Sun bear | 713 | 709 | 4 |
184
+ | Warthog | 1,671 | 1,666 | 5 |
185
+ | White-nosed coati | 1,996 | 1,982 | 14 |
186
+ | Wolf | 2,307 | 2,307 | 0 |
187
+
188
+ **Note**: "Uncertain" indicates cases where manual validation was uncertain of the intitial label.
189
+
190
+ ## Citation
191
+
192
+ If you use this dataset, please cite appropriately. Each species folder contains the original image source and datasets from LILA BC, which can be cited seperately.
193
+
194
+ ```bibtex
195
+ @dataset{TBA
196
+ }
197
+ ```