qanastek commited on
Commit
2858c41
·
1 Parent(s): 0cb458b

Update STANFORD-CARS-TYPES.py

Browse files
Files changed (1) hide show
  1. STANFORD-CARS-TYPES.py +5 -11
STANFORD-CARS-TYPES.py CHANGED
@@ -15,7 +15,7 @@ _DESCRIPTION = """\
15
  TODO
16
  """
17
 
18
- _URL = "XXX"
19
 
20
  @dataclass
21
  class CustomConfig(datasets.BuilderConfig):
@@ -27,13 +27,13 @@ class CustomConfig(datasets.BuilderConfig):
27
 
28
  class STANFORDCARSTYPES(datasets.GeneratorBasedBuilder):
29
 
30
- VERSION = datasets.Version("1.0.0")
31
 
32
  BUILDER_CONFIGS = [
33
  CustomConfig(
34
  name="default",
35
  version=VERSION,
36
- description="Skin Disease datasets.",
37
  schema="default",
38
  subset_id="default",
39
  ),
@@ -46,7 +46,7 @@ class STANFORDCARSTYPES(datasets.GeneratorBasedBuilder):
46
  {
47
  "image_file_path": datasets.Value("string"),
48
  "image": datasets.Image(),
49
- "labels": datasets.features.ClassLabel(names=["BA-cellulitis","BA-impetigo","FU-athlete-foot","FU-nail-fungus","FU-ringworm","PA-cutaneous-larva-migrans","VI-chickenpox","VI-shingles"]),
50
  }
51
  ),
52
  supervised_keys=("image", "labels"),
@@ -66,12 +66,6 @@ class STANFORDCARSTYPES(datasets.GeneratorBasedBuilder):
66
  "data_dir": os.path.join(data_dir, "train"),
67
  },
68
  ),
69
- datasets.SplitGenerator(
70
- name=datasets.Split.VALIDATION,
71
- gen_kwargs={
72
- "data_dir": os.path.join(data_dir, "validation"),
73
- },
74
- ),
75
  datasets.SplitGenerator(
76
  name=datasets.Split.TEST,
77
  gen_kwargs={
@@ -98,4 +92,4 @@ class STANFORDCARSTYPES(datasets.GeneratorBasedBuilder):
98
  "image_file_path": file_path,
99
  "image": file_path,
100
  "labels": class_name,
101
- }
 
15
  TODO
16
  """
17
 
18
+ _URL = "https://huggingface.co/datasets/HugsVision/STANFORD-CARS-TYPES/resolve/main/car_data.zip"
19
 
20
  @dataclass
21
  class CustomConfig(datasets.BuilderConfig):
 
27
 
28
  class STANFORDCARSTYPES(datasets.GeneratorBasedBuilder):
29
 
30
+ VERSION = datasets.Version("1.0.2")
31
 
32
  BUILDER_CONFIGS = [
33
  CustomConfig(
34
  name="default",
35
  version=VERSION,
36
+ description="Stanford cars datasets.",
37
  schema="default",
38
  subset_id="default",
39
  ),
 
46
  {
47
  "image_file_path": datasets.Value("string"),
48
  "image": datasets.Image(),
49
+ "labels": datasets.features.ClassLabel(names=['convertible', 'coupe', 'hatchback', 'sedan', 'suv', 'truck', 'van', 'wagon']),
50
  }
51
  ),
52
  supervised_keys=("image", "labels"),
 
66
  "data_dir": os.path.join(data_dir, "train"),
67
  },
68
  ),
 
 
 
 
 
 
69
  datasets.SplitGenerator(
70
  name=datasets.Split.TEST,
71
  gen_kwargs={
 
92
  "image_file_path": file_path,
93
  "image": file_path,
94
  "labels": class_name,
95
+ }