Skip to content

Commit

Permalink
./start-dev-env-stain.sh + cd /var/www/NodeODM/NodeODM && node index.…
Browse files Browse the repository at this point in the history
…js starts a Node that has stain segmentation built-in.
  • Loading branch information
cnpcshangbo committed Jul 5, 2024
1 parent fef37f5 commit 5dc9561
Show file tree
Hide file tree
Showing 8 changed files with 277 additions and 140 deletions.
19 changes: 16 additions & 3 deletions SuperBuild/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@ if (NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release")
endif()

# find_package(CUDA REQUIRED)
# if (CUDA_FOUND)
# message(STATUS "CUDA found at: ${CUDA_PATH}")
# else()
# message(FATAL_ERROR "CUDA not found. Please install CUDA and set the CUDA_PATH environment variable.")
# endif()


if (APPLE)
find_program(HOMEBREW_EXECUTABLE brew)
mark_as_advanced(FORCE HOMEBREW_EXECUTABLE)
Expand Down Expand Up @@ -108,9 +116,9 @@ if (WIN32)
file(GLOB COPY_DLLS "${VCPKG_ROOT}/installed/x64-windows/bin/*.dll")
file(COPY ${COPY_DLLS} DESTINATION "${SB_INSTALL_DIR}/bin")

message("Copying CUDA DLLs...")
file(GLOB CUDA_DLLS "$ENV{CUDA_PATH}/bin/cudart64*.dll")
file(COPY ${CUDA_DLLS} DESTINATION "${SB_INSTALL_DIR}/bin")
# message("Copying CUDA DLLs...")
# file(GLOB CUDA_DLLS "$ENV{CUDA_PATH}/bin/cudart64*.dll")
# file(COPY ${CUDA_DLLS} DESTINATION "${SB_INSTALL_DIR}/bin")

set(WIN32_GDAL_ARGS -DGDAL_FOUND=TRUE -DGDAL_LIBRARY=${GDAL_LIBRARY} -DGDAL_INCLUDE_DIR=${GDAL_INCLUDE_DIR})
elseif(APPLE)
Expand Down Expand Up @@ -209,6 +217,11 @@ else()
set(POISSON_BUILD_CMD COMPILER=${CMAKE_CXX_COMPILER} make -j${nproc} -f Makefile.macos poissonrecon)
endif()
endif()

add_custom_target(build_poissonrecon ALL
DEPENDS poissonrecon
)

externalproject_add(poissonrecon
GIT_REPOSITORY https://github.com/OpenDroneMap/PoissonRecon.git
GIT_TAG 290
Expand Down
4 changes: 2 additions & 2 deletions SuperBuild/cmake/External-OpenMVS.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ endif()

SET(GPU_CMAKE_ARGS "")
if(UNIX)
if (EXISTS "/usr/local/cuda/lib64/stubs")
SET(GPU_CMAKE_ARGS -DCMAKE_LIBRARY_PATH=/usr/local/cuda/lib64/stubs)
if (EXISTS "/usr/local/cuda/lib64")
SET(GPU_CMAKE_ARGS -DCMAKE_LIBRARY_PATH=/usr/local/cuda/lib64)
endif()
endif()

Expand Down
70 changes: 38 additions & 32 deletions SuperBuild/cmake/External-PyPopsift.cmake
Original file line number Diff line number Diff line change
@@ -1,36 +1,42 @@
set(_SB_BINARY_DIR "${SB_BINARY_DIR}/pypopsift")
set(YOUR_GPU_COMPUTE_CAPABILITY 86)

# Pypopsift
find_package(CUDA 7.0)
find_package(CUDA)

if(CUDA_FOUND)
ExternalProject_Add(pypopsift
DEPENDS opensfm
PREFIX ${_SB_BINARY_DIR}
TMP_DIR ${_SB_BINARY_DIR}/tmp
STAMP_DIR ${_SB_BINARY_DIR}/stamp
#--Download step--------------
DOWNLOAD_DIR ${SB_DOWNLOAD_DIR}
GIT_REPOSITORY https://github.com/OpenDroneMap/pypopsift
GIT_TAG 288
#--Update/Patch step----------
UPDATE_COMMAND ""
#--Configure step-------------
SOURCE_DIR ${SB_SOURCE_DIR}/pypopsift
CMAKE_ARGS
-DOUTPUT_DIR=${SB_INSTALL_DIR}/bin/opensfm/opensfm
-DCMAKE_INSTALL_PREFIX=${SB_INSTALL_DIR}
${WIN32_CMAKE_ARGS}
${ARM64_CMAKE_ARGS}
#--Build step-----------------
BINARY_DIR ${_SB_BINARY_DIR}
#--Install step---------------
INSTALL_DIR ${SB_INSTALL_DIR}
#--Output logging-------------
LOG_DOWNLOAD OFF
LOG_CONFIGURE OFF
LOG_BUILD OFF
)
else()
message(WARNING "Could not find CUDA >= 7.0")
endif()
if (CUDA_VERSION VERSION_LESS 7.0)
message(FATAL_ERROR "CUDA version ${CUDA_VERSION} is too old. Requires CUDA 7.0 or later.")
endif()

# if(CUDA_FOUND)
# ExternalProject_Add(pypopsift
# DEPENDS opensfm
# PREFIX ${_SB_BINARY_DIR}
# TMP_DIR ${_SB_BINARY_DIR}/tmp
# STAMP_DIR ${_SB_BINARY_DIR}/stamp
# #--Download step--------------
# DOWNLOAD_DIR ${SB_DOWNLOAD_DIR}
# GIT_REPOSITORY https://github.com/OpenDroneMap/pypopsift
# GIT_TAG 288
# #--Update/Patch step----------
# UPDATE_COMMAND ""
# #--Configure step-------------
# SOURCE_DIR ${SB_SOURCE_DIR}/pypopsift
# CMAKE_ARGS
# -DCUDA_NVCC_FLAGS="-gencode arch=compute_${YOUR_GPU_COMPUTE_CAPABILITY}, code=sm_${YOUR_GPU_COMPUTE_CAPABILITY}" # Add this line
# -DOUTPUT_DIR=${SB_INSTALL_DIR}/bin/opensfm/opensfm
# -DCMAKE_INSTALL_PREFIX=${SB_INSTALL_DIR}
# ${WIN32_CMAKE_ARGS}
# ${ARM64_CMAKE_ARGS}
# #--Build step-----------------
# BINARY_DIR ${_SB_BINARY_DIR}
# #--Install step---------------
# INSTALL_DIR ${SB_INSTALL_DIR}
# #--Output logging-------------
# LOG_DOWNLOAD OFF
# LOG_CONFIGURE OFF
# LOG_BUILD OFF
# )
# else()
# message(WARNING "Could not find CUDA >= 7.0")
# endif()
Loading

0 comments on commit 5dc9561

Please sign in to comment.