Skip to content

Commit 4fe8430

Browse files
committed
Initial import commit for kapture
0 parents  commit 4fe8430

File tree

459 files changed

+54030
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

459 files changed

+54030
-0
lines changed

.gitignore

+114
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
# Tutorial byproduct
2+
samples/virtual_gallery_tutorial/tutorial
3+
samples/virtual_gallery_tutorial/mapping/reconstruction/matches/
4+
samples/virtual_gallery_tutorial/vocab_trees/
5+
6+
# Byte-compiled / optimized / DLL files
7+
__pycache__/
8+
*.py[cod]
9+
*$py.class
10+
11+
# C extensions
12+
*.so
13+
14+
# Distribution / packaging
15+
.Python
16+
build/
17+
develop-eggs/
18+
dist/
19+
downloads/
20+
eggs/
21+
.eggs/
22+
lib/
23+
lib64/
24+
parts/
25+
sdist/
26+
var/
27+
wheels/
28+
*.egg-info/
29+
.installed.cfg
30+
*.egg
31+
MANIFEST
32+
33+
# PyInstaller
34+
# Usually these files are written by a python script from a template
35+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
36+
*.manifest
37+
*.spec
38+
39+
# Installer logs
40+
pip-log.txt
41+
pip-delete-this-directory.txt
42+
43+
# Unit test / coverage reports
44+
htmlcov/
45+
.tox/
46+
.coverage
47+
.coverage.*
48+
.cache
49+
nosetests.xml
50+
coverage.xml
51+
*.cover
52+
.hypothesis/
53+
.pytest_cache/
54+
55+
# Translations
56+
*.mo
57+
*.pot
58+
59+
# Django stuff:
60+
*.log
61+
local_settings.py
62+
db.sqlite3
63+
64+
# Flask stuff:
65+
instance/
66+
.webassets-cache
67+
68+
# Scrapy stuff:
69+
.scrapy
70+
71+
# Sphinx documentation
72+
docs/_build/
73+
74+
# PyBuilder
75+
target/
76+
77+
# Jupyter Notebook
78+
.ipynb_checkpoints
79+
80+
# pyenv
81+
.python-version
82+
.idea
83+
84+
# celery beat schedule file
85+
celerybeat-schedule
86+
87+
# SageMath parsed files
88+
*.sage.py
89+
90+
# Environments
91+
.env
92+
.envrc
93+
.venv
94+
env/
95+
venv/
96+
ENV/
97+
env.bak/
98+
venv.bak/
99+
100+
# Spyder project settings
101+
.spyderproject
102+
.spyproject
103+
104+
# Rope project settings
105+
.ropeproject
106+
107+
# mkdocs documentation
108+
/site
109+
110+
# mypy
111+
.mypy_cache/
112+
113+
# vscode config files
114+
.vscode/

CONTRIBUTING.adoc

+99
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
= image:assets/kapture_logo.svg["KAPTURE", width=64px] kapture: Contributing
2+
:sectnums:
3+
:sectnumlevels: 1
4+
:toc:
5+
:toclevels: 2
6+
7+
== Overview
8+
9+
There are several ways to contribue to the kapture project:
10+
11+
* submit bug reports in the project bug tracker
12+
* implement a feature or bug-fix for an outstanding issue
13+
* propose a new feature and implement it
14+
15+
And of course, it is possible to discuss new features or other aspects of the project.
16+
17+
18+
== Install kapture
19+
20+
21+
To develop kapture on your machine, here are some installation tips:
22+
23+
* Clone a copy of kapture from source:
24+
[source,txt]
25+
----
26+
git clone https://github.com/naver/kapture.git
27+
----
28+
29+
* Please note that kapture requires python version 3.6 or higher
30+
31+
* install dependencies
32+
33+
[source,txt]
34+
----
35+
pip install -r requirements.txt
36+
----
37+
38+
== Codebase structure
39+
[source,txt]
40+
----
41+
kapture # Repository root path
42+
├─ assets/ # Various files (images) used in the project (e.g. for documentation)
43+
├─ kapture/ # kapture library source code
44+
│ ├─ algo/ # Algorithmic related files
45+
│ ├─ converters/ # Converters libraries
46+
│ ├─ core/ # Core kapture objects
47+
│ ├─ io/ # I/O related files
48+
│ └─ utils/ # Various generic utilities
49+
├─ samples/ # data samples (kapture and other formats). Used by tests.
50+
├─ tests/ # Unit and functional tests
51+
└─ tools/ # kapture tools scripts (importers, exporters, utilities)
52+
----
53+
54+
== Coding guidelines
55+
56+
.Style Guide
57+
kapture code follows Python's link:https://www.python.org/dev/peps/pep-0008/[PEP-8 guidelines] with a few differences:
58+
59+
* Maximum Line Length is 120 characters
60+
* function arguments types should be specified
61+
* return types of functions should be specified
62+
63+
Docstrings are written in the `sphinx` format.
64+
65+
.Conventions
66+
67+
* Variable names shoud be explicit (e.g. avoid acronyms)
68+
* private member variables should start with an `_` (underscore)
69+
70+
.File headers
71+
All kapture source code files should start with this line:
72+
[source,txt]
73+
----
74+
#!/usr/bin/env python3
75+
​# Copyright 2020-present NAVER Corp. Under BSD 3-clause license
76+
----
77+
78+
.Loggers
79+
The library and the clients should use different loggers.
80+
81+
.Documentation
82+
83+
All API functions should be properly documented using docstrings
84+
85+
== Unit testing
86+
87+
kapture's testing is located under test/. Run the entire test suite with
88+
89+
[source,txt]
90+
----
91+
python test/run_test.py
92+
----
93+
94+
or run individual test files, like `python test/test_nn.py`, for individual test suites.
95+
96+
== License
97+
98+
Contributions will be provided under the same license as kapture, that is the 3-Clause BSD license (see LICENSE for details).
99+

