You can either install the package using pip or from the source code manually. We also provide a docker file.
Requirements:
-
python 3.6 + python3-pip
-
colmap (optional)
In a terminal (e.g. bash), run:
# install requirements
sudo apt-get install -y python3.6 python3-pip colmap
# install kapture
pip3 install kapture
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. |
In addition to [pre-built package] requirements, you need to install:
-
git.
Optionally, for documentation, you will also need to install
-
pandoc,
-
asciidoctor.
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
Download and install :
-
git from git-scm.com.
Optionally, for documentation, download and install
-
pandoc from github.com/jgm/pandoc,
-
asciidoctor from asciidoctor.org.
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
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
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.)
|
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 records : 3
nb records_camera records: 3
nb keypoints : 3
nb points 3-D : 5
nb observed 3-D points : 5
nb observation 2-D points: 27