Skip to content

Commit

Permalink
!!!Occhiooooo eliminare!!!
Browse files Browse the repository at this point in the history
  • Loading branch information
Giacomo Melacini committed Jan 23, 2024
1 parent c3f1613 commit 16c1a38
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 21 deletions.
16 changes: 0 additions & 16 deletions birdclef/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,18 +216,6 @@ def __getitem__(self, idx):
val_metadata_simple = val_metadata_base.loc[val_metadata_base.primary_label.isin(simple_classes)].reset_index()
test_metadata_simple = test_metadata_base.loc[test_metadata_base.primary_label.isin(simple_classes)].reset_index()

# %% ../nbs/02_dataset.ipynb 21
dir = DATA_DIR
try:
train_metadata_repeated = pd.read_csv(dir + 'repeated/train_metadata.csv')
val_metadata_repeated = pd.read_csv(dir + 'repeated/val_metadata.csv')
test_metadata_repeated = pd.read_csv(dir + 'repeated/test_metadata.csv')
except FileNotFoundError:
dir = 'data/'
train_metadata_repeated = pd.read_csv(dir + 'repeated/train_metadata.csv')
val_metadata_repeated = pd.read_csv(dir + 'repeated/val_metadata.csv')
test_metadata_repeated = pd.read_csv(dir + 'repeated/test_metadata.csv')

# %% ../nbs/02_dataset.ipynb 22
dataset_dict = {
'train_base': (BirdClef, {'metadata': train_metadata_base, 'classes': train_metadata_base.primary_label}),
Expand Down Expand Up @@ -258,10 +246,6 @@ def __getitem__(self, idx):
'val_base_pcn_aug_rnd': (BirdClef, {'metadata': val_metadata_base, 'classes': train_metadata_base.primary_label, 'per_channel': True, 'augmentations': True, 'rnd_offset': True}),
'test_base_pcn_aug_rnd': (BirdClef, {'metadata': test_metadata_base, 'classes': train_metadata_base.primary_label, 'per_channel': True, 'augmentations': True, 'rnd_offset': True}),

'train_repeated_pcn_rnd': (BirdClef, {'metadata': train_metadata_repeated, 'classes': train_metadata_repeated.primary_label, 'per_channel': True, 'rnd_offset': True}),
'val_repeated_pcn_rnd': (BirdClef, {'metadata': val_metadata_repeated, 'classes': train_metadata_repeated.primary_label, 'per_channel': True, 'rnd_offset': True}),
'test_repeated_pcn_rnd': (BirdClef, {'metadata': test_metadata_repeated, 'classes': train_metadata_repeated.primary_label, 'per_channel': True, 'rnd_offset': True}),

}

# %% ../nbs/02_dataset.ipynb 23
Expand Down
6 changes: 1 addition & 5 deletions nbs/02_dataset.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,7 @@
"metadata": {},
"outputs": [],
"source": [
"#| export\n",
"\n",
"dir = DATA_DIR\n",
"try:\n",
" train_metadata_repeated = pd.read_csv(dir + 'repeated/train_metadata.csv')\n",
Expand Down Expand Up @@ -626,10 +626,6 @@
" 'val_base_pcn_aug_rnd': (BirdClef, {'metadata': val_metadata_base, 'classes': train_metadata_base.primary_label, 'per_channel': True, 'augmentations': True, 'rnd_offset': True}),\n",
" 'test_base_pcn_aug_rnd': (BirdClef, {'metadata': test_metadata_base, 'classes': train_metadata_base.primary_label, 'per_channel': True, 'augmentations': True, 'rnd_offset': True}),\n",
" \n",
" 'train_repeated_pcn_rnd': (BirdClef, {'metadata': train_metadata_repeated, 'classes': train_metadata_repeated.primary_label, 'per_channel': True, 'rnd_offset': True}),\n",
" 'val_repeated_pcn_rnd': (BirdClef, {'metadata': val_metadata_repeated, 'classes': train_metadata_repeated.primary_label, 'per_channel': True, 'rnd_offset': True}),\n",
" 'test_repeated_pcn_rnd': (BirdClef, {'metadata': test_metadata_repeated, 'classes': train_metadata_repeated.primary_label, 'per_channel': True, 'rnd_offset': True}),\n",
" \n",
" }"
]
},
Expand Down

0 comments on commit 16c1a38

Please sign in to comment.