Skip to content
Merged
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
3 changes: 0 additions & 3 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
Dockerfile
tests/test_data
SuperBuild/build
SuperBuild/download
SuperBuild/install
Expand All @@ -18,8 +17,6 @@ images_resize
/hooks
/img
/license
/tests
tests.sh
settings.yml
code_of_conduct.md
configure_18_04.sh
Expand Down
28 changes: 28 additions & 0 deletions .github/workflows/build_vcpkg_env.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Build Windows Dependencies

on:
workflow_dispatch:

jobs:
windows:
runs-on: windows-2022
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Set up vcpkg
run: |
git clone https://github.com/microsoft/vcpkg.git
.\vcpkg\bootstrap-vcpkg.bat

- name: Install vcpkg dependencies
run: .\vcpkg\vcpkg.exe install --triplet x64-windows

- name: Export vcpkg dependencies
run: .\vcpkg\vcpkg.exe export --zip --output=vcpkg-export --output-dir=.

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: vcpkg-env-x64-windows
path: vcpkg-export.zip
6 changes: 3 additions & 3 deletions .github/workflows/publish-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: '3.8.1'
python-version: '3.12.10'
architecture: 'x64'
- uses: Jimver/cuda-toolkit@v0.2.4
- uses: Jimver/cuda-toolkit@v0.2.24
id: cuda-toolkit
with:
cuda: '11.4.0'
cuda: '12.8.1'
- name: Setup cmake
uses: jwlawson/actions-setup-cmake@v1.13
with:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/test-build-prs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,19 +49,19 @@ jobs:
# isClassic: 'false'

windows:
runs-on: windows-2019
runs-on: windows-2022
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: '3.8.1'
python-version: '3.12.10'
architecture: 'x64'
- uses: Jimver/cuda-toolkit@v0.2.4
- uses: Jimver/cuda-toolkit@v0.2.24
id: cuda-toolkit
with:
cuda: '11.4.0'
cuda: '12.8.1'
- name: Setup cmake
uses: jwlawson/actions-setup-cmake@v1.13
with:
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ storage/

vcpkg/
venv/
python38/
python312/
dist/
innosetup/
.DS_Store
22 changes: 10 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM ubuntu:21.04 AS builder
FROM ubuntu:24.04 AS builder

# Env variables
ENV DEBIAN_FRONTEND=noninteractive \
PYTHONPATH="$PYTHONPATH:/code/SuperBuild/install/lib/python3.9/dist-packages:/code/SuperBuild/install/lib/python3.8/dist-packages:/code/SuperBuild/install/bin/opensfm" \
PYTHONPATH="$PYTHONPATH:/code/SuperBuild/install/lib/python3.12/dist-packages:/code/SuperBuild/install/bin/opensfm" \
LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/code/SuperBuild/install/lib"

# Prepare directories
Expand All @@ -11,24 +11,25 @@ WORKDIR /code
# Copy everything
COPY . ./

# Use old-releases for 21.04
RUN printf "deb http://old-releases.ubuntu.com/ubuntu/ hirsute main restricted\ndeb http://old-releases.ubuntu.com/ubuntu/ hirsute-updates main restricted\ndeb http://old-releases.ubuntu.com/ubuntu/ hirsute universe\ndeb http://old-releases.ubuntu.com/ubuntu/ hirsute-updates universe\ndeb http://old-releases.ubuntu.com/ubuntu/ hirsute multiverse\ndeb http://old-releases.ubuntu.com/ubuntu/ hirsute-updates multiverse\ndeb http://old-releases.ubuntu.com/ubuntu/ hirsute-backports main restricted universe multiverse" > /etc/apt/sources.list

# Run the build
RUN bash configure.sh install

# Run the tests
ENV PATH="/code/venv/bin:$PATH"
RUN bash test.sh

# Clean Superbuild
RUN bash configure.sh clean

### END Builder

### Use a second image for the final asset to reduce the number and
# size of the layers.
FROM ubuntu:21.04
FROM ubuntu:24.04

