Datasets:
Tasks:
Image Classification
Modalities:
Image
Formats:
imagefolder
Languages:
English
Size:
1K - 10K
File size: 1,240 Bytes
aba0bad |
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 |
import fiftyone as fo
# Downloaded the images from hugging face using git clone
# git clone https://huggingface.co/datasets/fcakyon/pokemon-classification
POKEMON_DIR = "/home/spousty/data/pokemon-classification/data"
# There is a subdir for test, train, valid
train_pokemon = fo.Dataset.from_dir(
dataset_dir=POKEMON_DIR + "/train",
progress=True,
dataset_type=fo.types.ImageClassificationDirectoryTree,
name="train_pokemon",
overwrite=True,
persistent=True
)
test_pokemon = fo.Dataset.from_dir(
dataset_dir=POKEMON_DIR + "/test",
progress=True,
dataset_type=fo.types.ImageClassificationDirectoryTree,
name="test_pokemon",
overwrite=True,
persistent=True
)
valid_pokemon = fo.Dataset.from_dir(
dataset_dir=POKEMON_DIR + "/valid",
progress=True,
dataset_type=fo.types.ImageClassificationDirectoryTree,
name="valid_pokemon",
overwrite=True,
persistent=True
)
train_pokemon.tag_samples("train")
test_pokemon.tag_samples("test")
valid_pokemon.tag_samples("valid")
pokemon = train_pokemon.clone(name="pokemon", persistent=True)
pokemon.merge_samples(test_pokemon)
pokemon.merge_samples(valid_pokemon)
pokemon.save()
session = fo.launch_app(pokemon)
session.wait()
|