Meehai commited on
Commit
207e89c
·
1 Parent(s): 1e0c0b7

various fixes

Browse files
scripts/dronescapes_viewer/dronescapes_representations.py CHANGED
@@ -13,7 +13,7 @@ def get_gt_tasks() -> dict[str, Representation]:
13
  [255, 0, 0], [0, 0, 255], [0, 255, 255], [127, 127, 63]]
14
  classes_8 = ["land", "forest", "residential", "road", "little-objects", "water", "sky", "hill"]
15
  tasks = [
16
- SemanticRepresentation("semantic_output", classes=classes_8, color_map=color_map, disk_data_argmax=True),
17
  DepthRepresentation("depth_output", min_depth=0, max_depth=300),
18
  NormalsRepresentation("camera_normals_output"),
19
  ]
 
13
  [255, 0, 0], [0, 0, 255], [0, 255, 255], [127, 127, 63]]
14
  classes_8 = ["land", "forest", "residential", "road", "little-objects", "water", "sky", "hill"]
15
  tasks = [
16
+ SemanticRepresentation("semantic_output", classes=classes_8, color_map=color_map, semantic_argmax_only=True),
17
  DepthRepresentation("depth_output", min_depth=0, max_depth=300),
18
  NormalsRepresentation("camera_normals_output"),
19
  ]
scripts/semantic_mapper/semantic_mapper.py CHANGED
@@ -97,11 +97,11 @@ mapillary_color_map = [[165, 42, 42], [0, 192, 0], [196, 196, 196], [190, 153, 1
97
  [0, 0, 70], [0, 0, 192], [32, 32, 32], [120, 10, 10]]
98
 
99
  m2f_coco = SemanticRepresentation("semantic_mask2former_coco_47429163_0", classes=coco_classes,
100
- color_map=coco_color_map, disk_data_argmax=True)
101
  m2f_mapillary = SemanticRepresentation("semantic_mask2former_mapillary_49189528_0", classes=mapillary_classes,
102
- color_map=mapillary_color_map, disk_data_argmax=True)
103
  m2f_r50_mapillary = SemanticRepresentation("semantic_mask2former_mapillary_49189528_1", classes=mapillary_classes,
104
- color_map=mapillary_color_map, disk_data_argmax=True)
105
  marigold = DepthRepresentation("depth_marigold", min_depth=0, max_depth=1)
106
  normals_svd_marigold = NormalsRepresentation("normals_svd(depth_marigold)")
107
 
 
97
  [0, 0, 70], [0, 0, 192], [32, 32, 32], [120, 10, 10]]
98
 
99
  m2f_coco = SemanticRepresentation("semantic_mask2former_coco_47429163_0", classes=coco_classes,
100
+ color_map=coco_color_map, semantic_argmax_only=True)
101
  m2f_mapillary = SemanticRepresentation("semantic_mask2former_mapillary_49189528_0", classes=mapillary_classes,
102
+ color_map=mapillary_color_map, semantic_argmax_only=True)
103
  m2f_r50_mapillary = SemanticRepresentation("semantic_mask2former_mapillary_49189528_1", classes=mapillary_classes,
104
+ color_map=mapillary_color_map, semantic_argmax_only=True)
105
  marigold = DepthRepresentation("depth_marigold", min_depth=0, max_depth=1)
106
  normals_svd_marigold = NormalsRepresentation("normals_svd(depth_marigold)")
107
 
scripts/txt_files/experts/norway_DJI_0708_540p.txt ADDED
The diff for this file is too large to render. See raw diff
 
scripts/txt_files/experts/norway_DJI_0741_540p.txt DELETED
The diff for this file is too large to render. See raw diff
 
scripts/txt_files/experts/sheerness_youtube_1_540p.txt ADDED
The diff for this file is too large to render. See raw diff
 
scripts/txt_files/experts/train_set.txt CHANGED
The diff for this file is too large to render. See raw diff
 
vre_dronescapes/cfg.yaml CHANGED
@@ -30,7 +30,7 @@ representations:
30
  dependencies: []
31
  parameters:
32
  model_id: "47429163_0"
33
- disk_data_argmax: True
34
  compute_parameters:
35
  batch_size: 1
36
 
@@ -39,7 +39,7 @@ representations:
39
  dependencies: []
40
  parameters:
41
  model_id: "49189528_0"
42
- disk_data_argmax: True
43
  compute_parameters:
44
  batch_size: 1
45
 
@@ -48,7 +48,7 @@ representations:
48
  dependencies: []
49
  parameters:
50
  model_id: "49189528_1"
51
- disk_data_argmax: True
52
  compute_parameters:
