Meehai commited on
Commit
36c3da8
·
1 Parent(s): d068923

various fixes due to vre 1.8.0

Browse files
scripts/semantic_mapper/semantic_mapper.ipynb CHANGED
The diff for this file is too large to render. See raw diff
 
scripts/semantic_mapper/semantic_mapper.py CHANGED
@@ -139,7 +139,7 @@ class SemanticMask2FormerMapillaryConvertedPaper(TaskMapper, NpIORepresentation)
139
 
140
  @overrides
141
  def merge_fn(self, dep_data: list[MemoryData]) -> MemoryData:
142
- m2f_mapillary = dep_data[0].argmax(-1)
143
  m2f_mapillary_converted = semantic_mapper(m2f_mapillary, self.mapping, self.original_classes)
144
  return self.disk_to_memory_fmt(m2f_mapillary_converted)
145
 
@@ -198,7 +198,7 @@ class SemanticMask2FormerCOCOConverted(TaskMapper, NpIORepresentation):
198
 
199
  @overrides
200
  def merge_fn(self, dep_data: list[MemoryData]) -> MemoryData:
201
- m2f_mapillary = dep_data[0].argmax(-1)
202
  m2f_mapillary_converted = semantic_mapper(m2f_mapillary, self.mapping, self.original_classes)
203
  res = self.disk_to_memory_fmt(m2f_mapillary_converted)
204
  return res
@@ -252,8 +252,13 @@ class BinaryMapper(TaskMapper, NpIORepresentation):
252
 
253
  @overrides
254
  def merge_fn(self, dep_data: list[MemoryData]) -> MemoryData:
255
- dep_data_converted = [semantic_mapper(x.argmax(-1), mapping, oc)
256
- for x, mapping, oc in zip(dep_data, self.mapping, self.original_classes)]
 
 
 
 
 
257
  if self.mode == "all_agree":
258
  res_argmax = sum(dep_data_converted) == len(self.dependencies)
259
  elif self.mode == "at_least_one":
 
139
 
140
  @overrides
141
  def merge_fn(self, dep_data: list[MemoryData]) -> MemoryData:
142
+ m2f_mapillary = self.dependencies[0].to_argmaxed_representation(dep_data[0])
143
  m2f_mapillary_converted = semantic_mapper(m2f_mapillary, self.mapping, self.original_classes)
144
  return self.disk_to_memory_fmt(m2f_mapillary_converted)
145
 
 
198
 
199
  @overrides
200
  def merge_fn(self, dep_data: list[MemoryData]) -> MemoryData:
201
+ m2f_mapillary = self.dependencies[0].to_argmaxed_representation(dep_data[0])
202
  m2f_mapillary_converted = semantic_mapper(m2f_mapillary, self.mapping, self.original_classes)
203
  res = self.disk_to_memory_fmt(m2f_mapillary_converted)
204
  return res
 
252
 
253
  @overrides
254
  def merge_fn(self, dep_data: list[MemoryData]) -> MemoryData:
255
+ dep_data_argmaxed = []
256
+ for dep, data in zip(self.dependencies, dep_data):
257
+ assert isinstance(dep, SemanticRepresentation), type(dep)
258
+ dep_data_argmaxed.append(dep.to_argmaxed_representation(data))
259
+ dep_data_converted = [semantic_mapper(x, mapping, oc)
260
+ for x, mapping, oc in zip(dep_data_argmaxed, self.mapping, self.original_classes)]
261
+
262
  if self.mode == "all_agree":
263
  res_argmax = sum(dep_data_converted) == len(self.dependencies)
264
  elif self.mode == "at_least_one":
scripts/txt_files/experts/train_set.txt ADDED
The diff for this file is too large to render. See raw diff
 
vre_dronescapes/commands.txt CHANGED
@@ -1,10 +1,10 @@
1
  # Run VRE on the raw videos (in vre_dronescapes dir)
2
 
3
  tmux new -s vre_atanasie
