SatwikKambham commited on
Commit
5fc39ef
·
1 Parent(s): 892a33d

Split target feature

Browse files
Files changed (2) hide show
  1. README.md +20 -20
  2. ex-dark.py +15 -15
README.md CHANGED
@@ -5,32 +5,32 @@ dataset_info:
5
  features:
6
  - name: img
7
  dtype: image
8
- - name: target
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9
  sequence:
10
- - name: labels
11
- dtype:
12
- class_label:
13
- names:
14
- '0': Dog
15
- '1': Motorbike
16
- '2': People
17
- '3': Cat
18
- '4': Chair
19
- '5': Table
20
- '6': Car
21
- '7': Bicycle
22
- '8': Bottle
23
- '9': Bus
24
- '10': Cup
25
- '11': Boat
26
- - name: bboxes
27
  sequence: float32
 
28
  splits:
29
  - name: train
30
- num_bytes: 1864877
31
  num_examples: 7361
32
  download_size: 1487935964
33
- dataset_size: 1864877
34
  ---
35
 
36
  The Exclusively Dark (ExDARK) dataset is a collection of low-light
 
5
  features:
6
  - name: img
7
  dtype: image
8
+ - name: labels
9
+ sequence:
10
+ class_label:
11
+ names:
12
+ '0': Dog
13
+ '1': Motorbike
14
+ '2': People
15
+ '3': Cat
16
+ '4': Chair
17
+ '5': Table
18
+ '6': Car
19
+ '7': Bicycle
20
+ '8': Bottle
21
+ '9': Bus
22
+ '10': Cup
23
+ '11': Boat
24
+ - name: bboxes
25
  sequence:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
26
  sequence: float32
27
+ length: 4
28
  splits:
29
  - name: train
30
+ num_bytes: 1770065
31
  num_examples: 7361
32
  download_size: 1487935964
33
+ dataset_size: 1770065
34
  ---
35
 
36
  The Exclusively Dark (ExDARK) dataset is a collection of low-light
ex-dark.py CHANGED
@@ -1,4 +1,5 @@
1
- # Copyright 2020 The HuggingFace Datasets Authors and the current dataset script contributor.
 
2
  #
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
  # you may not use this file except in compliance with the License.
@@ -103,16 +104,17 @@ class ExDark(datasets.GeneratorBasedBuilder):
103
  features=datasets.Features(
104
  {
105
  "img": datasets.Image(),
106
- "target": datasets.Sequence(
107
- feature={
108
- "labels": datasets.features.ClassLabel(
109
- names=_LABEL_NAMES
110
- ),
111
- "bboxes": datasets.features.Sequence(
112
- feature=datasets.Value("float32")
113
- )
114
- }
115
- )
 
116
  }
117
  ),
118
  homepage=_HOMEPAGE,
@@ -149,8 +151,6 @@ class ExDark(datasets.GeneratorBasedBuilder):
149
  labels = sample["class"].to_numpy()
150
  yield idx, {
151
  "img": img_path,
152
- "target": {
153
- "labels": labels,
154
- "bboxes": bboxs,
155
- },
156
  }
 
1
+ # Copyright 2020 The HuggingFace Datasets Authors and the current dataset
2
+ # script contributor.
3
  #
4
  # Licensed under the Apache License, Version 2.0 (the "License");
5
  # you may not use this file except in compliance with the License.
 
104
  features=datasets.Features(
105
  {
106
  "img": datasets.Image(),
107
+ "labels": datasets.Sequence(
108
+ feature=datasets.features.ClassLabel(
109
+ names=_LABEL_NAMES,
110
+ ),
111
+ ),
112
+ "bboxes": datasets.Sequence(
113
+ feature=datasets.Sequence(
114
+ feature=datasets.Value("float32"),
115
+ length=4,
116
+ ),
117
+ ),
118
  }
119
  ),
120
  homepage=_HOMEPAGE,
 
151
  labels = sample["class"].to_numpy()
152
  yield idx, {
153
  "img": img_path,
154
+ "labels": labels,
155
+ "bboxes": bboxs,
 
 
156
  }