README updates
Browse files
README.md
CHANGED
@@ -1,339 +1,9 @@
|
|
1 |
-
# Dronescapes dataset
|
2 |
|
3 |
-
|
4 |
|
5 |

|
6 |
|
7 |
-
|
8 |
|
9 |
-
## Option 1. Download the pre-processed dataset from HuggingFace repository
|
10 |
-
|
11 |
-
```
|
12 |
-
git lfs install # Make sure you have git-lfs installed (https://git-lfs.com)
|
13 |
-
git clone https://huggingface.co/datasets/Meehai/dronescapes
|
14 |
-
```
|
15 |
-
|
16 |
-
Note: the dataset has about 500GB, so it may take a while to clone it.
|
17 |
-
|
18 |
-
<details>
|
19 |
-
<summary> <b> Option 2. Generating the dataset from raw videos and basic labels </b>.</summary>
|
20 |
-
|
21 |
-
Recommended if you intend on understanding how the dataset was created or add new videos or representations.
|
22 |
-
|
23 |
-
### 1.2.1 Raw videos
|
24 |
-
|
25 |
-
Follow the commands in each directory under `raw_data/videos/*/commands.txt` if you want to start from the 4K videos.
|
26 |
-
|
27 |
-
If you only want the 540p videos as used in the paper, they are already provided in the `raw_data/videos/*` directories.
|
28 |
-
|
29 |
-
### 1.2.2 Semantic segmentation labels (human annotated)
|
30 |
-
|
31 |
-
These were human annotated and then propagated using [segprop](https://github.com/vlicaret/segprop).
|
32 |
-
|
33 |
-
```bash
|
34 |
-
cd raw_data/
|
35 |
-
tar -xzvf segprop_npz_540.tar.gz
|
36 |
-
```
|
37 |
-
|
38 |
-
### 1.2.3 Generate the rest of the representations
|
39 |
-
|
40 |
-
We use the [video-representations-extractor](https://gitlab.com/meehai/video-representations-extractor) to generate
|
41 |
-
the rest of the labels using pre-traing networks or algoritms.
|
42 |
-
|
43 |
-
Install it via `pip install video-representations-extractor` (or follow the README over there for docker or local env)
|
44 |
-
|
45 |
-
```
|
46 |
-
VRE_DEVICE=cuda CUDA_VISIBLE_DEVICES=0 vre raw_data/videos/atanasie_DJI_0652_full/atanasie_DJI_0652_full_540p.mp4 -o raw_data/npz_540p/atanasie_DJI_0652_full/ --cfg_path scripts/cfg.yaml --batch_size 3 --n_threads_data_storer 4 --output_dir_exist_mode overwrite
|
47 |
-
VRE_DEVICE=cuda CUDA_VISIBLE_DEVICES=1 vre raw_data/videos/barsana_DJI_0500_0501_combined_sliced_2700_14700/barsana_DJI_0500_0501_combined_sliced_2700_14700_540p.mp4 -o raw_data/npz_540p/barsana_DJI_0500_0501_combined_sliced_2700_14700/ --cfg_path scripts/cfg.yaml --batch_size 3 --n_threads_data_storer 4 --output_dir_exist_mode overwrite
|
48 |
-
VRE_DEVICE=cuda CUDA_VISIBLE_DEVICES=2 vre raw_data/videos/comana_DJI_0881_full/comana_DJI_0881_full_540p.mp4 -o raw_data/npz_540p/comana_DJI_0881_full/ --cfg_path scripts/cfg.yaml --batch_size 3 --n_threads_data_storer 4 --output_dir_exist_mode overwrite
|
49 |
-
VRE_DEVICE=cuda CUDA_VISIBLE_DEVICES=3 vre raw_data/videos/gradistei_DJI_0787_0788_0789_combined_sliced_3510_13110/gradistei_DJI_0787_0788_0789_combined_sliced_3510_13110_540p.mp4 -o raw_data/npz_540p/gradistei_DJI_0787_0788_0789_combined_sliced_3510_13110/ --cfg_path scripts/cfg.yaml --batch_size 3 --n_threads_data_storer 4 --output_dir_exist_mode overwrite
|
50 |
-
VRE_DEVICE=cuda CUDA_VISIBLE_DEVICES=4 vre raw_data/videos/herculane_DJI_0021_full/herculane_DJI_0021_full_540p.mp4 -o raw_data/npz_540p/herculane_DJI_0021_full/ --cfg_path scripts/cfg.yaml --batch_size 3 --n_threads_data_storer 4 --output_dir_exist_mode overwrite
|
51 |
-
VRE_DEVICE=cuda CUDA_VISIBLE_DEVICES=5 vre raw_data/videos/jupiter_DJI_0703_0704_0705_combined_sliced_10650_21715/jupiter_DJI_0703_0704_0705_combined_sliced_10650_21715_540p.mp4 -o raw_data/npz_540p/jupiter_DJI_0703_0704_0705_combined_sliced_10650_21715/ --cfg_path scripts/cfg.yaml --batch_size 3 --n_threads_data_storer 4 --output_dir_exist_mode overwrite
|
52 |
-
VRE_DEVICE=cuda CUDA_VISIBLE_DEVICES=6 vre raw_data/videos/norway_210821_DJI_0015_full/norway_210821_DJI_0015_full_540p.mp4 -o raw_data/npz_540p/norway_210821_DJI_0015_full/ --cfg_path scripts/cfg.yaml --batch_size 3 --n_threads_data_storer 4 --output_dir_exist_mode overwrite
|
53 |
-
VRE_DEVICE=cuda CUDA_VISIBLE_DEVICES=7 vre raw_data/videos/olanesti_DJI_0416_full/olanesti_DJI_0416_full_540p.mp4 -o raw_data/npz_540p/olanesti_DJI_0416_full/ --cfg_path scripts/cfg.yaml --batch_size 3 --n_threads_data_storer 4 --output_dir_exist_mode overwrite
|
54 |
-
VRE_DEVICE=cuda CUDA_VISIBLE_DEVICES=0 vre raw_data/videos/petrova_DJI_0525_0526_combined_sliced_2850_11850/petrova_DJI_0525_0526_combined_sliced_2850_11850_540p.mp4 -o raw_data/npz_540p/petrova_DJI_0525_0526_combined_sliced_2850_11850/ --cfg_path scripts/cfg.yaml --batch_size 3 --n_threads_data_storer 4 --output_dir_exist_mode overwrite
|
55 |
-
VRE_DEVICE=cuda CUDA_VISIBLE_DEVICES=1 vre raw_data/videos/slanic_DJI_0956_0957_combined_sliced_780_9780/slanic_DJI_0956_0957_combined_sliced_780_9780_540p.mp4 -o raw_data/npz_540p/slanic_DJI_0956_0957_combined_sliced_780_9780/ --cfg_path scripts/cfg.yaml --batch_size 3 --n_threads_data_storer 4 --output_dir_exist_mode overwrite
|
56 |
-
```
|
57 |
-
|
58 |
-
Note: `depth_sfm`, `normals_sfm` and `depth_ufo` are not available in VRE. Contact us for more info about them.
|
59 |
-
|
60 |
-
Note: Add `--representations "rgb" "opticalflow_rife" "depth_dpt" "edges_dexined" "semantic_mask2former_swin_mapillary" "softseg_gb"` to control if you only want a subset of the representations.
|
61 |
-
|
62 |
-
Note: Some batch sizes are overwritten in the config itself.
|
63 |
-
|
64 |
-
### 1.2.4 Convert Mask2Former from Mapillary classes to segprop8 classes
|
65 |
-
|
66 |
-
Since we are using pre-trained Mask2Former which has either mapillary or COCO panoptic classes, we need to convert them to dronescapes-compatible (8) classes.
|
67 |
-
|
68 |
-
To do this, we use the `scripts/convert_m2f_to_dronescapes.py` script:
|
69 |
-
```
|
70 |
-
python scripts/convert_m2f_to_dronescapes.py in_dir out_dir mapillary/coco [--overwrite]
|
71 |
-
```
|
72 |
-
|
73 |
-
```
|
74 |
-
python scripts/convert_m2f_to_dronescapes.py raw_data/npz_540p/atanasie_DJI_0652_full/semantic_mask2former_swin_mapillary raw_data/npz_540p/atanasie_DJI_0652_full/semantic_mask2former_swin_mapillary_converted mapillary
|
75 |
-
python scripts/convert_m2f_to_dronescapes.py raw_data/npz_540p/barsana_DJI_0500_0501_combined_sliced_2700_14700/semantic_mask2former_swin_mapillary raw_data/npz_540p/barsana_DJI_0500_0501_combined_sliced_2700_14700/semantic_mask2former_swin_mapillary_converted mapillary
|
76 |
-
python scripts/convert_m2f_to_dronescapes.py raw_data/npz_540p/comana_DJI_0881_full/semantic_mask2former_swin_mapillary raw_data/npz_540p/comana_DJI_0881_full/semantic_mask2former_swin_mapillary_converted mapillary
|
77 |
-
python scripts/convert_m2f_to_dronescapes.py raw_data/npz_540p/gradistei_DJI_0787_0788_0789_combined_sliced_3510_13110/semantic_mask2former_swin_mapillary raw_data/npz_540p/gradistei_DJI_0787_0788_0789_combined_sliced_3510_13110/semantic_mask2former_swin_mapillary_converted mapillary
|
78 |
-
python scripts/convert_m2f_to_dronescapes.py raw_data/npz_540p/herculane_DJI_0021_full/semantic_mask2former_swin_mapillary raw_data/npz_540p/herculane_DJI_0021_full/semantic_mask2former_swin_mapillary_converted mapillary
|
79 |
-
python scripts/convert_m2f_to_dronescapes.py raw_data/npz_540p/jupiter_DJI_0703_0704_0705_combined_sliced_10650_21715/semantic_mask2former_swin_mapillary raw_data/npz_540p/jupiter_DJI_0703_0704_0705_combined_sliced_10650_21715/semantic_mask2former_swin_mapillary_converted mapillary
|
80 |
-
python scripts/convert_m2f_to_dronescapes.py raw_data/npz_540p/norway_210821_DJI_0015_full/semantic_mask2former_swin_mapillary raw_data/npz_540p/norway_210821_DJI_0015_full/semantic_mask2former_swin_mapillary_converted mapillary
|
81 |
-
python scripts/convert_m2f_to_dronescapes.py raw_data/npz_540p/olanesti_DJI_0416_full/semantic_mask2former_swin_mapillary raw_data/npz_540p/olanesti_DJI_0416_full/semantic_mask2former_swin_mapillary_converted mapillary
|
82 |
-
python scripts/convert_m2f_to_dronescapes.py raw_data/npz_540p/petrova_DJI_0525_0526_combined_sliced_2850_11850/semantic_mask2former_swin_mapillary raw_data/npz_540p/petrova_DJI_0525_0526_combined_sliced_2850_11850/semantic_mask2former_swin_mapillary_converted mapillary
|
83 |
-
python scripts/convert_m2f_to_dronescapes.py raw_data/npz_540p/slanic_DJI_0956_0957_combined_sliced_780_9780/semantic_mask2former_swin_mapillary raw_data/npz_540p/slanic_DJI_0956_0957_combined_sliced_780_9780/semantic_mask2former_swin_mapillary_converted mapillary
|
84 |
-
```
|
85 |
-
|
86 |
-
### 1.2.5 Check counts for consistency
|
87 |
-
|
88 |
-
Run: `bash scripts/count_npz.sh raw_data/npz_540p`. At this point it should return:
|
89 |
-
| scene | rgb | depth_dpt | depth_sfm_manual20.. | edges_dexined | normals_sfm_manual.. | opticalflow_rife | semantic_mask2form.. | semantic_segprop8 |
|
90 |
-
|:----------|------:|------------:|-----------------------:|----------------:|-----------------------:|-------------------:|-----------------------:|--------------------:|
|
91 |
-
| atanasie | 9021 | 9021 | 9020 | 9021 | 9020 | 9021 | 9021 | 9001 |
|
92 |
-
| barsana | 12001 | 12001 | 12001 | 12001 | 12001 | 12000 | 12001 | 1573 |
|
93 |
-
| comana | 9022 | 9022 | 0 | 9022 | 0 | 9022 | 9022 | 1210 |
|
94 |
-
| gradistei | 9601 | 9601 | 9600 | 9601 | 9600 | 9600 | 9601 | 1210 |
|
95 |
-
| herculane | 9022 | 9022 | 9021 | 9022 | 9021 | 9022 | 9022 | 1210 |
|
96 |
-
| jupiter | 11066 | 11066 | 11065 | 11066 | 11065 | 11066 | 11066 | 1452 |
|
97 |
-
| norway | 2983 | 2983 | 0 | 2983 | 0 | 2983 | 2983 | 2941 |
|
98 |
-
| olanesti | 9022 | 9022 | 9021 | 9022 | 9021 | 9022 | 9022 | 1210 |
|
99 |
-
| petrova | 9001 | 9001 | 9001 | 9001 | 9001 | 9000 | 9001 | 1210 |
|
100 |
-
| slanic | 9001 | 9001 | 9001 | 9001 | 9001 | 9000 | 9001 | 9001 |
|
101 |
-
|
102 |
-
### 1.2.6. Split intro train, validation, semisupervised and train
|
103 |
-
|
104 |
-
We include 8 splits: 4 using only GT annotated semantic data and 4 using all available data (i.e. segproped between
|
105 |
-
annotated data). The indexes are taken from `txt_files/*`, i.e. `txt_files/manually_adnotated_files/test_files_116.txt`
|
106 |
-
refers to the fact that the (unseen at train time) test set (norway + petrova + barsana) contains 116 manually
|
107 |
-
annotated semantic files. We include all representations from above, not just semantic for all possible splits.
|
108 |
-
Adding new representations is as simple as running VRE on the 540p mp4 file
|
109 |
-
|
110 |
-
```
|
111 |
-
python scripts/symlinks_from_txt_list.py raw_data/npz_540p/ --txt_file txt_files/annotated_and_segprop/train_files_11664.txt -o data/train_set --overwrite
|
112 |
-
python scripts/symlinks_from_txt_list.py raw_data/npz_540p/ --txt_file txt_files/annotated_and_segprop/val_files_605.txt -o data/validation_set --overwrite
|
113 |
-
python scripts/symlinks_from_txt_list.py raw_data/npz_540p/ --txt_file txt_files/annotated_and_segprop/semisup_files_11299.txt -o data/semisupervised_set --overwrite
|
114 |
-
python scripts/symlinks_from_txt_list.py raw_data/npz_540p/ --txt_file txt_files/annotated_and_segprop/test_files_5603.txt -o data/test_set --overwrite
|
115 |
-
python scripts/symlinks_from_txt_list.py raw_data/npz_540p/ --txt_file txt_files/manually_annotated_files/train_files_218.txt -o data/train_set_annotated_only --overwrite
|
116 |
-
python scripts/symlinks_from_txt_list.py raw_data/npz_540p/ --txt_file txt_files/manually_annotated_files/val_files_15.txt -o data/validation_set_annotated_only --overwrite
|
117 |
-
python scripts/symlinks_from_txt_list.py raw_data/npz_540p/ --txt_file txt_files/manually_annotated_files/semisup_files_207.txt -o data/semisupervised_set_annotated_nly --overwrite
|
118 |
-
python scripts/symlinks_from_txt_list.py raw_data/npz_540p/ --txt_file txt_files/manually_annotated_files/test_files_116.txt -o data/test_set_annotated_only --overwrite
|
119 |
-
```
|
120 |
-
|
121 |
-
Note: `add --copy_files` if you want to make copies instead of using symlinks.
|
122 |
-
|
123 |
-
Upon calling this, you should be able to see something like this:
|
124 |
-
```
|
125 |
-
user> ls data/*
|
126 |
-
data/semisupervised_set:
|
127 |
-
depth_dpt edges_dexined opticalflow_rife semantic_mask2former_swin_mapillary_converted
|
128 |
-
depth_sfm_manual202204 normals_sfm_manual202204 rgb semantic_segprop8
|
129 |
-
|
130 |
-
data/semisupervised_set_annotated_nly:
|
131 |
-
depth_dpt edges_dexined opticalflow_rife semantic_mask2former_swin_mapillary_converted
|
132 |
-
depth_sfm_manual202204 normals_sfm_manual202204 rgb semantic_segprop8
|
133 |
-
|
134 |
-
data/test_set:
|
135 |
-
depth_dpt edges_dexined opticalflow_rife semantic_mask2former_swin_mapillary_converted
|
136 |
-
depth_sfm_manual202204 normals_sfm_manual202204 rgb semantic_segprop8
|
137 |
-
|
138 |
-
data/test_set_annotated_nly:
|
139 |
-
depth_dpt edges_dexined opticalflow_rife semantic_mask2former_swin_mapillary_converted
|
140 |
-
depth_sfm_manual202204 normals_sfm_manual202204 rgb semantic_segprop8
|
141 |
-
|
142 |
-
data/train_set:
|
143 |
-
depth_dpt edges_dexined opticalflow_rife semantic_mask2former_swin_mapillary_converted
|
144 |
-
depth_sfm_manual202204 normals_sfm_manual202204 rgb semantic_segprop8
|
145 |
-
|
146 |
-
data/train_set_annotated_only:
|
147 |
-
depth_dpt edges_dexined opticalflow_rife semantic_mask2former_swin_mapillary_converted
|
148 |
-
depth_sfm_manual202204 normals_sfm_manual202204 rgb semantic_segprop8
|
149 |
-
|
150 |
-
data/validation_set:
|
151 |
-
depth_dpt edges_dexined opticalflow_rife semantic_mask2former_swin_mapillary_converted
|
152 |
-
depth_sfm_manual202204 normals_sfm_manual202204 rgb semantic_segprop8
|
153 |
-
|
154 |
-
data/validation_set_annotated_only:
|
155 |
-
depth_dpt edges_dexined opticalflow_rife semantic_mask2former_swin_mapillary_converted
|
156 |
-
depth_sfm_manual202204 normals_sfm_manual202204 rgb semantic_segprop8
|
157 |
-
```
|
158 |
-
|
159 |
-
### 1.2.7 Convert Camera Normals to World Normals
|
160 |
-
|
161 |
-
This is an optional step, but for some use cases, it may be better to use world normals instead of camera normals, which
|
162 |
-
are provided by default in `normals_sfm_manual202204`. To convert, we provide camera rotation matrices in
|
163 |
-
`raw_data/camera_matrics.tar.gz` for all 8 scenes that also have SfM.
|
164 |
-
|
165 |
-
In order to convert, use this function (for each npz file):
|
166 |
-
|
167 |
-
```
|
168 |
-
def convert_camera_to_world(normals: np.ndarray, rotation_matrix: np.ndarray) -> np.ndarray:
|
169 |
-
normals = (normals.copy() - 0.5) * 2 # [-1:1] -> [0:1]
|
170 |
-
camera_normals = camera_normals @ np.linalg.inv(rotation_matrix)
|
171 |
-
camera_normals = (camera_normals / 2) + 0.5 # [0:1] => [-1:1]
|
172 |
-
return np.clip(camera_normals, 0.0, 1.0)
|
173 |
-
```
|
174 |
-
|
175 |
-
</details>
|
176 |
-
|
177 |
-
## 2. Using the data
|
178 |
-
|
179 |
-
As per the split from the paper:
|
180 |
-
|
181 |
-
<details>
|
182 |
-
<summary> Split </summary>
|
183 |
-
<img src="split.png">
|
184 |
-
</details>
|
185 |
-
|
186 |
-
The data is in `data/*` (see the `ls` call above, it should match even if you download from huggingface).
|
187 |
-
|
188 |
-
## 2.1 Using the provided viewer
|
189 |
-
|
190 |
-

|
191 |
-
|
192 |
-
The simplest way to explore the data is to use the [provided notebook](scripts/dronescapes_viewer.ipynb). Upon running
|
193 |
-
it, you should get a collage with all the default tasks, like the picture at the top.
|
194 |
-
|
195 |
-
For a CLI-only method, you can use the provided reader as well:
|
196 |
-
|
197 |
-
```
|
198 |
-
python scripts/dronescapes_viewer.py data/test_set_annotated_only/ # or any of the 8 directories in data/
|
199 |
-
```
|
200 |
-
|
201 |
-
<details>
|
202 |
-
<summary> Expected output </summary>
|
203 |
-
|
204 |
-
```
|
205 |
-
[MultiTaskDataset]
|
206 |
-
- Path: '/export/home/proiecte/aux/mihai_cristian.pirvu/datasets/dronescapes/data/test_set_annotated_only'
|
207 |
-
- Tasks (11): [DepthRepresentation(depth_dpt), DepthRepresentation(depth_sfm_manual202204), DepthRepresentation(depth_ufo), ColorRepresentation(edges_dexined), EdgesRepresentation(edges_gb), NpzRepresentation(normals_sfm_manual202204), OpticalFlowRepresentation(opticalflow_rife), ColorRepresentation(rgb), SemanticRepresentation(semantic_mask2former_swin_mapillary_converted), SemanticRepresentation(semantic_segprop8), ColorRepresentation(softseg_gb)]
|
208 |
-
- Length: 116
|
209 |
-
- Handle missing data mode: 'fill_none'
|
210 |
-
== Shapes ==
|
211 |
-
{'depth_dpt': torch.Size([540, 960]),
|
212 |
-
'depth_sfm_manual202204': torch.Size([540, 960]),
|
213 |
-
'depth_ufo': torch.Size([540, 960, 1]),
|
214 |
-
'edges_dexined': torch.Size([540, 960]),
|
215 |
-
'edges_gb': torch.Size([540, 960, 1]),
|
216 |
-
'normals_sfm_manual202204': torch.Size([540, 960, 3]),
|
217 |
-
'opticalflow_rife': torch.Size([540, 960, 2]),
|
218 |
-
'rgb': torch.Size([540, 960, 3]),
|
219 |
-
'semantic_mask2former_swin_mapillary_converted': torch.Size([540, 960, 8]),
|
220 |
-
'semantic_segprop8': torch.Size([540, 960, 8]),
|
221 |
-
'softseg_gb': torch.Size([540, 960, 3])}
|
222 |
-
== Random loaded item ==
|
223 |
-
{'depth_dpt': tensor[540, 960] n=518400 (2.0Mb) x∈[0.043, 1.000] μ=0.341 σ=0.418,
|
224 |
-
'depth_sfm_manual202204': None,
|
225 |
-
'depth_ufo': tensor[540, 960, 1] n=518400 (2.0Mb) x∈[0.115, 0.588] μ=0.297 σ=0.138,
|
226 |
-
'edges_dexined': tensor[540, 960] n=518400 (2.0Mb) x∈[0.000, 0.004] μ=0.003 σ=0.001,
|
227 |
-
'edges_gb': tensor[540, 960, 1] n=518400 (2.0Mb) x∈[0., 1.000] μ=0.063 σ=0.100,
|
228 |
-
'normals_sfm_manual202204': None,
|
229 |
-
'opticalflow_rife': tensor[540, 960, 2] n=1036800 (4.0Mb) x∈[-0.004, 0.005] μ=0.000 σ=0.000,
|
230 |
-
'rgb': tensor[540, 960, 3] n=1555200 (5.9Mb) x∈[0., 1.000] μ=0.392 σ=0.238,
|
231 |
-
'semantic_mask2former_swin_mapillary_converted': tensor[540, 960, 8] n=4147200 (16Mb) x∈[0., 1.000] μ=0.125 σ=0.331,
|
232 |
-
'semantic_segprop8': tensor[540, 960, 8] n=4147200 (16Mb) x∈[0., 1.000] μ=0.125 σ=0.331,
|
233 |
-
'softseg_gb': tensor[540, 960, 3] n=1555200 (5.9Mb) x∈[0., 0.004] μ=0.002 σ=0.001}
|
234 |
-
== Random loaded batch ==
|
235 |
-
{'depth_dpt': tensor[5, 540, 960] n=2592000 (9.9Mb) x∈[0.043, 1.000] μ=0.340 σ=0.417,
|
236 |
-
'depth_sfm_manual202204': tensor[5, 540, 960] n=2592000 (9.9Mb) NaN!,
|
237 |
-
'depth_ufo': tensor[5, 540, 960, 1] n=2592000 (9.9Mb) x∈[0.115, 0.588] μ=0.296 σ=0.137,
|
238 |
-
'edges_dexined': tensor[5, 540, 960] n=2592000 (9.9Mb) x∈[0.000, 0.004] μ=0.003 σ=0.001,
|
239 |
-
'edges_gb': tensor[5, 540, 960, 1] n=2592000 (9.9Mb) x∈[0., 1.000] μ=0.063 σ=0.102,
|
240 |
-
'normals_sfm_manual202204': tensor[5, 540, 960, 3] n=7776000 (30Mb) NaN!,
|
241 |
-
'opticalflow_rife': tensor[5, 540, 960, 2] n=5184000 (20Mb) x∈[-0.004, 0.006] μ=0.000 σ=0.000,
|
242 |
-
'rgb': tensor[5, 540, 960, 3] n=7776000 (30Mb) x∈[0., 1.000] μ=0.393 σ=0.238,
|
243 |
-
'semantic_mask2former_swin_mapillary_converted': tensor[5, 540, 960, 8] n=20736000 (79Mb) x∈[0., 1.000] μ=0.125 σ=0.331,
|
244 |
-
'semantic_segprop8': tensor[5, 540, 960, 8] n=20736000 (79Mb) x∈[0., 1.000] μ=0.125 σ=0.331,
|
245 |
-
'softseg_gb': tensor[5, 540, 960, 3] n=7776000 (30Mb) x∈[0., 0.004] μ=0.002 σ=0.001}
|
246 |
-
== Random loaded batch using torch DataLoader ==
|
247 |
-
{'depth_dpt': tensor[5, 540, 960] n=2592000 (9.9Mb) x∈[0.025, 1.000] μ=0.216 σ=0.343,
|
248 |
-
'depth_sfm_manual202204': tensor[5, 540, 960] n=2592000 (9.9Mb) x∈[0., 1.000] μ=0.562 σ=0.335 NaN!,
|
249 |
-
'depth_ufo': tensor[5, 540, 960, 1] n=2592000 (9.9Mb) x∈[0.100, 0.580] μ=0.290 σ=0.128,
|
250 |
-
'edges_dexined': tensor[5, 540, 960] n=2592000 (9.9Mb) x∈[0.000, 0.004] μ=0.003 σ=0.001,
|
251 |
-
'edges_gb': tensor[5, 540, 960, 1] n=2592000 (9.9Mb) x∈[0., 1.000] μ=0.079 σ=0.116,
|
252 |
-
'normals_sfm_manual202204': tensor[5, 540, 960, 3] n=7776000 (30Mb) x∈[0.000, 1.000] μ=0.552 σ=0.253 NaN!,
|
253 |
-
'opticalflow_rife': tensor[5, 540, 960, 2] n=5184000 (20Mb) x∈[-0.013, 0.016] μ=0.000 σ=0.004,
|
254 |
-
'rgb': tensor[5, 540, 960, 3] n=7776000 (30Mb) x∈[0., 1.000] μ=0.338 σ=0.237,
|
255 |
-
'semantic_mask2former_swin_mapillary_converted': tensor[5, 540, 960, 8] n=20736000 (79Mb) x∈[0., 1.000] μ=0.125 σ=0.331,
|
256 |
-
'semantic_segprop8': tensor[5, 540, 960, 8] n=20736000 (79Mb) x∈[0., 1.000] μ=0.125 σ=0.331,
|
257 |
-
'softseg_gb': tensor[5, 540, 960, 3] n=7776000 (30Mb) x∈[0., 0.004] μ=0.002 σ=0.001}
|
258 |
-
```
|
259 |
-
</details>
|
260 |
-
|
261 |
-
## 3. Evaluation for semantic segmentation
|
262 |
-
|
263 |
-
We evaluate in the paper on the 3 test scenes (unsees at train) as well as the semi-supervised scenes (seen, but
|
264 |
-
different split) against the human annotated frames. The general evaluation script is in
|
265 |
-
`scripts/evaluate_semantic_segmentation.py`.
|
266 |
-
|
267 |
-
General usage is:
|
268 |
-
```
|
269 |
-
python scripts/evaluate_semantic_segmentation.py y_dir gt_dir -o results.csv --classes C1 C2 .. Cn
|
270 |
-
[--class_weights W1 W2 ... Wn] [--scenes s1 s2 ... sm]
|
271 |
-
```
|
272 |
-
|
273 |
-
<details>
|
274 |
-
<summary> Script explanation </summary>
|
275 |
-
The script is a bit convoluted, so let's break it into parts:
|
276 |
-
|
277 |
-
- `y_dir` and `gt_dir` Two directories of .npz files in the same format as the dataset (y_dir/1.npz, gt_dir/55.npz etc.)
|
278 |
-
- `classes` A list of classes in the order that they appear in the predictions and gt files
|
279 |
-
- `class_weights` (optional, but used in paper) How much to weigh each class. In the paper we compute these weights as
|
280 |
-
the number of pixels in all the dataset (train/val/semisup/test) for each of the 8 classes resulting in the numbers
|
281 |
-
below.
|
282 |
-
- `scenes` if the `y_dir` and `gt_dir` contains multiple scenes that you want to evaluate separately, the script allows
|
283 |
-
you to pass the prefix of all the scenes. For example, in `data/test_set_annotated_only/semantic_segprop8/` there are
|
284 |
-
actually 3 scenes in the npz files and in the paper, we evaluate each scene independently. Even though the script
|
285 |
-
outputs one csv file with predictions for each npz file, the scenes are used for proper aggregation at scene level.
|
286 |
-
</details>
|
287 |
-
|
288 |
-
<details>
|
289 |
-
<summary> Reproducing paper results for Mask2Former </summary>
|
290 |
-
|
291 |
-
```
|
292 |
-
python scripts/evaluate_semantic_segmentation.py \
|
293 |
-
data/test_set_annotated_only/semantic_mask2former_swin_mapillary_converted/ \
|
294 |
-
data/test_set_annotated_only/semantic_segprop8/ \
|
295 |
-
-o results.csv \
|
296 |
-
--classes land forest residential road little-objects water sky hill \
|
297 |
-
--class_weights 0.28172092 0.30589653 0.13341699 0.05937348 0.00474491 0.05987466 0.08660721 0.06836531 \
|
298 |
-
--scenes barsana_DJI_0500_0501_combined_sliced_2700_14700 comana_DJI_0881_full norway_210821_DJI_0015_full
|
299 |
-
```
|
300 |
-
|
301 |
-
Should output:
|
302 |
-
```
|
303 |
-
scene iou f1
|
304 |
-
barsana_DJI_0500_0501_combined_sliced_2700_14700 63.371 75.338
|
305 |
-
comana_DJI_0881_full 60.559 73.779
|
306 |
-
norway_210821_DJI_0015_full 37.986 45.939
|
307 |
-
mean 53.972 65.019
|
308 |
-
|
309 |
-
```
|
310 |
-
|
311 |
-
Not providing `--scenes` will make an average across all 3 scenes (not average after each metric individually):
|
312 |
-
|
313 |
-
```
|
314 |
-
iou f1
|
315 |
-
scene
|
316 |
-
all 60.456 73.261
|
317 |
-
```
|
318 |
-
</details>
|
319 |
-
|
320 |
-
### 3.1 Official benchmark
|
321 |
-
|
322 |
-
#### IoU
|
323 |
-
|
324 |
-
| method | #paramters | average | barsana_DJI_0500_0501_combined_sliced_2700_14700 | comana_DJI_0881_full | norway_210821_DJI_0015_full |
|
325 |
-
|:-|:-|:-|:-|:-|:-|
|
326 |
-
| [Mask2Former](https://openaccess.thecvf.com/content/CVPR2022/papers/Cheng_Masked-Attention_Mask_Transformer_for_Universal_Image_Segmentation_CVPR_2022_paper.pdf) | 216M | 53.97 | 63.37 | 60.55 | 37.98 |
|
327 |
-
| [NGC(LR)](https://openaccess.thecvf.com/content/ICCV2023W/LIMIT/papers/Marcu_Self-Supervised_Hypergraphs_for_Learning_Multiple_World_Interpretations_ICCVW_2023_paper.pdf) | 32M | 40.75 | 46.51 | 45.59 | 30.17 |
|
328 |
-
| [CShift](https://www.bmvc2021-virtualconference.com/assets/papers/0455.pdf)[^1] | n/a | 39.67 | 46.27 | 43.67 | 29.09 |
|
329 |
-
| [NGC](https://cdn.aaai.org/ojs/16283/16283-13-19777-1-2-20210518.pdf)[^1] | 32M | 35.32 | 44.34 | 38.99 | 22.63 |
|
330 |
-
| [SafeUAV](https://openaccess.thecvf.com/content_ECCVW_2018/papers/11130/Marcu_SafeUAV_Learning_to_estimate_depth_and_safe_landing_areas_for_ECCVW_2018_paper.pdf)[^1] | 1.1M | 32.79 | n/a | n/a | n/a |
|
331 |
-
|
332 |
-
[^1]: reported in the [Dronescapes paper](https://openaccess.thecvf.com/content/ICCV2023W/LIMIT/papers/Marcu_Self-Supervised_Hypergraphs_for_Learning_Multiple_World_Interpretations_ICCVW_2023_paper.pdf).
|
333 |
-
|
334 |
-
#### F1 Score
|
335 |
-
|
336 |
-
| method | #paramters | average | barsana_DJI_0500_0501_combined_sliced_2700_14700 | comana_DJI_0881_full | norway_210821_DJI_0015_full |
|
337 |
-
|:-|:-|:-|:-|:-|:-|
|
338 |
-
| [Mask2Former](https://openaccess.thecvf.com/content/CVPR2022/papers/Cheng_Masked-Attention_Mask_Transformer_for_Universal_Image_Segmentation_CVPR_2022_paper.pdf) | 216M | 65.01 | 75.33 | 73.77 | 45.93 |
|
339 |
|
|
|
1 |
+
# Dronescapes 2024 dataset
|
2 |
|
3 |
+
This dataset is an extension of the original [dronescapes dataset](https://huggingface.co/dataset/Meehai/dronescapes) with new modalities generated using VRE 100% from scratch. The only data that is not generable by VRE is the Ground Truth: semantic (human annotated), depth & normals (SfM).
|
4 |
|
5 |

|
6 |
|
7 |
+
WIP
|
8 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
|