Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/docker-gpu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ jobs:
push: ${{ github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v') }}
file: ./gpu.Dockerfile
target: runtime
# The SuperBuild nests ninja inside ninja; uncapped, both levels run
# cores+2 jobs and the free 16 GB runner is starved until GitHub kills
# it. cmake --build honours this at both levels, so 3 bounds it at 9.
build-args: |
CMAKE_BUILD_PARALLEL_LEVEL=3
platforms: linux/amd64
set-meta-labels: true
meta-images: opendronemap/odm
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ jobs:
push: ${{ github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/v') }}
file: ./Dockerfile
target: runtime
# The SuperBuild nests ninja inside ninja; uncapped, both levels run
# cores+2 jobs and the free 16 GB runner is starved until GitHub kills
# it. cmake --build honours this at both levels, so 3 bounds it at 9.
build-args: |
CMAKE_BUILD_PARALLEL_LEVEL=3
platforms: |
linux/amd64
linux/arm64
Expand Down
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ RUN pixi install --locked \
&& rm -rf .pixi/envs/prod/include .pixi/envs/prod/share/doc .pixi/envs/prod/share/man .pixi/envs/prod/share/info

COPY . ./
ARG CMAKE_BUILD_PARALLEL_LEVEL
RUN pixi run build && pixi run test

RUN mkdir -p /odm-runtime/SuperBuild /odm-runtime/scripts \
Expand Down
8 changes: 4 additions & 4 deletions SuperBuild/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -140,17 +140,17 @@ externalproject_add(mve
INSTALL_COMMAND ""
)

foreach(lib ${custom_libs})
SETUP_EXTERNAL_PROJECT_CUSTOM(${lib})
endforeach()

include(ProcessorCount)
if(DEFINED ENV{CMAKE_BUILD_PARALLEL_LEVEL})
set(nproc $ENV{CMAKE_BUILD_PARALLEL_LEVEL})
else()
ProcessorCount(nproc)
endif()

foreach(lib ${custom_libs})
SETUP_EXTERNAL_PROJECT_CUSTOM(${lib})
endforeach()

if (WIN32)
find_program(MSBUILD_EXECUTABLE msbuild REQUIRED)
if(NOT CMAKE_VS_PLATFORM_TOOLSET)
Expand Down
3 changes: 2 additions & 1 deletion SuperBuild/cmake/External-OpenMVS.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ ExternalProject_Add(${_proj_name}
#--Download step--------------
DOWNLOAD_DIR ${SB_DOWNLOAD_DIR}
GIT_REPOSITORY https://github.com/OpenDroneMap/openMVS
GIT_TAG 355
GIT_TAG e7eda74782ffb97ec09a684e88361458e7ec2d1e
#--Update/Patch step----------
UPDATE_COMMAND ""
PATCH_COMMAND ${OPENMVS_PATCH_COMMAND}
Expand All @@ -116,6 +116,7 @@ ExternalProject_Add(${_proj_name}
-DOpenMVS_MAX_CUDA_COMPATIBILITY=ON
-DINSTALL_USE_SUBDIR=OFF
-DOpenMVS_USE_CUDA=${SB_ENABLE_CUDA}
-DCMAKE_CUDA_ARCHITECTURES=OFF
${GPU_CMAKE_ARGS}
${CONDA_CMAKE_ARGS}
${OPENMVS_WIN_CONDA_ARGS}
Expand Down
4 changes: 1 addition & 3 deletions SuperBuild/cmake/External-OpenSfM.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
set(_proj_name opensfm)
set(_SB_BINARY_DIR "${SB_BINARY_DIR}/${_proj_name}")
include(ProcessorCount)
ProcessorCount(nproc)

set(EXTRA_INCLUDE_DIRS "")
set(OPENSFM_ADDITIONAL_INCLUDE_DIRS "")
Expand All @@ -19,7 +17,7 @@ if(WIN32)
set(OPENSFM_EXTRA_LINKER_FLAGS "$ENV{CONDA_PREFIX}/Library/lib/glog.lib $ENV{CONDA_PREFIX}/Library/lib/gflags.lib")
else()
set(OPENSFM_ADDITIONAL_INCLUDE_DIRS "${SB_INSTALL_DIR}/include")
set(BUILD_CMD ${CMAKE_COMMAND} --build . --parallel ${nproc})
set(BUILD_CMD ${CMAKE_COMMAND} --build .)
endif()

set(OPENSFM_CERES_ROOT_DIR "${SB_INSTALL_DIR}")
Expand Down
1 change: 1 addition & 0 deletions gpu.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ RUN pixi install --locked -e gpu \
&& rm -rf .pixi/envs/gpu-prod/include .pixi/envs/gpu-prod/share/doc .pixi/envs/gpu-prod/share/man .pixi/envs/gpu-prod/share/info

COPY . ./
ARG CMAKE_BUILD_PARALLEL_LEVEL
RUN pixi run -e gpu build && pixi run -e gpu test

RUN mkdir -p /odm-runtime/SuperBuild /odm-runtime/scripts \
Expand Down
39 changes: 39 additions & 0 deletions opendm/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@
'pc_quality': 'opensfm',
'pc_rectify': 'odm_georeferencing',
'pc_sample': 'odm_filterpoints',
'pc_fusion_filter': 'openmvs',
'pc_fusion_depth_diff': 'openmvs',
'pc_fusion_reprojection': 'openmvs',
'pc_crop_to_roi': 'openmvs',
'pc_skip_geometric': 'openmvs',
'primary_band': 'dataset',
'project_path': None,
Expand Down Expand Up @@ -510,6 +514,41 @@ def config(argv=None, parser=None):
help='Filters the point cloud by keeping only a single point around a radius N (in meters). This can be useful to limit the output resolution of the point cloud and remove duplicate points. Set to 0 to disable sampling. '
'Default: %(default)s')

parser.add_argument('--pc-fusion-filter',
metavar='<string>',
action=StoreValue,
default='fuse',
choices=['merge', 'fuse', 'dense-fuse'],
help='Select algorithm to fuse the depth-maps into a point cloud. '
'"merge" Keeps everything, i.e. one point per depth pixel. '
'"fuse" aggregates points and keeps the weighted mean (projecting back the point into other depth maps) '
'"dense-fuse" applies a stricter consensus, it requires a certain amount (default 5) to actually create the point.'
'Can be one of: %(choices)s. Default: %(default)s')

parser.add_argument('--pc-fusion-depth-diff',
metavar='<positive float>',
action=StoreValue,
type=float,
default=0.01,
help='Maximum relative depth difference, as a fraction of the depth, for two depth estimates to be fused. '
'Default: %(default)s')

parser.add_argument('--pc-fusion-reprojection',
metavar='<positive float>',
action=StoreValue,
type=float,
default=1.2,
help='Maximum reprojection distance in pixels for two depth estimates to be fused.'
'Only used by "dense-fuse".'
'Default: %(default)s')

parser.add_argument('--pc-crop-to-roi',
action=StoreTrue,
nargs=0,
default=False,
help='Crop the point cloud to the ROI (region of interest), if not given, it is estimated by OpenMVS'
'Default: %(default)s')

parser.add_argument('--pc-skip-geometric',
action=StoreTrue,
nargs=0,
Expand Down
Loading