# Env variables
ENV DEBIAN_FRONTEND=noninteractive \
PYTHONPATH="$PYTHONPATH:/code/SuperBuild/install/lib/python3.9:/code/SuperBuild/install/lib/python3.8/dist-packages:/code/SuperBuild/install/bin/opensfm" \
PYTHONPATH="$PYTHONPATH:/code/SuperBuild/install/lib/python3.12/dist-packages:/code/SuperBuild/install/bin/opensfm" \
LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/code/SuperBuild/install/lib" \
PDAL_DRIVER_PATH="/code/SuperBuild/install/bin"

Expand All @@ -37,11 +38,7 @@ WORKDIR /code
# Copy everything we built from the builder
COPY --from=builder /code /code

# Copy the Python libraries installed via pip from the builder
COPY --from=builder /usr/local /usr/local

# Use old-releases for 21.04
RUN printf "deb http://old-releases.ubuntu.com/ubuntu/ hirsute main restricted\ndeb http://old-releases.ubuntu.com/ubuntu/ hirsute-updates main restricted\ndeb http://old-releases.ubuntu.com/ubuntu/ hirsute universe\ndeb http://old-releases.ubuntu.com/ubuntu/ hirsute-updates universe\ndeb http://old-releases.ubuntu.com/ubuntu/ hirsute multiverse\ndeb http://old-releases.ubuntu.com/ubuntu/ hirsute-updates multiverse\ndeb http://old-releases.ubuntu.com/ubuntu/ hirsute-backports main restricted universe multiverse" > /etc/apt/sources.list
ENV PATH="/code/venv/bin:$PATH"

# Install shared libraries that we depend on via APT, but *not*
# the -dev packages to save space!
Expand All @@ -51,5 +48,6 @@ RUN bash configure.sh installruntimedepsonly \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
&& bash run.sh --help \
&& bash -c "eval $(python3 /code/opendm/context.py) && python3 -c 'from opensfm import io, pymap'"

# Entry point
ENTRYPOINT ["python3", "/code/run.py"]
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,9 @@ You're in good shape!

See https://github.com/NVIDIA/nvidia-docker and https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html#docker for information on docker/NVIDIA setup.

## Native Install (Ubuntu 21.04)
## Native Install (Ubuntu 24.04)

