Federico Galatolo commited on
Commit
5a9bde4
1 Parent(s): 7ba884f

use 'captioned' and 'uncaptioned' for clarity

Browse files
Files changed (1) hide show
  1. TeTIm-Eval.py +9 -9
TeTIm-Eval.py CHANGED
@@ -15,8 +15,8 @@ Text To Image Evaluation (TeTIm-Eval)
15
  """
16
 
17
  _URLS = {
18
- "mini": "https://huggingface.co/datasets/galatolo/TeTIm-Eval/resolve/main/data/TeTIm-Eval-Mini.zip",
19
- "full": "https://huggingface.co/datasets/galatolo/TeTIm-Eval/resolve/main/data/TeTIm-Eval.zip"
20
  }
21
 
22
  _CLASSES = [
@@ -54,7 +54,7 @@ _MAP_CATEGORY = {
54
  }
55
 
56
  _FOLDERS = {
57
- "mini": {
58
  _CLASSES[0]: "TeTIm-Eval-Mini/sampled_art_digital",
59
  _CLASSES[1]: "TeTIm-Eval-Mini/sampled_art_sketch",
60
  _CLASSES[2]: "TeTIm-Eval-Mini/sampled_art_traditional",
@@ -66,7 +66,7 @@ _FOLDERS = {
66
  _CLASSES[8]: "TeTIm-Eval-Mini/sampled_photo_landscape",
67
  _CLASSES[9]: "TeTIm-Eval-Mini/sampled_photo_person",
68
  },
69
- "full": {
70
  _CLASSES[0]: "TeTIm-Eval/sampled_art_digital",
71
  _CLASSES[1]: "TeTIm-Eval/sampled_art_sketch",
72
  _CLASSES[2]: "TeTIm-Eval/sampled_art_traditional",
@@ -88,18 +88,18 @@ class TeTImConfig(datasets.BuilderConfig):
88
  class TeTIm(datasets.GeneratorBasedBuilder):
89
  BUILDER_CONFIGS = [
90
  TeTImConfig(
91
- name="mini",
92
  version=datasets.Version("1.0.0", ""),
93
  description="A random sampling of 300 text-images pairs (30 per category) from the TeTIm dataset, manually annotated by the same person",
94
  ),
95
  TeTImConfig(
96
- name="full",
97
  version=datasets.Version("1.0.0", ""),
98
  description="2500 labelled images (250 per category) from the TeTIm dataset",
99
  ),
100
  ]
101
-
102
- DEFAULT_CONFIG_NAME="mini"
103
 
104
  def _info(self):
105
  return datasets.DatasetInfo(
@@ -153,7 +153,7 @@ if __name__ == "__main__":
153
  from datasets import load_dataset
154
  dataset_config = {
155
  "LOADING_SCRIPT_FILES": os.path.join(os.getcwd(), "TeTIm-Eval.py"),
156
- "CONFIG_NAME": "mini",
157
  }
158
  ds = load_dataset(
159
  dataset_config["LOADING_SCRIPT_FILES"],
 
15
  """
16
 
17
  _URLS = {
18
+ "captioned": "https://huggingface.co/datasets/galatolo/TeTIm-Eval/resolve/main/data/TeTIm-Eval-Mini.zip",
19
+ "uncaptioned": "https://huggingface.co/datasets/galatolo/TeTIm-Eval/resolve/main/data/TeTIm-Eval.zip"
20
  }
21
 
22
  _CLASSES = [
 
54
  }
55
 
56
  _FOLDERS = {
57
+ "captioned": {
58
  _CLASSES[0]: "TeTIm-Eval-Mini/sampled_art_digital",
59
  _CLASSES[1]: "TeTIm-Eval-Mini/sampled_art_sketch",
60
  _CLASSES[2]: "TeTIm-Eval-Mini/sampled_art_traditional",
 
66
  _CLASSES[8]: "TeTIm-Eval-Mini/sampled_photo_landscape",
67
  _CLASSES[9]: "TeTIm-Eval-Mini/sampled_photo_person",
68
  },
69
+ "uncaptioned": {
70
  _CLASSES[0]: "TeTIm-Eval/sampled_art_digital",
71
  _CLASSES[1]: "TeTIm-Eval/sampled_art_sketch",
72
  _CLASSES[2]: "TeTIm-Eval/sampled_art_traditional",
 
88
  class TeTIm(datasets.GeneratorBasedBuilder):
89
  BUILDER_CONFIGS = [
90
  TeTImConfig(
91
+ name="captioned",
92
  version=datasets.Version("1.0.0", ""),
93
  description="A random sampling of 300 text-images pairs (30 per category) from the TeTIm dataset, manually annotated by the same person",
94
  ),
95
  TeTImConfig(
96
+ name="uncaptioned",
97
  version=datasets.Version("1.0.0", ""),
98
  description="2500 labelled images (250 per category) from the TeTIm dataset",
99
  ),
100
  ]
101
+
102
+ DEFAULT_CONFIG_NAME="captioned"
103
 
104
  def _info(self):
105
  return datasets.DatasetInfo(
 
153
  from datasets import load_dataset
154
  dataset_config = {
155
  "LOADING_SCRIPT_FILES": os.path.join(os.getcwd(), "TeTIm-Eval.py"),
156
+ "CONFIG_NAME": "uncaptioned",
157
  }
158
  ds = load_dataset(
159
  dataset_config["LOADING_SCRIPT_FILES"],