Sahil Santosh Khose commited on
Commit
3fe4c06
·
2 Parent(s): 5f831c712830b1

Add trial segment

Browse files
Files changed (3) hide show
  1. Images/Town01.txt +70 -0
  2. README.md +229 -0
  3. SkyScenes.py +99 -0
Images/Town01.txt ADDED
@@ -0,0 +1,70 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 007751.png
2
+ 007761.png
3
+ 007771.png
4
+ 007781.png
5
+ 007791.png
6
+ 007801.png
7
+ 007811.png
8
+ 007821.png
9
+ 007831.png
10
+ 007841.png
11
+ 007851.png
12
+ 007861.png
13
+ 007871.png
14
+ 007881.png
15
+ 007891.png
16
+ 007901.png
17
+ 007911.png
18
+ 007921.png
19
+ 007931.png
20
+ 007941.png
21
+ 007951.png
22
+ 007961.png
23
+ 007971.png
24
+ 007981.png
25
+ 007991.png
26
+ 008001.png
27
+ 008011.png
28
+ 008021.png
29
+ 008031.png
30
+ 008041.png
31
+ 008051.png
32
+ 008061.png
33
+ 008071.png
34
+ 008081.png
35
+ 008091.png
36
+ 008101.png
37
+ 008111.png
38
+ 008121.png
39
+ 008131.png
40
+ 008141.png
41
+ 008151.png
42
+ 008161.png
43
+ 008171.png
44
+ 008181.png
45
+ 008191.png
46
+ 008201.png
47
+ 008211.png
48
+ 008221.png
49
+ 008231.png
50
+ 008241.png
51
+ 008251.png
52
+ 008261.png
53
+ 008271.png
54
+ 008281.png
55
+ 008291.png
56
+ 008301.png
57
+ 008311.png
58
+ 008321.png
59
+ 008331.png
60
+ 008341.png
61
+ 008351.png
62
+ 008361.png
63
+ 008371.png
64
+ 008381.png
65
+ 008391.png
66
+ 008401.png
67
+ 008411.png
68
+ 008421.png
69
+ 008431.png
70
+ 008441.png
README.md CHANGED
@@ -1,5 +1,7 @@
1
  ---
2
  license: mit
 
 
3
  ---
4
 
5
  <div align="center">
@@ -16,3 +18,230 @@ license: mit
16
  <!-- [![Watch the Demo](./assets/robust_aerial_videos.mp4)](./assets/robust_aerial_videos.mp4) -->
17
 
18
  <img src="./assets/skyscene_intro_teaser.png" width="100%"/>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: mit
3
+ language:
4
+ - en
5
  ---
6
 
7
  <div align="center">
 
18
  <!-- [![Watch the Demo](./assets/robust_aerial_videos.mp4)](./assets/robust_aerial_videos.mp4) -->
19
 
20
  <img src="./assets/skyscene_intro_teaser.png" width="100%"/>
