Commit
·
892a33d
1
Parent(s):
a001ee7
Updated readme and fixed feature definition
Browse files- README.md +59 -0
- ex-dark.py +11 -9
README.md
CHANGED
|
@@ -1,3 +1,62 @@
|
|
| 1 |
---
|
| 2 |
license: bsd-3-clause
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
license: bsd-3-clause
|
| 3 |
+
dataset_info:
|
| 4 |
+
config_name: exdark
|
| 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
|
| 37 |
+
images from very low-light environments to twilight (i.e 10 different
|
| 38 |
+
conditions) with 12 object classes (similar to PASCAL VOC) annotated on both
|
| 39 |
+
image class level and local object bounding boxes.
|
| 40 |
+
|
| 41 |
+
The object classes are as follows:
|
| 42 |
+
|
| 43 |
+
- Dog
|
| 44 |
+
- Motorbike
|
| 45 |
+
- People
|
| 46 |
+
- Cat
|
| 47 |
+
- Chair
|
| 48 |
+
- Table
|
| 49 |
+
- Car
|
| 50 |
+
- Bicycle
|
| 51 |
+
- Bottle
|
| 52 |
+
- Bus
|
| 53 |
+
- Cup
|
| 54 |
+
- Boat
|
| 55 |
+
|
| 56 |
+
For more information about the original Exclusively Dark Image dataset,
|
| 57 |
+
please visit the official dataset page:
|
| 58 |
+
|
| 59 |
+
[https://github.com/cs-chan/Exclusively-Dark-Image-Dataset](https://github.com/cs-chan/Exclusively-Dark-Image-Dataset)
|
| 60 |
+
|
| 61 |
+
Please refer to the original dataset source for any additional details,
|
| 62 |
+
citations, or specific usage guidelines provided by the dataset creators.
|
ex-dark.py
CHANGED
|
@@ -103,15 +103,16 @@ class ExDark(datasets.GeneratorBasedBuilder):
|
|
| 103 |
features=datasets.Features(
|
| 104 |
{
|
| 105 |
"img": datasets.Image(),
|
| 106 |
-
"
|
| 107 |
feature={
|
| 108 |
-
"
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
"
|
| 112 |
-
|
|
|
|
| 113 |
}
|
| 114 |
-
)
|
| 115 |
}
|
| 116 |
),
|
| 117 |
homepage=_HOMEPAGE,
|
|
@@ -142,12 +143,13 @@ class ExDark(datasets.GeneratorBasedBuilder):
|
|
| 142 |
df["class"] = df["class"].apply(lambda x: classes.tolist().index(x))
|
| 143 |
|
| 144 |
for idx, file_name in enumerate(df.file_name.unique()):
|
|
|
|
| 145 |
sample = df[df.file_name == file_name]
|
| 146 |
bboxs = sample[["x", "y", "w", "h"]].to_numpy()
|
| 147 |
labels = sample["class"].to_numpy()
|
| 148 |
yield idx, {
|
| 149 |
-
"img":
|
| 150 |
-
"
|
| 151 |
"labels": labels,
|
| 152 |
"bboxes": bboxs,
|
| 153 |
},
|
|
|
|
| 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,
|
|
|
|
| 143 |
df["class"] = df["class"].apply(lambda x: classes.tolist().index(x))
|
| 144 |
|
| 145 |
for idx, file_name in enumerate(df.file_name.unique()):
|
| 146 |
+
img_path = os.path.join(data_dir, "ExDark", file_name)
|
| 147 |
sample = df[df.file_name == file_name]
|
| 148 |
bboxs = sample[["x", "y", "w", "h"]].to_numpy()
|
| 149 |
labels = sample["class"].to_numpy()
|
| 150 |
yield idx, {
|
| 151 |
+
"img": img_path,
|
| 152 |
+
"target": {
|
| 153 |
"labels": labels,
|
| 154 |
"bboxes": bboxs,
|
| 155 |
},
|