4
- VRE_DEVICE=cuda CUDA_VISIBLE_DEVICES=0 vre ../raw_data/videos/atanasie_DJI_0652_full/atanasie_DJI_0652_full_540p.mp4 -o atanasie_DJI_0652_full/ --config_path cfg.yaml --output_dir_exists_mode skip_computed --exception_mode skip_representation --n_threads_data_storer 4 -I ../scripts/semantic_mapper/semantic_mapper.py:get_new_semantic_mapped_tasks;
5
 
6
  tmux new -s vre_barsana
7
- 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 barsana_DJI_0500_0501_combined_sliced_2700_14700/ --config_path cfg.yaml --output_dir_exists_mode skip_computed --exception_mode skip_representation --n_threads_data_storer 4 "transportation" -I ../scripts/semantic_mapper/semantic_mapper.py:get_new_semantic_mapped_tasks
8
 
9
  tmux new -s vre_comana
10
  VRE_DEVICE=cuda CUDA_VISIBLE_DEVICES=2 vre ../raw_data/videos/comana_DJI_0881_full/comana_DJI_0881_full_540p.mp4 -o comana_DJI_0881_full/ --config_path cfg.yaml --output_dir_exists_mode skip_computed --exception_mode skip_representation --n_threads_data_storer 4 -I ../scripts/semantic_mapper/semantic_mapper.py:get_new_semantic_mapped_tasks
@@ -19,50 +19,52 @@ tmux new -s vre_petrova
19
  VRE_DEVICE=cuda CUDA_VISIBLE_DEVICES=5 vre ../raw_data/videos/petrova_DJI_0525_0526_combined_sliced_2850_11850/petrova_DJI_0525_0526_combined_sliced_2850_11850_540p.mp4 -o petrova_DJI_0525_0526_combined_sliced_2850_11850/ --config_path cfg.yaml --output_dir_exists_mode skip_computed --exception_mode skip_representation --n_threads_data_storer 4 -I ../scripts/semantic_mapper/semantic_mapper.py:get_new_semantic_mapped_tasks
20
 
21
  tmux new -s vre_norway
22
- VRE_DEVICE=cuda CUDA_VISIBLE_DEVICES=6 vre ../raw_data/videos/norway_210821_DJI_0015_full/norway_210821_DJI_0015_full_540p.mp4 -o norway_210821_DJI_0015_full/ --config_path cfg.yaml --output_dir_exists_mode skip_computed --exception_mode skip_representation --n_threads_data_storer 4 -I ../scripts/semantic_mapper/semantic_mapper.py:get_new_semantic_mapped_tasks;
23
 
24
  tmux new -s vre_slanic
25
  VRE_DEVICE=cuda CUDA_VISIBLE_DEVICES=6 vre ../raw_data/videos/slanic_DJI_0956_0957_combined_sliced_780_9780/slanic_DJI_0956_0957_combined_sliced_780_9780_540p.mp4 -o slanic_DJI_0956_0957_combined_sliced_780_9780/ --config_path cfg.yaml --output_dir_exists_mode skip_computed --exception_mode skip_representation --n_threads_data_storer 4 -I ../scripts/semantic_mapper/semantic_mapper.py:get_new_semantic_mapped_tasks
26
 
27
  tmux new -s vre_jupiter
28
- VRE_DEVICE=cuda CUDA_VISIBLE_DEVICES=7 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 jupiter_DJI_0703_0704_0705_combined_sliced_10650_21715/ --config_path cfg.yaml --output_dir_exists_mode skip_computed --exception_mode skip_representation --n_threads_data_storer 4 -I ../scripts/semantic_mapper/semantic_mapper.py:get_new_semantic_mapped_tasks;
29
 
30
  tmux new -s vre_olanesti
31
  VRE_DEVICE=cuda CUDA_VISIBLE_DEVICES=7 vre ../raw_data/videos/olanesti_DJI_0416_full/olanesti_DJI_0416_full_540p.mp4 -o olanesti_DJI_0416_full/ --config_path cfg.yaml --output_dir_exists_mode skip_computed --exception_mode skip_representation --n_threads_data_storer 4 -I ../scripts/semantic_mapper/semantic_mapper.py:get_new_semantic_mapped_tasks
