最后的部分版本信息:
虚拟机 ubantu20.0.4
opencv 2.4.11
h5py 2.10.0
keras 2.0.9
numpy 1.16.6
pillow 6.2.2
python 2.7.18
pycocotools 2.0.3
scikit-image 0.14.5
tensorflow 1.4.0
超详细Ubuntu安装Anaconda步骤+Anconda常用命令
如果您希望 conda 的基础环境在启动时不被激活,请将 auto_activate_base 参数设置为 false
,命令如下:conda config --set auto_activate_base false
当然这一条命令执行完毕后,想要再次进入conda的base环境,只需要使用对应的conda指令即可,如下:
conda activate base
实跑DynaSLAM
参考:关于运行DynaSLAM源码这档子事(OpenCV3.x版)
sudo apt-get install libboost-all-dev
git clone https://github.com/BertaBescos/DynaSLAM.git
作用:这个是当pycocotools安装不成功的时候,就用这个来安装
git clone https://github.com/waleedka/coco.git
DynaSLAM
源码git clone https://github.com/BertaBescos/DynaSLAM.git
mask_rcnn_coco.h5
文件mask_rcnn_coco.h5
复制到DynaSLAM/src/python/
下注:找不到的拉到页面的最下面。
这里先在Anaconda创建一个新的虚拟环境并激活,然后在虚拟环境中依次安装tensorflow和keras。
防止走弯路,可以先把第四部分看完再安装,因为我中间也有报错的部分
conda create -n MaskRCNN python=2.7
conda activate MaskRCNN
pip install tensorflow==1.4.0 #或者 pip install tensorflow-gpu==1.4.0
pip install keras==2.0.9
注:我最开始安装的是tensorflow==1.14.0,但是各种报错,最后的结果是1.4.0版本。
sudo pip install scikit-image
我在安装sudo pip install scikit-image
时,说我numpy
版本过低,pillow
版本过低。
//升级numpy和pillow
sudo pip install numpy==1.19.2
sudo pip install pillow==8.3.2
pip install pycocotools
我的没报错,可能是用了VPN的原因。
报错的话参考 :3.2 关于pycocotools的报错
git clone https://github.com/waleedka/coco
pip install Cython
pip install fasttext
安装COCO工具箱
cd coco
cd PythonAPI
which python
sudo /home/cgm/anaconda3/envs/MaskRCNN/bin/python setup.py install
解决:ImportError: No module named Cython.Build
build/lib.linux-x86_64-2.7/pycocotools
文件夹里的内容替换到 pycocotools
文件夹中python src/python/Check.py
ImportError: No module named skimage.io
解决参考 解决已安装scikit-image不能导入skimage的问题
我最后安装的是scikit-image==0.14.5,而不是这里的0.14.0,因为0.14.0还是有其他的报错。
PS(马后炮): 我感觉这里sudo pip install scikit-image==0.14.5就好了
python src/python/Check.py
ImportError: cannot import name _validate_lengths
网上绝大多数回答是:
numpy版本太高,对numpy进行重新安装:
pip install numpy==1.15.0
**但是降低版本会引来其他很多问题,因此我认为这不是很好的解决方式。**我现在的numpy=16.6.0
解决办法:
pip install -U scikit-image
我这里scikit-image就是从0.14.0
升级到0.14.5
我最后还是把tensorflow 从 1.14.0 降到 1.4.0 了
发现在运行Check.py时会报utils.py中的scipy.misc.imresize不可用的错误
解决方法:D8异常处理
(我没遇到这个问题)scipy1.3.0后imresize被弃用,我的scipy1.2.3。
再次运行
python src/python/Check.py
如果输出为Mask R-CNN is correctly working,就可以下一步了。
(MaskRCNN) cgm@ubuntu:~/DynaSLAM$ conda list
# packages in environment at /home/cgm/anaconda3/envs/MaskRCNN:
#
# Name Version Build Channel
_libgcc_mutex 0.1 main
_openmp_mutex 5.1 1_gnu
absl-py 0.15.0 pypi_0 pypi
astor 0.8.1 pypi_0 pypi
backports-functools-lru-cache 1.6.4 pypi_0 pypi
backports-weakref 1.0.post1 pypi_0 pypi
bleach 1.5.0 pypi_0 pypi
ca-certificates 2022.07.19 h06a4308_0
certifi 2020.6.20 pyhd3eb1b0_3
cloudpickle 1.3.0 pypi_0 pypi
cycler 0.10.0 pypi_0 pypi
cython 0.29.32 pypi_0 pypi
dask 1.2.2 pypi_0 pypi
decorator 4.4.2 pypi_0 pypi
enum34 1.1.10 pypi_0 pypi
funcsigs 1.0.2 pypi_0 pypi
futures 3.3.0 pypi_0 pypi
gast 0.5.3 pypi_0 pypi
google-pasta 0.2.0 pypi_0 pypi
grpcio 1.41.1 pypi_0 pypi
h5py 2.10.0 pypi_0 pypi
html5lib 0.9999999 pypi_0 pypi
keras 2.0.9 pypi_0 pypi
keras-applications 1.0.8 pypi_0 pypi
keras-preprocessing 1.1.2 pypi_0 pypi
kiwisolver 1.1.0 pypi_0 pypi
libffi 3.3 he6710b0_2
libgcc-ng 11.2.0 h1234567_1
libgomp 11.2.0 h1234567_1
libstdcxx-ng 11.2.0 h1234567_1
markdown 3.1.1 pypi_0 pypi
matplotlib 2.2.5 pypi_0 pypi
mock 3.0.5 pypi_0 pypi
ncurses 6.3 h5eee18b_3
networkx 2.2 pypi_0 pypi
numpy 1.16.6 pypi_0 pypi
pillow 6.2.2 pypi_0 pypi
pip 19.3.1 py27_0
protobuf 3.17.3 pypi_0 pypi
pycocotools 2.0.3 pypi_0 pypi
pyparsing 2.4.7 pypi_0 pypi
python 2.7.18 ha1903f6_2
python-dateutil 2.8.2 pypi_0 pypi
pytz 2022.2.1 pypi_0 pypi
pywavelets 1.0.3 pypi_0 pypi
pyyaml 5.4.1 pypi_0 pypi
readline 8.1.2 h7f8727e_1
scikit-image 0.14.5 pypi_0 pypi
scipy 1.2.3 pypi_0 pypi
setuptools 44.0.0 py27_0
six 1.16.0 pypi_0 pypi
sqlite 3.39.2 h5082296_0
subprocess32 3.5.4 pypi_0 pypi
tensorboard 1.14.0 pypi_0 pypi
tensorflow 1.4.0 pypi_0 pypi
tensorflow-estimator 1.14.0 pypi_0 pypi
tensorflow-tensorboard 0.4.0 pypi_0 pypi
termcolor 1.1.0 pypi_0 pypi
tk 8.6.12 h1ccaba5_0
toolz 0.10.0 pypi_0 pypi
werkzeug 1.0.1 pypi_0 pypi
wheel 0.37.1 pyhd3eb1b0_0
wrapt 1.14.1 pypi_0 pypi
zlib 1.2.12 h5eee18b_3
注意版本:tensorflow 1.4.0
h5py 2.10.0
keras 2.0.9
numpy 1.16.6
pillow 6.2.2
python 2.7.18
pycocotools 2.0.3
scikit-image 0.14.5
tensorflow 1.4.0
查看DynaSLAM的CMakeLists.txt 可知需要2.4.11或者3.0,我电脑是OpenCV4.2.0,现在安装OpenCV2.4.11双版本共存。
pkg-config opencv --modversion
我的要opencv4才能才看?不知道是不是cmake的时候相关的命令没输上去。
pkg-config opencv4 --modversion
官网opencv 2.4.11安装包
下载好后
mkdir build
cd build
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local/opencv2.4.11 -DENABLE_PRECOMPILED_HEADERS=OFF -D WITH_FFMPEG=OFF ..
make -j4
sudo make install
注:第三行和 cmake .. 一样,有两个点点
我最开始运行的命令是cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local/opencv2.4.11 ..
会出错
用cmake ..
也是报错如下
解决:将OpenCVDetectCXXCompiler.cmake
的内容替换为如下:
# ----------------------------------------------------------------------------
# Detect Microsoft compiler:
# ----------------------------------------------------------------------------
if(CMAKE_CL_64)
set(MSVC64 1)
endif()
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
set(CMAKE_COMPILER_IS_GNUCXX 1)
set(CMAKE_COMPILER_IS_CLANGCXX 1)
endif()
if(CMAKE_C_COMPILER_ID STREQUAL "Clang")
set(CMAKE_COMPILER_IS_GNUCC 1)
set(CMAKE_COMPILER_IS_CLANGCC 1)
endif()
if("${CMAKE_CXX_COMPILER};${CMAKE_C_COMPILER}" MATCHES "ccache")
set(CMAKE_COMPILER_IS_CCACHE 1)
endif()
# ----------------------------------------------------------------------------
# Detect Intel ICC compiler -- for -fPIC in 3rdparty ( UNIX ONLY ):
# see include/opencv/cxtypes.h file for related ICC & CV_ICC defines.
# NOTE: The system needs to determine if the '-fPIC' option needs to be added
# for the 3rdparty static libs being compiled. The CMakeLists.txt files
# in 3rdparty use the CV_ICC definition being set here to determine if
# the -fPIC flag should be used.
# ----------------------------------------------------------------------------
if(UNIX)
if (__ICL)
set(CV_ICC __ICL)
elseif(__ICC)
set(CV_ICC __ICC)
elseif(__ECL)
set(CV_ICC __ECL)
elseif(__ECC)
set(CV_ICC __ECC)
elseif(__INTEL_COMPILER)
set(CV_ICC __INTEL_COMPILER)
elseif(CMAKE_C_COMPILER MATCHES "icc")
set(CV_ICC icc_matches_c_compiler)
endif()
endif()
if(MSVC AND CMAKE_C_COMPILER MATCHES "icc|icl")
set(CV_ICC __INTEL_COMPILER_FOR_WINDOWS)
endif()
# ----------------------------------------------------------------------------
# Detect GNU version:
# ----------------------------------------------------------------------------
if(CMAKE_COMPILER_IS_CLANGCXX)
set(CMAKE_GCC_REGEX_VERSION "4.2.1")
set(CMAKE_OPENCV_GCC_VERSION_MAJOR 4)
set(CMAKE_OPENCV_GCC_VERSION_MINOR 2)
set(CMAKE_OPENCV_GCC_VERSION 42)
set(CMAKE_OPENCV_GCC_VERSION_NUM 402)
execute_process(COMMAND ${CMAKE_CXX_COMPILER} ${CMAKE_CXX_COMPILER_ARG1} -v
ERROR_VARIABLE CMAKE_OPENCV_CLANG_VERSION_FULL
ERROR_STRIP_TRAILING_WHITESPACE)
string(REGEX MATCH "version.*$" CMAKE_OPENCV_CLANG_VERSION_FULL "${CMAKE_OPENCV_CLANG_VERSION_FULL}")
string(REGEX MATCH "[0-9]+\\.[0-9]+" CMAKE_CLANG_REGEX_VERSION "${CMAKE_OPENCV_CLANG_VERSION_FULL}")
elseif(CMAKE_COMPILER_IS_GNUCXX)
execute_process(COMMAND ${CMAKE_CXX_COMPILER} ${CMAKE_CXX_COMPILER_ARG1} -dumpversion
OUTPUT_VARIABLE CMAKE_OPENCV_GCC_VERSION_FULL
OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(COMMAND ${CMAKE_CXX_COMPILER} ${CMAKE_CXX_COMPILER_ARG1} -v
ERROR_VARIABLE CMAKE_OPENCV_GCC_INFO_FULL
OUTPUT_STRIP_TRAILING_WHITESPACE)
# Typical output in CMAKE_OPENCV_GCC_VERSION_FULL: "c+//0 (whatever) 4.2.3 (...)"
# Look for the version number, major.minor.build
string(REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]+" CMAKE_GCC_REGEX_VERSION "${CMAKE_OPENCV_GCC_VERSION_FULL}")
if(NOT CMAKE_GCC_REGEX_VERSION)#major.minor
string(REGEX MATCH "[0-9]+\\.[0-9]+" CMAKE_GCC_REGEX_VERSION "${CMAKE_OPENCV_GCC_VERSION_FULL}")
endif()
if(CMAKE_GCC_REGEX_VERSION)
# Split the parts:
string(REGEX MATCHALL "[0-9]+" CMAKE_OPENCV_GCC_VERSIONS "${CMAKE_GCC_REGEX_VERSION}")
list(GET CMAKE_OPENCV_GCC_VERSIONS 0 CMAKE_OPENCV_GCC_VERSION_MAJOR)
list(GET CMAKE_OPENCV_GCC_VERSIONS 1 CMAKE_OPENCV_GCC_VERSION_MINOR)
else()#compiler returned just the major version number
string(REGEX MATCH "[0-9]+" CMAKE_GCC_REGEX_VERSION "${CMAKE_OPENCV_GCC_VERSION_FULL}")
if(NOT CMAKE_GCC_REGEX_VERSION)#compiler did not return anything reasonable
set(CMAKE_GCC_REGEX_VERSION "0")
message(WARNING "GCC version not detected!")
endif()
set(CMAKE_OPENCV_GCC_VERSION_MAJOR ${CMAKE_GCC_REGEX_VERSION})
set(CMAKE_OPENCV_GCC_VERSION_MINOR 0)
endif()
set(CMAKE_OPENCV_GCC_VERSION ${CMAKE_OPENCV_GCC_VERSION_MAJOR}${CMAKE_OPENCV_GCC_VERSION_MINOR})
math(EXPR CMAKE_OPENCV_GCC_VERSION_NUM "${CMAKE_OPENCV_GCC_VERSION_MAJOR}*100 + ${CMAKE_OPENCV_GCC_VERSION_MINOR}")
message(STATUS "Detected version of GNU GCC: ${CMAKE_OPENCV_GCC_VERSION} (${CMAKE_OPENCV_GCC_VERSION_NUM})")
if(WIN32)
execute_process(COMMAND ${CMAKE_CXX_COMPILER} -dumpmachine
OUTPUT_VARIABLE OPENCV_GCC_TARGET_MACHINE
OUTPUT_STRIP_TRAILING_WHITESPACE)
if(OPENCV_GCC_TARGET_MACHINE MATCHES "amd64|x86_64|AMD64")
set(MINGW64 1)
endif()
endif()
endif()
if(MSVC64 OR MINGW64)
set(X86_64 1)
elseif(MINGW OR (MSVC AND NOT CMAKE_CROSSCOMPILING))
set(X86 1)
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "amd64.*|x86_64.*|AMD64.*")
set(X86_64 1)
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "i686.*|i386.*|x86.*|amd64.*|AMD64.*")
set(X86 1)
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(arm.*|ARM.*)")
set(ARM 1)
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(aarch64.*|AARCH64.*)")
set(AARCH64 1)
endif()
# Workaround for 32-bit operating systems on 64-bit x86_64 processor
if(X86_64 AND CMAKE_SIZEOF_VOID_P EQUAL 4 AND NOT FORCE_X86_64)
message(STATUS "sizeof(void) = 4 on x86 / x86_64 processor. Assume 32-bit compilation mode (X86=1)")
unset(X86_64)
set(X86 1)
endif()
# Similar code exists in OpenCVConfig.cmake
if(NOT DEFINED OpenCV_STATIC)
# look for global setting
if(NOT DEFINED BUILD_SHARED_LIBS OR BUILD_SHARED_LIBS)
set(OpenCV_STATIC OFF)
else()
set(OpenCV_STATIC ON)
endif()
endif()
if(MSVC)
if(CMAKE_CL_64)
set(OpenCV_ARCH x64)
elseif((CMAKE_GENERATOR MATCHES "ARM") OR ("${arch_hint}" STREQUAL "ARM") OR (CMAKE_VS_EFFECTIVE_PLATFORMS MATCHES "ARM|arm"))
# see Modules/CmakeGenericSystem.cmake
set(OpenCV_ARCH ARM)
else()
set(OpenCV_ARCH x86)
endif()
if(MSVC_VERSION EQUAL 1400)
set(OpenCV_RUNTIME vc8)
elseif(MSVC_VERSION EQUAL 1500)
set(OpenCV_RUNTIME vc9)
elseif(MSVC_VERSION EQUAL 1600)
set(OpenCV_RUNTIME vc10)
elseif(MSVC_VERSION EQUAL 1700)
set(OpenCV_RUNTIME vc11)
elseif(MSVC_VERSION EQUAL 1800)
set(OpenCV_RUNTIME vc12)
elseif(MSVC_VERSION EQUAL 1900)
set(OpenCV_RUNTIME vc14)
elseif(MSVC_VERSION EQUAL 1910)
set(OpenCV_RUNTIME vc15)
endif()
elseif(MINGW)
set(OpenCV_RUNTIME mingw)
if(MINGW64)
set(OpenCV_ARCH x64)
else()
set(OpenCV_ARCH x86)
endif()
endif()
安装opencv编译过程中几个不常见的小错误
编译到12%时报错 fatal error: stdlib.h: 没有那个文件或目录,可能要往上翻一翻找到红字error的部分。
解决方案:cmake的时候在命令后面加上
-DENABLE_PRECOMPILED_HEADERS=OFF
编译到14%时一长串的错误,全都是一个类型:error: ‘CODEC_ID_H264’ was not declared in this scope
{ CODEC_ID_H264, MKTAG(‘H’, ‘2’, ‘6’, ‘4’) }
还有这种错误 ``error: ‘PIX_FMT_YUV444P’ was not declared in this scope;
解决方案:cmake直接关闭ffmpeg,在cmake命令后面加上
-D WITH_FFMPEG=OFF
解决方案:假设opencv中生成的临时编译文件为build,则在文件中找到./build/modules/contrib/CMakeFiles/opencv_contrib.dir/flags.make,删除第四行中的-Werror=address。
rgbdodometry.cpp:65:12: fatal error: unsupported/Eigen/MatrixFunctions: 没有那个文件或目录
解决方案:在rgbdodometry.cpp的65行加上eigen3
#include
//或者
#include
sudo mkdir -p /usr/local/opencv2.4.11
sudo gedit ~/.bashrc
//在文件末尾加上下面两行:
#export PKG_CONFIG_PATH="/usr/local/opencv2.4.11/lib/pkgconfig:$PKG_CONFIG_PATH"
#export LD_LIBRARY_PATH="/usr/local/opencv2.4.11/lib:$LD_LIBRARY_PATH"
//保存之后
//更新环境
source ~/.bashrc
//查看opencv的版本
pkg-config --modversion opencv
使用另一个版本(我的是4.2.0)的时候,同样终端输入 gedit ~/.bashrc
就将前两行的#号去掉两行即可(取消注释)。
记得要 source ~/.bashrc
bbescos/feature/carla
分支的DynaSLAM源码//通过以下命令可以克隆带有carla文件的源码
git clone -b bbescos/feature/carla https://github.com/BertaBescos/DynaSLAM
PS:如果克隆的master分支,master分支里没有mono_carla.cc这个文件,需要注释掉
git clone https://github.com/BertaBescos/DynaSLAM
//注释master分支的CMakeLists.txt的末尾部分
# add_executable(mono_carla
# Examples/Monocular/mono_carla.cc)
# target_link_libraries(mono_carla ${PROJECT_NAME})
注:master里没有mono_carla.cc这个文件
注意:在我们之前创建的MaskRCNN环境下运行./build.sh
cgm@ubuntu:~$ conda activate MaskRCNN
(MaskRCNN) cgm@ubuntu:~$ cd DynaSLAM/
(MaskRCNN) cgm@ubuntu:~/DynaSLAM$ chmod +x build.sh
(MaskRCNN) cgm@ubuntu:~/DynaSLAM$ ./build.sh
(1)将Dynaslam根目录中的CMakeLists.txt 以及 Thirdparty中DBoW2和g2o中的CMakeLists.txt文件中的 -march=native
去掉 (否则会报核心转储的错误)
//快速去掉的操作是:vscode里 ctrl+shift+F 打开搜索框,输入`-march=native` 进行全部替换
注:我最后的测试发现不删掉也可以运行。
(2)修改有错误的文件:
viewer.cc
中,按Ctrl+F查找imshow,我们可以看到2个imshow,而且调用之前没有判断,会在某些情况导致程序终止。我们将两句话依次对应替换即可(其实就是先if(!image.empty())判断一下) pangolin::FinishFrame();
cv::Mat im = mpFrameDrawer->DrawFrame();
//cv::imshow("DynaSLAM: Current Frame",im); //替换为如下if语句
if(!im.empty())
{
cv::imshow("DynaSLAM: Current Frame",im);
}
cv::Mat im_dyn = mpFrameDrawer->GetDynamicFrame();
//cv::imshow("DynaSLAM: Dynamic Frame", im_dyn); //替换为如下if语句
if(!im_dyn.empty())
{
cv::imshow("DynaSLAM: Dynamic Frame", im_dyn);
}
我测试的是不修改这个会闪退
注意:master分支``viewer.cc
是这样的
(3)报错:/usr/include/c++/9/bits/stl_map.h:122:71: error: static assertion failed: std::map
must have the same value_type as its allocator
//打开LoopClosing.h,将
typedef map<KeyFrame*,g2o::Sim3,std::less<KeyFrame*>,
Eigen::aligned_allocator<std::pair<const KeyFrame*, g2o::Sim3> > > KeyFrameAndPose;
//改为
typedef map<KeyFrame*,g2o::Sim3,std::less<KeyFrame*>,
Eigen::aligned_allocator<std::pair<KeyFrame *const, g2o::Sim3> > > KeyFrameAndPose;
(4)报错:
In file included from /home/cgm/DynaSLAM/src/Conversion.cc:9:/home/cgm/DynaSLAN/include/Conversion.h:17:10: fatal error: ndarrayobject.h:没有那个文件或目录
17|#include "ndarrayobject.h"
compilation terminated .
解决办法:在anaconda3/envs
下搜索ndarrayobject.h
,复制其路径,添加到ndarrayobject.h
上
//Conversion.h
//将
#include "ndarrayobject.h"
//改为正确的python2.7下的路径
#include "/home/cgm/anaconda3/envs/MaskRCNN/lib/python2.7/site-packages/numpy/core/include/numpy/ndarrayobject.h"
对于TUM 动态序列,这些关联文件在./Examples/RGB-D/associations/
的文件夹中给出。
例如我们使用 数据集TUM的DYNAMIC OBJECTS下的(rgbd_dataset_freiburg2_desk_with_person
)
使用associate.py
将数据集中的RGB图片和深度图建立关联
原因:
Kinect 以非同步方式提供颜色和深度图像。这意味着来自彩色图像的时间戳集不会与深度图像的时间戳集相交。因此,我们需要某种方式将彩色图像与深度图像相关联。
为此,您可以使用“associate.py”脚本。rgb.txt
文件和从文件中读取时间戳depth.txt
,并通过查找最佳匹配来连接它们。
点这里下载associate.py。
conda activate MaskRCNN
python associate.py rgb.txt depth.txt > rgbd_dataset_freiburg2_desk_with_person.txt
说明:
./Examples/RGB-D/rgbd_tum
,传入参数分别为:ORB字典、配置信息、数据集路径、Mask目录、OUTPUT目录。其中mask目录和output目录是我们新建的。PATH_TO_MASKS
,Mask R-CNN
用于分割每一帧的潜在动态内容。这些mask保存在提供的文件夹 PATH_TO_MASKS 中。如果此参数为 no_save,则使用mask但不保存。如果它在 PATH_TO_MASKS 中找到 Mask R-CNN 计算的动态掩码,它会使用它们但不会再次计算它们。(1)如果未提供 PATH_TO_MASKS 和 PATH_TO_OUTPUT,则仅使用几何方法检测动态对象。
./Examples/RGB-D/rgbd_tum Vocabulary/ORBvoc.txt Examples/RGB-D/TUM3.yaml ../DataSet/TUM_Dataset/rgbd_dataset_freiburg3_walking_xyz/ Examples/RGB-D/associations/fr3_walking_xyz.txt
sudo apt install libcanberra-gtk-module
DynaSLAM:Dynamic Frame窗口里面没有东西??
evo_ape tum groundtruth.txt KeyFrameTrajectory.txt --plot -va --plot_mode xy
(2)有PATH_TO_MASKS
./Examples/RGB-D/rgbd_tum Vocabulary/ORBvoc.txt Examples/RGB-D/TUM3.yaml ../DataSet/TUM_Dataset/rgbd_dataset_freiburg3_walking_xyz/ Examples/RGB-D/associations/fr3_walking_xyz.txt /data/mask
报错:Initializing Mask RCNN network. …
./ src/ python
Creating net instance. …
Loading net parameters. …
段错误(核心已转储)
我以为是如下的这个问题,但还是报错。最后测试的是,不修改这个也可以运行。
编译的时候是找的 libpython3.8.so
我想的解决办法是:我们自己设置 libpython2.7.so
的路径
set( PYTHON_LIBRARY /home/cgm/anaconda3/envs/MaskRCNN/lib/libpython2.7.so)
找到问题所在:
我有看了一下是 ./ src/ python
这个时候报的Creating net instance. ..Loading net parameters. ..
也就是加载Mask RCNN网络参数出的错。
然后我发现,因为我切换源码分支的原因,没有把文件mask_rcnn_coco.h5
复制到DynaSLAM/src/python/
下!!!
Geometry not working.
Light Tracking not working because Tracking is not initialized...
//TUM3.yaml文件
//ORB Extractor: Number of features per image
ORBextractor.nFeatures: 3000
运行着运行着(卡着卡着)就这样了…
Light Tracking not working because Tracking is not initialized...
Geometry not working.
New map created with 764 points
OpenCV Error: Assertion failed (a_size.width == len) in gemm, file /home/cgm/opencv-2.4.11/modules/core/src/matmul.cpp, line 728
terminate called after throwing an instance of 'cv::Exception'
what(): /home/cgm/opencv-2.4.11/modules/core/src/matmul.cpp:728: error: (-215) a_size.width == len in function gemm
已放弃 (核心已转储)
**whatever ......太卡了**