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