32
 
33
- # Split dataset in the relevant 8 splits (in root dir)
34
-
35
- python scripts/symlinks_from_txt_list.py vre_dronescapes/ --copy_files --txt_file scripts/txt_files/annotated_and_segprop/train_files_11664.txt -o data/train_set
36
- python scripts/symlinks_from_txt_list.py vre_dronescapes/ --copy_files --txt_file scripts/txt_files/annotated_and_segprop/val_files_605.txt -o data/validation_set
37
- python scripts/symlinks_from_txt_list.py vre_dronescapes/ --copy_files --txt_file scripts/txt_files/annotated_and_segprop/semisup_files_11299.txt -o data/semisupervised_set
38
- python scripts/symlinks_from_txt_list.py vre_dronescapes/ --copy_files --txt_file scripts/txt_files/annotated_and_segprop/test_files_5603.txt -o data/test_set
39
- python scripts/symlinks_from_txt_list.py vre_dronescapes/ --copy_files --txt_file scripts/txt_files/manually_annotated_files/train_files_218.txt -o data/train_set_annotated_only
40
- python scripts/symlinks_from_txt_list.py vre_dronescapes/ --copy_files --txt_file scripts/txt_files/manually_annotated_files/val_files_15.txt -o data/validation_set_annotated_only
41
- python scripts/symlinks_from_txt_list.py vre_dronescapes/ --copy_files --txt_file scripts/txt_files/manually_annotated_files/semisup_files_207.txt -o data/semisupervised_set_annotated_only
42
- python scripts/symlinks_from_txt_list.py vre_dronescapes/ --copy_files --txt_file scripts/txt_files/manually_annotated_files/test_files_116.txt -o data/test_set_annotated_only
43
-
44
  # new videos
45
 
46
  tmux new -s norway2
47
  VRE_DEVICE=cuda CUDA_VISIBLE_DEVICES=1 vre ../raw_data/videos/new_videos/norway_DJI_0741_540p.mp4 -o norway_DJI_0741_540p/ --config_path cfg.yaml --output_dir_exists_mode skip_computed --exception_mode skip_representation --n_threads_data_storer 4 -I ../scripts/semantic_mapper/semantic_mapper.py:get_new_semantic_mapped_tasks
48
 
49
  tmux new -s politehnica
50
- VRE_DEVICE=cuda CUDA_VISIBLE_DEVICES=2 vre ../raw_data/videos/new_videos/politehnica_DJI_0741_a2_540p.mp4 -o politehnica_DJI_0741_a2_540p/ --config_path cfg.yaml --output_dir_exists_mode skip_computed --exception_mode skip_representation --n_threads_data_storer 4 -I ../scripts/semantic_mapper/semantic_mapper.py:get_new_semantic_mapped_tasks;
51
 
52
  tmux new -s ovaselu
53
- VRE_DEVICE=cuda CUDA_VISIBLE_DEVICES=3 vre ../raw_data/videos/new_videos/ovaselu_DJI_0372_540p.mp4 -o ovaselu_DJI_0372_540p/ --config_path cfg.yaml --output_dir_exists_mode skip_computed --exception_mode skip_representation --n_threads_data_storer 4 -I ../scripts/semantic_mapper/semantic_mapper.py:get_new_semantic_mapped_tasks;
54
 
55
  tmux new -s raciu
56
- VRE_DEVICE=cuda CUDA_VISIBLE_DEVICES=4 vre ../raw_data/videos/new_videos/raciu_DJI_0418_540p.mp4 -o raciu_DJI_0418_540p/ --config_path cfg.yaml --output_dir_exists_mode skip_computed --exception_mode skip_representation --n_threads_data_storer 4 -I ../scripts/semantic_mapper/semantic_mapper.py:get_new_semantic_mapped_tasks;
57
 
58
  tmux new -s sf
