Update renovation.py
Browse files- renovation.py +6 -5
renovation.py
CHANGED
@@ -86,11 +86,11 @@ class Renovations(datasets.GeneratorBasedBuilder):
|
|
86 |
|
87 |
num_files = len(all_files_and_labels)
|
88 |
if split == "train":
|
89 |
-
all_files_and_labels = all_files_and_labels[:int(num_files*0.
|
90 |
elif split == "val":
|
91 |
-
all_files_and_labels = all_files_and_labels[int(num_files*0.
|
92 |
-
else:
|
93 |
-
all_files_and_labels = all_files_and_labels[int(num_files*0.
|
94 |
|
95 |
for idx, (file, label) in enumerate(all_files_and_labels):
|
96 |
yield idx, {
|
@@ -98,6 +98,7 @@ class Renovations(datasets.GeneratorBasedBuilder):
|
|
98 |
"image": file,
|
99 |
"labels": label,
|
100 |
}
|
101 |
-
|
|
|
102 |
|
103 |
|
|
|
86 |
|
87 |
num_files = len(all_files_and_labels)
|
88 |
if split == "train":
|
89 |
+
all_files_and_labels = all_files_and_labels[:int(num_files*0.9)]
|
90 |
elif split == "val":
|
91 |
+
all_files_and_labels = all_files_and_labels[int(num_files*0.9):]
|
92 |
+
else: # "test" split
|
93 |
+
all_files_and_labels = all_files_and_labels[int(num_files*0.9):]
|
94 |
|
95 |
for idx, (file, label) in enumerate(all_files_and_labels):
|
96 |
yield idx, {
|
|
|
98 |
"image": file,
|
99 |
"labels": label,
|
100 |
}
|
101 |
+
|
102 |
+
|
103 |
|
104 |
|