MBZUAI-Campus / run_scenes.sh
Sebastian Cavada
fixed image things
9a0dbee
#!/bin/bash
# Define the scenes to process
SCENES=("campus_core")
# You can modify this list with your actual scene names
echo "Starting COLMAP processing for ${#SCENES[@]} scenes at $OVERALL_START_TIME"
# Process each scene
for SCENE_NAME in "${SCENES[@]}"; do
# First run feature extraction for each scene
echo "Running Feature Extractor..."
colmap feature_extractor \
--database_path ./global/database_core.db \
--image_path ./images \
--ImageReader.single_camera_per_folder 1 \
--ImageReader.default_focal_length_factor 0.5 \
--ImageReader.camera_model OPENCV \
--image_list_path ./images/$SCENE_NAME/image_list.txt
SCENE_START_TIME=$(date +"%H:%M:%S")
echo "----------------------------------------"
echo "Processing scene: $SCENE_NAME"
echo "Scene start time: $SCENE_START_TIME"
echo "Running feature matching for $SCENE_NAME..."
colmap matches_importer \
--database_path ./global/database_core.db \
--match_list_path ./images/$SCENE_NAME/image_pairs_sequentially.txt \
--image_list_path ./images/$SCENE_NAME/image_list.txt
echo "Reconstructing 3D model for $SCENE_NAME..."
colmap mapper \
--database_path ./global/database_core.db \
--image_path ./images \
--output_path ./$SCENE_NAME \
--image_list_path ./images/$SCENE_NAME/image_list.txt
SCENE_END_TIME=$(date +"%H:%M:%S")
echo "Scene $SCENE_NAME completed at: $SCENE_END_TIME"
done
OVERALL_END_TIME=$(date +"%H:%M:%S")
echo "----------------------------------------"
echo "All scenes processed. Completed at: $OVERALL_END_TIME"