Datasets:

Modalities:
Image
Formats:
parquet
Languages:
English
ArXiv:
Libraries:
Datasets
pandas
tanganke commited on
Commit
ab23e0b
·
verified ·
1 Parent(s): 5b9e300

Upload folder using huggingface_hub

Browse files
.gitattributes CHANGED
@@ -1,55 +1 @@
1
- *.7z filter=lfs diff=lfs merge=lfs -text
2
- *.arrow filter=lfs diff=lfs merge=lfs -text
3
- *.bin filter=lfs diff=lfs merge=lfs -text
4
- *.bz2 filter=lfs diff=lfs merge=lfs -text
5
- *.ckpt filter=lfs diff=lfs merge=lfs -text
6
- *.ftz filter=lfs diff=lfs merge=lfs -text
7
- *.gz filter=lfs diff=lfs merge=lfs -text
8
- *.h5 filter=lfs diff=lfs merge=lfs -text
9
- *.joblib filter=lfs diff=lfs merge=lfs -text
10
- *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
- *.lz4 filter=lfs diff=lfs merge=lfs -text
12
- *.mlmodel filter=lfs diff=lfs merge=lfs -text
13
- *.model filter=lfs diff=lfs merge=lfs -text
14
- *.msgpack filter=lfs diff=lfs merge=lfs -text
15
- *.npy filter=lfs diff=lfs merge=lfs -text
16
- *.npz filter=lfs diff=lfs merge=lfs -text
17
- *.onnx filter=lfs diff=lfs merge=lfs -text
18
- *.ot filter=lfs diff=lfs merge=lfs -text
19
- *.parquet filter=lfs diff=lfs merge=lfs -text
20
- *.pb filter=lfs diff=lfs merge=lfs -text
21
- *.pickle filter=lfs diff=lfs merge=lfs -text
22
- *.pkl filter=lfs diff=lfs merge=lfs -text
23
- *.pt filter=lfs diff=lfs merge=lfs -text
24
- *.pth filter=lfs diff=lfs merge=lfs -text
25
- *.rar filter=lfs diff=lfs merge=lfs -text
26
- *.safetensors filter=lfs diff=lfs merge=lfs -text
27
- saved_model/**/* filter=lfs diff=lfs merge=lfs -text
28
- *.tar.* filter=lfs diff=lfs merge=lfs -text
29
- *.tar filter=lfs diff=lfs merge=lfs -text
30
- *.tflite filter=lfs diff=lfs merge=lfs -text
31
- *.tgz filter=lfs diff=lfs merge=lfs -text
32
- *.wasm filter=lfs diff=lfs merge=lfs -text
33
- *.xz filter=lfs diff=lfs merge=lfs -text
34
  *.zip filter=lfs diff=lfs merge=lfs -text
