Datasets:
ArXiv:
License:
Update medianomaly.py
Browse files- medianomaly.py +3 -3
medianomaly.py
CHANGED
@@ -209,7 +209,7 @@ class Medianomaly(datasets.GeneratorBasedBuilder):
|
|
209 |
idx = 0
|
210 |
for item in os.listdir(good_dir):
|
211 |
if item.endswith(".png"):
|
212 |
-
image_path = os.path.join(
|
213 |
yield idx, {
|
214 |
"image": image_path,
|
215 |
"label": 0,
|
@@ -218,12 +218,12 @@ class Medianomaly(datasets.GeneratorBasedBuilder):
|
|
218 |
|
219 |
for item in os.listdir(ungood_dir):
|
220 |
if item.endswith(".png"):
|
221 |
-
image_path = os.path.join(
|
222 |
yield idx, {
|
223 |
"image": image_path,
|
224 |
"label": 1,
|
225 |
}
|
226 |
idx += 1
|
227 |
-
|
228 |
|
229 |
|
|
|
209 |
idx = 0
|
210 |
for item in os.listdir(good_dir):
|
211 |
if item.endswith(".png"):
|
212 |
+
image_path = os.path.join(good_dir, item)
|
213 |
yield idx, {
|
214 |
"image": image_path,
|
215 |
"label": 0,
|
|
|
218 |
|
219 |
for item in os.listdir(ungood_dir):
|
220 |
if item.endswith(".png"):
|
221 |
+
image_path = os.path.join(ungood_dir, item)
|
222 |
yield idx, {
|
223 |
"image": image_path,
|
224 |
"label": 1,
|
225 |
}
|
226 |
idx += 1
|
227 |
+
|
228 |
|
229 |
|