Skip to content

COLMAP

COLMAP is a general-purpose Structure-from-Motion (SfM) and Multi-View Stereo (MVS) pipeline with several features for the reconstruction of ordered and unordered image collections.

COLMAP is available as a module which wraps an Apptainer container on Apocrita.

Usage

GUI support via OnDemand

To use the COLMAP GUI, launch the software via the OnDemand COLMAP interactive app.

To run the default version of COLMAP, simply load the colmap module:

$ module load colmap
$ colmap --help

Usage:
  colmap [command] [options]

Documentation:
  https://colmap.github.io/

Example usage:
  colmap help [ -h, --help ]
  colmap automatic_reconstructor -h [ --help ]
  colmap automatic_reconstructor --image_path IMAGES --workspace_path WORKSPACE
  colmap feature_extractor --image_path IMAGES --database_path DATABASE
  colmap exhaustive_matcher --database_path DATABASE
  colmap mapper --image_path IMAGES --database_path DATABASE --output_path MODEL
  ...

Example job

CPU and GPU utilisation

To ensure your job uses the requested cores and GPU, add the --num_threads $NSLOTS and --gpu_index 0 parameters to your job script, as shown below. Failure to add these parameters will result in your job only using one core, significantly increasing the execution time for your job.

GPU job

Here is an example job running on 1 GPU:

#!/bin/bash
#$ -cwd
#$ -j y
#$ -pe smp 12
#$ -l h_rt=240:0:0
#$ -l h_vmem=7.5G
#$ -l gpu=1

module load colmap

# Set the path to your dataset
export DATASET_PATH=/path/to/dataset

colmap automatic_reconstructor \
  --workspace_path "${DATASET_PATH}" \
  --image_path "${DATASET_PATH}/images" \
  --num_threads "${NSLOTS}" \
  --gpu_index 0

References