Meehai commited on
Commit
69c544e
1 Parent(s): bf45936

updated commands files and readme

Browse files
README.md CHANGED
@@ -15,23 +15,15 @@ TODO: recommended
15
 
16
  Recommended if you intend on understanding how the dataset was created or add new videos or representations.
17
 
18
- ### 1.2.1 Download the raw videos
19
 
20
  Follow the commands in each directory under `raw_data/videos/*/commands.txt` if you want to start from the 4K videos.
21
 
22
- If you only want the 540p videos as used in the paper, then download them from: [link](https://drive.google.com/file/d/1AH-9K1RjxCJr8atRU8p3CqCOGKmQtLbU).
23
 
24
- ```bash
25
- cd raw_data/
26
- tar -xzvf videos_540p.tar.gz
27
- ```
28
-
29
- ### 1.2.2 Download the GT semantic segmentation labels
30
 
31
  These were human annotated and then propagated using [segprop](https://github.com/vlicaret/segprop).
32
- Direct link: [link](https://drive.google.com/file/d/1ElBDox_UUqngqZeuJpibYX2wSU8YdQt7/view?usp=sharing).
33
-
34
- or:
35
 
36
  ```bash
37
  cd raw_data/
@@ -95,6 +87,8 @@ Adding new representations is as simple as running VRE on the 540p mp4 file
95
  ./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_nly --overwrite
96
  ```
97
 
 
 
98
  Upon calling this, you should be able to see something like this:
99
  ```
100
  user> ls data/*
@@ -143,13 +137,60 @@ The data is in `data/*` (see the `ls` call above, it should match even if you do
143
  ## 2.1 Using the provided viewer
144
  Basic usage:
145
  ```
146
- /dronescapes_viewer.py data/test_set_annotated_only/ # or any of the 8 directories
147
  ```
148
 
149
- Should output:
 
 
150
  ```
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
151
  ```
152
 
 
 
153
  ## TODOs
154
  - mask2former convert
155
  - add raw script for reading data
 
15
 
16
  Recommended if you intend on understanding how the dataset was created or add new videos or representations.
17
 
18
+ ### 1.2.1 Raw videos
19
 
20
  Follow the commands in each directory under `raw_data/videos/*/commands.txt` if you want to start from the 4K videos.
21
 
22
+ If you only want the 540p videos as used in the paper, they are already provided in the `raw_data/videos/*` directories.
23
 
24
+ ### 1.2.2 Semantic segmentation labels (human annotated)
 
 
 
 
 
25
 
26
  These were human annotated and then propagated using [segprop](https://github.com/vlicaret/segprop).
 
 
 
27
 
28
  ```bash
29
  cd raw_data/
 
87
  ./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_nly --overwrite
88
  ```
89
 
90
+ Note: `add --copy_files` if you want to make copies instead of using symlinks.
91
+
92
  Upon calling this, you should be able to see something like this:
93
  ```
94
  user> ls data/*
 
137
  ## 2.1 Using the provided viewer
138
  Basic usage:
139
  ```
140
+ ./dronescapes_viewer.py data/test_set_annotated_only/ # or any of the 8 directories
141
  ```
142
 
143
+ <details>
144
+ <summary> Expected output </summary>
145
+
146
  ```
147
+ [MultiTaskDataset]
148
+ - Path: '/scratch/sdc/datasets/dronescapes/data/test_set_annotated_only'
149
+ - Only full data: False
150
+ - Representations (8): [NpzRepresentation(depth_dpt), NpzRepresentation(depth_sfm_manual202204), NpzRepresentation(edges_dexined), NpzRepresentation(normals_sfm_manual202204), NpzRepresentation(opticalflow_rife), NpzRepresentation(rgb), NpzRepresentation(semantic_mask2former_swin_mapillary_converted), NpzRepresentation(semantic_segprop8)]
151
+ - Length: 116
152
+ == Shapes ==
153
+ {'depth_dpt': torch.Size([540, 960]),
154
+ 'depth_sfm_manual202204': torch.Size([540, 960]),
155
+ 'edges_dexined': torch.Size([540, 960]),
156
+ 'normals_sfm_manual202204': torch.Size([540, 960, 3]),
157
+ 'opticalflow_rife': torch.Size([540, 960, 2]),
158
+ 'rgb': torch.Size([540, 960, 3]),
159
+ 'semantic_mask2former_swin_mapillary_converted': torch.Size([540, 960]),
160
+ 'semantic_segprop8': torch.Size([540, 960])}
161
+ == Random loaded item ==
162
+ /export/home/proiecte/aux/mihai_cristian.pirvu/.conda/envs/ngc/lib/python3.10/site-packages/numpy/core/_methods.py:215: RuntimeWarning: overflow encountered in reduce
163
+ arrmean = umr_sum(arr, axis, dtype, keepdims=True, where=where)
164
+ {'depth_dpt': tensor[540, 960] x∈[0.031, 1.000] μ=0.060 σ=0.038,
165
+ 'depth_sfm_manual202204': tensor[540, 960] f16 x∈[0., 1.195e+03] μ=360.250 σ=inf,
166
+ 'edges_dexined': tensor[540, 960] x∈[0.131, 1.000] μ=0.848 σ=0.188,
167
+ 'normals_sfm_manual202204': tensor[540, 960, 3] f16 x∈[0.000, 1.000] μ=0.525 σ=inf,
168
+ 'opticalflow_rife': tensor[540, 960, 2] f16 x∈[-0.000, 0.007] μ=0.002 σ=0.002,
169
+ 'rgb': tensor[540, 960, 3] u8 x∈[0, 255] μ=68.154 σ=33.902,
170
+ 'semantic_mask2former_swin_mapillary_converted': tensor[540, 960] u8 x∈[0, 7] μ=3.591 σ=3.058,
171
+ 'semantic_segprop8': tensor[540, 960] u8 x∈[0, 6] μ=1.057 σ=0.916}
172
+ == Random loaded batch ==
173
+ {'depth_dpt': torch.Size([5, 540, 960]),
174
+ 'depth_sfm_manual202204': torch.Size([5, 540, 960]),
175
+ 'edges_dexined': torch.Size([5, 540, 960]),
176
+ 'normals_sfm_manual202204': torch.Size([5, 540, 960, 3]),
177
+ 'opticalflow_rife': torch.Size([5, 540, 960, 2]),
178
+ 'rgb': torch.Size([5, 540, 960, 3]),
179
+ 'semantic_mask2former_swin_mapillary_converted': torch.Size([5, 540, 960]),
180
+ 'semantic_segprop8': torch.Size([5, 540, 960])}
181
+ == Random loaded batch using torch DataLoader ==
182
+ {'depth_dpt': torch.Size([5, 540, 960]),
183
+ 'depth_sfm_manual202204': torch.Size([5, 540, 960]),
184
+ 'edges_dexined': torch.Size([5, 540, 960]),
185
+ 'normals_sfm_manual202204': torch.Size([5, 540, 960, 3]),
186
+ 'opticalflow_rife': torch.Size([5, 540, 960, 2]),
187
+ 'rgb': torch.Size([5, 540, 960, 3]),
188
+ 'semantic_mask2former_swin_mapillary_converted': torch.Size([5, 540, 960]),
189
+ 'semantic_segprop8': torch.Size([5, 540, 960])}
190
  ```
191
 
192
+ </summary>
193
+
194
  ## TODOs
195
  - mask2former convert
196
  - add raw script for reading data
raw_data/videos/atanasie_DJI_0652_full/commands.txt CHANGED
@@ -1,4 +1,3 @@
1
- gdown 1qz32oi-6bOKBL6A84lglOUtHK0OQyo4Y # DJI_0652.MP4
2
  ffmpeg -i DJI_0652.MP4 -vf "scale=960:540" -c:v libx264 atanasie_DJI_0652_full_540p.mp4
3
  ffmpeg -i DJI_0652.MP4 -vf "scale=1280:720" -c:v libx264 atanasie_DJI_0652_full_720p.mp4
4
 
 
 
1
  ffmpeg -i DJI_0652.MP4 -vf "scale=960:540" -c:v libx264 atanasie_DJI_0652_full_540p.mp4
2
  ffmpeg -i DJI_0652.MP4 -vf "scale=1280:720" -c:v libx264 atanasie_DJI_0652_full_720p.mp4
3
 
raw_data/videos/barsana_DJI_0500_0501_combined_sliced_2700_14700/commands.txt CHANGED
@@ -1,5 +1,3 @@
1
- gdown 1GzBnD8peVafDP7ZQAJOu7j4TYfLfdHd3 # DJI_0500.MP4
2
- gdown 1Mud2unSluYPbLuLvXTo-10TFmyABXSQO # DJI_0501.MP4
3
  echo -e "file DJI_0500.MP4\nfile DJI_0501.MP4\n" > list.txt
4
  ffmpeg -f concat -i list.txt -c copy output_tmp.mp4
5
  ffmpeg -ss 90.09 -i output_tmp.mp4 -vf "scale=960:540" -c:v libx264 -frames:v 12001 barsana_DJI_0500_0501_combined_sliced_2700_14700_540p.mp4 # 2700 / 29.97 = 90.09
 
 
 
1
  echo -e "file DJI_0500.MP4\nfile DJI_0501.MP4\n" > list.txt
2
  ffmpeg -f concat -i list.txt -c copy output_tmp.mp4
3
  ffmpeg -ss 90.09 -i output_tmp.mp4 -vf "scale=960:540" -c:v libx264 -frames:v 12001 barsana_DJI_0500_0501_combined_sliced_2700_14700_540p.mp4 # 2700 / 29.97 = 90.09
raw_data/videos/comana_DJI_0881_full/commands.txt CHANGED
@@ -1,4 +1,3 @@
1
- gdown 1Sp1CwGVHzOVwE0U3o2teLs7FoSI72nVX # DJI_0881.MP4
2
  ffmpeg -i DJI_0881.MP4 -vf "scale=960:540" -c:v libx264 comana_DJI_0881_full_540p.mp4
3
  ffmpeg -i DJI_0881.MP4 -vf "scale=1280:720" -c:v libx264 comana_DJI_0881_full_720p.mp4
4
 
 
 
1
  ffmpeg -i DJI_0881.MP4 -vf "scale=960:540" -c:v libx264 comana_DJI_0881_full_540p.mp4
2
  ffmpeg -i DJI_0881.MP4 -vf "scale=1280:720" -c:v libx264 comana_DJI_0881_full_720p.mp4
3
 
raw_data/videos/gradistei_DJI_0787_0788_0789_combined_sliced_3510_13110/commands.txt CHANGED
@@ -1,6 +1,3 @@
1
- gdown 1_CmYdwN6TXrowUVtwosHUFCJ0yYVP6s5 # DJI_0787.MP4
2
- gdown 1-S0EmEbV5X4O-V7bOWSSTOeaINSlwiev # DJI_0788.MP4
3
- gdown 1VL2afMtjS5zObTL49_gwl3Z7bncMDwFw # DJI_0789.MP4
4
  echo -e "file DJI_0787.MP4\nfile DJI_0788.MP4\nfile DJI_0789.MP4" > list.txt
5
  ffmpeg -f concat -i list.txt -c copy output_tmp.mp4
6
  ffmpeg -ss 117.117 -i output_tmp.mp4 -vf "scale=960:540" -c:v libx264 -frames:v 12001 gradistei_DJI_0787_0788_0789_combined_sliced_3510_13110_540p.mp4 # 3510 / 29.97 = 117.117
 
 
 
 
1
  echo -e "file DJI_0787.MP4\nfile DJI_0788.MP4\nfile DJI_0789.MP4" > list.txt
2
  ffmpeg -f concat -i list.txt -c copy output_tmp.mp4
3
  ffmpeg -ss 117.117 -i output_tmp.mp4 -vf "scale=960:540" -c:v libx264 -frames:v 12001 gradistei_DJI_0787_0788_0789_combined_sliced_3510_13110_540p.mp4 # 3510 / 29.97 = 117.117
raw_data/videos/herculane_DJI_0021_full/commands.txt CHANGED
@@ -1,4 +1,3 @@
1
- gdown 18-5eFwJQkFtM_1jwMK9i9qFLAEENQv3o # DJI_0021.MP4
2
  ffmpeg -i DJI_0021.MP4 -vf "scale=960:540" -c:v libx264 herculane_DJI_0021_full_540p.mp4
3
  ffmpeg -i DJI_0021.MP4 -vf "scale=1280:720" -c:v libx264 herculane_DJI_0021_full_720p.mp4
4
 
 
 
1
  ffmpeg -i DJI_0021.MP4 -vf "scale=960:540" -c:v libx264 herculane_DJI_0021_full_540p.mp4
2
  ffmpeg -i DJI_0021.MP4 -vf "scale=1280:720" -c:v libx264 herculane_DJI_0021_full_720p.mp4
3
 
raw_data/videos/jupiter_DJI_0703_0704_0705_combined_sliced_10650_21715/commands.txt CHANGED
@@ -1,6 +1,3 @@
1
- gdown 1I2wHteOfHJ8585abjWRXCJw-4HlEvoD- # DJI_0703.MP4
2
- gdown 1Qk9ViYMJHh3a3AKHW_EGhFT4mw32_4O5 # DJI_0704.MP4
3
- gdown 1CBYiWOnkXvYBL8l3EgCEp-RGyV84kPte # DJI_0705.MP4
4
  echo -e "file DJI_0703.MP4\nfile DJI_0704.MP4\nfile DJI_0705.MP4" > list.txt
5
  ffmpeg -f concat -i list.txt -c copy output_tmp.mp4
6
  ffmpeg -ss 355.355 -i output_tmp.mp4 -vf "scale=960:540" -c:v libx264 -frames:v 12001 jupiter_DJI_0703_0704_0705_combined_sliced_10650_21715_540p.mp4 # 10650 / 29.97 = 355.355
 
 
 
 
1
  echo -e "file DJI_0703.MP4\nfile DJI_0704.MP4\nfile DJI_0705.MP4" > list.txt
2
  ffmpeg -f concat -i list.txt -c copy output_tmp.mp4
3
  ffmpeg -ss 355.355 -i output_tmp.mp4 -vf "scale=960:540" -c:v libx264 -frames:v 12001 jupiter_DJI_0703_0704_0705_combined_sliced_10650_21715_540p.mp4 # 10650 / 29.97 = 355.355
raw_data/videos/norway_210821_DJI_0015_full/commands.txt CHANGED
@@ -1,3 +1,2 @@
1
- gdown 1idHZBqiS4ZlLgtnNOwJG08ecPSWcNo-Q # DJI_0015.MP4
2
  ffmpeg -i DJI_0015.MP4 -vf "scale=960:540" -c:v libx264 norway_210821_DJI_0015_full_540p.mp4
3
  ffmpeg -i DJI_0015.MP4 -vf "scale=1280:720" -c:v libx264 norway_210821_DJI_0015_full_720p.mp4
 
 
1
  ffmpeg -i DJI_0015.MP4 -vf "scale=960:540" -c:v libx264 norway_210821_DJI_0015_full_540p.mp4
2
  ffmpeg -i DJI_0015.MP4 -vf "scale=1280:720" -c:v libx264 norway_210821_DJI_0015_full_720p.mp4
raw_data/videos/olanesti_DJI_0416_full/commands.txt CHANGED
@@ -1,3 +1,2 @@
1
- gdown 1V8uIVi1jZgmlDMymUVoblU-GVmPKTvzV # DJI_0416.MP4
2
  ffmpeg -i DJI_0416.MP4 -vf "scale=960:540" -c:v libx264 olanesti_DJI_0416_full_540p.mp4
3
  ffmpeg -i DJI_0416.MP4 -vf "scale=1280:720" -c:v libx264 olanesti_DJI_0416_full_720p.mp4
 
 
1
  ffmpeg -i DJI_0416.MP4 -vf "scale=960:540" -c:v libx264 olanesti_DJI_0416_full_540p.mp4
2
  ffmpeg -i DJI_0416.MP4 -vf "scale=1280:720" -c:v libx264 olanesti_DJI_0416_full_720p.mp4
raw_data/videos/petrova_DJI_0525_0526_combined_sliced_2850_11850/commands.txt CHANGED
@@ -1,5 +1,3 @@
1
- gdown 1WusHf8gYSFCTs4ncXf5sgr-w8ELZ1UNA # DJI_0525_good.MP4
2
- gdown 1QNy2Yi_VBL362zF68lXJ7Tw6xSV6P4Vo # DJI_0526_good.MP4
3
  echo -e "file DJI_0525_good.MP4\nfile DJI_0526_good.MP4\n" > list.txt
4
  ffmpeg -f concat -i list.txt -c copy output_tmp.mp4
5
  ffmpeg -ss 95.095 -i output_tmp.mp4 -vf "scale=960:540" -c:v libx264 -frames:v 12001 petrova_DJI_0525_0526_combined_sliced_2850_11850_540p.mp4 # 2850 / 29.97 = 95.095
 
 
 
1
  echo -e "file DJI_0525_good.MP4\nfile DJI_0526_good.MP4\n" > list.txt
2
  ffmpeg -f concat -i list.txt -c copy output_tmp.mp4
3
  ffmpeg -ss 95.095 -i output_tmp.mp4 -vf "scale=960:540" -c:v libx264 -frames:v 12001 petrova_DJI_0525_0526_combined_sliced_2850_11850_540p.mp4 # 2850 / 29.97 = 95.095
raw_data/videos/slanic_DJI_0956_0957_combined_sliced_780_9780/commands.txt CHANGED
@@ -1,5 +1,3 @@
1
- gdown 1dZgxsBjJjyuCJWeBgkIm1hc_A3Nm5PsA # DJI_0956.MP4
2
- gdown 11NnTUchvWXmJmwQxXUYe5-v7nCuWd4D4 # DJI_0957.MP4
3
  echo -e "file DJI_0956.MP4\nfile DJI_0957.MP4\n" > list.txt
4
  ffmpeg -f concat -i list.txt -c copy output_tmp.mp4
5
  ffmpeg -ss 26.02 -i output_tmp.mp4 -vf "scale=960:540" -c:v libx264 -frames:v 9001 slanic_DJI_0956_0957_combined_sliced_780_9780_540p.mp4
 
 
 
1
  echo -e "file DJI_0956.MP4\nfile DJI_0957.MP4\n" > list.txt
2
  ffmpeg -f concat -i list.txt -c copy output_tmp.mp4
3
  ffmpeg -ss 26.02 -i output_tmp.mp4 -vf "scale=960:540" -c:v libx264 -frames:v 9001 slanic_DJI_0956_0957_combined_sliced_780_9780_540p.mp4
symlinks_from_txt_list.py CHANGED
@@ -106,7 +106,7 @@ def main(args: Namespace):
106
  txt_data = read_txt_data(args.txt_file)
107
  symlinks_to_do = check_and_gather_all_files(args.dataset_dir, txt_data, args.output_path, suffix=".npz")
108
  symlinks_to_do = make_partitions_if_needed(symlinks_to_do, args.partition_max_size)
109
- for in_file, out_file in tqdm(symlinks_to_do.items(), desc="symlinks"):
110
  Path(out_file).parent.mkdir(exist_ok=True, parents=True)
111
  if args.copy_files:
112
  shutil.copyfile(in_file, out_file, follow_symlinks=True)
 
106
  txt_data = read_txt_data(args.txt_file)
107
  symlinks_to_do = check_and_gather_all_files(args.dataset_dir, txt_data, args.output_path, suffix=".npz")
108
  symlinks_to_do = make_partitions_if_needed(symlinks_to_do, args.partition_max_size)
109
+ for in_file, out_file in tqdm(symlinks_to_do.items(), desc="copying" if args.copy_files else "symlinks"):
110
  Path(out_file).parent.mkdir(exist_ok=True, parents=True)
111
  if args.copy_files:
112
  shutil.copyfile(in_file, out_file, follow_symlinks=True)