Installation

Dependencies

  • CMake >= 3.17

  • COLMAP 3.8

    Follow official document to install COLMAP. Make sure to use the tag 3.8. (COLMAP has been under active development since summer 2023, so we currently only support COLMAP 3.8 or before)

  • PoseLib

    git clone --recursive https://github.com/vlarsson/PoseLib.git
    cd PoseLib
    mkdir build && cd build
    cmake ..
    sudo make install -j8
    
  • HDF5

    sudo apt-get install libhdf5-dev
    
  • OpenCV (only for installing pytlbd, it’s fine to remove it from requirements.txt and use LIMAP without OpenCV)

    sudo apt-get install libopencv-dev libopencv-contrib-dev libarpack++2-dev libarpack2-dev libsuperlu-dev
    
  • Python 3.9 + required packages

    Install PyTorch >= 1.12.0 (Note: LIMAP has not been tested with PyTorch 2)

    • CPU version

    pip install torch==1.12.0 torchvision==0.13.0
    

    Install other Python packages

    git submodule update --init --recursive
    pip install -r requirements.txt
    

Install LIMAP

pip install -Ive .

Alternatively:

mkdir build && cd build
cmake -DPYTHON_EXECUTABLE=`which python` ..
make -j8

To test if LIMAP is successfully installed, try import limap and it should reports no error.

python -c "import limap"