Datasets:
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,230 +1,197 @@
|
|
| 1 |
-
# ViT Animal Dataset
|
| 2 |
-
|
| 3 |
-
This dataset contains 139,111 cropped images of 60
|
| 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 |
-
from
|
| 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 |
-
|
| 193 |
-
|
| 194 |
-
|
| 195 |
-
|
| 196 |
-
|
| 197 |
-
|
| 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 |
+
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|