自己留着,省着忘了
配置Semantic Scene Completion from a Single Depth Image http://sscnet.cs.princeton.edu/

硬件:GPU Quadro M6000 24G

最开始配置了caffe+CUDA8.0+cuDNN6.0+Anaconda2+python2.7
http://www.cnblogs.com/zhbzz2007/p/5499180.html
http://blog.csdn.net/u012604811/article/details/53791222

install anaconda2
http://blog.csdn.net/c406495762/article/details/65449495?locationNum=2&fps=1

Matlab配置
http://blog.csdn.net/lcx543576178/article/details/51376008

然后发现cuDNN版本过新,会报一些参数过少的错误,cuDNN版本改成了“cudnn-8.0-linux-x64-v5.1.tgz”

然后开始了无知的爬坑之旅……
开始不了解,以为自己配置好了cafee,SSCNet给的caffe3d_suncg就不需要管它了……
结果
WARNING: Logging before InitGoogleLogging() is written to STDERR
W0522 11:41:47.128919 31334 _caffe.cpp:139] DEPRECATION WARNING - deprecated use of Python interface
W0522 11:41:47.128947 31334 _caffe.cpp:140] Use this instead (with the named "weights" parameter):
W0522 11:41:47.128952 31334 _caffe.cpp:142] Net('demo.txt', 1, weights='../models/suncg_ft_nyu.caffemodel')
[libprotobuf ERROR google/protobuf/text_format.cc:245] Error parsing text-format caffe.NetParameter: 7:20: Message type "caffe.LayerParameter" has no field named "suncg_data_param".
F0522 11:41:47.130220 31334 upgrade_proto.cpp:88] Check failed: ReadProtoFromTextFile(param_file, param) Failed to parse NetParameter file: demo.txt
*** Check failure stack trace: ***
Aborted (core dumped)

发现问题是,可能并不需要自己编译caffe,而是直接编译作者给的caffe_code即可。
开始想把作者对层的定义和参数复制到源生caffe中,后来放弃。

第二个坑出现了,死活编译不过,错误如下:

In file included from /usr/include/c++/4.8/future:35:0, from /home/mobilear/sscnet/caffe_code/caffe3d_suncg/include/caffe/layers/suncg_data_layer.hpp:4, from /home/mobilear/sscnet/caffe_code/caffe3d_suncg/src/caffe/layers/suncg_data_layer.cu:5: /usr/include/c++/4.8/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support is currently experimental, and must be enabled with the -std=c++11 or -std=gnu++11 compiler options. #error This file requires compiler and library support for the \ ^ CMake Error at cuda_compile_generated_suncg_data_layer.cu.o.cmake:206 (message): Error generating /home/mobilear/sscnet/caffe_code/caffe3d_suncg/src/caffe/CMakeFiles/cuda_compile.dir/layers/./cuda_compile_generated_suncg_data_layer.cu.o

然后我在CMakeList.txt中加入

list(APPEND CUDA_NVCC_FLAGS "-arch=sm_20;-std=c++11;-O2;-DVERBOSE") SET(CUDA_PROPAGATE_HOST_FLAGS OFF)

接着报错:

[ 1%] Built target proto
[ 1%] Building NVCC (Device) object src/caffe/CMakeFiles/cuda_compile.dir/util/./cuda_compile_generated_math_functions.cu.o
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stddef.h(432): error: identifier "nullptr" is undefined/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stddef.h(432): error: expected a ";"/usr/include/x86_64-linux-gnu/c++/4.8/bits/c++config.h(190): error: expected a ";"/usr/include/c++/4.8/exception(63): error: expected a ";"/usr/include/c++/4.8/exception(68): error: expected a ";"/usr/include/c++/4.8/exception(76): error: expected a ";"/usr/include/c++/4.8/exception(83): error: expected a ";"/usr/include/c++/4.8/exception(93): error: expected a "{"/usr/include/c++/4.8/bits/exception_ptr.h(64): error: function "std::current_exception" returns incomplete type "std::__exception_ptr::exception_ptr"/usr/include/c++/4.8/bits/exception_ptr.h(64): error: expected a "{"/usr/include/c++/4.8/bits/exception_ptr.h(79): error: expected a ";"/usr/include/c++/4.8/bits/exception_ptr.h(81): error: expected a ";"/usr/include/c++/4.8/bits/exception_ptr.h(82): error: expected a ";"/usr/include/c++/4.8/bits/exception_ptr.h(84): error: expected a ";"/usr/include/c++/4.8/bits/exception_ptr.h(86): error: declaration is incompatible with previous "std::current_exception"
(64): here/usr/include/c++/4.8/bits/exception_ptr.h(86): error: use of a local type to declare a function/usr/include/c++/4.8/bits/exception_ptr.h(86): error: expected a ";"/usr/include/c++/4.8/bits/exception_ptr.h(87): error: use of a local type to declare a function/usr/include/c++/4.8/bits/exception_ptr.h(90): error: expected a ";"/usr/include/c++/4.8/bits/exception_ptr.h(92): error: expected a ";"/usr/include/c++/4.8/bits/exception_ptr.h(95): error: incomplete type is not allowed/usr/include/c++/4.8/bits/exception_ptr.h(95): error: expected a ";"/usr/include/c++/4.8/bits/exception_ptr.h(116): error: expected a ";"/usr/include/c++/4.8/bits/exception_ptr.h(126): error: expected a ";"/usr/include/c++/4.8/bits/exception_ptr.h(143): error: use of a local type to declare a function/usr/include/c++/4.8/bits/exception_ptr.h(144): error: expected a ";"/usr/include/c++/4.8/bits/exception_ptr.h(147): error: expected a ";"/usr/include/c++/4.8/bits/exception_ptr.h(152): error: use of a local type to declare a function/usr/include/c++/4.8/bits/exception_ptr.h(153): error: expected a ";"/usr/include/c++/4.8/bits/exception_ptr.h(156): error: use of a local type to declare a function/usr/include/c++/4.8/bits/exception_ptr.h(157): error: expected a ";"/usr/include/c++/4.8/bits/exception_ptr.h(160): error: use of a local type to declare a function/usr/include/c++/4.8/bits/exception_ptr.h(161): error: expected a ";"/usr/include/c++/4.8/bits/exception_ptr.h(169): error: expected a ";"/usr/include/c++/4.8/bits/nested_exception.h(57): error: incomplete type is not allowed/usr/include/c++/4.8/bits/nested_exception.h(60): error: expected a ";"/usr/include/c++/4.8/bits/nested_exception.h(66): error: expected a ";"/usr/include/c++/4.8/bits/nested_exception.h(70): error: identifier "rethrow_exception" is undefined/usr/include/c++/4.8/bits/nested_exception.h(73): error: function "std::nested_exception::nested_ptr" returns incomplete type "std::__exception_ptr::exception_ptr"/usr/include/c++/4.8/new(95): error: expected a "{"/usr/include/c++/4.8/new(110): error: identifier "__p" is undefined/usr/include/c++/4.8/new(111): error: expected a "{"/usr/include/c++/4.8/new(115): error: expected a "{"/usr/include/c++/4.8/new(116): error: expected a "{"/usr/local/cuda/include/common_functions.h(106): warning: exception specification is incompatible with that of previous function "operator new[](std::size_t, void *)"
/usr/include/c++/4.8/new(111): here/usr/local/cuda/include/common_functions.h(107): warning: exception specification is incompatible with that of previous function "operator delete(void *, void *)"
/usr/include/c++/4.8/new(115): here/usr/local/cuda/include/common_functions.h(108): warning: exception specification is incompatible with that of previous function "operator delete[](void *, void *)"
/usr/include/c++/4.8/new(116): here/usr/include/c++/4.8/bits/cpp_type_traits.h(184): error: identifier "char16_t" is undefined/usr/include/c++/4.8/bits/cpp_type_traits.h(191): error: identifier "char32_t" is undefined/usr/include/c++/4.8/bits/cpp_type_traits.h(191): error: class "std::__is_integer<>" has already been defined/usr/include/c++/4.8/bits/cpp_type_traits.h(314): error: namespace "std::__gnu_cxx" has no member "__normal_iterator"/usr/include/c++/4.8/bits/cpp_type_traits.h(314): error: expected a ">"/usr/include/c++/4.8/cmath(80): error: inline specifier allowed on function declarations only/usr/include/c++/4.8/cmath(80): error: expected a ";"/usr/include/c++/4.8/cmath(105): error: inline specifier allowed on function declarations only/usr/include/c++/4.8/cmath(105): error: variable "std::constexpr" has already been defined/usr/include/c++/4.8/cmath(105): error: expected a ";"/usr/include/c++/4.8/cmath(124): error: inline specifier allowed on function declarations only/usr/include/c++/4.8/cmath(124): error: variable "std::constexpr" has already been defined/usr/include/c++/4.8/cmath(124): error: expected a ";"/usr/include/c++/4.8/cmath(143): error: inline specifier allowed on function declarations only/usr/include/c++/4.8/cmath(143): error: variable "std::constexpr" has already been defined/usr/include/c++/4.8/cmath(143): error: expected a ";"/usr/include/c++/4.8/cmath(162): error: inline specifier allowed on function declarations only/usr/include/c++/4.8/cmath(162): error: variable "std::constexpr" has already been defined/usr/include/c++/4.8/cmath(162): error: expected a ";"/usr/include/c++/4.8/cmath(183): error: inline specifier allowed on function declarations only/usr/include/c++/4.8/cmath(183): error: variable "std::constexpr" has already been defined/usr/include/c++/4.8/cmath(183): error: expected a ";"/usr/include/c++/4.8/cmath(202): error: inline specifier allowed on function declarations only/usr/include/c++/4.8/cmath(202): error: variable "std::constexpr" has already been defined/usr/include/c++/4.8/cmath(202): error: expected a ";"/usr/include/c++/4.8/cmath(221): error: inline specifier allowed on function declarations only/usr/include/c++/4.8/cmath(221): error: variable "std::constexpr" has already been defined/usr/include/c++/4.8/cmath(221): error: expected a ";"/usr/include/c++/4.8/cmath(240): error: inline specifier allowed on function declarations only/usr/include/c++/4.8/cmath(240): error: variable "std::constexpr" has already been defined/usr/include/c++/4.8/cmath(240): error: expected a ";"/usr/include/c++/4.8/cmath(259): error: inline specifier allowed on function declarations only/usr/include/c++/4.8/cmath(259): error: variable "std::constexpr" has already been defined/usr/include/c++/4.8/cmath(259): error: expected a ";"/usr/include/c++/4.8/cmath(278): error: inline specifier allowed on function declarations only/usr/include/c++/4.8/cmath(278): error: variable "std::constexpr" has already been defined/usr/include/c++/4.8/cmath(278): error: expected a ";"/usr/include/c++/4.8/cmath(297): error: inline specifier allowed on function declarations only/usr/include/c++/4.8/cmath(297): error: variable "std::constexpr" has already been defined/usr/include/c++/4.8/cmath(297): error: expected a ";"/usr/include/c++/4.8/cmath(328): error: "constexpr" is not a function or static data member/usr/include/c++/4.8/cmath(337): error: inline specifier allowed on function declarations only/usr/include/c++/4.8/cmath(337): error: variable "std::constexpr" has already been defined/usr/include/c++/4.8/cmath(337): error: expected a ";"/usr/include/c++/4.8/cmath(356): error: inline specifier allowed on function declarations only/usr/include/c++/4.8/cmath(356): error: variable "std::constexpr" has already been defined/usr/include/c++/4.8/cmath(356): error: expected a ";"/usr/include/c++/4.8/cmath(375): error: inline specifier allowed on function declarations only/usr/include/c++/4.8/cmath(375): error: variable "std::constexpr" has already been defined/usr/include/c++/4.8/cmath(375): error: expected a ";"/usr/include/c++/4.8/cmath(406): error: inline specifier allowed on function declarations only/usr/include/c++/4.8/cmath(406): error: variable "std::constexpr" has already been defined/usr/include/c++/4.8/cmath(406): error: expected a ";"/usr/include/c++/4.8/cmath(443): error: inline specifier allowed on function declarations only/usr/include/c++/4.8/cmath(443): error: variable "std::constexpr" has already been defined/usr/include/c++/4.8/cmath(443): error: expected a ";"Error limit reached.
100 errors detected in the compilation of "/tmp/tmpxft_00008230_00000000-7_math_functions.cpp1.ii".
Compilation terminated.
CMake Error at cuda_compile_generated_math_functions.cu.o.cmake:264 (message):
Error generating file
/home/mobilear/sscnet/caffe_code/caffe3d_suncg/src/caffe/CMakeFiles/cuda_compile.dir/util/./cuda_compile_generated_math_functions.cu.omake[2]: *** [src/caffe/CMakeFiles/cuda_compile.dir/util/./cuda_compile_generated_math_functions.cu.o] Error 1
make[1]: *** [src/caffe/CMakeFiles/caffe.dir/all] Error 2
make: *** [all] Error 2