You can run ODM natively on Ubuntu 21.04 (although we don't recommend it):
You can run ODM natively on Ubuntu 24.04 (although we don't recommend it):

```bash
git clone https://github.com/OpenDroneMap/ODM
Expand All @@ -144,6 +144,8 @@ You can then process datasets with `./run.sh /datasets/odm_data_aukerman`

## Native Install (MacOS)

> **Warning:** Installation on Mac is currently unmaintained, and may not work out-of-the-box. See this [issue](https://community.opendronemap.org/t/odm-install-on-a-mac-os-14-6-1/25007/3).

You can run ODM natively on Intel/ARM MacOS.

First install:
Expand Down
20 changes: 8 additions & 12 deletions SuperBuild/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -96,14 +96,9 @@ if (WIN32)

# Use the GDAL version that comes with pip
set(GDAL_ROOT "${PYTHON_HOME}/Lib/site-packages/osgeo")
set(GDAL_LIBRARY "${GDAL_ROOT}/lib/gdal_i.lib")
set(GDAL_LIBRARY "${GDAL_ROOT}/gdal.lib")
set(GDAL_INCLUDE_DIR "${GDAL_ROOT}/include/gdal")

# Also download missing headers :/
if (NOT EXISTS "${GDAL_INCLUDE_DIR}/ogrsf_frmts.h")
file(DOWNLOAD "https://raw.githubusercontent.com/OSGeo/gdal/release/3.2/gdal/ogr/ogrsf_frmts/ogrsf_frmts.h" "${GDAL_INCLUDE_DIR}/ogrsf_frmts.h")
endif()

message("Copying VCPKG DLLs...")
file(GLOB COPY_DLLS "${VCPKG_ROOT}/installed/x64-windows/bin/*.dll")
file(COPY ${COPY_DLLS} DESTINATION "${SB_INSTALL_DIR}/bin")
Expand All @@ -117,7 +112,8 @@ elseif(APPLE)
set(PYTHON_HOME "${SB_ROOT_DIR}/../venv")
set(PYTHON_EXE_PATH "${PYTHON_HOME}/bin/python")
else()
set(PYTHON_EXE_PATH "/usr/bin/python3")
set(PYTHON_HOME "${SB_ROOT_DIR}/../venv")
set(PYTHON_EXE_PATH "${PYTHON_HOME}/bin/python3")
endif()

# Path to additional CMake modules
Expand All @@ -133,7 +129,7 @@ include(ExternalProject-Setup)
# ---------------------------------------------------------------------------------------------
# Open Source Computer Vision (OpenCV)
#
set(ODM_OpenCV_Version 2.4.11)
set(ODM_OpenCV_Version 4.12.0)
option(ODM_BUILD_OpenCV "Force to build OpenCV library" OFF)

SETUP_EXTERNAL_PROJECT(OpenCV ${ODM_OpenCV_Version} ${ODM_BUILD_OpenCV})
Expand All @@ -160,7 +156,7 @@ SETUP_EXTERNAL_PROJECT(Ceres ${ODM_Ceres_Version} ${ODM_BUILD_Ceres})
# ---------------------------------------------------------------------------------------------
# Hexer
#
SETUP_EXTERNAL_PROJECT(Hexer 1.4 ON)
SETUP_EXTERNAL_PROJECT(Hexer 1.5 ON)

# ---------------------------------------------------------------------------------------------
# Open Structure from Motion (OpenSfM)
Expand Down Expand Up @@ -269,9 +265,9 @@ externalproject_add(lastools
)

externalproject_add(draco
GIT_REPOSITORY https://github.com/OpenDroneMap/draco
GIT_SHALLOW ON
GIT_TAG 304
GIT_REPOSITORY https://github.com/google/draco
GIT_SHALLOW OFF
GIT_TAG e801aebf9665f6dcf3b6b0a604055a300ff85aa4
PREFIX ${SB_BINARY_DIR}/draco
SOURCE_DIR ${SB_SOURCE_DIR}/draco
CMAKE_ARGS -DDRACO_TRANSCODER_SUPPORTED=ON
Expand Down
1 change: 1 addition & 0 deletions SuperBuild/cmake/External-Ceres.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ ExternalProject_Add(${_proj_name}
URL http://ceres-solver.org/ceres-solver-2.0.0.tar.gz
#--Update/Patch step----------
UPDATE_COMMAND ""
PATCH_COMMAND git apply ${CMAKE_MODULE_PATH}/ceres.patch
#--Configure step-------------
SOURCE_DIR ${SB_SOURCE_DIR}/${_proj_name}
CMAKE_ARGS
Expand Down
4 changes: 3 additions & 1 deletion SuperBuild/cmake/External-Entwine.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ ExternalProject_Add(${_proj_name}
#--Download step--------------
DOWNLOAD_DIR ${SB_DOWNLOAD_DIR}
GIT_REPOSITORY https://github.com/OpenDroneMap/entwine/
GIT_TAG 290
GIT_TAG 0cf957432f291e841ff1385085dadad933dcba8d
#--Update/Patch step----------
UPDATE_COMMAND ""
#--Configure step-------------
Expand All @@ -23,6 +23,8 @@ ExternalProject_Add(${_proj_name}
-DADDITIONAL_LINK_DIRECTORIES_PATHS=${SB_INSTALL_DIR}/lib
-DWITH_TESTS=OFF
-DWITH_ZSTD=OFF
-DWITH_CURL=OFF
-DWITH_OPENSSL=OFF
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-DCMAKE_INSTALL_PREFIX:PATH=${SB_INSTALL_DIR}
#--Build step-----------------
Expand Down
2 changes: 1 addition & 1 deletion SuperBuild/cmake/External-Hexer.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ ExternalProject_Add(${_proj_name}
STAMP_DIR ${_SB_BINARY_DIR}/stamp
#--Download step--------------
DOWNLOAD_DIR ${SB_DOWNLOAD_DIR}
URL https://github.com/hobu/hexer/archive/bc748fc16b51c562f68f6641574b7af4244adfa2.tar.gz
URL https://github.com/hobuinc/hexer/archive/5876a5ab1d5b504cf1ea985d66ae359287eef31e.tar.gz
#--Update/Patch step----------
UPDATE_COMMAND ""
#--Configure step-------------
Expand Down
2 changes: 1 addition & 1 deletion SuperBuild/cmake/External-MvsTexturing.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ ExternalProject_Add(${_proj_name}
#--Download step--------------
DOWNLOAD_DIR ${SB_DOWNLOAD_DIR}/${_proj_name}
GIT_REPOSITORY https://github.com/OpenDroneMap/mvs-texturing
GIT_TAG 290
GIT_TAG c5a4d0c9a434553533c6e39d426e349fcfa5f48d
#--Update/Patch step----------
UPDATE_COMMAND ""
#--Configure step-------------
Expand Down
20 changes: 12 additions & 8 deletions SuperBuild/cmake/External-OpenCV.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,36 @@ set(_proj_name opencv)
set(_SB_BINARY_DIR "${SB_BINARY_DIR}/${_proj_name}")

if (WIN32)
set(OCV_CMAKE_EXTRA_ARGS -DPYTHON3_NUMPY_INCLUDE_DIRS=${PYTHON_HOME}/lib/site-packages/numpy/core/include
set(OCV_CMAKE_EXTRA_ARGS -DPYTHON3_NUMPY_INCLUDE_DIRS=${PYTHON_HOME}/lib/site-packages/numpy/_core/include
-DPYTHON3_PACKAGES_PATH=${PYTHON_HOME}/lib/site-packages
-DPYTHON3_EXECUTABLE=${PYTHON_EXE_PATH}
-DWITH_MSMF=OFF
-DOPENCV_LIB_INSTALL_PATH=${SB_INSTALL_DIR}/lib
-DOPENCV_BIN_INSTALL_PATH=${SB_INSTALL_DIR}/bin)
elseif(APPLE)
# macOS is unable to automatically detect our Python libs
set(OCV_CMAKE_EXTRA_ARGS -DPYTHON3_NUMPY_INCLUDE_DIRS=${PYTHON_HOME}/lib/python3.8/site-packages/numpy/core/include
-DPYTHON3_PACKAGES_PATH=${PYTHON_HOME}/lib/python3.8/site-packages
set(OCV_CMAKE_EXTRA_ARGS -DPYTHON3_NUMPY_INCLUDE_DIRS=${PYTHON_HOME}/lib/python3.12/site-packages/numpy/core/include
-DPYTHON3_PACKAGES_PATH=${PYTHON_HOME}/lib/python3.12/site-packages
-DPYTHON3_EXECUTABLE=${PYTHON_EXE_PATH}
-DPYTHON3_LIBRARIES=${HOMEBREW_INSTALL_PREFIX}/opt/python@3.8/Frameworks/Python.framework/Versions/3.8/lib/libpython3.8.dylib
-DPYTHON3_INCLUDE_DIR=${HOMEBREW_INSTALL_PREFIX}/opt/python@3.8/Frameworks/Python.framework/Versions/3.8/include/python3.8/
-DPYTHON3_INCLUDE_PATH=${HOMEBREW_INSTALL_PREFIX}/opt/python@3.8/Frameworks/Python.framework/Versions/3.8/include/python3.8/
-DPYTHON3_LIBRARIES=${HOMEBREW_INSTALL_PREFIX}/opt/python@3.12/Frameworks/Python.framework/Versions/3.12/lib/libpython3.12.dylib
-DPYTHON3_INCLUDE_DIR=${HOMEBREW_INSTALL_PREFIX}/opt/python@3.12/Frameworks/Python.framework/Versions/3.12/include/python3.12/
-DPYTHON3_INCLUDE_PATH=${HOMEBREW_INSTALL_PREFIX}/opt/python@3.12/Frameworks/Python.framework/Versions/3.12/include/python3.12/
-DPYTHON3INTERP_FOUND=ON
-DPYTHON3LIBS_FOUND=ON
-DPYTHON_DEFAULT_AVAILABLE=ON
-DPYTHON_DEFAULT_EXECUTABLE=${PYTHON_EXE_PATH}
-DPYTHON3_VERSION_MAJOR=3
-DPYTHON3_VERSION_MINOR=8
-DOPENCV_CONFIG_INSTALL_PATH=
-DOPENCV_PYTHON_INSTALL_PATH=${SB_INSTALL_DIR}/lib/python3.8/dist-packages
-DOPENCV_PYTHON_INSTALL_PATH=${SB_INSTALL_DIR}/lib/python3.12/dist-packages
-DHAVE_opencv_python3=ON
-DOPENCV_PYTHON_SKIP_DETECTION=ON
-DOPENCV_LIB_INSTALL_PATH=${SB_INSTALL_DIR}/lib
-DOPENCV_BIN_INSTALL_PATH=${SB_INSTALL_DIR}/bin)
else()
set(OCV_CMAKE_EXTRA_ARGS -DPYTHON3_NUMPY_INCLUDE_DIRS=${PYTHON_HOME}/lib/python3.12/site-packages/numpy/_core/include
-DPYTHON3_PACKAGES_PATH=${PYTHON_HOME}/lib/python3.12/site-packages
-DPYTHON3_EXECUTABLE=${PYTHON_EXE_PATH})
endif()

ExternalProject_Add(${_proj_name}
Expand All @@ -36,7 +40,7 @@ ExternalProject_Add(${_proj_name}
STAMP_DIR ${_SB_BINARY_DIR}/stamp
#--Download step--------------
DOWNLOAD_DIR ${SB_DOWNLOAD_DIR}
URL https://github.com/opencv/opencv/archive/4.5.0.zip
URL https://github.com/opencv/opencv/archive/4.12.0.zip
#--Update/Patch step----------
UPDATE_COMMAND ""
#--Configure step-------------
Expand Down
2 changes: 1 addition & 1 deletion SuperBuild/cmake/External-OpenPointClass.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ ExternalProject_Add(${_proj_name}
#--Download step--------------
DOWNLOAD_DIR ${SB_DOWNLOAD_DIR}
GIT_REPOSITORY https://github.com/uav4geo/OpenPointClass
GIT_TAG v1.1.3
GIT_TAG dd6a560a1d43cb709f7b220b19a436e25a889e3e
#--Update/Patch step----------
UPDATE_COMMAND ""
#--Configure step-------------
Expand Down
4 changes: 2 additions & 2 deletions SuperBuild/cmake/External-OpenSfM.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ProcessorCount(nproc)

set(EXTRA_INCLUDE_DIRS "")
if(WIN32)
set(OpenCV_DIR "${SB_INSTALL_DIR}/x64/vc16/lib")
set(OpenCV_DIR "${SB_INSTALL_DIR}/x64/vc17/lib")
set(BUILD_CMD ${CMAKE_COMMAND} --build "${SB_BUILD_DIR}/opensfm" --config "${CMAKE_BUILD_TYPE}")
else()
set(BUILD_CMD make "-j${nproc}")
Expand All @@ -25,7 +25,7 @@ ExternalProject_Add(${_proj_name}
#--Download step--------------
DOWNLOAD_DIR ${SB_DOWNLOAD_DIR}
GIT_REPOSITORY https://github.com/OpenDroneMap/OpenSfM/
GIT_TAG 355
GIT_TAG c5328439465e6ace011f39077d1077d7b1cdd65d
#--Update/Patch step----------
UPDATE_COMMAND git submodule update --init --recursive
#--Configure step-------------
Expand Down
4 changes: 3 additions & 1 deletion SuperBuild/cmake/External-PDAL.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@ ExternalProject_Add(${_proj_name}
STAMP_DIR ${_SB_BINARY_DIR}/stamp
#--Download step--------------
DOWNLOAD_DIR ${SB_DOWNLOAD_DIR}
URL https://github.com/OpenDroneMap/PDAL/archive/refs/heads/333.zip
GIT_REPOSITORY https://github.com/PDAL/PDAL/
GIT_TAG 831631084edc7e61bc898eae136294c375b13d14
#--Update/Patch step----------
UPDATE_COMMAND ""
PATCH_COMMAND git apply ${CMAKE_MODULE_PATH}/pdal.patch
#--Configure step-------------
SOURCE_DIR ${SB_SOURCE_DIR}/${_proj_name}
CMAKE_ARGS
Expand Down
Loading
Loading