Bazyl commited on
Commit
34bd73e
1 Parent(s): 6588dac

update dataset info

Browse files
Files changed (4) hide show
  1. .gitignore +3 -0
  2. dataset_infos.json +2 -2
  3. gtsrb.py +11 -6
  4. requirements.txt +30 -0
.gitignore ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ .env
2
+ Test/
3
+ Train/
dataset_infos.json CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:5430330a15dcce22183f5ea28cc989538156ada15669657341212234d37e67bd
3
- size 3035
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4ebbf9875e6989bb510fde0ed00fa3bab307a18a3d18ff26277bcaa9190d351e
3
+ size 3249
gtsrb.py CHANGED
@@ -16,7 +16,7 @@
16
  # Lint as: python3
17
  """GTSRB: German Traffic Sign Recognition Benchmark."""
18
 
19
-
20
  import csv
21
  import pandas as pd
22
 
@@ -76,12 +76,17 @@ _FEATURES = datasets.Features({
76
  "Roi.X2": datasets.Value("uint8"),
77
  "Roi.Y2": datasets.Value("uint8"),
78
  "ClassId": datasets.Value("uint8"),
79
- "Path": datasets.Value("string"),
80
  })
81
 
82
  _URL = "https://github.com/bazylhorsey/gtsrb/archive/refs/tags/0.0.0.tar.gz"
83
 
84
 
 
 
 
 
 
85
 
86
 
87
  class GTSRBConfig(datasets.BuilderConfig):
@@ -112,15 +117,15 @@ class GTSRB(datasets.GeneratorBasedBuilder):
112
  features=_FEATURES,
113
  # No default supervised_keys (as we have to pass both question
114
  # and context as input).
115
- supervised_keys=None,
116
  homepage="https://benchmark.ini.rub.de/gtsrb_news.html",
117
  citation=_CITATION,
118
  license="gnu public license",
119
  )
120
 
121
  def _split_generators(self, dl_manager):
122
- # downloaded_files = dl_manager.download_and_extract(_URLS)
123
- # print(downloaded_files)
124
  return [
125
  datasets.SplitGenerator(
126
  name=datasets.Split.TRAIN,
@@ -175,5 +180,5 @@ class GTSRB(datasets.GeneratorBasedBuilder):
175
  "Roi.X2": int(row[4]),
176
  "Roi.Y2": int(row[5]),
177
  "ClassId": int(row[6]),
178
- "Path": row[7],
179
  }
 
16
  # Lint as: python3
17
  """GTSRB: German Traffic Sign Recognition Benchmark."""
18
 
19
+ import tarfile
20
  import csv
21
  import pandas as pd
22
 
 
76
  "Roi.X2": datasets.Value("uint8"),
77
  "Roi.Y2": datasets.Value("uint8"),
78
  "ClassId": datasets.Value("uint8"),
79
+ "Path": datasets.Image("png"),
80
  })
81
 
82
  _URL = "https://github.com/bazylhorsey/gtsrb/archive/refs/tags/0.0.0.tar.gz"
83
 
84
 
85
+ # importing the "tarfile" module
86
+
87
+ # open file
88
+ # file = tarfile.open("https://github.com/bazylhorsey/gtsrb/archive/refs/tags/0.0.0.tar.gz")
89
+ # file.extractall('temp')
90
 
91
 
92
  class GTSRBConfig(datasets.BuilderConfig):
 
117
  features=_FEATURES,
118
  # No default supervised_keys (as we have to pass both question
119
  # and context as input).
120
+ supervised_keys=["ClassId"],
121
  homepage="https://benchmark.ini.rub.de/gtsrb_news.html",
122
  citation=_CITATION,
123
  license="gnu public license",
124
  )
125
 
126
  def _split_generators(self, dl_manager):
127
+ files = dl_manager.download_and_extract(_URL)
128
+ print(files)
129
  return [
130
  datasets.SplitGenerator(
131
  name=datasets.Split.TRAIN,
 
180
  "Roi.X2": int(row[4]),
181
  "Roi.Y2": int(row[5]),
182
  "ClassId": int(row[6]),
183
+ "Path": str(row[7]),
184
  }
requirements.txt ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ aiohttp==3.8.1
2
+ aiosignal==1.2.0
3
+ async-timeout==4.0.2
4
+ certifi==2022.6.15
5
+ charset-normalizer==2.0.12
6
+ datasets==2.3.2
7
+ dill==0.3.5.1
8
+ filelock==3.7.1
9
+ frozenlist==1.3.0
10
+ fsspec==2022.5.0
11
+ huggingface-hub==0.8.1
12
+ idna==3.3
13
+ multidict==6.0.2
14
+ multiprocess==0.70.13
15
+ numpy==1.23.0
16
+ packaging==21.3
17
+ pandas==1.4.3
18
+ pyaml==21.10.1
19
+ pyarrow==8.0.0
20
+ pyparsing==3.0.9
21
+ PyYAML==6.0
22
+ requests==2.28.0
23
+ responses==0.18.0
24
+ tqdm==4.64.0
25
+ typing_extensions==4.2.0
26
+ urllib3==1.26.9
27
+ xxhash==3.0.0
28
+ yarl==1.7.2
29
+
30
+ --extra-index-url=https://packagecloud.io/github/git-lfs/pypi/simple