Sebastian Cavada commited on
Commit
9a0dbee
·
1 Parent(s): 7de9793

fixed image things

Browse files
Files changed (3) hide show
  1. prepare_data.py +23 -12
  2. run_core.sh +1 -1
  3. run_scenes.sh +47 -0
prepare_data.py CHANGED
@@ -443,46 +443,55 @@ config = {
443
  'generate_correspondances': False,
444
  },
445
  "campus_entrance": {
446
- 'skip_start_frames': 0,
447
  'cam1_start': 0,
448
  'cam1_end': 100,
449
  'cam2_start': 0,
450
  'cam2_end': 100,
451
  },
452
  "campus_entrance_2": {
453
- 'skip_start_frames': 0,
 
454
  },
455
  "campus_knowledge_center": {
456
- 'skip_start_frames': 0,
 
457
  },
458
- "campus_nlpr": {
459
- 'skip_start_frames': 0,
 
460
  },
461
  "garden_path": {
462
- 'skip_start_frames': 0,
 
463
  },
464
  "hydro_NLP_connection":{
465
- 'skip_start_frames': 0,
 
466
  'cam1_start': 1150,
467
  'cam1_end': 1170,
468
  'cam2_start': 158,
469
  'cam2_end': 171,
470
  },
471
  "knowledge_center_front": {
472
- 'skip_start_frames': 0,
 
473
  },
474
  "library": {
475
- 'skip_start_frames': 4,
 
476
  },
477
  "mid_library": {
478
- 'skip_start_frames': 20,
 
479
  'cam1_start': 700,
480
  'cam1_end': 720,
481
  'cam2_start': 118,
482
  'cam2_end': 140,
483
  },
484
  "NLP_boulevard": {
485
- 'skip_start_frames': 8,
 
486
  'cam1_start': 220,
487
  'cam1_end': 240,
488
  'cam2_start': 164,
@@ -505,4 +514,6 @@ for scene in scenes_to_process:
505
  else:
506
  print(f"Warning: Scene '{scene}' not found in configuration. Skipping.")
507
 
508
- print("All scenes processed successfully!")
 
 
 
443
  'generate_correspondances': False,
444
  },
445
  "campus_entrance": {
446
+ 'skip_start_seconds': 0,
447
  'cam1_start': 0,
448
  'cam1_end': 100,
449
  'cam2_start': 0,
450
  'cam2_end': 100,
451
  },
452
  "campus_entrance_2": {
453
+ 'skip_start_seconds': 3,
454
+ 'skip_end_seconds': 0,
455
  },
456
  "campus_knowledge_center": {
457
+ 'skip_start_seconds': 0,
458
+ 'skip_end_seconds': 0,
459
  },
460
+ "campus_nlp": {
461
+ 'skip_start_seconds': 0,
462
+ 'skip_end_seconds': 0,
463
  },
464
  "garden_path": {
465
+ 'skip_start_seconds': 5,
466
+ 'skip_end_seconds': 0,
467
  },
468
  "hydro_NLP_connection":{
469
+ 'skip_start_seconds': 6,
470
+ 'skip_end_seconds': 7,
471
  'cam1_start': 1150,
472
  'cam1_end': 1170,
473
  'cam2_start': 158,
474
  'cam2_end': 171,
475
  },
476
  "knowledge_center_front": {
477
+ 'skip_start_seconds': 8,
478
+ 'skip_end_seconds': 0,
479
  },
480
  "library": {
481
+ 'skip_start_seconds': 4,
482
+ 'skip_end_seconds': 0,
483
  },
484
  "mid_library": {
485
+ 'skip_start_seconds': 3,
486
+ 'skip_end_seconds': 0,
487
  'cam1_start': 700,
488
  'cam1_end': 720,
489
  'cam2_start': 118,
490
  'cam2_end': 140,
491
  },
492
  "NLP_boulevard": {
493
+ 'skip_start_seconds': 6,
494
+ 'skip_end_seconds': 0,
495
  'cam1_start': 220,
496
  'cam1_end': 240,
497
  'cam2_start': 164,
 
514
  else:
515
  print(f"Warning: Scene '{scene}' not found in configuration. Skipping.")
516
 
517
+ print("All scenes processed successfully!")
518
+
519
+ # find . -type f -name '._*.MP4' -delete
run_core.sh CHANGED
@@ -1,7 +1,7 @@
1
  # RUN RECONSTRUCTION
2
 
3
  if [ ! -d "./global" ]; then
4
- mkdir ./global
5
  fi
6
 
7
  echo "Running Feature Extractor"
 
1
  # RUN RECONSTRUCTION
2
 
3
  if [ ! -d "./global" ]; then
4
+ mkdir -p ./global/campus_core
5
  fi
6
 
7
  echo "Running Feature Extractor"
run_scenes.sh ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+
3
+ # Define the scenes to process
4
+ SCENES=("campus_core")
5
+ # You can modify this list with your actual scene names
6
+
7
+ echo "Starting COLMAP processing for ${#SCENES[@]} scenes at $OVERALL_START_TIME"
8
+
9
+ # Process each scene
10
+ for SCENE_NAME in "${SCENES[@]}"; do
11
+
12
+ # First run feature extraction for each scene
13
+ echo "Running Feature Extractor..."
14
+ colmap feature_extractor \
15
+ --database_path ./global/database_core.db \
16
+ --image_path ./images \
17
+ --ImageReader.single_camera_per_folder 1 \
18
+ --ImageReader.default_focal_length_factor 0.5 \
19
+ --ImageReader.camera_model OPENCV \
20
+ --image_list_path ./images/$SCENE_NAME/image_list.txt
21
+
22
+ SCENE_START_TIME=$(date +"%H:%M:%S")
23
+ echo "----------------------------------------"
24
+ echo "Processing scene: $SCENE_NAME"
25
+ echo "Scene start time: $SCENE_START_TIME"
26
+
27
+ echo "Running feature matching for $SCENE_NAME..."
28
+ colmap matches_importer \
29
+ --database_path ./global/database_core.db \
30
+ --match_list_path ./images/$SCENE_NAME/image_pairs_sequentially.txt \
31
+ --image_list_path ./images/$SCENE_NAME/image_list.txt
32
+
33
+ echo "Reconstructing 3D model for $SCENE_NAME..."
34
+ colmap mapper \
35
+ --database_path ./global/database_core.db \
36
+ --image_path ./images \
37
+ --output_path ./$SCENE_NAME \
38
+ --image_list_path ./images/$SCENE_NAME/image_list.txt
39
+
40
+ SCENE_END_TIME=$(date +"%H:%M:%S")
41
+ echo "Scene $SCENE_NAME completed at: $SCENE_END_TIME"
42
+
43
+ done
44
+
45
+ OVERALL_END_TIME=$(date +"%H:%M:%S")
46
+ echo "----------------------------------------"
47
+ echo "All scenes processed. Completed at: $OVERALL_END_TIME"