File size: 24,653 Bytes
aef7e7c 7823e79 aef7e7c 7823e79 aef7e7c 7823e79 aef7e7c 552b720 aef7e7c 7823e79 aef7e7c 552b720 aef7e7c 395669b d746a04 395669b aef7e7c ebaa43f 12830b1 ebaa43f 7823e79 ebaa43f aef7e7c 395669b 62fa269 164476e 395669b ef48722 aef7e7c 7823e79 395669b aef7e7c 388463b 7823e79 395669b 388463b 395669b | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 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 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 | import collections
import json
import os
import datasets
_DESCRIPTION='SkyScenes, a synthetic dataset of densely annotated aerial images captured from Unmanned Aerial Vehicle (UAV) perspectives. SkyScenes is curated from CARLA to comprehensively capture diversity across layout (urban and rural maps), weather conditions, times of day, pitch angles and altitudes with corresponding semantic, instance and depth annotations.'
_HOMEPAGE = "skyscenes.github.io"
_LICENSE = "MIT"
# _CITATION = """\
# @misc{ buildings-instance-segmentation_dataset,
# title = { Buildings Instance Segmentation Dataset },
# type = { Open Source Dataset },
# author = { Roboflow Universe Projects },
# howpublished = { \\url{ https://universe.roboflow.com/roboflow-universe-projects/buildings-instance-segmentation } },
# url = { https://universe.roboflow.com/roboflow-universe-projects/buildings-instance-segmentation },
# journal = { Roboflow Universe },
# publisher = { Roboflow },
# year = { 2023 },
# month = { jan },
# note = { visited on 2023-01-18 },
# }
# """
_CATEGORIES = ["unlabeled", "building", "fence", "other", "pedestrian", "pole",
"roadline", "road", "sidewalk", "vegetation", "vehicles", "wall",
"trafficsign", "sky", "ground", "bridge", "railtrack", "guardrail",
"trafficlight", "static", "dynamic", "water", "terrain"]
class SKYSCENESConfig(datasets.BuilderConfig):
"""Builder Config for SkyScenes"""
def __init__(self, data_urls, **kwargs):
"""
BuilderConfig for SkyScenes.
Args:
data_urls: `dict`, name to url to download the zip file from.
**kwargs: keyword arguments forwarded to super.
"""
super(SKYSCENESConfig, self).__init__(version=datasets.Version("1.0.0"), **kwargs)
self.data_urls = data_urls
# self.metadata_url = metadata_url
class SKYSCENES(datasets.GeneratorBasedBuilder):
"""satellite-building-segmentation instance segmentation dataset"""
VERSION = datasets.Version("1.0.0")
BUILDER_CONFIGS = [
SKYSCENESConfig(
name="ClearNoon",
description="ClearNoon subset for all H/P variations",
data_urls={
"Images":["https://huggingface.co/datasets/hoffman-lab/SkyScenes/resolve/main/Images/H_35_P_45/ClearNoon/Town01/Town01.tar.gz","https://huggingface.co/datasets/hoffman-lab/SkyScenes/resolve/main/Images/H_35_P_45/ClearNoon/Town02/Town02.tar.gz","https://huggingface.co/datasets/hoffman-lab/SkyScenes/resolve/main/Images/H_35_P_45/ClearNoon/Town03/Town03.tar.gz","https://huggingface.co/datasets/hoffman-lab/SkyScenes/resolve/main/Images/H_35_P_45/ClearNoon/Town04/Town04.tar.gz"],
"Instance":["https://huggingface.co/datasets/hoffman-lab/SkyScenes/resolve/main/Instance/H_35_P_45/ClearNoon/Town01/Town01.tar.gz","https://huggingface.co/datasets/hoffman-lab/SkyScenes/resolve/main/Instance/H_35_P_45/ClearNoon/Town02/Town02.tar.gz","https://huggingface.co/datasets/hoffman-lab/SkyScenes/resolve/main/Instance/H_35_P_45/ClearNoon/Town03/Town03.tar.gz","https://huggingface.co/datasets/hoffman-lab/SkyScenes/resolve/main/Instance/H_35_P_45/ClearNoon/Town04/Town04.tar.gz"],
"Seg":["https://huggingface.co/datasets/hoffman-lab/SkyScenes/resolve/main/Instance/H_35_P_45/ClearNoon/Town01/Town01.tar.gz","https://huggingface.co/datasets/hoffman-lab/SkyScenes/resolve/main/Instance/H_35_P_45/ClearNoon/Town02/Town02.tar.gz","https://huggingface.co/datasets/hoffman-lab/SkyScenes/resolve/main/Instance/H_35_P_45/ClearNoon/Town03/Town03.tar.gz","https://huggingface.co/datasets/hoffman-lab/SkyScenes/resolve/main/Instance/H_35_P_45/ClearNoon/Town04/Town04.tar.gz"],
"Depth":["https://huggingface.co/datasets/hoffman-lab/SkyScenes/resolve/main/Instance/H_35_P_45/ClearNoon/Town01/Town01.tar.gz","https://huggingface.co/datasets/hoffman-lab/SkyScenes/resolve/main/Instance/H_35_P_45/ClearNoon/Town02/Town02.tar.gz","https://huggingface.co/datasets/hoffman-lab/SkyScenes/resolve/main/Instance/H_35_P_45/ClearNoon/Town03/Town03.tar.gz","https://huggingface.co/datasets/hoffman-lab/SkyScenes/resolve/main/Instance/H_35_P_45/ClearNoon/Town04/Town04.tar.gz"]
}
)
# SKYSCENESConfig(
# name="ClearNight",
# description="ClearNight subset for all H/P variations",
# data_urls={
# "Images":["https://huggingface.co/datasets/hoffman-lab/SkyScenes/resolve/main/Images/H_15_P_0/ClearNight/Town01.tar.gz","https://huggingface.co/datasets/hoffman-lab/SkyScenes/blob/main/Images/H_15_P_0/ClearNight/Town02.tar.gz","https://huggingface.co/datasets/hoffman-lab/SkyScenes/blob/main/Images/H_15_P_0/ClearNight/Town03.tar.gz","https://huggingface.co/datasets/hoffman-lab/SkyScenes/blob/main/Images/H_15_P_0/ClearNight/Town04.tar.gz",]
# "Instance":[]
# "Seg":[]
# "Depth":[]
# }
# )
# SKYSCENESConfig(
# name="ClearSunset",
# description="ClearNoon subset for all H/P variations",
# data_urls={
# "Images":["https://huggingface.co/datasets/hoffman-lab/SkyScenes/resolve/main/Images/H_15_P_0/ClearNight/Town01.tar.gz","https://huggingface.co/datasets/hoffman-lab/SkyScenes/blob/main/Images/H_15_P_0/ClearNight/Town02.tar.gz","https://huggingface.co/datasets/hoffman-lab/SkyScenes/blob/main/Images/H_15_P_0/ClearNight/Town03.tar.gz","https://huggingface.co/datasets/hoffman-lab/SkyScenes/blob/main/Images/H_15_P_0/ClearNight/Town04.tar.gz",]
# "Instance":[]
# "Seg":[]
# "Depth":[]
# }
# )
# SKYSCENESConfig(
# name="CloudyNoon",
# description="CloudyNoon subset for all H/P variations",
# data_urls={
# "Images":["https://huggingface.co/datasets/hoffman-lab/SkyScenes/resolve/main/Images/H_15_P_0/ClearNight/Town01.tar.gz","https://huggingface.co/datasets/hoffman-lab/SkyScenes/blob/main/Images/H_15_P_0/ClearNight/Town02.tar.gz","https://huggingface.co/datasets/hoffman-lab/SkyScenes/blob/main/Images/H_15_P_0/ClearNight/Town03.tar.gz","https://huggingface.co/datasets/hoffman-lab/SkyScenes/blob/main/Images/H_15_P_0/ClearNight/Town04.tar.gz",]
# "Instance":[]
# "Seg":[]
# "Depth":[]
# }
# )
# SKYSCENESConfig(
# name="MidRainyNoon",
# description="MidRainyNoon subset for all H/P variations",
# data_urls={
# "Images":["https://huggingface.co/datasets/hoffman-lab/SkyScenes/resolve/main/Images/H_15_P_0/ClearNight/Town01.tar.gz","https://huggingface.co/datasets/hoffman-lab/SkyScenes/blob/main/Images/H_15_P_0/ClearNight/Town02.tar.gz","https://huggingface.co/datasets/hoffman-lab/SkyScenes/blob/main/Images/H_15_P_0/ClearNight/Town03.tar.gz","https://huggingface.co/datasets/hoffman-lab/SkyScenes/blob/main/Images/H_15_P_0/ClearNight/Town04.tar.gz",]
# "Instance":[]
# "Seg":[]
# "Depth":[]
# }
# )
# SKYSCENESConfig(
# name="H_15",
# description="All variations for Height=15m",
# data_urls={
# "Images":["https://huggingface.co/datasets/hoffman-lab/SkyScenes/resolve/main/Images/H_15_P_0/ClearNight/Town01.tar.gz","https://huggingface.co/datasets/hoffman-lab/SkyScenes/blob/main/Images/H_15_P_0/ClearNight/Town02.tar.gz","https://huggingface.co/datasets/hoffman-lab/SkyScenes/blob/main/Images/H_15_P_0/ClearNight/Town03.tar.gz","https://huggingface.co/datasets/hoffman-lab/SkyScenes/blob/main/Images/H_15_P_0/ClearNight/Town04.tar.gz",]
# "Instance":[]
# "Seg":[]
# "Depth":[]
# }
# )
# SKYSCENESConfig(
# name="H_35",
# description="All variations for Height=35m",
# data_urls={
# "Images":["https://huggingface.co/datasets/hoffman-lab/SkyScenes/resolve/main/Images/H_15_P_0/ClearNight/Town01.tar.gz","https://huggingface.co/datasets/hoffman-lab/SkyScenes/blob/main/Images/H_15_P_0/ClearNight/Town02.tar.gz","https://huggingface.co/datasets/hoffman-lab/SkyScenes/blob/main/Images/H_15_P_0/ClearNight/Town03.tar.gz","https://huggingface.co/datasets/hoffman-lab/SkyScenes/blob/main/Images/H_15_P_0/ClearNight/Town04.tar.gz",]
# "Instance":[]
# "Seg":[]
# "Depth":[]
# }
# )
# SKYSCENESConfig(
# name="H_60",
# description="All variations for Height=60m",
# data_urls={
# "Images":["https://huggingface.co/datasets/hoffman-lab/SkyScenes/resolve/main/Images/H_15_P_0/ClearNight/Town01.tar.gz","https://huggingface.co/datasets/hoffman-lab/SkyScenes/blob/main/Images/H_15_P_0/ClearNight/Town02.tar.gz","https://huggingface.co/datasets/hoffman-lab/SkyScenes/blob/main/Images/H_15_P_0/ClearNight/Town03.tar.gz","https://huggingface.co/datasets/hoffman-lab/SkyScenes/blob/main/Images/H_15_P_0/ClearNight/Town04.tar.gz",]
# "Instance":[]
# "Seg":[]
# "Depth":[]
# }
# )
# SKYSCENESConfig(
# name="P_0",
# description="All variations for Pitch=0",
# data_urls={
# "Images":["https://huggingface.co/datasets/hoffman-lab/SkyScenes/resolve/main/Images/H_15_P_0/ClearNight/Town01.tar.gz","https://huggingface.co/datasets/hoffman-lab/SkyScenes/blob/main/Images/H_15_P_0/ClearNight/Town02.tar.gz","https://huggingface.co/datasets/hoffman-lab/SkyScenes/blob/main/Images/H_15_P_0/ClearNight/Town03.tar.gz","https://huggingface.co/datasets/hoffman-lab/SkyScenes/blob/main/Images/H_15_P_0/ClearNight/Town04.tar.gz",]
# "Instance":[]
# "Seg":[]
# "Depth":[]
# }
# )
# SKYSCENESConfig(
# name="P_45",
# description="All variations for Pitch=45",
# data_urls={
# "Images":["https://huggingface.co/datasets/hoffman-lab/SkyScenes/resolve/main/Images/H_15_P_0/ClearNight/Town01.tar.gz","https://huggingface.co/datasets/hoffman-lab/SkyScenes/blob/main/Images/H_15_P_0/ClearNight/Town02.tar.gz","https://huggingface.co/datasets/hoffman-lab/SkyScenes/blob/main/Images/H_15_P_0/ClearNight/Town03.tar.gz","https://huggingface.co/datasets/hoffman-lab/SkyScenes/blob/main/Images/H_15_P_0/ClearNight/Town04.tar.gz",]
# "Instance":[]
# "Seg":[]
# "Depth":[]
# }
# )
# SKYSCENESConfig(
# name="P_60",
# description="All variations for Pitch=60",
# data_urls={
# "Images":["https://huggingface.co/datasets/hoffman-lab/SkyScenes/resolve/main/Images/H_15_P_0/ClearNight/Town01.tar.gz","https://huggingface.co/datasets/hoffman-lab/SkyScenes/blob/main/Images/H_15_P_0/ClearNight/Town02.tar.gz","https://huggingface.co/datasets/hoffman-lab/SkyScenes/blob/main/Images/H_15_P_0/ClearNight/Town03.tar.gz","https://huggingface.co/datasets/hoffman-lab/SkyScenes/blob/main/Images/H_15_P_0/ClearNight/Town04.tar.gz",]
# "Instance":[]
# "Seg":[]
# "Depth":[]
# }
# )
# SKYSCENESConfig(
# name="P_90",
# description="All variations for Pitch=90",
# data_urls={
# "Images":["https://huggingface.co/datasets/hoffman-lab/SkyScenes/resolve/main/Images/H_15_P_0/ClearNight/Town01.tar.gz","https://huggingface.co/datasets/hoffman-lab/SkyScenes/blob/main/Images/H_15_P_0/ClearNight/Town02.tar.gz","https://huggingface.co/datasets/hoffman-lab/SkyScenes/blob/main/Images/H_15_P_0/ClearNight/Town03.tar.gz","https://huggingface.co/datasets/hoffman-lab/SkyScenes/blob/main/Images/H_15_P_0/ClearNight/Town04.tar.gz",]
# "Instance":[]
# "Seg":[]
# "Depth":[]
# }
# )
# SKYSCENESConfig(
# name="H_15_P_0",
# description="All variations for Height = 15m and Pitch=0",
# data_urls={
# "Images":["https://huggingface.co/datasets/hoffman-lab/SkyScenes/resolve/main/Images/H_15_P_0/ClearNight/Town01.tar.gz","https://huggingface.co/datasets/hoffman-lab/SkyScenes/blob/main/Images/H_15_P_0/ClearNight/Town02.tar.gz","https://huggingface.co/datasets/hoffman-lab/SkyScenes/blob/main/Images/H_15_P_0/ClearNight/Town03.tar.gz","https://huggingface.co/datasets/hoffman-lab/SkyScenes/blob/main/Images/H_15_P_0/ClearNight/Town04.tar.gz",]
# "Instance":[]
# "Seg":[]
# "Depth":[]
# }
# )
# SKYSCENESConfig(
# name="H_15_P_45",
# description="All variations for Height = 15m and Pitch=45",
# data_urls={
# "Images":["https://huggingface.co/datasets/hoffman-lab/SkyScenes/resolve/main/Images/H_15_P_0/ClearNight/Town01.tar.gz","https://huggingface.co/datasets/hoffman-lab/SkyScenes/blob/main/Images/H_15_P_0/ClearNight/Town02.tar.gz","https://huggingface.co/datasets/hoffman-lab/SkyScenes/blob/main/Images/H_15_P_0/ClearNight/Town03.tar.gz","https://huggingface.co/datasets/hoffman-lab/SkyScenes/blob/main/Images/H_15_P_0/ClearNight/Town04.tar.gz",]
# "Instance":[]
# "Seg":[]
# "Depth":[]
# }
# )
# SKYSCENESConfig(
# name="H_15_P_60",
# description="All variations for Height = 15m and Pitch=60",
# data_urls={
# "Images":["https://huggingface.co/datasets/hoffman-lab/SkyScenes/resolve/main/Images/H_15_P_0/ClearNight/Town01.tar.gz","https://huggingface.co/datasets/hoffman-lab/SkyScenes/blob/main/Images/H_15_P_0/ClearNight/Town02.tar.gz","https://huggingface.co/datasets/hoffman-lab/SkyScenes/blob/main/Images/H_15_P_0/ClearNight/Town03.tar.gz","https://huggingface.co/datasets/hoffman-lab/SkyScenes/blob/main/Images/H_15_P_0/ClearNight/Town04.tar.gz",]
# "Instance":[]
# "Seg":[]
# "Depth":[]
# }
# )
# SKYSCENESConfig(
# name="H_15_P_90",
# description="All variations for Height = 15m and Pitch=90",
# data_urls={
# "Images":["https://huggingface.co/datasets/hoffman-lab/SkyScenes/resolve/main/Images/H_15_P_0/ClearNight/Town01.tar.gz","https://huggingface.co/datasets/hoffman-lab/SkyScenes/blob/main/Images/H_15_P_0/ClearNight/Town02.tar.gz","https://huggingface.co/datasets/hoffman-lab/SkyScenes/blob/main/Images/H_15_P_0/ClearNight/Town03.tar.gz","https://huggingface.co/datasets/hoffman-lab/SkyScenes/blob/main/Images/H_15_P_0/ClearNight/Town04.tar.gz",]
# "Instance":[]
# "Seg":[]
# "Depth":[]
# }
# )
# SKYSCENESConfig(
# name="H_35_P_0",
# description="All variations for Height = 35m and Pitch=0",
# data_urls={
# "Images":["https://huggingface.co/datasets/hoffman-lab/SkyScenes/resolve/main/Images/H_15_P_0/ClearNight/Town01.tar.gz","https://huggingface.co/datasets/hoffman-lab/SkyScenes/blob/main/Images/H_15_P_0/ClearNight/Town02.tar.gz","https://huggingface.co/datasets/hoffman-lab/SkyScenes/blob/main/Images/H_15_P_0/ClearNight/Town03.tar.gz","https://huggingface.co/datasets/hoffman-lab/SkyScenes/blob/main/Images/H_15_P_0/ClearNight/Town04.tar.gz",]
# "Instance":[]
# "Seg":[]
# "Depth":[]
# }
# )
# SKYSCENESConfig(
# name="H_35_P_45",
# description="All variations for Height = 35m and Pitch=45",
# data_urls={
# "Images":["https://huggingface.co/datasets/hoffman-lab/SkyScenes/resolve/main/Images/H_15_P_0/ClearNight/Town01.tar.gz","https://huggingface.co/datasets/hoffman-lab/SkyScenes/blob/main/Images/H_15_P_0/ClearNight/Town02.tar.gz","https://huggingface.co/datasets/hoffman-lab/SkyScenes/blob/main/Images/H_15_P_0/ClearNight/Town03.tar.gz","https://huggingface.co/datasets/hoffman-lab/SkyScenes/blob/main/Images/H_15_P_0/ClearNight/Town04.tar.gz",]
# "Instance":[]
# "Seg":[]
# "Depth":[]
# }
# )
# SKYSCENESConfig(
# name="H_35_P_60",
# description="All variations for Height = 35m and Pitch=60",
# data_urls={
# "Images":["https://huggingface.co/datasets/hoffman-lab/SkyScenes/resolve/main/Images/H_15_P_0/ClearNight/Town01.tar.gz","https://huggingface.co/datasets/hoffman-lab/SkyScenes/blob/main/Images/H_15_P_0/ClearNight/Town02.tar.gz","https://huggingface.co/datasets/hoffman-lab/SkyScenes/blob/main/Images/H_15_P_0/ClearNight/Town03.tar.gz","https://huggingface.co/datasets/hoffman-lab/SkyScenes/blob/main/Images/H_15_P_0/ClearNight/Town04.tar.gz",]
# "Instance":[]
# "Seg":[]
# "Depth":[]
# }
# )
# SKYSCENESConfig(
# name="H_35_P_90",
# description="All variations for Height = 35m and Pitch=90",
# data_urls={
# "Images":["https://huggingface.co/datasets/hoffman-lab/SkyScenes/resolve/main/Images/H_15_P_0/ClearNight/Town01.tar.gz","https://huggingface.co/datasets/hoffman-lab/SkyScenes/blob/main/Images/H_15_P_0/ClearNight/Town02.tar.gz","https://huggingface.co/datasets/hoffman-lab/SkyScenes/blob/main/Images/H_15_P_0/ClearNight/Town03.tar.gz","https://huggingface.co/datasets/hoffman-lab/SkyScenes/blob/main/Images/H_15_P_0/ClearNight/Town04.tar.gz",]
# "Instance":[]
# "Seg":[]
# "Depth":[]
# }
# )
# SKYSCENESConfig(
# name="H_60_P_0",
# description="All variations for Height = 60m and Pitch=0",
# data_urls={
# "Images":["https://huggingface.co/datasets/hoffman-lab/SkyScenes/resolve/main/Images/H_15_P_0/ClearNight/Town01.tar.gz","https://huggingface.co/datasets/hoffman-lab/SkyScenes/blob/main/Images/H_15_P_0/ClearNight/Town02.tar.gz","https://huggingface.co/datasets/hoffman-lab/SkyScenes/blob/main/Images/H_15_P_0/ClearNight/Town03.tar.gz","https://huggingface.co/datasets/hoffman-lab/SkyScenes/blob/main/Images/H_15_P_0/ClearNight/Town04.tar.gz",]
# "Instance":[]
# "Seg":[]
# "Depth":[]
# }
# )
# SKYSCENESConfig(
# name="H_60_P_45",
# description="All variations for Height = 60m and Pitch=45",
# data_urls={
# "Images":["https://huggingface.co/datasets/hoffman-lab/SkyScenes/resolve/main/Images/H_15_P_0/ClearNight/Town01.tar.gz","https://huggingface.co/datasets/hoffman-lab/SkyScenes/blob/main/Images/H_15_P_0/ClearNight/Town02.tar.gz","https://huggingface.co/datasets/hoffman-lab/SkyScenes/blob/main/Images/H_15_P_0/ClearNight/Town03.tar.gz","https://huggingface.co/datasets/hoffman-lab/SkyScenes/blob/main/Images/H_15_P_0/ClearNight/Town04.tar.gz",]
# "Instance":[]
# "Seg":[]
# "Depth":[]
# }
# )
# SKYSCENESConfig(
# name="H_60_P_60",
# description="All variations for Height = 60m and Pitch=60",
# data_urls={
# "Images":["https://huggingface.co/datasets/hoffman-lab/SkyScenes/resolve/main/Images/H_15_P_0/ClearNight/Town01.tar.gz","https://huggingface.co/datasets/hoffman-lab/SkyScenes/blob/main/Images/H_15_P_0/ClearNight/Town02.tar.gz","https://huggingface.co/datasets/hoffman-lab/SkyScenes/blob/main/Images/H_15_P_0/ClearNight/Town03.tar.gz","https://huggingface.co/datasets/hoffman-lab/SkyScenes/blob/main/Images/H_15_P_0/ClearNight/Town04.tar.gz",]
# "Instance":[]
# "Seg":[]
# "Depth":[]
# }
# )
# SKYSCENESConfig(
# name="H_60_P_90",
# description="All variations for Height = 60m and Pitch=90",
# data_urls={
# "Images":["https://huggingface.co/datasets/hoffman-lab/SkyScenes/resolve/main/Images/H_15_P_0/ClearNight/Town01.tar.gz","https://huggingface.co/datasets/hoffman-lab/SkyScenes/blob/main/Images/H_15_P_0/ClearNight/Town02.tar.gz","https://huggingface.co/datasets/hoffman-lab/SkyScenes/blob/main/Images/H_15_P_0/ClearNight/Town03.tar.gz","https://huggingface.co/datasets/hoffman-lab/SkyScenes/blob/main/Images/H_15_P_0/ClearNight/Town04.tar.gz",]
# "Instance":[]
# "Seg":[]
# "Depth":[]
# }
# )
# ]
# SKYSCENESConfig(
# name="Rural",
# description="All rural town variations",
# data_urls={
# "Images":["https://huggingface.co/datasets/hoffman-lab/SkyScenes/resolve/main/Images/H_15_P_0/ClearNight/Town01.tar.gz","https://huggingface.co/datasets/hoffman-lab/SkyScenes/blob/main/Images/H_15_P_0/ClearNight/Town02.tar.gz","https://huggingface.co/datasets/hoffman-lab/SkyScenes/blob/main/Images/H_15_P_0/ClearNight/Town03.tar.gz","https://huggingface.co/datasets/hoffman-lab/SkyScenes/blob/main/Images/H_15_P_0/ClearNight/Town04.tar.gz",]
# "Instance":[]
# "Seg":[]
# "Depth":[]
# }
# )
# SKYSCENESConfig(
# name="Urban",
# description="All urban town variations",
# data_urls={
# "Images":["https://huggingface.co/datasets/hoffman-lab/SkyScenes/resolve/main/Images/H_15_P_0/ClearNight/Town01.tar.gz","https://huggingface.co/datasets/hoffman-lab/SkyScenes/blob/main/Images/H_15_P_0/ClearNight/Town02.tar.gz","https://huggingface.co/datasets/hoffman-lab/SkyScenes/blob/main/Images/H_15_P_0/ClearNight/Town03.tar.gz","https://huggingface.co/datasets/hoffman-lab/SkyScenes/blob/main/Images/H_15_P_0/ClearNight/Town04.tar.gz",]
# "Instance":[]
# "Seg":[]
# "Depth":[]
# }
# )
]
def _info(self):
features = datasets.Features(
{
"image": datasets.Image(),
}
)
return datasets.DatasetInfo(
description=_DESCRIPTION,
homepage=_HOMEPAGE,
license=_LICENSE,
)
def _split_generators(self, dl_manager):
data_files = []
final_kwargs = {}
# print(len(self.config.data_urls)
for key,_ in self.config.data_urls.items():
down = dl_manager.download_and_extract(self.config.data_urls[key])
data_files.append(down)
final_kwargs[key] = down
print(final_kwargs.keys())
return [
datasets.SplitGenerator(
name=datasets.Split.TRAIN,
gen_kwargs=final_kwargs,
),
]
def _generate_examples(self, images=None, seg=None, instance=None, depth=None):
"""Generate images and labels for splits."""
dict_final = {}
try:
filepath_img = os.listdir(images)
except:
pass
try:
filepath_seg = os.listdir(seg)
except:
pass
try:
filepath_instance = os.listdir(instance)
except:
pass
try:
filepath_depth = os.listdir(depth)
except:
pass
for i in range(os.listdir(images)):
# filepath = os.path.join(images, filename)
try:
with open(os.path.join(images, filepath_img[i]), "rb") as f:
image_bytes = f.read()
dict_final["image"] = {"path":filepath_img[i],"bytes":image_bytes}
except:
pass
try:
with open(os.path.join(seg, filepath_seg[i]), "rb") as f:
seg_bytes = f.read()
dict_final["seg"] = {"path":filepath_seg[i],"bytes":seg_bytes}
except:
pass
try:
with open(os.path.join(instance, filepath_instance[i]), "rb") as f:
instance_bytes = f.read()
dict_final["instance"] = {"path":filepath_instance[i],"bytes":instance_bytes}
except:
pass
try:
with open(os.path.join(depth, filepath_depth[i]), "rb") as f:
depth_bytes = f.read()
dict_final["depth"] = {"path":filepath_depth[i],"bytes":depth_bytes}
except:
pass
yield filepath_img[i], dict_final |