karolyartur
commited on
Commit
•
c174f79
1
Parent(s):
486b7b4
Update dataset card and add dataset builder
Browse files
README.md
CHANGED
@@ -1,3 +1,67 @@
|
|
1 |
---
|
|
|
|
|
2 |
license: gpl-3.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
+
language:
|
3 |
+
- en
|
4 |
license: gpl-3.0
|
5 |
+
tags:
|
6 |
+
- vision
|
7 |
+
- image-segmentation
|
8 |
+
- instance-segmentation
|
9 |
+
- object-detection
|
10 |
+
- optical-flow
|
11 |
+
- depth
|
12 |
+
- synthetic
|
13 |
+
- sim-to-real
|
14 |
+
annotations_creators:
|
15 |
+
- machine-generated
|
16 |
+
pretty_name: SMVB Dataset
|
17 |
+
size_categories:
|
18 |
+
- 1K<n<10K
|
19 |
+
task_categories:
|
20 |
+
- object-detection
|
21 |
+
- zero-shot-object-detection
|
22 |
+
- image-segmentation
|
23 |
+
- depth-estimation
|
24 |
+
- video-classification
|
25 |
+
- other
|
26 |
+
task_ids:
|
27 |
+
- instance-segmentation
|
28 |
+
- semantic-segmentation
|
29 |
---
|
30 |
+
|
31 |
+
# Synthetic Multimodal Video Benchmark (SMVB)
|
32 |
+
|
33 |
+
A dataset consisting of synthetic images from distinct synthetic scenes, annotated with object/instance/semantic segmentation masks, depth data, surface normal information and optical for testing and benchmarking model performance for multi-task/multi-objective learning.
|
34 |
+
|
35 |
+
### Supported Tasks and Leaderboards
|
36 |
+
|
37 |
+
The dataset supports tasks such as semantic segmentation, instance segmentation, object detection, image classification, depth, surface normal, and optical flow estimation, and video object segmentation.
|
38 |
+
|
39 |
+
## Dataset Structure
|
40 |
+
|
41 |
+
### Data Instances
|
42 |
+
|
43 |
+
|
44 |
+
### Data Fields
|
45 |
+
|
46 |
+
### Data Splits
|
47 |
+
|
48 |
+
|
49 |
+
## Dataset Creation
|
50 |
+
|
51 |
+
### Curation Rationale
|
52 |
+
|
53 |
+
### Source Data
|
54 |
+
|
55 |
+
### Citation Information
|
56 |
+
|
57 |
+
```bibtex
|
58 |
+
@INPROCEEDINGS{karoly2024synthetic,
|
59 |
+
author={Károly, Artúr I. and Nádas, Imre and Galambos, Péter},
|
60 |
+
booktitle={2024 IEEE 22nd World Symposium on Applied Machine Intelligence and Informatics (SAMI)},
|
61 |
+
title={Synthetic Multimodal Video Benchmark (SMVB): Utilizing Blender for rich dataset generation},
|
62 |
+
year={2024},
|
63 |
+
volume={},
|
64 |
+
number={},
|
65 |
+
pages={},
|
66 |
+
doi={}}
|
67 |
+
```
|
SMVB.py
ADDED
@@ -0,0 +1,140 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#
|
2 |
+
# This file is part of the SMVB distribution (https://huggingface.co/datasets/ABC-iRobotics/SMVB).
|
3 |
+
# Copyright (c) 2023 ABC-iRobotics.
|
4 |
+
#
|
5 |
+
# This program is free software: you can redistribute it and/or modify
|
6 |
+
# it under the terms of the GNU General Public License as published by
|
7 |
+
# the Free Software Foundation, version 3.
|
8 |
+
#
|
9 |
+
# This program is distributed in the hope that it will be useful, but
|
10 |
+
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
11 |
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
12 |
+
# General Public License for more details.
|
13 |
+
#
|
14 |
+
# You should have received a copy of the GNU General Public License
|
15 |
+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
16 |
+
#
|
17 |
+
"""SMVB dataset"""
|
18 |
+
|
19 |
+
import sys
|
20 |
+
import pathlib
|
21 |
+
if sys.version_info < (3, 9):
|
22 |
+
from typing import Sequence, Generator, Tuple
|
23 |
+
else:
|
24 |
+
from collections.abc import Sequence, Generator
|
25 |
+
Tuple = tuple
|
26 |
+
|
27 |
+
from typing import Optional, IO
|
28 |
+
|
29 |
+
import datasets
|
30 |
+
import itertools
|
31 |
+
|
32 |
+
|
33 |
+
# ---- Constants ----
|
34 |
+
|
35 |
+
_CITATION = """\
|
36 |
+
@INPROCEEDINGS{karoly2024synthetic,
|
37 |
+
author={Károly, Artúr I. and Nádas, Imre and Galambos, Péter},
|
38 |
+
booktitle={2024 IEEE 22nd World Symposium on Applied Machine Intelligence and Informatics (SAMI)},
|
39 |
+
title={Synthetic Multimodal Video Benchmark (SMVB): Utilizing Blender for rich dataset generation},
|
40 |
+
year={2024},
|
41 |
+
volume={},
|
42 |
+
number={},
|
43 |
+
pages={},
|
44 |
+
doi={}}
|
45 |
+
|
46 |
+
"""
|
47 |
+
|
48 |
+
_DESCRIPTION = """\
|
49 |
+
Amultimodal video benchmark for evaluating models in multi-task learning scenarios.
|
50 |
+
"""
|
51 |
+
|
52 |
+
_HOMEPAGE = "https://huggingface.co/ABC-iRobotics/SMVB"
|
53 |
+
|
54 |
+
_LICENSE = "GNU General Public License v3.0"
|
55 |
+
|
56 |
+
_BASE_URL = "https://huggingface.co/datasets/ABC-iRobotics/SMVB/resolve/main/data"
|
57 |
+
|
58 |
+
_VERSION = '1.0.0'
|
59 |
+
|
60 |
+
|
61 |
+
# ---- SMVB dataset Configs ----
|
62 |
+
|
63 |
+
class SMVBDatasetConfig(datasets.BuilderConfig):
|
64 |
+
"""BuilderConfig for SMVB dataset."""
|
65 |
+
|
66 |
+
def __init__(self, name: str, data_urls: Sequence[str], version: Optional[str] = None, **kwargs):
|
67 |
+
super(SMVBDatasetConfig, self).__init__(version=datasets.Version(version), name=name, **kwargs)
|
68 |
+
self._data_urls = data_urls
|
69 |
+
|
70 |
+
@property
|
71 |
+
def features(self):
|
72 |
+
return datasets.Features(
|
73 |
+
{
|
74 |
+
"image": datasets.Image(),
|
75 |
+
"mask": datasets.Image(),
|
76 |
+
"depth": datasets.Sequence(datasets.Value("float32")),
|
77 |
+
"flow": datasets.Sequence(datasets.Value("float32")),
|
78 |
+
"normal": datasets.Sequence(datasets.Value("float32"))
|
79 |
+
}
|
80 |
+
)
|
81 |
+
|
82 |
+
@property
|
83 |
+
def supervised_keys(self):
|
84 |
+
return ("image", "mask", "depth", "flow", "normal")
|
85 |
+
|
86 |
+
|
87 |
+
|
88 |
+
# ---- SMVB dataset Loader ----
|
89 |
+
|
90 |
+
class SMVBDataset(datasets.GeneratorBasedBuilder):
|
91 |
+
"""SMVB dataset."""
|
92 |
+
|
93 |
+
BUILDER_CONFIG_CLASS = SMVBDatasetConfig
|
94 |
+
BUILDER_CONFIGS = [
|
95 |
+
SMVBDatasetConfig(
|
96 |
+
name = "all",
|
97 |
+
description = "Photorealistic synthetic images",
|
98 |
+
data_urls = [_BASE_URL],
|
99 |
+
version = _VERSION
|
100 |
+
),
|
101 |
+
]
|
102 |
+
DEFAULT_WRITER_BATCH_SIZE = 10
|
103 |
+
|
104 |
+
def _info(self):
|
105 |
+
return datasets.DatasetInfo(
|
106 |
+
description=_DESCRIPTION,
|
107 |
+
features=self.config.features,
|
108 |
+
supervised_keys=self.config.supervised_keys,
|
109 |
+
homepage=_HOMEPAGE,
|
110 |
+
license=_LICENSE,
|
111 |
+
citation=_CITATION,
|
112 |
+
version=self.config.version,
|
113 |
+
)
|
114 |
+
|
115 |
+
def _split_generators(self, dl_manager):
|
116 |
+
local_data_paths = dl_manager.download(self.config._data_urls)
|
117 |
+
archives = itertools.chain.from_iterable([pathlib.Path(path).rglob('*.tar.gz') for path in local_data_paths])
|
118 |
+
local_data_gen = itertools.chain.from_iterable([dl_manager.iter_archive(path) for path in archives])
|
119 |
+
|
120 |
+
return [
|
121 |
+
datasets.SplitGenerator(
|
122 |
+
name=datasets.Split.TRAIN,
|
123 |
+
gen_kwargs={
|
124 |
+
"data": local_data_gen
|
125 |
+
}
|
126 |
+
)
|
127 |
+
]
|
128 |
+
|
129 |
+
def _generate_examples(
|
130 |
+
self,
|
131 |
+
data: Generator[Tuple[str,IO], None, None]
|
132 |
+
):
|
133 |
+
file_infos = []
|
134 |
+
keys = self.config.supervised_keys
|
135 |
+
|
136 |
+
for i, info in enumerate(data):
|
137 |
+
if file_infos and i%len(keys) == 0:
|
138 |
+
yield (i//len(keys))-1, {k:{'path':d[0],'bytes':d[1].read()} for k,d in zip(keys,file_infos)}
|
139 |
+
file_infos = []
|
140 |
+
file_infos.append(info)
|