Datasets:
Tasks:
Image Classification
Sub-tasks:
multi-class-image-classification
Languages:
English
Size:
1K<n<10K
Tags:
biology
License:
update bird species
Browse files- .gitignore +0 -1
- bird-species-dataset.py +0 -14
.gitignore
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
data/
|
|
|
|
bird-species-dataset.py
CHANGED
@@ -57,20 +57,6 @@ class BirdSpeciesDataset(datasets.GeneratorBasedBuilder):
|
|
57 |
|
58 |
def _split_generators(self, dl_manager):
|
59 |
data_dir = _DATA_DIR
|
60 |
-
# Downloading the dataset
|
61 |
-
if not os.path.exists(data_dir):
|
62 |
-
from kaggle.api.kaggle_api_extended import KaggleApi
|
63 |
-
kaggle_api = KaggleApi()
|
64 |
-
kaggle_api.authenticate()
|
65 |
-
kaggle_api.dataset_download_files('gpiosenka/100-bird-species', path=data_dir, unzip=True)
|
66 |
-
|
67 |
-
# There is a bug in the dataset, where one of the folders is named "PARAKETT AUKLET" instead of "PARAKETT AUKLET"
|
68 |
-
# We fix it by adding a space to the valid folder, because train and test are wrong and also the names in the labels file
|
69 |
-
# Fixing the path
|
70 |
-
fault_path = os.path.join(data_dir, 'valid', 'PARAKETT AUKLET')
|
71 |
-
correct_path = os.path.join(data_dir, 'valid', 'PARAKETT AUKLET')
|
72 |
-
os.rename(fault_path, correct_path)
|
73 |
-
|
74 |
return [
|
75 |
SplitGenerator(name=Split.TRAIN, gen_kwargs={"filepath": os.path.join(data_dir, "train")}),
|
76 |
SplitGenerator(name=Split.VALIDATION, gen_kwargs={"filepath": os.path.join(data_dir, "valid")}),
|
|
|
57 |
|
58 |
def _split_generators(self, dl_manager):
|
59 |
data_dir = _DATA_DIR
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
60 |
return [
|
61 |
SplitGenerator(name=Split.TRAIN, gen_kwargs={"filepath": os.path.join(data_dir, "train")}),
|
62 |
SplitGenerator(name=Split.VALIDATION, gen_kwargs={"filepath": os.path.join(data_dir, "valid")}),
|