-
Notifications
You must be signed in to change notification settings - Fork 199
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Darius Rueckert
committed
Nov 2, 2021
1 parent
6a8c4bc
commit 351d14e
Showing
59 changed files
with
11,069 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Commented out parameters are those with the same value as base LLVM style | ||
# We can uncomment them if we want to change their value, or enforce the | ||
# chosen value in case the base style changes (last sync: Clang 6.0.1). | ||
--- | ||
### General config, applies to all languages ### | ||
BasedOnStyle: Google | ||
IndentWidth: 4 | ||
BreakBeforeBraces: Allman | ||
ColumnLimit: 120 | ||
DerivePointerAlignment: false | ||
PointerAlignment: Left | ||
MaxEmptyLinesToKeep: 3 | ||
SortIncludes: true | ||
IncludeBlocks: Regroup | ||
IncludeCategories: | ||
- Regex: '^"(saiga)/' | ||
Priority: 1 | ||
- Regex: '^"(internal)/' | ||
Priority: 2 | ||
- Regex: '"[[:alnum:]./]+"' | ||
Priority: 3 | ||
- Regex: '<[[:alnum:]./]+>' | ||
Priority: 4 | ||
IndentPPDirectives: AfterHash | ||
AlignConsecutiveAssignments: true | ||
AllowShortFunctionsOnASingleLine: Inline |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
log/ | ||
valgrind* | ||
cmake-build-*/ | ||
perf* | ||
out.perf-folded | ||
.idea/ | ||
checkpoints/ | ||
imgui.ini | ||
build*/ | ||
debug/ | ||
config.ini | ||
pretrained/ | ||
experiments/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
cmake_minimum_required(VERSION 3.8 FATAL_ERROR) | ||
project(ADOP VERSION 1.0.0 LANGUAGES CXX CUDA) | ||
|
||
set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH}) | ||
list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/External/saiga/cmake/") | ||
|
||
include(helper_macros) | ||
include(ExternalProject) | ||
DefaultBuildType(RelWithDebInfo) | ||
message("Build Options") | ||
|
||
OptionsHelper(ADOP_HEADLESS "Skips the adop_viewer and other apps that require a window." OFF) | ||
OptionsHelper(ADOP_ASAN "Adds sanitize=address compiler flag" OFF) | ||
|
||
if (ADOP_HEADLESS) | ||
set(SAIGA_MODULE_OPENGL OFF) | ||
set(SAIGA_BUILD_GLFW OFF) | ||
endif () | ||
|
||
############# Required LIBRARIES ############### | ||
|
||
# Saiga | ||
set(SAIGA_BUILD_SAMPLES OFF) | ||
set(SAIGA_BUILD_TESTS OFF) | ||
set(SAIGA_BUILD_SHARED ON) | ||
set(SAIGA_MODULE_VISION OFF) | ||
set(SAIGA_MODULE_VULKAN OFF) | ||
#set(SAIGA_MODULE_CUDA OFF) | ||
set(SAIGA_NO_INSTALL ON) | ||
set(SAIGA_USE_SUBMODULES ON) | ||
add_subdirectory(External/saiga) | ||
PackageHelperTarget(saiga_core SAIGA_FOUND) | ||
if (NOT ADOP_HEADLESS) | ||
PackageHelperTarget(saiga_opengl SAIGA_FOUND) | ||
endif () | ||
PackageHelperTarget(saiga_opengl SAIGA_FOUND) | ||
PackageHelperTarget(saiga_cuda SAIGA_FOUND) | ||
|
||
# Torch | ||
find_package(Torch REQUIRED) | ||
PackageHelperTarget(torch TORCH_FOUND) | ||
|
||
# Torchvision | ||
add_subdirectory(External/torchvision) | ||
target_include_directories(torchvision PUBLIC | ||
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/External/torchvision/> | ||
$<INSTALL_INTERFACE:External/torchvision/> | ||
) | ||
PackageHelperTarget(torchvision TORCHVISION_FOUND) | ||
|
||
############# COMPILER FLAGS ############### | ||
|
||
if (MSVC) | ||
#multiprocessor compilation for visual studio | ||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP") | ||
else () | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Werror=return-type") | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-strict-aliasing") | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-sign-compare") | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ftemplate-backtrace-limit=0") | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -march=native -pthread") | ||
endif () | ||
|
||
|
||
message(STATUS CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}) | ||
message(STATUS CMAKE_EXE_LINKER_FLAGS ${CMAKE_EXE_LINKER_FLAGS}) | ||
|
||
set(LIBS ${LIBS} ${LIB_TARGETS}) | ||
|
||
############# C++ Standard and Filesystem stuff ############### | ||
|
||
set(CMAKE_CXX_STANDARD 17) | ||
set(CMAKE_CXX_STANDARD_REQUIRED ON) | ||
|
||
|
||
|
||
############# SOURCE ############### | ||
|
||
add_subdirectory(src) | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
Submodule saiga
updated
2 files
+3 −4 | src/saiga/vision/cameraModel/Distortion.h | |
+1 −1 | src/saiga/vision/cameraModel/OCam.h |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/bin/bash | ||
|
||
git submodule update --init --recursive --jobs 0 | ||
source $(conda info --base)/etc/profile.d/conda.sh | ||
conda activate adop | ||
|
||
|
||
|
||
if command -v g++-9 &> /dev/null | ||
then | ||
export CC=gcc-9 | ||
export CXX=g++-9 | ||
export CUDAHOSTCXX=g++-9 | ||
echo "Using g++-9" | ||
elif command -v g++-7 &> /dev/null | ||
then | ||
export CC=gcc-7 | ||
export CXX=g++-7 | ||
export CUDAHOSTCXX=g++-7 | ||
echo "Using g++-7" | ||
else | ||
echo "No suitable compiler found. Install g++-7 or g++-9" | ||
exit | ||
fi | ||
|
||
|
||
mkdir build | ||
cd build | ||
export CONDA=${CONDA_PREFIX:-"$(dirname $(which conda))/../"} | ||
cmake -DCMAKE_PREFIX_PATH="${CONDA}/lib/python3.9/site-packages/torch/;${CONDA}" .. | ||
make -j10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,15 @@ | ||
#!/bin/bash | ||
|
||
git submodule update --init --recursive | ||
git submodule update --init --recursive --jobs 0 | ||
|
||
|
||
source $(conda info --base)/etc/profile.d/conda.sh | ||
|
||
#conda update -n base -c defaults conda | ||
|
||
conda create -y -n adop python=3.9.7 | ||
conda activate adop | ||
|
||
conda install -y cudnn=8.2.1.32 cudatoolkit-dev=11.2 cudatoolkit=11.2 -c nvidia -c conda-forge | ||
conda install -y astunparse numpy ninja pyyaml mkl mkl-include setuptools cmake=3.19.6 cffi typing_extensions future six requests dataclasses | ||
conda install -y astunparse numpy ninja pyyaml mkl mkl-include setuptools cmake=3.19.6 cffi typing_extensions future six requests dataclasses pybind11=2.6.2 | ||
conda install -y magma-cuda110 -c pytorch |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
add_subdirectory(lib) | ||
add_subdirectory(tests) | ||
add_subdirectory(apps) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
function(add_app TARGET_NAME) | ||
|
||
set_target_properties(${TARGET_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/bin") | ||
target_include_directories(${TARGET_NAME} PUBLIC ".") | ||
target_link_libraries(${TARGET_NAME} NeuralPoints) | ||
|
||
if (PR_NO_WINDOW) | ||
target_compile_definitions(${TARGET_NAME} PUBLIC PR_NO_WINDOW) | ||
endif () | ||
|
||
|
||
message(STATUS "App enabled: ${TARGET_NAME}") | ||
endfunction() | ||
|
||
add_executable(colmap2adop colmap2adop.cpp) | ||
add_app(colmap2adop) | ||
|
||
add_executable(preprocess_pointcloud preprocess_pointcloud.cpp) | ||
add_app(preprocess_pointcloud) | ||
|
||
add_executable(adop_train adop_train.cpp) | ||
add_app(adop_train) | ||
|
||
if (TARGET saiga_opengl) | ||
add_executable(adop_viewer adop_viewer.cpp adop_viewer.h) | ||
add_app(adop_viewer) | ||
|
||
|
||
find_package(OpenVR QUIET) | ||
if (${OPENVR_FOUND}) | ||
add_executable(adop_vr_viewer adop_vr_viewer.cpp) | ||
add_app(adop_vr_viewer) | ||
endif () | ||
endif () |
Oops, something went wrong.