59
- VRE_DEVICE=cuda CUDA_VISIBLE_DEVICES=5 vre ../raw_data/videos/new_videos/sanfrancisco_youtube_1_540p.mp4 -o sanfrancisco_youtube_1_540p/ --config_path cfg.yaml --output_dir_exists_mode skip_computed --exception_mode skip_representation --n_threads_data_storer 4 -I ../scripts/semantic_mapper/semantic_mapper.py:get_new_semantic_mapped_tasks;
60
 
61
  tmux new -s paris
62
- VRE_DEVICE=cuda CUDA_VISIBLE_DEVICES=6 vre ../raw_data/videos/new_videos/paris_youtube_1_540p.mp4 -o paris_youtube_1_540p/ --config_path cfg.yaml --output_dir_exists_mode skip_computed --exception_mode skip_representation --n_threads_data_storer 4 -I ../scripts/semantic_mapper/semantic_mapper.py:get_new_semantic_mapped_tasks;
63
 
64
  tmux new -s rio
65
- VRE_DEVICE=cuda CUDA_VISIBLE_DEVICES=7 vre ../raw_data/videos/new_videos/riodejaneiro_youtube_1_540p.mp4 -o riodejaneiro_youtube_1_540p/ --config_path cfg.yaml --output_dir_exists_mode skip_computed --exception_mode skip_representation --n_threads_data_storer 4 -I ../scripts/semantic_mapper/semantic_mapper.py:get_new_semantic_mapped_tasks;
66
 
67
  tmux new -s rome
68
- VRE_DEVICE=cuda CUDA_VISIBLE_DEVICES=0 vre ../raw_data/videos/new_videos/rome_youtube_1_540p.mp4 -o rome_youtube_1_540p/ --config_path cfg.yaml --output_dir_exists_mode skip_computed --exception_mode skip_representation --n_threads_data_storer 4 -I ../scripts/semantic_mapper/semantic_mapper.py:get_new_semantic_mapped_tasks;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  # Run VRE on the raw videos (in vre_dronescapes dir)
2
 
3
  tmux new -s vre_atanasie
4
+ VRE_DEVICE=cuda CUDA_VISIBLE_DEVICES=0 vre ../raw_data/videos/atanasie_DJI_0652_full/atanasie_DJI_0652_full_540p.mp4 -o atanasie_DJI_0652_full/ --config_path cfg.yaml --output_dir_exists_mode skip_computed --exception_mode skip_representation --n_threads_data_storer 4 -I ../scripts/semantic_mapper/semantic_mapper.py:get_new_semantic_mapped_tasks
5
 
6
  tmux new -s vre_barsana
7
+ 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 barsana_DJI_0500_0501_combined_sliced_2700_14700/ --config_path cfg.yaml --output_dir_exists_mode skip_computed --exception_mode skip_representation --n_threads_data_storer 4 -I ../scripts/semantic_mapper/semantic_mapper.py:get_new_semantic_mapped_tasks
8
 
9
  tmux new -s vre_comana
10
  VRE_DEVICE=cuda CUDA_VISIBLE_DEVICES=2 vre ../raw_data/videos/comana_DJI_0881_full/comana_DJI_0881_full_540p.mp4 -o comana_DJI_0881_full/ --config_path cfg.yaml --output_dir_exists_mode skip_computed --exception_mode skip_representation --n_threads_data_storer 4 -I ../scripts/semantic_mapper/semantic_mapper.py:get_new_semantic_mapped_tasks
 
19
  VRE_DEVICE=cuda CUDA_VISIBLE_DEVICES=5 vre ../raw_data/videos/petrova_DJI_0525_0526_combined_sliced_2850_11850/petrova_DJI_0525_0526_combined_sliced_2850_11850_540p.mp4 -o petrova_DJI_0525_0526_combined_sliced_2850_11850/ --config_path cfg.yaml --output_dir_exists_mode skip_computed --exception_mode skip_representation --n_threads_data_storer 4 -I ../scripts/semantic_mapper/semantic_mapper.py:get_new_semantic_mapped_tasks
20
 
21
  tmux new -s vre_norway
