Datasets:
Update CC6204-Hackaton-Cub-Dataset.py
Browse files
CC6204-Hackaton-Cub-Dataset.py
CHANGED
@@ -95,12 +95,12 @@ class CubDataset(datasets.GeneratorBasedBuilder):
|
|
95 |
for batch in data_files:
|
96 |
path_files = dl_manager.iter_files(batch)
|
97 |
for img in path_files:
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
|
105 |
return [
|
106 |
datasets.SplitGenerator(
|
|
|
95 |
for batch in data_files:
|
96 |
path_files = dl_manager.iter_files(batch)
|
97 |
for img in path_files:
|
98 |
+
if img.endswith(".jpg"):
|
99 |
+
img_idx = _IMGNAME2ID[img]
|
100 |
+
if img_idx in _TRAIN_IDX_SET:
|
101 |
+
train_files.append(img)
|
102 |
+
else:
|
103 |
+
test_files.append(img)
|
104 |
|
105 |
return [
|
106 |
datasets.SplitGenerator(
|