Datasets:

ArXiv:
License:
haodoz0118 commited on
Commit
8947b0d
·
verified ·
1 Parent(s): 231fab5

Update medianomaly.py

Browse files
Files changed (1) hide show
  1. medianomaly.py +2 -0
medianomaly.py CHANGED
@@ -250,6 +250,8 @@ class Medianomaly(datasets.GeneratorBasedBuilder):
250
  for idx, row in df.iterrows():
251
  image_id = row["image"]
252
  image_path = os.path.join(img_dir, f"{image_id}.jpg")
 
 
253
  label_vector = row.iloc[1:].astype(int).tolist()
254
 
255
  yield idx, {
 
250
  for idx, row in df.iterrows():
251
  image_id = row["image"]
252
  image_path = os.path.join(img_dir, f"{image_id}.jpg")
253
+ if not os.path.exists(image_path):
254
+ continue
255
  label_vector = row.iloc[1:].astype(int).tolist()
256
 
257
  yield idx, {