21
+
22
+ ## Dataset Summary
23
+
24
+ Real-world aerial scene understanding is limited by a lack of datasets that contain densely annotated images curated under a diverse set of conditions.
25
+ Due to inherent challenges in obtaining such images in controlled real-world settings,
26
+ we present SkyScenes, a synthetic dataset of densely annotated aerial images captured from Unmanned Aerial Vehicle (UAV) perspectives.
27
+ **SkyScenes** images are carefully 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.
28
+ **SkyScenes** features **33,600** images in total, which are spread across 8 towns, 5 weather and daytime conditions and 12 height and pitch variations.
29
+
30
+
31
+ <details>
32
+ <summary>Click to view the detailed list of all variations</summary>
33
+
34
+ - **Layout Variations(Total 8):**:
35
+ - Town01
36
+ - Town02
37
+ - Town03
38
+ - Town04
39
+ - Town05
40
+ - Town06
41
+ - Town07
42
+ - Town10HD
43
+ _Town07 features Rural Scenes, whereas the rest of the towns feature Urban scenes_
44
+
45
+ - **Weather & Daytime Variations(Total 5):**
46
+ - ClearNoon
47
+ - ClearSunset
48
+ - ClearNight
49
+ - CloudyNoon
50
+ - MidRainyNoon
51
+
52
+ - **Height and Pitch Variations of UAV Flight(Total 12):**
53
+ - Height = 15m, Pitch = 0°
54
+ - Height = 15m, Pitch = 45°
55
+ - Height = 15m, Pitch = 60°
56
+ - Height = 15m, Pitch = 90°
57
+ - Height = 35m, Pitch = 0°
58
+ - Height = 35m, Pitch = 45°
59
+ - Height = 35m, Pitch = 60°
60
+ - Height = 35m, Pitch = 90°
61
+ - Height = 60m, Pitch = 0°
62
+ - Height = 60m, Pitch = 45°
63
+ - Height = 60m, Pitch = 60°
64
+ - Height = 60m, Pitch = 90°
65
+ </details>
66
+ <details>
67
+ <summary>Click to view class definitions, color palette and class IDs for Semantic Segmentation</summary>
68
+
69
+ **SkyScenes** semantic segmentation labels span 28 classes which can be further collapsed to 20 classes.
70
+ | Class ID | Class ID (collapsed) | RGB Color Palette | Class Name | Definition |
71
+ |----------|--------------------|-------------------|------------------|----------------------------------------------------------------------------------------------------|
72
+ | 0 | -1 | <span style="color:rgb(0, 0, 0)"> (0, 0, 0) </span> | unlabeled | Elements/objects in the scene that have not been categorized |
73
+ | 1 | 2 | <span style="color:rgb(70, 70, 70)"> (70, 70, 70) </span> | building | Includes houses, skyscrapers, and the elements attached to them |
74
+ | 2 | 4 | <span style="color:rgb(190, 153, 153)"> (190, 153, 153) </span> | fence | Wood or wire assemblies that enclose an area of ground |
75
+ | 3 | -1 | <span style="color:rgb(55, 90, 80)"> (55, 90, 80) </span> | other | Uncategorized elements |
76
+ | 4 | 11 | <span style="color:rgb(220, 20, 60)"> (220, 20, 60) </span> | pedestrian | Humans that walk |
77
+ | 5 | 5 | <span style="color:rgb(153, 153, 153)"> (153, 153, 153) </span> | pole | Vertically oriented pole and its horizontal components if any |
78
+ | 6 | 16 | <span style="color:rgb(157, 234, 50)"> (157, 234, 50) </span> | roadline | Markings on road |
79
+ | 7 | 0 | <span style="color:rgb(128, 64, 128)"> (128, 64, 128) </span> | road | Lanes, streets, paved areas on which cars drive |
80
+ | 8 | 1 | <span style="color:rgb(244, 35, 232)"> (244, 35, 232) </span> | sidewalk | Parts of ground designated for pedestrians or cyclists |
81
+ | 9 | 8 | <span style="color:rgb(107, 142, 35)"> (107, 142, 35) </span> | vegetation | Trees, hedges, all kinds of vertical vegetation (ground-level vegetation is not included here) |
82
+ | 10 | 13 | <span style="color:rgb(0, 0, 142)"> (0, 0, 142) </span> | cars | Cars in scene |
83
+ | 11 | 3 | <span style="color:rgb(102, 102, 156)"> (102, 102, 156) </span> | wall | Individual standing walls, not part of buildings |
84
+ | 12 | 7 | <span style="color:rgb(220, 220, 0)"> (220, 220, 0) </span> | traffic sign | Signs installed by the state/city authority, usually for traffic regulation |
85
+ | 13 | 10 | <span style="color:rgb(70, 130, 180)"> (70, 130, 180) </span> | sky | Open sky, including clouds and sun |
86
+ | 14 | -1 | <span style="color:rgb(81, 0, 81)"> (81, 0, 81) </span> | ground | Any horizontal ground-level structures that do not match any other category |
87
+ | 15 | -1 | <span style="color:rgb(150, 100, 100)"> (150, 100, 100) </span> | bridge | The structure of the bridge |
88
+ | 16 | -1 | <span style="color:rgb(230, 150, 140)"> (230, 150, 140) </span> | railtrack | Rail tracks that are non-drivable by cars |
89
+ | 17 | -1 | <span style="color:rgb(180, 165, 180)"> (180, 165, 180) </span> | guardrail | Guard rails / crash barriers |
90
+ | 18 | 6 | <span style="color:rgb(250, 170, 30)"> (250, 170, 30) </span> | traffic light | Traffic light boxes without their poles |
91
+ | 19 | -1 | <span style="color:rgb(110, 190, 160)"> (110, 190, 160) </span> | static | Elements in the scene and props that are immovable |
92
+ | 20 | -1 | <span style="color:rgb(170, 120, 50)"> (170, 120, 50) </span> | dynamic | Elements whose position is susceptible to change over time |
93
+ | 21 | 19 | <span style="color:rgb(45, 60, 150)"> (45, 60, 150) </span> | water | Horizontal water surfaces |
94
+ | 22 | 9 | <span style="color:rgb(152, 251, 152)"> (152, 251, 152) </span> | terrain | Grass, ground-level vegetation, soil, or sand |
95
+ | 23 | 12 | <span style="color:rgb(255, 0, 0)"> (255, 0, 0) </span> | rider | Humans that ride/drive any kind of vehicle or mobility system |
96
+ | 24 | 18 | <span style="color:rgb(119, 11, 32)"> (119, 11, 32) </span> | bicycle | Bicycles in scenes |
97
+ | 25 | 17 | <span style="color:rgb(0, 0, 230)"> (0, 0, 230) </span> | motorcycle | Motorcycles in scene |
98
+ | 26 | 15 | <span style="color:rgb(0, 60, 100)"> (0, 60, 100) </span> | bus | Buses in scenes |
99
+ | 27 | 14 | <span style="color:rgb(0, 0, 70)"> (0, 0, 70) </span> | truck | Trucks in scenes |
100
+ |
101
+ </details>
102
+
103
+ ## Dataset Structure
104
+
105
+ The dataset is organized in the following structure:
106
+ <!--<details>
107
+ <summary><strong>Images (RGB Images)</strong></summary>
108
+
109
+ - ***H_15_P_0***
110
+ - *ClearNoon*
111
+ - Town01.tar.gz
112
+ - Town02.tar.gz
113
+ - ...
114
+ - Town10HD.tar.gz
115
+ - *ClearSunset*
116
+ - Town01.tar.gz
117
+ - Town02.tar.gz
118
+ - ...
119
+ - Town10HD.tar.gz
120
+ - *ClearNight*
121
+ - Town01.tar.gz
122
+ - Town02.tar.gz
123
+ - ...
124
+ - Town10HD.tar.gz
125
+ - *CloudyNoon*
126
+ - Town01.tar.gz
127
+ - Town02.tar.gz
128
+ - ...
129
+ - Town10HD.tar.gz
130
+ - *MidRainyNoon*
131
+ - Town01.tar.gz
132
+ - Town02.tar.gz
133
+ - ...
134
+ - Town10HD.tar.gz
135
+ - ***H_15_P_45***
136
+ - ...
137
+ - ...
138
+ - ***H_60_P_90***
139
+ - ...
140
+ </details>
141
+
142
+ <details>
143
+ <summary><strong>Instance (Instance Segmentation Annotations)</strong></summary>
144
+
145
+ - ***H_35_P_45***
146
+ - *ClearNoon*
147
+ - Town01.tar.gz
148
+ - Town02.tar.gz
149
+ - ...
150
+ - Town10HD.tar.gz
151
+ </details>
152
+
153
+ <details>
154
+ <summary><strong>Segment (Semantic Segmentation Annotations)</strong></summary>
155
+
156
+ - ***H_15_P_0***
157
+ - *ClearNoon*
158
+ - Town01.tar.gz
159
+ - Town02.tar.gz
160
+ - ...
161
+ - Town10HD.tar.gz
162
+ - ***H_15_P_45***
163
+ - ...
164
+ - ...
165
+ - ***H_60_P_90***
166
+ </details>
167
+
168
+ <details>
169
+ <summary><strong>Depth (Depth Annotations)</strong></summary>
170
+
171
+ - ***H_35_P_45***
172
+ - *ClearNoon*
173
+ - Town01.tar.gz
174
+ - Town02.tar.gz
175
+ - ...
176
+ - Town10HD.tar.gz
177
+ </details>
178
+ -->
179
+
180
+
181
+ ```
182
+ ├── Images (RGB Images)
183
+ ├── H_15_P_0
184
+ │ ├── ClearNoon
185
+ │ │ ├── Town01.tar.gz
186
+ │ │ ├── Town02.tar.gz
187
+ │ │ ├── ...
188
+ │ │ └── Town10HD.tar.gz
189
+ │ ├── ClearSunset
190
+ │ │ ├── Town01.tar.gz
191
+ │ │ ├── Town02.tar.gz
192
+ │ │ ├── ...
193
+ │ │ └── Town10HD.tar.gz
194
+ │ ├── ClearNight
195
+ │ │ ├── Town01.tar.gz
196
+ │ │ ├── Town02.tar.gz
197
+ │ │ ├── ...
198
+ │ │ └── Town10HD.tar.gz
199
+ │ ├── CloudyNoon
200
+ │ │ ├── Town01.tar.gz
201
+ │ │ ├── Town02.tar.gz
202
+ │ │ ├── ...
203
+ │ │ └── Town10HD.tar.gz
204
+ │ └── MidRainyNoon
205
+ │ ├── Town01.tar.gz
206
+ │ ├── Town02.tar.gz
207
+ │ ├── ...
208
+ │ └── Town10HD.tar.gz
209
+ ├── H_15_P_45
210
+ │ └── ...
211
+ ├── ...
212
+ └── H_60_P_90
213
+ └── ...
214
+ └── Instance (Instance Segmentation Annotations)
215
+ ├── H_35_P_45
216
+ │ └── ClearNoon
217
+ │ ├── Town01.tar.gz
218
+ │ ├── Town02.tar.gz
219
+ │ ├── ...
220
+ │ └── Town10HD.tar.gz
221
+ └── ...
222
+ └── Segment (Semantic Segmentation Annotations)
223
+ ├── H_15_P_0
224
+ │ ├── ClearNoon
225
+ │ │ ├── Town01.tar.gz
226
+ │ │ ├── Town02.tar.gz
227
+ │ │ ├── ...
228
+ │ │ └── Town10HD.tar.gz
229
+ │ ├── H_15_P_45
230
+ │ │ └── ...
231
+ │ ├── ...
232
+ │ └── H_60_P_90
233
+ │ └── ...
234
+ └── ...
235
+ └── Depth (Depth Annotations)
236
+ ├── H_35_P_45
237
+ │ └── ClearNoon
238
+ │ ├── Town01.tar.gz
239
+ │ ├── Town02.tar.gz
240
+ │ ├── ...
241
+ │ └── Town10HD.tar.gz
242
+ └── ...
243
+ ```
244
+
245
+ **Note**: Since the same viewpoint is reproduced across each weather variation, hence ClearNoon annotations can be used for all images pertaining to the different weather variations.
246
+
247
+
SkyScenes.py ADDED
@@ -0,0 +1,99 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import collections
2
+ import json
3
+ import os
4
+
5
+ import datasets
6
+
7
+ _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.'
8
+ _HOMEPAGE = "skyscenes.github.io"
9
+ _LICENSE = "MIT"
10
+ # _CITATION = """\
11
+ # @misc{ buildings-instance-segmentation_dataset,
12
+ # title = { Buildings Instance Segmentation Dataset },
13
+ # type = { Open Source Dataset },
14
+ # author = { Roboflow Universe Projects },
15
+ # howpublished = { \\url{ https://universe.roboflow.com/roboflow-universe-projects/buildings-instance-segmentation } },
16
+ # url = { https://universe.roboflow.com/roboflow-universe-projects/buildings-instance-segmentation },
17
+ # journal = { Roboflow Universe },
18
+ # publisher = { Roboflow },
19
+ # year = { 2023 },
20
+ # month = { jan },
21
+ # note = { visited on 2023-01-18 },
22
+ # }
23
+ # """
24
+ _CATEGORIES = ["unlabeled", "building", "fence", "other", "pedestrian", "pole",
25
+ "roadline", "road", "sidewalk", "vegetation", "vehicles", "wall",
26
+ "trafficsign", "sky", "ground", "bridge", "railtrack", "guardrail",
27
+ "trafficlight", "static", "dynamic", "water", "terrain"]
28
+
29
+
30
+ class SKYSCENESConfig(datasets.BuilderConfig):
31
+ """Builder Config for SkyScenes"""
32
+
33
+ def __init__(self, data_urls, metadata_url, **kwargs):
34
+ """
35
+ BuilderConfig for SkyScenes.
36
+ Args:
37
+ data_urls: `dict`, name to url to download the zip file from.
38
+ **kwargs: keyword arguments forwarded to super.
39
+ """
40
+ super(SKYSCENESConfig, self).__init__(version=datasets.Version("1.0.0"), **kwargs)
41
+ self.data_urls = data_urls
42
+ self.metadata_url = metadata_url
43
+
44
+
45
+ class SKYSCENES(datasets.GeneratorBasedBuilder):
46
+ """satellite-building-segmentation instance segmentation dataset"""
47
+
48
+ VERSION = datasets.Version("1.0.0")
49
+ BUILDER_CONFIGS = [
50
+ SKYSCENESConfig(
51
+ name="full",
52
+ description="Full version of skyscenes dataset.",
53
+ data_urls="https://huggingface.co/datasets/hoffman-lab/SkyScenes/resolve/main/Images/H_15_P_0/ClearNight/Town01.tar.gz",
54
+ metadata_url = "https://huggingface.co/datasets/hoffman-lab/SkyScenes/resolve/main/Images/Town01.txt",)
55
+ # SKYSCENESConfig(
56
+ # name="mini",
57
+ # description="Mini version of satellite-building-segmentation dataset.",
58
+ # data_urls=["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",]
59
+ # )
60
+ ]
61
+
62
+ def _info(self):
63
+ features = datasets.Features(
64
+ {
65
+ "image": datasets.Image(),
66
+ }
67
+ )
68
+ return datasets.DatasetInfo(
69
+ description=_DESCRIPTION,
70
+ homepage=_HOMEPAGE,
71
+ license=_LICENSE,
72
+ )
73
+
74
+ def _split_generators(self, dl_manager):
75
+ data_files = dl_manager.download_and_extract(self.config.data_urls)
76
+ split_metadata_paths = dl_manager.download(self.config.metadata_url)
77
+ return [
78
+ datasets.SplitGenerator(
79
+ name=datasets.Split.TRAIN,
80
+ gen_kwargs={
81
+ "images": dl_manager.iter_archive(data_files),
82
+ "metadata_path": split_metadata_paths,
83
+ },
84
+ ),
85
+ ]
86
+
87
+ def _generate_examples(self, images, metadata_path):
88
+ """Generate images and labels for splits."""
89
+ # with open(metadata_path, encoding="utf-8") as f:
90
+ # files_to_keep = set(f.read().split("\n"))
91
+ # print('KEEP',files_to_keep)
92
+ for file_path, file_obj in images:
93
+ # print('FILE',file_path)
94
+ # if file_path.startswith(_IMAGES_DIR):
95
+ # if file_path[len(_IMAGES_DIR) : -len(".jpg")] in files_to_keep:
96
+ # label = file_path.split("/")[2]
97
+ yield file_path, {
98
+ "image": {"path": file_path, "bytes": file_obj.read()},
99
+ }