53
  batch_size: 1
54
 
 
30
  dependencies: []
31
  parameters:
32
  model_id: "47429163_0"
33
+ semantic_argmax_only: True
34
  compute_parameters:
35
  batch_size: 1
36
 
 
39
  dependencies: []
40
  parameters:
41
  model_id: "49189528_0"
42
+ semantic_argmax_only: True
43
  compute_parameters:
44
  batch_size: 1
45
 
 
48
  dependencies: []
49
  parameters:
50
  model_id: "49189528_1"
51
+ semantic_argmax_only: True
52
  compute_parameters:
53
  batch_size: 1
54
 
vre_dronescapes/commands.txt CHANGED
@@ -33,7 +33,7 @@ VRE_DEVICE=cuda CUDA_VISIBLE_DEVICES=7 vre ../raw_data/videos/olanesti_DJI_0416_
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_0708_540p.mp4 -o norway_DJI_0708_540p.mp4/ --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
@@ -69,9 +69,9 @@ python scripts/symlinks_from_txt_list.py vre_dronescapes/ --copy_files --txt_fil
69
 
70
  # experts (make combined txt file of all new scenes + old data)
71
  # in vre_dronescapes_dir
72
- ls . | grep "norway_DJI_0708_540p.mp4\|politehnica_DJI_0741_a2_540p\|ovaselu_DJI_0372_540p\|raciu_DJI_0418_540p\|sanfrancisco_youtube_1_540p\|paris_youtube_1_540p\|riodejaneiro_youtube_1_540p\|sheerness_youtube_1_540p" | while read line; do rm -f ../scripts/txt_files/experts/"$line".txt; ls -v $line/rgb/npz | while read line2; do stem=${line2:0:-4}; echo $line/$stem >> ../scripts/txt_files/experts/"$line".txt; done; done
73
- ls . | grep "norway_DJI_0708_540p.mp4\|politehnica_DJI_0741_a2_540p\|ovaselu_DJI_0372_540p\|raciu_DJI_0418_540p\|sanfrancisco_youtube_1_540p\|paris_youtube_1_540p\|riodejaneiro_youtube_1_540p\|sheerness_youtube_1_540p" | while read line; do echo $line; cp -r $line/depth_marigold $line/depth_output; ../scripts/update_stastistics.py $line/depth_output/npz --statistics_file ../data/train_set/.task_statistics.npz --source_task depth_marigold --n_workers 32; cp -r $line/'normals_svd(depth_marigold)' $line/camera_normals_output; done
74
  mkdir ../scripts/txt_files/experts # in root dir
 
75
  cd ../scripts/txt_files/experts # move to txt files dir
76
  cat ../annotated_and_segprop/train_files_11664.txt > train_set.txt
77
  cat ../annotated_and_segprop/semisup_files_11299.txt >> train_set.txt
 
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_0708_540p.mp4 -o norway_DJI_0708_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
 
69
 
70
  # experts (make combined txt file of all new scenes + old data)
71
  # in vre_dronescapes_dir
72
+ ls . | grep "norway_DJI_0708_540p\|politehnica_DJI_0741_a2_540p\|ovaselu_DJI_0372_540p\|raciu_DJI_0418_540p\|sanfrancisco_youtube_1_540p\|paris_youtube_1_540p\|riodejaneiro_youtube_1_540p\|sheerness_youtube_1_540p" | while read line; do echo $line; cp -r $line/depth_marigold $line/depth_output; ../scripts/update_stastistics.py $line/depth_output/npz --statistics_file ../data/train_set/.task_statistics.npz --source_task depth_marigold --n_workers 32; cp -r $line/'normals_svd(depth_marigold)' $line/camera_normals_output; done
 
73
  mkdir ../scripts/txt_files/experts # in root dir
74
+ ls . | grep "norway_DJI_0708_540p\|politehnica_DJI_0741_a2_540p\|ovaselu_DJI_0372_540p\|raciu_DJI_0418_540p\|sanfrancisco_youtube_1_540p\|paris_youtube_1_540p\|riodejaneiro_youtube_1_540p\|sheerness_youtube_1_540p" | while read line; do rm -f ../scripts/txt_files/experts/"$line".txt; ls -v $line/rgb/npz | while read line2; do stem=${line2:0:-4}; echo $line/$stem >> ../scripts/txt_files/experts/"$line".txt; done; done
75
  cd ../scripts/txt_files/experts # move to txt files dir
76
  cat ../annotated_and_segprop/train_files_11664.txt > train_set.txt
77
  cat ../annotated_and_segprop/semisup_files_11299.txt >> train_set.txt