22
+ VRE_DEVICE=cuda CUDA_VISIBLE_DEVICES=6 vre ../raw_data/videos/norway_210821_DJI_0015_full/norway_210821_DJI_0015_full_540p.mp4 -o norway_210821_DJI_0015_full/ --config_path cfg.yaml --output_dir_exists_mode skip_computed --exception_mode skip_representation --n_threads_data_storer 4 -I ../scripts/semantic_mapper/semantic_mapper.py:get_new_semantic_mapped_tasks
23
 
24
  tmux new -s vre_slanic
25
  VRE_DEVICE=cuda CUDA_VISIBLE_DEVICES=6 vre ../raw_data/videos/slanic_DJI_0956_0957_combined_sliced_780_9780/slanic_DJI_0956_0957_combined_sliced_780_9780_540p.mp4 -o slanic_DJI_0956_0957_combined_sliced_780_9780/ --config_path cfg.yaml --output_dir_exists_mode skip_computed --exception_mode skip_representation --n_threads_data_storer 4 -I ../scripts/semantic_mapper/semantic_mapper.py:get_new_semantic_mapped_tasks
26
 
27
  tmux new -s vre_jupiter
28
+ VRE_DEVICE=cuda CUDA_VISIBLE_DEVICES=7 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 jupiter_DJI_0703_0704_0705_combined_sliced_10650_21715/ --config_path cfg.yaml --output_dir_exists_mode skip_computed --exception_mode skip_representation --n_threads_data_storer 4 -I ../scripts/semantic_mapper/semantic_mapper.py:get_new_semantic_mapped_tasks
29
 
30
  tmux new -s vre_olanesti
31
  VRE_DEVICE=cuda CUDA_VISIBLE_DEVICES=7 vre ../raw_data/videos/olanesti_DJI_0416_full/olanesti_DJI_0416_full_540p.mp4 -o olanesti_DJI_0416_full/ --config_path cfg.yaml --output_dir_exists_mode skip_computed --exception_mode skip_representation --n_threads_data_storer 4 -I ../scripts/semantic_mapper/semantic_mapper.py:get_new_semantic_mapped_tasks
32
 
 
 
 
 
 
 
 
 
 
 
 
33
  # new videos
34
 
35
  tmux new -s norway2
36
  VRE_DEVICE=cuda CUDA_VISIBLE_DEVICES=1 vre ../raw_data/videos/new_videos/norway_DJI_0741_540p.mp4 -o norway_DJI_0741_540p/ --config_path cfg.yaml --output_dir_exists_mode skip_computed --exception_mode skip_representation --n_threads_data_storer 4 -I ../scripts/semantic_mapper/semantic_mapper.py:get_new_semantic_mapped_tasks
37
 
38
  tmux new -s politehnica
39
+ VRE_DEVICE=cuda CUDA_VISIBLE_DEVICES=2 vre ../raw_data/videos/new_videos/politehnica_DJI_0741_a2_540p.mp4 -o politehnica_DJI_0741_a2_540p/ --config_path cfg.yaml --output_dir_exists_mode skip_computed --exception_mode skip_representation --n_threads_data_storer 4 -I ../scripts/semantic_mapper/semantic_mapper.py:get_new_semantic_mapped_tasks
40
 
41
  tmux new -s ovaselu
42
+ VRE_DEVICE=cuda CUDA_VISIBLE_DEVICES=3 vre ../raw_data/videos/new_videos/ovaselu_DJI_0372_540p.mp4 -o ovaselu_DJI_0372_540p/ --config_path cfg.yaml --output_dir_exists_mode skip_computed --exception_mode skip_representation --n_threads_data_storer 4 -I ../scripts/semantic_mapper/semantic_mapper.py:get_new_semantic_mapped_tasks
43
 
44
  tmux new -s raciu
45
+ VRE_DEVICE=cuda CUDA_VISIBLE_DEVICES=4 vre ../raw_data/videos/new_videos/raciu_DJI_0418_540p.mp4 -o raciu_DJI_0418_540p/ --config_path cfg.yaml --output_dir_exists_mode skip_computed --exception_mode skip_representation --n_threads_data_storer 4 -I ../scripts/semantic_mapper/semantic_mapper.py:get_new_semantic_mapped_tasks
46
 
