Update SkyScenes.py
Browse files- SkyScenes.py +42 -42
SkyScenes.py
CHANGED
|
@@ -4,24 +4,24 @@ import os
|
|
| 4 |
import datasets
|
| 5 |
|
| 6 |
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
|
| 26 |
|
| 27 |
class SKYSCENESConfig(datasets.BuilderConfig):
|
|
@@ -63,30 +63,30 @@ class SKYSCENES(datasets.GeneratorBasedBuilder):
|
|
| 63 |
)
|
| 64 |
]
|
| 65 |
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
|
| 90 |
|
| 91 |
def _split_generators(self, dl_manager):
|
| 92 |
data_files = dl_manager.download_and_extract(self.config.data_urls)
|
|
|
|
| 4 |
import datasets
|
| 5 |
|
| 6 |
|
| 7 |
+
_HOMEPAGE = "
|
| 8 |
+
_LICENSE = "CC BY 4.0"
|
| 9 |
+
_CITATION = """\
|
| 10 |
+
@misc{ buildings-instance-segmentation_dataset,
|
| 11 |
+
title = { Buildings Instance Segmentation Dataset },
|
| 12 |
+
type = { Open Source Dataset },
|
| 13 |
+
author = { Roboflow Universe Projects },
|
| 14 |
+
howpublished = { \\url{ https://universe.roboflow.com/roboflow-universe-projects/buildings-instance-segmentation } },
|
| 15 |
+
url = { https://universe.roboflow.com/roboflow-universe-projects/buildings-instance-segmentation },
|
| 16 |
+
journal = { Roboflow Universe },
|
| 17 |
+
publisher = { Roboflow },
|
| 18 |
+
year = { 2023 },
|
| 19 |
+
month = { jan },
|
| 20 |
+
note = { visited on 2023-01-18 },
|
| 21 |
+
}
|
| 22 |
+
"""
|
| 23 |
+
_CATEGORIES = ['building']
|
| 24 |
+
_ANNOTATION_FILENAME = "_annotations.coco.json"
|
| 25 |
|
| 26 |
|
| 27 |
class SKYSCENESConfig(datasets.BuilderConfig):
|
|
|
|
| 63 |
)
|
| 64 |
]
|
| 65 |
|
| 66 |
+
def _info(self):
|
| 67 |
+
features = datasets.Features(
|
| 68 |
+
{
|
| 69 |
+
"image_id": datasets.Value("int64"),
|
| 70 |
+
"image": datasets.Image(),
|
| 71 |
+
"width": datasets.Value("int32"),
|
| 72 |
+
"height": datasets.Value("int32"),
|
| 73 |
+
"objects": datasets.Sequence(
|
| 74 |
+
{
|
| 75 |
+
"id": datasets.Value("int64"),
|
| 76 |
+
"area": datasets.Value("int64"),
|
| 77 |
+
"bbox": datasets.Sequence(datasets.Value("float32"), length=4),
|
| 78 |
+
"segmentation": datasets.Sequence(datasets.Sequence(datasets.Value("float32"))),
|
| 79 |
+
"category": datasets.ClassLabel(names=_CATEGORIES),
|
| 80 |
+
}
|
| 81 |
+
),
|
| 82 |
+
}
|
| 83 |
+
)
|
| 84 |
+
return datasets.DatasetInfo(
|
| 85 |
+
features=features,
|
| 86 |
+
homepage=_HOMEPAGE,
|
| 87 |
+
citation=_CITATION,
|
| 88 |
+
license=_LICENSE,
|
| 89 |
+
)
|
| 90 |
|
| 91 |
def _split_generators(self, dl_manager):
|
| 92 |
data_files = dl_manager.download_and_extract(self.config.data_urls)
|