百思不得其解

最后发现,需要在caffe的源CMakeList.txt中改即可,而不是在src中的CMakeList.txt
相对路径: sscnet/caffe_code/caffe3d_suncg/CMakeList.txt
位置在include(cmake/Dependencies.cmake)后面即可,改后的CMakeList.txt为:

cmake_minimum_required(VERSION 2.8.7)
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-rc3" CACHE STRING "Caffe logical version")
set(CAFFE_TARGET_SOVERSION "1.0.0-rc3" 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(cmake/Utils.cmake)
include(cmake/Targets.cmake)
include(cmake/Misc.cmake)
include(cmake/Summary.cmake)
include(cmake/ConfigGen.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(BUILD_SHARED_LIBS "Build shared libraries" ON)
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 IF UNIX OR APPLE)
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)# ---[ Dependencies
include(cmake/Dependencies.cmake)# ---[ Flags
if(UNIX OR APPLE)set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -Wall")
endif()
list(APPEND CUDA_NVCC_FLAGS "-arch=sm_20;-std=c++11;-O2;-DVERBOSE")
SET(CUDA_PROPAGATE_HOST_FLAGS OFF)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()add_definitions(-DGTEST_USE_OWN_TR1_TUPLE)# ---[ 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)
include_directories(${Caffe_INCLUDE_DIR} ${PROJECT_BINARY_DIR})
include_directories(BEFORE src) # This is needed for gtest.# ---[ 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} -P ${PROJECT_SOURCE_DIR}/cmake/lint.cmake)# ---[ pytest target
if(BUILD_python)add_custom_target(pytest COMMAND python${python_version} -m unittest discover -s caffe/test WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/python )add_dependencies(pytest pycaffe)
endif()# ---[ Configuration summary
caffe_print_configuration_summary()# ---[ Export configs generation
caffe_generate_export_configs()