47
  tmux new -s sf
48
+ VRE_DEVICE=cuda CUDA_VISIBLE_DEVICES=5 vre ../raw_data/videos/new_videos/sanfrancisco_youtube_1_540p.mp4 -o sanfrancisco_youtube_1_540p/ --config_path cfg.yaml --output_dir_exists_mode skip_computed --exception_mode skip_representation --n_threads_data_storer 4 -I ../scripts/semantic_mapper/semantic_mapper.py:get_new_semantic_mapped_tasks
49
 
50
  tmux new -s paris
51
+ VRE_DEVICE=cuda CUDA_VISIBLE_DEVICES=6 vre ../raw_data/videos/new_videos/paris_youtube_1_540p.mp4 -o paris_youtube_1_540p/ --config_path cfg.yaml --output_dir_exists_mode skip_computed --exception_mode skip_representation --n_threads_data_storer 4 -I ../scripts/semantic_mapper/semantic_mapper.py:get_new_semantic_mapped_tasks
52
 
53
  tmux new -s rio
54
+ VRE_DEVICE=cuda CUDA_VISIBLE_DEVICES=7 vre ../raw_data/videos/new_videos/riodejaneiro_youtube_1_540p.mp4 -o riodejaneiro_youtube_1_540p/ --config_path cfg.yaml --output_dir_exists_mode skip_computed --exception_mode skip_representation --n_threads_data_storer 4 -I ../scripts/semantic_mapper/semantic_mapper.py:get_new_semantic_mapped_tasks
55
 
56
  tmux new -s rome
57
+ VRE_DEVICE=cuda CUDA_VISIBLE_DEVICES=0 vre ../raw_data/videos/new_videos/rome_youtube_1_540p.mp4 -o rome_youtube_1_540p/ --config_path cfg.yaml --output_dir_exists_mode skip_computed --exception_mode skip_representation --n_threads_data_storer 4 -I ../scripts/semantic_mapper/semantic_mapper.py:get_new_semantic_mapped_tasks
58
+
59
+ # Split dataset in the relevant 8 splits (in root dir)
60
+
61
+ python scripts/symlinks_from_txt_list.py vre_dronescapes/ --copy_files --txt_file scripts/txt_files/annotated_and_segprop/train_files_11664.txt -o data/train_set
62
+ python scripts/symlinks_from_txt_list.py vre_dronescapes/ --copy_files --txt_file scripts/txt_files/annotated_and_segprop/val_files_605.txt -o data/validation_set
63
+ python scripts/symlinks_from_txt_list.py vre_dronescapes/ --copy_files --txt_file scripts/txt_files/annotated_and_segprop/semisup_files_11299.txt -o data/semisupervised_set
64
+ python scripts/symlinks_from_txt_list.py vre_dronescapes/ --copy_files --txt_file scripts/txt_files/annotated_and_segprop/test_files_5603.txt -o data/test_set
65
+ python scripts/symlinks_from_txt_list.py vre_dronescapes/ --copy_files --txt_file scripts/txt_files/manually_annotated_files/train_files_218.txt -o data/train_set_annotated_only
66
+ python scripts/symlinks_from_txt_list.py vre_dronescapes/ --copy_files --txt_file scripts/txt_files/manually_annotated_files/val_files_15.txt -o data/validation_set_annotated_only
67
+ python scripts/symlinks_from_txt_list.py vre_dronescapes/ --copy_files --txt_file scripts/txt_files/manually_annotated_files/semisup_files_207.txt -o data/semisupervised_set_annotated_only
68
+ python scripts/symlinks_from_txt_list.py vre_dronescapes/ --copy_files --txt_file scripts/txt_files/manually_annotated_files/test_files_116.txt -o data/test_set_annotated_only
69
+ # TODO: experts
70
+ python scripts/symlinks_from_txt_list.py vre_dronescapes/ --copy_files --txt_file scripts/txt_files/experts/train_set.txt -o data/train_set_experts