35
- *.zst filter=lfs diff=lfs merge=lfs -text
36
- *tfevents* filter=lfs diff=lfs merge=lfs -text
37
- # Audio files - uncompressed
38
- *.pcm filter=lfs diff=lfs merge=lfs -text
39
- *.sam filter=lfs diff=lfs merge=lfs -text
40
- *.raw filter=lfs diff=lfs merge=lfs -text
41
- # Audio files - compressed
42
- *.aac filter=lfs diff=lfs merge=lfs -text
43
- *.flac filter=lfs diff=lfs merge=lfs -text
44
- *.mp3 filter=lfs diff=lfs merge=lfs -text
45
- *.ogg filter=lfs diff=lfs merge=lfs -text
46
- *.wav filter=lfs diff=lfs merge=lfs -text
47
- # Image files - uncompressed
48
- *.bmp filter=lfs diff=lfs merge=lfs -text
49
- *.gif filter=lfs diff=lfs merge=lfs -text
50
- *.png filter=lfs diff=lfs merge=lfs -text
51
- *.tiff filter=lfs diff=lfs merge=lfs -text
52
- # Image files - compressed
53
- *.jpg filter=lfs diff=lfs merge=lfs -text
54
- *.jpeg filter=lfs diff=lfs merge=lfs -text
55
- *.webp filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  *.zip filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
README.md ADDED
@@ -0,0 +1,86 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ dataset_info:
3
+ features:
4
+ - name: image
5
+ dtype: image
6
+ - name: label
7
+ dtype:
8
+ class_label:
9
+ names:
10
+ '0': red and white circle 20 kph speed limit
11
+ '1': red and white circle 30 kph speed limit
12
+ '2': red and white circle 50 kph speed limit
13
+ '3': red and white circle 60 kph speed limit
14
+ '4': red and white circle 70 kph speed limit
15
+ '5': red and white circle 80 kph speed limit
16
+ '6': end / de-restriction of 80 kph speed limit
17
+ '7': red and white circle 100 kph speed limit
18
+ '8': red and white circle 120 kph speed limit
19
+ '9': red and white circle red car and black car no passing
20
+ '10': red and white circle red truck and black car no passing
21
+ '11': red and white triangle road intersection warning
22
+ '12': white and yellow diamond priority road
23
+ '13': red and white upside down triangle yield right-of-way
24
+ '14': stop
25
+ '15': empty red and white circle
26
+ '16': red and white circle no truck entry
27
+ '17': red circle with white horizonal stripe no entry
28
+ '18': red and white triangle with exclamation mark warning
29
+ '19': red and white triangle with black left curve approaching warning
30
+ '20': red and white triangle with black right curve approaching warning
31
+ '21': red and white triangle with black double curve approaching warning
32
+ '22': red and white triangle rough / bumpy road warning
33
+ '23': red and white triangle car skidding / slipping warning
34
+ '24': red and white triangle with merging / narrow lanes warning
35
+ '25': red and white triangle with person digging / construction / road work
36
+ warning
37
+ '26': red and white triangle with traffic light approaching warning
38
+ '27': red and white triangle with person walking warning
39
+ '28': red and white triangle with child and person walking warning
40
+ '29': red and white triangle with bicyle warning
41
+ '30': red and white triangle with snowflake / ice warning
42
+ '31': red and white triangle with deer warning
43
+ '32': white circle with gray strike bar no speed limit
44
+ '33': blue circle with white right turn arrow mandatory
45
+ '34': blue circle with white left turn arrow mandatory
46
+ '35': blue circle with white forward arrow mandatory
47
+ '36': blue circle with white forward or right turn arrow mandatory
48
+ '37': blue circle with white forward or left turn arrow mandatory
49
+ '38': blue circle with white keep right arrow mandatory
50
+ '39': blue circle with white keep left arrow mandatory
51
+ '40': blue circle with white arrows indicating a traffic circle
52
+ '41': white circle with gray strike bar indicating no passing for cars has
53
+ ended
54
+ '42': white circle with gray strike bar indicating no passing for trucks
55
+ has ended
56
+ splits:
57
+ - name: train
58
+ num_bytes: 3190230
59
+ num_examples: 26640
60
+ - name: test
61
+ num_bytes: 1411339
62
+ num_examples: 12630
63
+ - name: contrast
64
+ num_bytes: 1512379
65
+ num_examples: 12630
66
+ - name: gaussian_noise
67
+ num_bytes: 1663939
68
+ num_examples: 12630
69
+ - name: impulse_noise
70
+ num_bytes: 1638679
71
+ num_examples: 12630
72
+ - name: jpeg_compression
73
+ num_bytes: 1714459
74
+ num_examples: 12630
75
+ - name: motion_blur
76
+ num_bytes: 1588159
77
+ num_examples: 12630
78
+ - name: pixelate
79
+ num_bytes: 1512379
80
+ num_examples: 12630
81
+ - name: spatter
82
+ num_bytes: 1487119
83
+ num_examples: 12630
84
+ download_size: 841108239
85
+ dataset_size: 15718682
86
+ ---
data/contrast.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:66d8de328ac8e6194b8e445a7f302570a371f5b22a13c7840f818facd725f498
3
+ size 72731662
data/gaussian_noise.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f85ec1e3ee55339bb32f99fe7bb4ed4d7867bac0034b95c130f13c5501dd8ead
3
+ size 107066840
data/impulse_noise.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cf3c023d4aa149016e97e62c593c3ebb0497ab386981ddd0701c484fe109e280
3
+ size 90390821
data/jpeg_compression.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b6d75ae386db806c557d92a5099b84189d70319661faad815c1b8afdea318f9c
3
+ size 86363380
data/motion_blur.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fa6938418101ef77110cc700c9cc7942d1deec9182cc3490903dad55af6331b1
3
+ size 88657131
data/pixelate.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5792eb9a91376bb8fa1d6157170dfe6026d6bd69c690dbc4089ea285a445a39a
3
+ size 27164607
data/spatter.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cc3c91df697702ce6cb069df58f9ddc3cd4a9fd8b2bf8dc038f89c20e8c5106e
3
+ size 91524208
data/test.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0906180dba332274fc5c57b784bc315234f6290d1e4582878e387767be16d54d
3
+ size 89209187
data/train.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:97793acfe2ccddfa78c52e85d2f5344d68b0b14fae17ea6976660975a21dfdc0
3
+ size 188000403
gtsrb.py ADDED
@@ -0,0 +1,83 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import datasets
2
+ from datasets.data_files import DataFilesDict
3
+ from datasets.packaged_modules.imagefolder.imagefolder import ImageFolder, ImageFolderConfig
4
+
5
+ logger = datasets.logging.get_logger(__name__)
6
+
7
+
8
+ class GTSRB(ImageFolder):
9
+ R"""
10
+ GTSRB dataset for image classification.
11
+ """
12
+
13
+ BUILDER_CONFIG_CLASS = ImageFolderConfig
14
+ BUILDER_CONFIGS = [
15
+ ImageFolderConfig(name='default', features=("images", "labels"), data_files=DataFilesDict({split: f"data/{split}.zip" for split in ["train", "test"] + ["contrast", "gaussian_noise", "impulse_noise", "jpeg_compression", "motion_blur", "pixelate", "spatter"]}),)
16
+ ]
17
+
18
+
19
+ classnames = [
20
+ "red and white circle 20 kph speed limit",
21
+ "red and white circle 30 kph speed limit",
22
+ "red and white circle 50 kph speed limit",
23
+ "red and white circle 60 kph speed limit",
24
+ "red and white circle 70 kph speed limit",
25
+ "red and white circle 80 kph speed limit",
26
+ "end / de-restriction of 80 kph speed limit",
27
+ "red and white circle 100 kph speed limit",
28
+ "red and white circle 120 kph speed limit",
29
+ "red and white circle red car and black car no passing",
30
+ "red and white circle red truck and black car no passing",
31
+ "red and white triangle road intersection warning",
32
+ "white and yellow diamond priority road",
33
+ "red and white upside down triangle yield right-of-way",
34
+ "stop",
35
+ "empty red and white circle",
36
+ "red and white circle no truck entry",
37
+ "red circle with white horizonal stripe no entry",
38
+ "red and white triangle with exclamation mark warning",
39
+ "red and white triangle with black left curve approaching warning",
40
+ "red and white triangle with black right curve approaching warning",
41
+ "red and white triangle with black double curve approaching warning",
42
+ "red and white triangle rough / bumpy road warning",
43
+ "red and white triangle car skidding / slipping warning",
44
+ "red and white triangle with merging / narrow lanes warning",
45
+ "red and white triangle with person digging / construction / road work warning",
46
+ "red and white triangle with traffic light approaching warning",
47
+ "red and white triangle with person walking warning",
48
+ "red and white triangle with child and person walking warning",
49
+ "red and white triangle with bicyle warning",
50
+ "red and white triangle with snowflake / ice warning",
51
+ "red and white triangle with deer warning",
52
+ "white circle with gray strike bar no speed limit",
53
+ "blue circle with white right turn arrow mandatory",
54
+ "blue circle with white left turn arrow mandatory",
55
+ "blue circle with white forward arrow mandatory",
56
+ "blue circle with white forward or right turn arrow mandatory",
57
+ "blue circle with white forward or left turn arrow mandatory",
58
+ "blue circle with white keep right arrow mandatory",
59
+ "blue circle with white keep left arrow mandatory",
60
+ "blue circle with white arrows indicating a traffic circle",
61
+ "white circle with gray strike bar indicating no passing for cars has ended",
62
+ "white circle with gray strike bar indicating no passing for trucks has ended",
63
+ ]
64
+
65
+ clip_templates = [
66
+ lambda c: f'a zoomed in photo of a "{c}" traffic sign.',
67
+ lambda c: f'a centered photo of a "{c}" traffic sign.',
68
+ lambda c: f'a close up photo of a "{c}" traffic sign.',
69
+ ]
70
+
71
+ def _info(self):
72
+ return datasets.DatasetInfo(
73
+ description="GTSRB dataset for image classification.",
74
+ features=datasets.Features(
75
+ {
76
+ "image": datasets.Image(),
77
+ "label": datasets.ClassLabel(names=self.classnames),
78
+ }
79
+ ),
80
+ supervised_keys=("image", "label"),
81
+ task_templates=[datasets.ImageClassification(image_column="image", label_column="label")],
82
+ )
83
+