然后报错:

mobilear@mobilear-HP-Z840-Workstation:~/sscnet/demo$ python demotest_model.py Traceback (most recent call last):File "demotest_model.py", line 9, in <module>import caffe
ImportError: No module named caffe

把环境变量路径放到 ~/.bashrc文件中,打开文件
sudo vim ~/.bashrc
在文件下方写入
export PYTHONPATH=~/caffe/python:$PYTHONPATH
上述语句中 “~” 号表示caffe 所在的根目录。
http://blog.csdn.net/u010417185/article/details/53559107

再次出错:
ImportError: No module named google.protobuf.internal
我装的是anaconda2, 解决方法是在其中安装protobuf最新版本
sudo chmod 777 -R anaconda2
conda install protobuf
http://blog.csdn.net/wuzuyu365/article/details/52431062

接下来准备使用自己的RGB-D数据来用网络跑下结果,我看github中有人问这个问题,感觉又会是一个坑=。=期待早出。

SSCNet环境搭建相关推荐

  1. Anaconda3+python3.7.10+TensorFlow2.3.0+PyQt5环境搭建

    Anaconda3+python3.7.10+TensorFlow2.3.0+PyQt5环境搭建 一.Anaconda 创建 python3.7环境 1.进入 C:\Users\用户名 目录下,找到 ...

  2. Windows10+Anaconda3+Pycharm环境搭建

    Windows10+Anaconda3+Pycharm环境搭建 一.安装Anaconda3 1.进入 anconda官网,下载Anaconda3 2.安装,选项默认继续安装(可以自行更改安装位置),等 ...

  3. SpringCloud Alibaba微服务实战(一) - 基础环境搭建

    说在前面 Spring Cloud Alibaba 致力于提供微服务开发的一站式解决方案.此项目包含开发分布式应用微服务的必需组件,方便开发者通过 Spring Cloud 编程模型轻松使用这些组件来 ...

  4. 2021年大数据环境搭建(二):分布式环境搭建

    2021大数据领域优质创作博客,带你从入门到精通,该博客每天更新,逐渐完善大数据各个知识体系的文章,帮助大家更高效学习. 有对大数据感兴趣的可以关注微信公众号:三帮大数据 目录 分布式环境搭建 集群规 ...

  5. 2021年大数据Spark(八):环境搭建集群模式 Standalone HA

    环境搭建-Standalone HA 高可用HA Spark Standalone集群是Master-Slaves架构的集群模式,和大部分的Master-Slaves结构集群一样,存在着Master单 ...

  6. 2021年大数据Spark(六):环境搭建集群模式 Standalone

    目录 环境搭建-Standalone 前言 Standalone 架构 ​​​​​​​集群规划 修改配置并分发 修改slaves ​​​​​​​分发到其他机器 修改spark-env.sh 集群启动和 ...

  7. CentOS7环境搭建使用PhpStorm上传代码

    一.虚拟机介绍 虚拟机(Virtual Machine)指通过软件模拟的具有完整硬件系统功能的.运行在一个完全隔离环境中的完整计算机系统. 虚拟系统通过生成现有操作系统的全新虚拟镜像,它具有真实win ...

  8. window10 系统上 ecplise 环境搭建

    ecplise 安装需要用到  JDK 环境的搭建以及ecplise 的下载 这两部完成即可 一: JDK环境搭建 到官网上下载JDK并且安装即可(下载的时候注意选择Accept License Ag ...

  9. centOS7 LNMP+phpmyadmin环境搭建 第三篇phpmyadmin安装

    这篇文章主要介绍了CentOS7 LNMP+phpmyadmin环境搭建,第三篇phpmyadmin安装,具有一定的参考价值,感兴趣的小伙伴们可以参考一下 之前我们已经安装了lnmp的环境,现在让我们 ...

最新文章

  1. Web中的积累:外观模式 Facade
  2. iOS利用通知(NSNotification)进行传值
  3. Spring MVC 入门
  4. MYSQL数据同步到ES7
  5. MSN和QQ文件传输速度解析
  6. JS中的预编译(词法分析)阶段和执行阶段
  7. 收发一体超声波测距离传感器模块_芜湖低功耗超声波液位计物位计设备排名
  8. JavaJDBC【三、增删改查】
  9. PSD分层情人节海报模板,让人眼前一亮
  10. poj 1704 HDU-4315 阶梯博弈
  11. php外壳函数,php 方法笔记
  12. 指针变量本质(四十三)
  13. C语言---数字迷宫
  14. FlashDevelop 3.0.0 Rc2 版本下载
  15. 基于springboot的物流管理系统设计与实现 JAVA MYSQL
  16. Apple Pay 接入
  17. Python功能使用学习笔记(4)--链接数据库
  18. 工业级手持式扫描仪3d扫描首选迪万科技抄数服务
  19. 数字先锋 | 天翼云牵手中能融合
  20. SSR在天猫优品大促会场的探索实践

热门文章

  1. gateway使用教程
  2. Python实战之小说下载神器(二)整本小说下载:看小说不用这个程序,我实在替你感到可惜*(小说爱好者必备)
  3. Java:DateUtils 获取 本上下(周/月)周一周日 最后一天 当月多少天
  4. Java小项目——客户的关系管理系统
  5. 机器学习:数据预处理之独热编码(One-Hot)详解
  6. 介词短语就这三类用法
  7. Linux怎么查看软件安装路径 查看mysql安装在哪
  8. 基于 PIR 的运动检测:传感器解决方案
  9. cache object script基本结构---Cache变量,变量名称,定义,特殊的变量
  10. cad转dxf格式文件太大,将CAD图纸文件进行转换成低版本DXF格式如何进行?