File size: 5,034 Bytes
4be1394 c750ec3 4be1394 c750ec3 4be1394 c750ec3 4be1394 33e4e5b 4be1394 33e4e5b b302a03 33e4e5b df75716 b302a03 ad325cb b302a03 ae76bc4 |
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 |
---
size_categories:
- n<1K
task_categories:
- image-classification
- image-segmentation
dataset_info:
features:
- name: image
dtype: image
- name: label
dtype:
class_label:
names:
'0': antelope
'1': badger
'2': bat
'3': bear
'4': bee
'5': beetle
'6': bison
'7': boar
'8': butterfly
'9': cat
'10': caterpillar
'11': chimpanzee
'12': cockroach
'13': cow
'14': coyote
'15': crab
'16': crow
'17': deer
'18': dog
'19': dolphin
'20': donkey
'21': dragonfly
'22': duck
'23': eagle
'24': elephant
'25': flamingo
'26': fly
'27': fox
'28': goat
'29': goldfish
'30': goose
'31': gorilla
'32': grasshopper
'33': hamster
'34': hare
'35': hedgehog
'36': hippopotamus
'37': hornbill
'38': horse
'39': hummingbird
'40': hyena
'41': jellyfish
'42': kangaroo
'43': koala
'44': ladybugs
'45': leopard
'46': lion
'47': lizard
'48': lobster
'49': mosquito
'50': moth
'51': mouse
'52': octopus
'53': okapi
'54': orangutan
'55': otter
'56': owl
'57': ox
'58': oyster
'59': panda
'60': parrot
'61': pelecaniformes
'62': penguin
'63': pig
'64': pigeon
'65': porcupine
'66': possum
'67': raccoon
'68': rat
'69': reindeer
'70': rhinoceros
'71': sandpiper
'72': seahorse
'73': seal
'74': shark
'75': sheep
'76': snake
'77': sparrow
'78': squid
'79': squirrel
'80': starfish
'81': swan
'82': tiger
'83': turkey
'84': turtle
'85': whale
'86': wolf
'87': wombat
'88': woodpecker
'89': zebra
splits:
- name: train
num_bytes: 520059675.84
num_examples: 4320
- name: test
num_bytes: 138887701.08
num_examples: 1080
download_size: 696270301
dataset_size: 658947376.92
configs:
- config_name: default
data_files:
- split: train
path: data/train-*
- split: test
path: data/test-*
tags:
- animals
---
# Dataset Card for Dataset Name
This dataset is a port of the ["Animal Image Dataset"](https://www.kaggle.com/datasets/iamsouravbanerjee/animal-image-dataset-90-different-animals) that you can find on Kaggle.
The dataset contains 60 pictures for 90 types of animals, with various image sizes.
With respect to the original dataset, I created the train-test-split partitions (80%/20%) to make it compatible via HuggingFace `datasets`.
**Note**. At the time of writing, by looking at the Croissant ML Metadata, the original license of the data is `sc:CreativeWork`. If you believe this dataset violates any license, please
open an issue in the discussion tab, so I can take action as soon as possible.
## How to use this data
```python
from datasets import load_dataset
# for exploration
ds = load_dataset("lucabaggi/animal-wildlife", split="train")
# for training
ds = load_dataset("lucabaggi/animal-wildlife")
```
## How the data was generated
You can find the source code for the extraction pipeline [here](./extract.py). Note: partly generated with Claude3 and Codestral 😎😅 Please feel free to open an issue in the discussion sction if you wish to improve the code.
```
$ uv run --python=3.11 -- python -m extract --help
usage: extract.py [-h] [--destination-dir DESTINATION_DIR] [--split-ratio SPLIT_RATIO] [--random-seed RANDOM_SEED] [--remove-zip] zip_file
Reorganize dataset.
positional arguments:
zip_file Path to the zip file.
options:
-h, --help show this help message and exit
--destination-dir DESTINATION_DIR
Path to the destination directory.
--split-ratio SPLIT_RATIO
Ratio of data to be used for training.
--random-seed RANDOM_SEED
Random seed for reproducibility.
--remove-zip Whether to remove the source zip archive file after extraction.
```
Example usage:
1. Download the data from Kaggle. You can use Kaggle Python SDK, but that might require an API key if you use it locally.
2. Invoke the script:
```bash
uv run --python=3.11 -- python -m extract -- archive.zip
```
This will explode the contents of the zip archive into a `data` directory, splitting the train and test dataset in a 80%/20% ratio.
3. Upload to the hub:
```python
from datasets import load_dataset
ds = load_datset("imagefolder", data_dir="data")
ds.push_to_hub()
``` |