cmake_minimum_required(VERSION 2.8.7)
if(MSVC)
# CMake 3.4 introduced a WINDOWS_EXPORT_ALL_SYMBOLS target property that makes it possible to
# build shared libraries without using the usual declspec() decoration.
# See: https://blog.kitware.com/create-dlls-on-windows-without-declspec-using-new-cmake-export-all-feature/
# and https://cmake.org/cmake/help/v3.5/prop_tgt/WINDOWS_EXPORT_ALL_SYMBOLS.html
# for details.
cmake_minimum_required(VERSION 3.4)
endif()
if(POLICY CMP0046)
cmake_policy(SET CMP0046 NEW)
endif()
if(POLICY CMP0054)
cmake_policy(SET CMP0054 NEW)
endif()
# ---[ Caffe project
project(Caffe C CXX)
# ---[ Caffe version
set(CAFFE_TARGET_VERSION "1.0.0" CACHE STRING "Caffe logical version")
set(CAFFE_TARGET_SOVERSION "1.0.0" CACHE STRING "Caffe soname version")
add_definitions(-DCAFFE_VERSION=${CAFFE_TARGET_VERSION})
# ---[ Using cmake scripts and modules
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/Modules)
include(ExternalProject)
include(GNUInstallDirs)
include(cmake/Utils.cmake)
include(cmake/Targets.cmake)
include(cmake/Misc.cmake)
include(cmake/Summary.cmake)
include(cmake/ConfigGen.cmake)
include(cmake/WindowsCreateLinkHeader.cmake)
include(cmake/TargetResolvePrerequesites.cmake)
# ---[ Options
caffe_option(CPU_ONLY "Build Caffe without CUDA support" OFF) # TODO: rename to USE_CUDA
caffe_option(USE_CUDNN "Build Caffe with cuDNN library support" ON IF NOT CPU_ONLY)
caffe_option(USE_NCCL "Build Caffe with NCCL library support" OFF)
if(MSVC)
# default to static libs
caffe_option(BUILD_SHARED_LIBS "Build shared libraries" OFF)
else()
caffe_option(BUILD_SHARED_LIBS "Build shared libraries" ON)
endif()
caffe_option(BUILD_python "Build Python wrapper" ON)
set(python_version "2" CACHE STRING "Specify which Python version to use")
caffe_option(BUILD_matlab "Build Matlab wrapper" OFF)
caffe_option(BUILD_docs "Build documentation" ON IF UNIX OR APPLE)
caffe_option(BUILD_python_layer "Build the Caffe Python layer" ON)
caffe_option(USE_OPENCV "Build with OpenCV support" ON)
caffe_option(USE_LEVELDB "Build with levelDB" ON)
caffe_option(USE_LMDB "Build with lmdb" ON)
caffe_option(ALLOW_LMDB_NOLOCK "Allow MDB_NOLOCK when reading LMDB files (only if necessary)" OFF)
caffe_option(USE_OPENMP "Link with OpenMP (when your BLAS wants OpenMP and you get linker errors)" OFF)
caffe_option(protobuf_MODULE_COMPATIBLE "Make the protobuf-config.cmake compatible with the module mode" ON IF MSVC)
caffe_option(COPY_PREREQUISITES "Copy the prerequisites next to each executable or shared library directory" ON IF MSVC)
caffe_option(INSTALL_PREREQUISITES "Install the prerequisites next to each executable or shared library directory" ON IF MSVC)
if(MSVC AND BUILD_SHARED_LIBS)
if(CMAKE_GENERATOR MATCHES "Visual Studio")
# see issue https://gitlab.kitware.com/cmake/cmake/issues/16552#note_215236
message(FATAL_ERROR "The Visual Studio generator cannot build a shared library. Use the Ninja generator instead.")
endif()
# Some tests (solver tests) fail when caffe is built as a shared library. The problem comes
# from protobuf that has a global static empty_string_ variable. Since caffe and test.testbin
# link to a static protobuf library both end up with their own instance of the empty_string_
# variable. This causes some SEH exception to occur. In practice if the caffe executable does not link
# to protobuf this problem should not happen. Use at your own risk.
message(WARNING "Some tests (solvers) will fail when building as a shared library with MSVC")
endif()
# ---[ Prebuild dependencies on windows
include(cmake/WindowsDownloadPrebuiltDependencies.cmake)
# ---[ Dependencies
include(cmake/Dependencies.cmake)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++11")
# ---[ Flags
if(UNIX OR APPLE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -Wall")
endif()
caffe_set_caffe_link()
if(USE_libstdcpp)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libstdc++")
message("-- Warning: forcing libstdc++ (controlled by USE_libstdcpp option in cmake)")
endif()
# ---[ Warnings
caffe_warnings_disable(CMAKE_CXX_FLAGS -Wno-sign-compare -Wno-uninitialized)
# ---[ Config generation
configure_file(cmake/Templates/caffe_config.h.in "${PROJECT_BINARY_DIR}/caffe_config.h")
# ---[ Includes
set(Caffe_INCLUDE_DIR ${PROJECT_SOURCE_DIR}/include)
set(Caffe_SRC_DIR ${PROJECT_SOURCE_DIR}/src)
include_directories(${PROJECT_BINARY_DIR})
# ---[ Includes & defines for CUDA
# cuda_compile() does not have per-call dependencies or include pathes
# (cuda_compile() has per-call flags, but we set them here too for clarity)
#
# list(REMOVE_ITEM ...) invocations remove PRIVATE and PUBLIC keywords from collected definitions and include pathes
if(HAVE_CUDA)
# pass include pathes to cuda_include_directories()
set(Caffe_ALL_INCLUDE_DIRS ${Caffe_INCLUDE_DIRS})
list(REMOVE_ITEM Caffe_ALL_INCLUDE_DIRS PRIVATE PUBLIC)
cuda_include_directories(${Caffe_INCLUDE_DIR} ${Caffe_SRC_DIR} ${Caffe_ALL_INCLUDE_DIRS})
# add definitions to nvcc flags directly
set(Caffe_ALL_DEFINITIONS ${Caffe_DEFINITIONS})
list(REMOVE_ITEM Caffe_ALL_DEFINITIONS PRIVATE PUBLIC)
list(APPEND CUDA_NVCC_FLAGS ${Caffe_ALL_DEFINITIONS})
endif()
# ---[ Subdirectories
add_subdirectory(src/gtest)
add_subdirectory(src/caffe)
add_subdirectory(tools)
add_subdirectory(examples)
add_subdirectory(python)
add_subdirectory(matlab)
add_subdirectory(docs)
# ---[ Linter target
add_custom_target(lint COMMAND ${CMAKE_COMMAND} -DPYTHON_EXECUTABLE=${PYTHON_EXECUTABLE} -P ${PROJECT_SOURCE_DIR}/cmake/lint.cmake)
# ---[ pytest target
if(BUILD_python)
if(UNIX)
set(python_executable python${python_version})
else()
set(python_executable ${PYTHON_EXECUTABLE})
endif()
add_custom_target(pytest COMMAND ${python_executable} -m unittest discover -s caffe/test WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/python )
add_dependencies(pytest pycaffe)
endif()
# ---[ uninstall target
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/cmake/Uninstall.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/cmake/Uninstall.cmake
IMMEDIATE @ONLY)
add_custom_target(uninstall
COMMAND ${CMAKE_COMMAND} -P
${CMAKE_CURRENT_BINARY_DIR}/cmake/Uninstall.cmake)
# ---[ Configuration summary
caffe_print_configuration_summary()
# ---[ Export configs generation
caffe_generate_export_configs()
没有合适的资源?快使用搜索试试~ 我知道了~
基于C++的O-CNN(基于八叉树的卷积神经网络)三维形状分析设计源码
共355个文件
cpp:108个
py:84个
hpp:28个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 139 浏览量
2024-04-17
02:29:25
上传
评论
收藏 11.05MB ZIP 举报
温馨提示
本项目是基于C++开发的O-CNN(基于八叉树的卷积神经网络)三维形状分析设计源码,主要使用C++进行开发。项目共包含358个文件,其中C++源代码文件108个,Python源代码文件84个,头文件28个,CUDA源代码文件26个,C++源代码文件26个,C源代码文件23个,Prototxt配置文件22个,Markdown文档14个,YAML配置文件14个,以及Caffemodel模型文件4个。O-CNN是一个用于三维形状分析的框架,它利用八叉树结构来表示和处理三维形状数据,通过卷积神经网络进行特征提取和分类。项目结构清晰,代码注释详尽,适合用于学习和研究C++、Python、CUDA、MATLAB在三维形状分析中的应用。
资源推荐
资源详情
资源评论
收起资源包目录
基于C++的O-CNN(基于八叉树的卷积神经网络)三维形状分析设计源码 (355个子文件)
S55_6.caffemodel 2.31MB
ocnn_M40_6.caffemodel 2.3MB
S55_5.caffemodel 2.3MB
ocnn_M40_5.caffemodel 2.29MB
octree_conv_op.cc 10KB
transform_points_op.cc 9KB
octree_key_op.cc 8KB
octree_max_pool_op.cc 6KB
octree2col_op.cc 6KB
octree_property_op.cc 5KB
octree_grow_op.cc 5KB
octree_align_op.cc 5KB
octree_set_property_op.cc 4KB
points_set_property_op.cc 4KB
octree_pad_op.cc 4KB
octree_bilinear_op.cc 4KB
transform_octree_op.cc 4KB
points_property_op.cc 4KB
octree_gather_op.cc 3KB
points2octree_op.cc 3KB
octree_search_op.cc 3KB
octree_new_op.cc 3KB
octree_update_op.cc 2KB
octree_mask_op.cc 2KB
octree_batch_op.cc 2KB
tensorflow_gpu_gemm.cu.cc 1KB
octree_samples.cc 1KB
octree_samples.cpp 154KB
test_octree.cpp 154KB
octree.cpp 45KB
octree.cpp 31KB
octree_nn.cpp 25KB
marching_cube_table.cpp 19KB
caffe.cpp 18KB
octree_base_conv_layer.cpp 18KB
adaptive_octree.cpp 17KB
transform_octree.cpp 16KB
feature_pooling.cpp 12KB
test_octree.cpp 12KB
mesh.cpp 11KB
test_octree_util.cpp 10KB
test_argmax_layer.cpp 10KB
octree_conv.cpp 9KB
test_eltwise_layer.cpp 9KB
octree_info.cpp 9KB
octree_conv.cpp 9KB
test_octree_conv_layer.cpp 8KB
test_permute_layer.cpp 8KB
math_functions.cpp 8KB
octree2col.cpp 8KB
chamfer_distance.cpp 7KB
octree_property.cpp 7KB
merge_octrees.cpp 7KB
points_parser.cpp 7KB
test_octree_deconv_layer.cpp 7KB
octree_parser.cpp 7KB
octree_grow_layer.cpp 6KB
octree_info.cpp 6KB
upgrade_octree_database.cpp 6KB
test_octree_property_layer.cpp 6KB
octree_database_layer.cpp 6KB
octree_prune.cpp 5KB
build_octree.cpp 5KB
convert_octree_data.cpp 5KB
upgrade_octree.cpp 5KB
contour.cpp 5KB
octree_parser.cpp 5KB
points.cpp 5KB
resize_image_lmdb.cpp 5KB
points_property.cpp 5KB
test_octree2col_layer.cpp 5KB
permute_layer.cpp 5KB
octree_full_voxel_layer.cpp 5KB
octree_pooling_layer.cpp 4KB
play_ground.cpp 4KB
octree_tile_layer.cpp 4KB
octree_unpooling_layer.cpp 4KB
octree2col_layer.cpp 4KB
accuracy_layer.cpp 4KB
points_noise.cpp 4KB
mesh2points.cpp 4KB
octree_property_layer.cpp 4KB
simplify_points.cpp 3KB
test_normalization_layer.cpp 3KB
upgrade_points.cpp 3KB
octree_set_feature_layer.cpp 3KB
argmax_layer.cpp 3KB
marching_cube.cpp 3KB
test_util.cpp 3KB
check_octree.cpp 3KB
octree_key.cpp 3KB
euclidean_loss_layer.cpp 3KB
octree_mask_layer.cpp 3KB
octree_depadding_layer.cpp 3KB
transform_points.cpp 3KB
octree_padding_layer.cpp 3KB
normalize_layer.cpp 3KB
test_octree_nn.cpp 3KB
octree_zbuffer.cpp 3KB
pyoctree.cpp 3KB
共 355 条
- 1
- 2
- 3
- 4
资源评论
沐知全栈开发
- 粉丝: 4743
- 资源: 3374
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 论文(最终)_20240430235101.pdf
- 基于python编写的Keras深度学习框架开发,利用卷积神经网络CNN,快速识别图片并进行分类
- 最全空间计量实证方法(空间杜宾模型和检验以及结果解释文档).txt
- 5uonly.apk
- 蓝桥杯Python组的历年真题
- 2023-04-06-项目笔记 - 第一百十九阶段 - 4.4.2.117全局变量的作用域-117 -2024.04.30
- 2023-04-06-项目笔记 - 第一百十九阶段 - 4.4.2.117全局变量的作用域-117 -2024.04.30
- 前端开发技术实验报告:内含4四实验&实验报告
- Highlight Plus v20.0.1
- 林周瑜-论文.docx
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功