Skip to content

Latest commit

 

History

History
172 lines (128 loc) · 3.97 KB

installation.adoc

File metadata and controls

172 lines (128 loc) · 3.97 KB

kapture / installation

You can either install the package using pip or from the source code manually. We also provide a docker file.

1. pip: the simple way

Requirements:

  • python 3.6 + python3-pip

  • colmap (optional)

linux (Ubuntu 18.04 LTS)

In a terminal (e.g. bash), run:

# install requirements
sudo apt-get install -y python3.6 python3-pip colmap
# install kapture
pip3 install kapture

Windows and MacOS

Requirements

Download and install the latest 3.6 release from https://www.python.org/downloads/ for your machine.

Note
For windows user: when running the installer, tick Add Python 3.6 to PATH, then customize, make sure pip, Python test suite and py launcher are installed.

Get the latest colmap binaries from https://github.com/colmap/colmap/releases.

Finally, in a terminal (e.g. powershell), run:

pip3 install kapture
Note
For windows user: kapture uses symlinks to optimize transfer operations. But symbolic links are not fully supported on windows platform, and may lead to permission errors. If you encounter that kind of errors, please consider using copy or skip as transfer mode.

2. from source: for developers

In addition to [pre-built package] requirements, you need to install:

  • git.

Optionally, for documentation, you will also need to install

  • pandoc,

  • asciidoctor.

linux (Ubuntu 18.04 LTS)

In a terminal, do:

# install requirements
sudo apt-get install -y git python3.6 python3-pip colmap
# install optionnal requirements
sudo apt-get install -y pandoc asciidoctor
# clone source repository
git clone https://github.com/naver/kapture.git
cd kapture
# check everything is fine
python3 -m unittest discover -s tests
# install
python3 setup.py build install

Windows and MacOS

Download and install :

Optionally, for documentation, download and install

Then, in a command prompt (cmd or powershell) run:

# clone source repository
git clone https://github.com/naver/kapture.git
cd kapture
# check everything is fine
python -m unittest discover -s tests
# install
python setup.py build install

3. using docker

Build

Build the docker image:

# clone source repository
git clone https://github.com/naver/kapture.git
cd kapture
# build the docker image
docker build . -t kapture/kapture

OR build the docker image directly from github

docker build git://github.com/naver/kapture -t kapture/kapture

Finally, run unit tests:

docker run --runtime=nvidia -it --rm kapture/kapture python3 -m unittest discover -s /opt/src/kapture/tests

Run

docker run --runtime=nvidia -it \
    --rm \ # Automatically remove the container when it exits \
    --volume /path/to/dataset/:/dataset:ro \ #read only
    kapture/kapture
Note
You can bind directories between the host and the container using --volume or --mount option in order to access to any files and directories on a host machine from the container. (See the docker documentation.)

4. test your installation

cd kapture # use path of your cloned repository
cd tools
# On linux
python3 ./kapture_print.py -i ../samples/Aachen-Day-Night/kapture/training
# On Windows and MacOS
python ./kapture_print.py -i ../samples/Aachen-Day-Night/kapture/training
# add -v 10 for more output

You should get something like this:

nb sensors               : 3
nb trajectories          : 3
nb records_camera        : 3
nb types keypoints       : 1
 └─ nb images sift       : 3
nb points 3-D            : 5
nb observed 3-D points   : 27
nb observation 2-D points: 27