Datasets:

ArXiv:
License:
haodoz0118 commited on
Commit
dce33fe
·
verified ·
1 Parent(s): 30af0a8

Update medianomaly.py

Browse files
Files changed (1) hide show
  1. medianomaly.py +2 -3
medianomaly.py CHANGED
@@ -67,8 +67,7 @@ class Medianomaly(datasets.GeneratorBasedBuilder):
67
  raise NotImplementedError(f"{config_name} is not implemented in Medianomaly.")
68
  archive_path = dl_manager.download_and_extract(_URLS[config_name])
69
 
70
-
71
- if config_name == "rsna":
72
  data_dir = os.path.join(archive_path, config_name.upper())
73
  with open(os.path.join(data_dir, "data.json"), "r") as f:
74
  metadata = json.load(f)
@@ -83,7 +82,7 @@ class Medianomaly(datasets.GeneratorBasedBuilder):
83
 
84
 
85
  def _generate_examples(self, samples, base_dir, config):
86
- if config == "rsna":
87
  base_dir = os.path.join(base_dir, "images")
88
  for label_str, items in samples.items(): # only "0" in train, "0"/"1" in test
89
  label = int(label_str)
 
67
  raise NotImplementedError(f"{config_name} is not implemented in Medianomaly.")
68
  archive_path = dl_manager.download_and_extract(_URLS[config_name])
69
 
70
+ if config_name in ["rsna", "vincxr"]:
 
71
  data_dir = os.path.join(archive_path, config_name.upper())
72
  with open(os.path.join(data_dir, "data.json"), "r") as f:
73
  metadata = json.load(f)
 
82
 
83
 
84
  def _generate_examples(self, samples, base_dir, config):
85
+ if config in ["rsna", "vincxr"]:
86
  base_dir = os.path.join(base_dir, "images")
87
  for label_str, items in samples.items(): # only "0" in train, "0"/"1" in test
88
  label = int(label_str)