Spaces:
Sleeping
Sleeping
Commit
·
2ca3f67
1
Parent(s):
5682d80
Remove IDMT-SMT-GUITAR for now
Browse files- remfx/datasets.py +17 -17
remfx/datasets.py
CHANGED
|
@@ -93,22 +93,22 @@ def locate_files(root: str, mode: str):
|
|
| 93 |
]
|
| 94 |
print(f"Found {len(files)} files in GuitarSet {mode}.")
|
| 95 |
file_list.append(sorted(files))
|
| 96 |
-
# ------------------------- IDMT-SMT-GUITAR -------------------------
|
| 97 |
-
idmt_smt_guitar_dir = os.path.join(root, "IDMT-SMT-GUITAR_V2")
|
| 98 |
-
if os.path.isdir(idmt_smt_guitar_dir):
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
# ------------------------- IDMT-SMT-BASS -------------------------
|
| 113 |
# idmt_smt_bass_dir = os.path.join(root, "IDMT-SMT-BASS")
|
| 114 |
# if os.path.isdir(idmt_smt_bass_dir):
|
|
@@ -207,8 +207,8 @@ class EffectDataset(Dataset):
|
|
| 207 |
self.proc_root.mkdir(parents=True, exist_ok=True)
|
| 208 |
for num_chunk in tqdm(range(self.total_chunks)):
|
| 209 |
chunk = None
|
|
|
|
| 210 |
while chunk is None:
|
| 211 |
-
random_dataset_choice = random.choice(self.files)
|
| 212 |
random_file_choice = random.choice(random_dataset_choice)
|
| 213 |
chunk = select_random_chunk(
|
| 214 |
random_file_choice, self.chunk_size, self.sample_rate
|
|
|
|
| 93 |
]
|
| 94 |
print(f"Found {len(files)} files in GuitarSet {mode}.")
|
| 95 |
file_list.append(sorted(files))
|
| 96 |
+
# # ------------------------- IDMT-SMT-GUITAR -------------------------
|
| 97 |
+
# idmt_smt_guitar_dir = os.path.join(root, "IDMT-SMT-GUITAR_V2")
|
| 98 |
+
# if os.path.isdir(idmt_smt_guitar_dir):
|
| 99 |
+
# files = glob.glob(
|
| 100 |
+
# os.path.join(
|
| 101 |
+
# idmt_smt_guitar_dir, "IDMT-SMT-GUITAR_V2", "dataset4", "**", "*.wav"
|
| 102 |
+
# ),
|
| 103 |
+
# recursive=True,
|
| 104 |
+
# )
|
| 105 |
+
# files = [
|
| 106 |
+
# f
|
| 107 |
+
# for f in files
|
| 108 |
+
# if os.path.basename(f).split("_")[0] in idmt_guitar_splits[mode]
|
| 109 |
+
# ]
|
| 110 |
+
# file_list.append(sorted(files))
|
| 111 |
+
# print(f"Found {len(files)} files in IDMT-SMT-Guitar {mode}.")
|
| 112 |
# ------------------------- IDMT-SMT-BASS -------------------------
|
| 113 |
# idmt_smt_bass_dir = os.path.join(root, "IDMT-SMT-BASS")
|
| 114 |
# if os.path.isdir(idmt_smt_bass_dir):
|
|
|
|
| 207 |
self.proc_root.mkdir(parents=True, exist_ok=True)
|
| 208 |
for num_chunk in tqdm(range(self.total_chunks)):
|
| 209 |
chunk = None
|
| 210 |
+
random_dataset_choice = random.choice(self.files)
|
| 211 |
while chunk is None:
|
|
|
|
| 212 |
random_file_choice = random.choice(random_dataset_choice)
|
| 213 |
chunk = select_random_chunk(
|
| 214 |
random_file_choice, self.chunk_size, self.sample_rate
|