subset download
Browse files- SkyScenes.py +314 -31
SkyScenes.py
CHANGED
|
@@ -48,15 +48,266 @@ class SKYSCENES(datasets.GeneratorBasedBuilder):
|
|
| 48 |
VERSION = datasets.Version("1.0.0")
|
| 49 |
BUILDER_CONFIGS = [
|
| 50 |
SKYSCENESConfig(
|
| 51 |
-
name="
|
| 52 |
-
description="
|
| 53 |
-
data_urls=
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 60 |
]
|
| 61 |
|
| 62 |
def _info(self):
|
|
@@ -72,32 +323,64 @@ class SKYSCENES(datasets.GeneratorBasedBuilder):
|
|
| 72 |
)
|
| 73 |
|
| 74 |
def _split_generators(self, dl_manager):
|
| 75 |
-
data_files =
|
| 76 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 77 |
return [
|
| 78 |
datasets.SplitGenerator(
|
| 79 |
name=datasets.Split.TRAIN,
|
| 80 |
-
gen_kwargs=
|
| 81 |
-
"images": data_files,
|
| 82 |
-
"metadata_path": split_metadata_paths,
|
| 83 |
-
},
|
| 84 |
),
|
| 85 |
]
|
| 86 |
|
| 87 |
-
def _generate_examples(self, images,
|
| 88 |
"""Generate images and labels for splits."""
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 48 |
VERSION = datasets.Version("1.0.0")
|
| 49 |
BUILDER_CONFIGS = [
|
| 50 |
SKYSCENESConfig(
|
| 51 |
+
name="ClearNoon",
|
| 52 |
+
description="ClearNoon subset for all H/P variations",
|
| 53 |
+
data_urls={
|
| 54 |
+
"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",]
|
| 55 |
+
"Instance":["https://huggingface.co/datasets/hoffman-lab/SkyScenes/resolve/main/Instance/H_15_P_0/ClearNight/Town01.tar.gz","https://huggingface.co/datasets/hoffman-lab/SkyScenes/blob/main/Instance/H_15_P_0/ClearNight/Town02.tar.gz","https://huggingface.co/datasets/hoffman-lab/SkyScenes/blob/main/Instance/H_15_P_0/ClearNight/Town03.tar.gz","https://huggingface.co/datasets/hoffman-lab/SkyScenes/blob/main/Instance/H_15_P_0/ClearNight/Town04.tar.gz",]
|
| 56 |
+
"Seg":["https://huggingface.co/datasets/hoffman-lab/SkyScenes/resolve/main/Instance/H_15_P_0/ClearNight/Town01.tar.gz","https://huggingface.co/datasets/hoffman-lab/SkyScenes/blob/main/Instance/H_15_P_0/ClearNight/Town02.tar.gz","https://huggingface.co/datasets/hoffman-lab/SkyScenes/blob/main/Instance/H_15_P_0/ClearNight/Town03.tar.gz","https://huggingface.co/datasets/hoffman-lab/SkyScenes/blob/main/Instance/H_15_P_0/ClearNight/Town04.tar.gz",]
|
| 57 |
+
"Depth":["https://huggingface.co/datasets/hoffman-lab/SkyScenes/resolve/main/Instance/H_15_P_0/ClearNight/Town01.tar.gz","https://huggingface.co/datasets/hoffman-lab/SkyScenes/blob/main/Instance/H_15_P_0/ClearNight/Town02.tar.gz","https://huggingface.co/datasets/hoffman-lab/SkyScenes/blob/main/Instance/H_15_P_0/ClearNight/Town03.tar.gz","https://huggingface.co/datasets/hoffman-lab/SkyScenes/blob/main/Instance/H_15_P_0/ClearNight/Town04.tar.gz",]
|
| 58 |
+
}
|
| 59 |
+
)
|
| 60 |
+
# SKYSCENESConfig(
|
| 61 |
+
# name="ClearNight",
|
| 62 |
+
# description="ClearNight subset for all H/P variations",
|
| 63 |
+
# data_urls={
|
| 64 |
+
# "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",]
|
| 65 |
+
# "Instance":[]
|
| 66 |
+
# "Seg":[]
|
| 67 |
+
# "Depth":[]
|
| 68 |
+
# }
|
| 69 |
+
# )
|
| 70 |
+
# SKYSCENESConfig(
|
| 71 |
+
# name="ClearSunset",
|
| 72 |
+
# description="ClearNoon subset for all H/P variations",
|
| 73 |
+
# data_urls={
|
| 74 |
+
# "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",]
|
| 75 |
+
# "Instance":[]
|
| 76 |
+
# "Seg":[]
|
| 77 |
+
# "Depth":[]
|
| 78 |
+
# }
|
| 79 |
+
# )
|
| 80 |
+
# SKYSCENESConfig(
|
| 81 |
+
# name="CloudyNoon",
|
| 82 |
+
# description="CloudyNoon subset for all H/P variations",
|
| 83 |
+
# data_urls={
|
| 84 |
+
# "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",]
|
| 85 |
+
# "Instance":[]
|
| 86 |
+
# "Seg":[]
|
| 87 |
+
# "Depth":[]
|
| 88 |
+
# }
|
| 89 |
+
# )
|
| 90 |
+
# SKYSCENESConfig(
|
| 91 |
+
# name="MidRainyNoon",
|
| 92 |
+
# description="MidRainyNoon subset for all H/P variations",
|
| 93 |
+
# data_urls={
|
| 94 |
+
# "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",]
|
| 95 |
+
# "Instance":[]
|
| 96 |
+
# "Seg":[]
|
| 97 |
+
# "Depth":[]
|
| 98 |
+
# }
|
| 99 |
+
# )
|
| 100 |
+
# SKYSCENESConfig(
|
| 101 |
+
# name="H_15",
|
| 102 |
+
# description="All variations for Height=15m",
|
| 103 |
+
# data_urls={
|
| 104 |
+
# "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",]
|
| 105 |
+
# "Instance":[]
|
| 106 |
+
# "Seg":[]
|
| 107 |
+
# "Depth":[]
|
| 108 |
+
# }
|
| 109 |
+
# )
|
| 110 |
+
# SKYSCENESConfig(
|
| 111 |
+
# name="H_35",
|
| 112 |
+
# description="All variations for Height=35m",
|
| 113 |
+
# data_urls={
|
| 114 |
+
# "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",]
|
| 115 |
+
# "Instance":[]
|
| 116 |
+
# "Seg":[]
|
| 117 |
+
# "Depth":[]
|
| 118 |
+
# }
|
| 119 |
+
# )
|
| 120 |
+
# SKYSCENESConfig(
|
| 121 |
+
# name="H_60",
|
| 122 |
+
# description="All variations for Height=60m",
|
| 123 |
+
# data_urls={
|
| 124 |
+
# "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",]
|
| 125 |
+
# "Instance":[]
|
| 126 |
+
# "Seg":[]
|
| 127 |
+
# "Depth":[]
|
| 128 |
+
# }
|
| 129 |
+
# )
|
| 130 |
+
# SKYSCENESConfig(
|
| 131 |
+
# name="P_0",
|
| 132 |
+
# description="All variations for Pitch=0",
|
| 133 |
+
# data_urls={
|
| 134 |
+
# "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",]
|
| 135 |
+
# "Instance":[]
|
| 136 |
+
# "Seg":[]
|
| 137 |
+
# "Depth":[]
|
| 138 |
+
# }
|
| 139 |
+
# )
|
| 140 |
+
# SKYSCENESConfig(
|
| 141 |
+
# name="P_45",
|
| 142 |
+
# description="All variations for Pitch=45",
|
| 143 |
+
# data_urls={
|
| 144 |
+
# "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",]
|
| 145 |
+
# "Instance":[]
|
| 146 |
+
# "Seg":[]
|
| 147 |
+
# "Depth":[]
|
| 148 |
+
# }
|
| 149 |
+
# )
|
| 150 |
+
# SKYSCENESConfig(
|
| 151 |
+
# name="P_60",
|
| 152 |
+
# description="All variations for Pitch=60",
|
| 153 |
+
# data_urls={
|
| 154 |
+
# "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",]
|
| 155 |
+
# "Instance":[]
|
| 156 |
+
# "Seg":[]
|
| 157 |
+
# "Depth":[]
|
| 158 |
+
# }
|
| 159 |
+
# )
|
| 160 |
+
# SKYSCENESConfig(
|
| 161 |
+
# name="P_90",
|
| 162 |
+
# description="All variations for Pitch=90",
|
| 163 |
+
# data_urls={
|
| 164 |
+
# "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",]
|
| 165 |
+
# "Instance":[]
|
| 166 |
+
# "Seg":[]
|
| 167 |
+
# "Depth":[]
|
| 168 |
+
# }
|
| 169 |
+
# )
|
| 170 |
+
# SKYSCENESConfig(
|
| 171 |
+
# name="H_15_P_0",
|
| 172 |
+
# description="All variations for Height = 15m and Pitch=0",
|
| 173 |
+
# data_urls={
|
| 174 |
+
# "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",]
|
| 175 |
+
# "Instance":[]
|
| 176 |
+
# "Seg":[]
|
| 177 |
+
# "Depth":[]
|
| 178 |
+
# }
|
| 179 |
+
# )
|
| 180 |
+
# SKYSCENESConfig(
|
| 181 |
+
# name="H_15_P_45",
|
| 182 |
+
# description="All variations for Height = 15m and Pitch=45",
|
| 183 |
+
# data_urls={
|
| 184 |
+
# "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",]
|
| 185 |
+
# "Instance":[]
|
| 186 |
+
# "Seg":[]
|
| 187 |
+
# "Depth":[]
|
| 188 |
+
# }
|
| 189 |
+
# )
|
| 190 |
+
# SKYSCENESConfig(
|
| 191 |
+
# name="H_15_P_60",
|
| 192 |
+
# description="All variations for Height = 15m and Pitch=60",
|
| 193 |
+
# data_urls={
|
| 194 |
+
# "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",]
|
| 195 |
+
# "Instance":[]
|
| 196 |
+
# "Seg":[]
|
| 197 |
+
# "Depth":[]
|
| 198 |
+
# }
|
| 199 |
+
# )
|
| 200 |
+
# SKYSCENESConfig(
|
| 201 |
+
# name="H_15_P_90",
|
| 202 |
+
# description="All variations for Height = 15m and Pitch=90",
|
| 203 |
+
# data_urls={
|
| 204 |
+
# "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",]
|
| 205 |
+
# "Instance":[]
|
| 206 |
+
# "Seg":[]
|
| 207 |
+
# "Depth":[]
|
| 208 |
+
# }
|
| 209 |
+
# )
|
| 210 |
+
# SKYSCENESConfig(
|
| 211 |
+
# name="H_35_P_0",
|
| 212 |
+
# description="All variations for Height = 35m and Pitch=0",
|
| 213 |
+
# data_urls={
|
| 214 |
+
# "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",]
|
| 215 |
+
# "Instance":[]
|
| 216 |
+
# "Seg":[]
|
| 217 |
+
# "Depth":[]
|
| 218 |
+
# }
|
| 219 |
+
# )
|
| 220 |
+
# SKYSCENESConfig(
|
| 221 |
+
# name="H_35_P_45",
|
| 222 |
+
# description="All variations for Height = 35m and Pitch=45",
|
| 223 |
+
# data_urls={
|
| 224 |
+
# "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",]
|
| 225 |
+
# "Instance":[]
|
| 226 |
+
# "Seg":[]
|
| 227 |
+
# "Depth":[]
|
| 228 |
+
# }
|
| 229 |
+
# )
|
| 230 |
+
# SKYSCENESConfig(
|
| 231 |
+
# name="H_35_P_60",
|
| 232 |
+
# description="All variations for Height = 35m and Pitch=60",
|
| 233 |
+
# data_urls={
|
| 234 |
+
# "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",]
|
| 235 |
+
# "Instance":[]
|
| 236 |
+
# "Seg":[]
|
| 237 |
+
# "Depth":[]
|
| 238 |
+
# }
|
| 239 |
+
# )
|
| 240 |
+
# SKYSCENESConfig(
|
| 241 |
+
# name="H_35_P_90",
|
| 242 |
+
# description="All variations for Height = 35m and Pitch=90",
|
| 243 |
+
# data_urls={
|
| 244 |
+
# "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",]
|
| 245 |
+
# "Instance":[]
|
| 246 |
+
# "Seg":[]
|
| 247 |
+
# "Depth":[]
|
| 248 |
+
# }
|
| 249 |
+
# )
|
| 250 |
+
# SKYSCENESConfig(
|
| 251 |
+
# name="H_60_P_0",
|
| 252 |
+
# description="All variations for Height = 60m and Pitch=0",
|
| 253 |
+
# data_urls={
|
| 254 |
+
# "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",]
|
| 255 |
+
# "Instance":[]
|
| 256 |
+
# "Seg":[]
|
| 257 |
+
# "Depth":[]
|
| 258 |
+
# }
|
| 259 |
+
# )
|
| 260 |
+
# SKYSCENESConfig(
|
| 261 |
+
# name="H_60_P_45",
|
| 262 |
+
# description="All variations for Height = 60m and Pitch=45",
|
| 263 |
+
# data_urls={
|
| 264 |
+
# "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",]
|
| 265 |
+
# "Instance":[]
|
| 266 |
+
# "Seg":[]
|
| 267 |
+
# "Depth":[]
|
| 268 |
+
# }
|
| 269 |
+
# )
|
| 270 |
+
# SKYSCENESConfig(
|
| 271 |
+
# name="H_60_P_60",
|
| 272 |
+
# description="All variations for Height = 60m and Pitch=60",
|
| 273 |
+
# data_urls={
|
| 274 |
+
# "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",]
|
| 275 |
+
# "Instance":[]
|
| 276 |
+
# "Seg":[]
|
| 277 |
+
# "Depth":[]
|
| 278 |
+
# }
|
| 279 |
+
# )
|
| 280 |
+
# SKYSCENESConfig(
|
| 281 |
+
# name="H_60_P_90",
|
| 282 |
+
# description="All variations for Height = 60m and Pitch=90",
|
| 283 |
+
# data_urls={
|
| 284 |
+
# "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",]
|
| 285 |
+
# "Instance":[]
|
| 286 |
+
# "Seg":[]
|
| 287 |
+
# "Depth":[]
|
| 288 |
+
# }
|
| 289 |
+
# )
|
| 290 |
+
# ]
|
| 291 |
+
# SKYSCENESConfig(
|
| 292 |
+
# name="Rural",
|
| 293 |
+
# description="All rural town variations",
|
| 294 |
+
# data_urls={
|
| 295 |
+
# "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",]
|
| 296 |
+
# "Instance":[]
|
| 297 |
+
# "Seg":[]
|
| 298 |
+
# "Depth":[]
|
| 299 |
+
# }
|
| 300 |
+
# )
|
| 301 |
+
# SKYSCENESConfig(
|
| 302 |
+
# name="Urban",
|
| 303 |
+
# description="All urban town variations",
|
| 304 |
+
# data_urls={
|
| 305 |
+
# "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",]
|
| 306 |
+
# "Instance":[]
|
| 307 |
+
# "Seg":[]
|
| 308 |
+
# "Depth":[]
|
| 309 |
+
# }
|
| 310 |
+
# )
|
| 311 |
]
|
| 312 |
|
| 313 |
def _info(self):
|
|
|
|
| 323 |
)
|
| 324 |
|
| 325 |
def _split_generators(self, dl_manager):
|
| 326 |
+
data_files = []
|
| 327 |
+
final_kwargs = {}
|
| 328 |
+
for key,_ in self.config.data_urls:
|
| 329 |
+
down = dl_manager.download_and_extract(self.config.data_urls[key]
|
| 330 |
+
data_files.append(down)
|
| 331 |
+
final_kwargs[key] = down
|
| 332 |
+
|
| 333 |
return [
|
| 334 |
datasets.SplitGenerator(
|
| 335 |
name=datasets.Split.TRAIN,
|
| 336 |
+
gen_kwargs=final_kwargs,
|
|
|
|
|
|
|
|
|
|
| 337 |
),
|
| 338 |
]
|
| 339 |
|
| 340 |
+
def _generate_examples(self, images=None, seg=None, instance=None, depth=None):
|
| 341 |
"""Generate images and labels for splits."""
|
| 342 |
+
dict_final = {}
|
| 343 |
+
try:
|
| 344 |
+
filepath_img = os.listdir(images)
|
| 345 |
+
except:
|
| 346 |
+
pass
|
| 347 |
+
try:
|
| 348 |
+
filepath_seg = os.listdir(seg)
|
| 349 |
+
except:
|
| 350 |
+
pass
|
| 351 |
+
try:
|
| 352 |
+
filepath_instance = os.listdir(instance)
|
| 353 |
+
except:
|
| 354 |
+
pass
|
| 355 |
+
try:
|
| 356 |
+
filepath_depth = os.listdir(depth)
|
| 357 |
+
except:
|
| 358 |
+
pass
|
| 359 |
+
for i in range(os.listdir(images)):
|
| 360 |
+
# filepath = os.path.join(images, filename)
|
| 361 |
+
try:
|
| 362 |
+
with open(os.path.join(images, filepath_img[i]), "rb") as f:
|
| 363 |
+
image_bytes = f.read()
|
| 364 |
+
dict_final["image"] = {"path":filepath_img[i],"bytes":image_bytes}
|
| 365 |
+
except:
|
| 366 |
+
pass
|
| 367 |
+
try:
|
| 368 |
+
with open(os.path.join(seg, filepath_seg[i]), "rb") as f:
|
| 369 |
+
seg_bytes = f.read()
|
| 370 |
+
dict_final["seg"] = {"path":filepath_seg[i],"bytes":seg_bytes}
|
| 371 |
+
except:
|
| 372 |
+
pass
|
| 373 |
+
|
| 374 |
+
try:
|
| 375 |
+
with open(os.path.join(instance, filepath_instance[i]), "rb") as f:
|
| 376 |
+
instance_bytes = f.read()
|
| 377 |
+
dict_final["instance"] = {"path":filepath_instance[i],"bytes":instance_bytes}
|
| 378 |
+
except:
|
| 379 |
+
pass
|
| 380 |
+
try:
|
| 381 |
+
with open(os.path.join(depth, filepath_depth[i]), "rb") as f:
|
| 382 |
+
depth_bytes = f.read()
|
| 383 |
+
dict_final["depth"] = {"path":filepath_depth[i],"bytes":depth_bytes}
|
| 384 |
+
except:
|
| 385 |
+
pass
|
| 386 |
+
yield filepath_img[i], dict_final
|