Datasets:

ArXiv:
License:
haodoz0118 commited on
Commit
d7ee8ad
·
verified ·
1 Parent(s): 5871ce1

Update medianomaly.py

Browse files
Files changed (1) hide show
  1. 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(base_dir, item)
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(base_dir, item)
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