Dockerfile

+81
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
#FROM ubuntu:18.04
2+
FROM nvidia/cudagl:10.0-devel-ubuntu18.04
3+
MAINTAINER naverlabs "kapture@naverlabs.com"
4+
5+
# Set correct environment variables.
6+
ENV LC_ALL C
7+
ENV DEBIAN_FRONTEND noninteractive
8+
ARG MAKE_OPTIONS="-j8"
9+
10+
# Get dependencies
11+
RUN apt-get update \
12+
&& apt-get install -y --no-install-recommends \
13+
git \
14+
wget\
15+
python3.6 python3-pip \
16+
pandoc asciidoctor \
17+
cmake \
18+
build-essential \
19+
libboost-all-dev \
20+
libsuitesparse-dev \
21+
libfreeimage-dev \
22+
libgoogle-glog-dev \
23+
libgflags-dev \
24+
libglew-dev \
25+
freeglut3-dev \
26+
libxmu-dev \
27+
libxi-dev \
28+
libatlas-base-dev \
29+
libsuitesparse-dev \
30+
libcgal-qt5-dev \
31+
libqt5opengl5-dev \
32+
qt5-default \
33+
x11-apps \
34+
mesa-utils \
35+
&& rm -rf /var/lib/apt/lists/*
36+
37+
RUN pip3 install --upgrade setuptools wheel twine
38+
39+
########################################################################################################################
40+
# COLMAP ###############################################################################################################
41+
RUN mkdir /src
42+
43+
# Eigen 3.2.10
44+
RUN cd /src && git clone -b 3.2.10 https://gitlab.com/libeigen/eigen.git eigen
45+
RUN mkdir -p /src/eigen/build
46+
WORKDIR /src/eigen/build
47+
RUN cmake \
48+
-DCMAKE_BUILD_TYPE=Release \
49+
.. && \
50+
make ${MAKE_OPTIONS} && make install && make clean
51+
52+
# ceres 1.14.0
53+
RUN cd /src && git clone -b 1.14.0 https://github.com/ceres-solver/ceres-solver.git
54+
RUN mkdir -p /src/ceres-solver/build
55+
WORKDIR /src/ceres-solver/build
56+
RUN cmake \
57+
-DCMAKE_BUILD_TYPE=Release \
58+
-DBUILD_TESTING=OFF \
59+
-DBUILD_EXAMPLES=OFF \
60+
-DBUILD_BENCHMARKS=OFF \
61+
../ && \
62+
make ${MAKE_OPTIONS} && make install && make clean
63+
64+
# colmap
65+
RUN cd /src && git clone -b 3.6-dev.3 https://github.com/colmap/colmap.git
66+
RUN mkdir -p /src/colmap/build
67+
WORKDIR /src/colmap/build
68+
RUN cmake \
69+
-DCMAKE_BUILD_TYPE=Release \
70+
-DTESTS_ENABLED=OFF \
71+
.. && \
72+
make ${MAKE_OPTIONS} && make install && make clean
73+
74+
75+
########################################################################################################################
76+
# install kapture env
77+
ADD . /opt/source/kapture
78+
WORKDIR /opt/source/kapture
79+
RUN git submodule update --init --recursive
80+
RUN pip3 install -r requirements.txt
81+
RUN python3 setup.py install

LICENSE

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
Copyright (c) 2020, NAVER Corp
2+
All rights reserved.
3+
4+
Redistribution and use in source and binary forms, with or without
5+
modification, are permitted provided that the following conditions are met:
6+
* Redistributions of source code must retain the above copyright
7+
notice, this list of conditions and the following disclaimer.
8+
* Redistributions in binary form must reproduce the above copyright
9+
notice, this list of conditions and the following disclaimer in the
10+
documentation and/or other materials provided with the distribution.
11+
* Neither the name of the <organization> nor the
12+
names of its contributors may be used to endorse or promote products
13+
derived from this software without specific prior written permission.
14+
15+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
16+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
18+
DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
19+
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
20+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
22+
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
24+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

NOTICE

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
kapture
2+
Copyright 2020-present NAVER Corp.
3+
4+
This project contains subcomponents with separate copyright notices and license terms.
5+
Your use of the source code for these subcomponents is subject to the terms and conditions of the following licenses.
6+
7+
=======================================================================
8+
9+
COLMAP from https://github.com/colmap/colmap/
10+
11+
=======================================================================
12+
13+
14+
# Copyright (c) 2018, ETH Zurich and UNC Chapel Hill.
15+
# All rights reserved.
16+
#
17+
# Redistribution and use in source and binary forms, with or without
18+
# modification, are permitted provided that the following conditions are met:
19+
#
20+
# * Redistributions of source code must retain the above copyright
21+
# notice, this list of conditions and the following disclaimer.
22+
#
23+
# * Redistributions in binary form must reproduce the above copyright
24+
# notice, this list of conditions and the following disclaimer in the
25+
# documentation and/or other materials provided with the distribution.
26+
#
27+
# * Neither the name of ETH Zurich and UNC Chapel Hill nor the names of
28+
# its contributors may be used to endorse or promote products derived
29+
# from this software without specific prior written permission.
30+
#
31+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
32+
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
33+
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
34+
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
35+
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
36+
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
37+
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
38+
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
39+
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
40+
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
41+
# POSSIBILITY OF SUCH DAMAGE.
42+
#
43+
# Author: Johannes L. Schoenberger (jsch-at-demuc-dot-de)
44+

0 commit comments

Comments
 (0)