驱动下载链接
nouveau是16系统默认的第三方开源程序,不禁用后面会与NVIDIA显卡驱动安装发生冲突报错
在文档最后面添加以下内容用来禁用
sudo gedit /etc/modprobe.d/blacklist.conf
blacklist nouveau
options nouveau modeset=0
重启
sudo update-initramfs -u
reboot
提前下载好显卡驱动放在/home
准备两台设备
ctrl+alt+f1 进入命令行界面
sudo service lightdm stop
sudo apt-get remove nvidia-*
sudo chmod a+x NVIDIA-Linux-x86_64-470.63.01.run
sudo ./NVIDIA-Linux-x86_64-470.63.01.run -no-x-check -no-nouveau-check
continue installation
yes
ok
sudo service lightdm start
ctrl+alt+f7回到登录界面
查看是否安装完成
nvidia-smi
sudo chmod a+x cuda_8.0.61_375.26_linux.run
sudo sh cuda_8.0.61_375.26_linux.run
部分选择
accept
是否安装显卡驱动 : n
yes
yes
yes
sudo gedit ~/.bashrc
在文件中添加:
export PATH=/usr/local/cuda-8.0/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH
查看cuda:
sudo apt install nvidia-cuda-toolkit
nvcc -V
nvidia官网下载
cudnn6.0 for cuda8.0
cuDNN v6.0 Library for Linux
sudo tar -zxvf cudnn-8.0-linux-x64-v6.0.tgz
解压后会出现一个cuda文件夹
cd cuda
sudo cp include/cudnn.h /usr/local/cuda/include/
sudo cp lib64/libcudnn* /usr/local/cuda/lib64/
sudo chmod a+r /usr/local/cuda/include/cudnn.h /usr/local/cuda/lib64/libcudnn*
查看cudnn版本:
cat /usr/local/cuda/include/cudnn.h | grep CUDNN_MAJOR -A 2
sudo apt-get install libglew-dev
sudo apt-get install cmake
git clone https://github.com/stevenlovegrove/Pangolin.git
cd Pangolin
mkdir build
cd build
cmake ..
make -j12
sudo make install
sudo rm /usr/lib/x86_64-linux-gnu/libGL.so
sudo ln -s /usr/lib/libGL.so.1 /usr/lib/x86_64-linux-gnu/libGL.so
sudo apt-get install build-essential
sudo apt-get install cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev
sudo apt-get install python-dev python-numpy libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev libjasper-dev libdc1394-22-dev
cd opencv-2.4.11
mkdir build
cd build
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -DWITH_CUDA=OFF ..
make -j12
sudo make install
cd eigen-3.1.0
mkdir build
cd build
cmake ..
sudo make install
sudo cp -r /usr/local/include/eigen3 /usr/include
wget https://bootstrap.pypa.io/pip/2.7/get-pip.py
sudo python2 get-pip.py
sudo apt update
sudo apt install --no-install-recommends python2.7-minimal python2.7
sudo apt install python-numpy python-scipy
sudo pip2 install keras==2.0.8
下载Tensorflow-gpu文件:
https://mirrors.tuna.tsinghua.edu.cn/tensorflow/linux/gpu/tensorflow_gpu-1.4.0rc1-cp27-none-linux_x86_64.whl
pip2 install numpy==1.16.1
pip2 install Markdown==2.6.8
sudo pip2 install tensorflow_gpu-1.4.0rc1-cp27-none-linux_x86_64.whl
python
import os
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
import tensorflow as tf
hello = tf.constant('Hello, TensorFlow!')
sess = tf.Session()
sess.run(hello)
sudo ldconfig /usr/local/cuda/lib64
pip install mock==0.8.0
git clone https://github.com/matterport/Mask_RCNN.git
cd Mask_RCNN
pip2 install cpython
sudo apt-get install python-matplotlib
pip2 install future
pip install --upgrade pip
pip install pillow==4.3.0
pip install scikit-image==0.11.3
python -m pip install opencv-python==4.2.0.32
pip install h5py
pip install imageio==2.6.1
pip2 install matplotlib==2.0.0
pip install imgaug
pip2 install notebook
pip2 install qtconsole
pip2 install ipywidgets
pip2 install Sphinx
sudo pip2 install -r requirements.txt
git clone https://github.com/waleedka/coco.git
cd coco/PythonAPI
make
pip install pycocotools
下载dynaslam
wget https://github.com/BertaBescos/DynaSLAM/tree/bbescos/feature/carla
将coco/PythonAPI下的pycocotools文件夹和mask_rcnn_coco.h5放到Dynaslam的src/python目录下。
打开Check.py,将第17行的ROOT_DIR = “src/python”,改为ROOT_DIR = “./”,保存退出。
python Check.py
显示maskrcnn is correct
sudo ldconfig /usr/local/cuda/lib64
DynaSLAM、/Thirdpary/DBoW2和/Thirdparty/g2o三个文件夹下的CMakeLists.txt 将-march=native删除
cv::imshow("DynaSLAM: Current Frame",im);
cv::imshow("DynaSLAM: Dynamic Frame", im_dyn)
修改为:
if(!im.empty())
{
cv::imshow("DynaSLAM: Current Frame",im);
}
if(!im_dyn.empty())
{
cv::imshow("DynaSLAM: Dynamic Frame", im_dyn);
}
cd DynaSLAM
sudo apt-get install cmake qt5-default qtcreator
bash build.sh
cd /usr/lib/x86_64-linux-gnu/
sudo rm libEGL.so
sudo ln -s libEGL.so.1.1.0 libEGL.so
bash build.sh
安装升级参考链接
python associate.py rgb.txt depth.txt > associated.txt
./Examples/RGB-D/rgbd_tum Vocabulary/ORBvoc.txt ./Examples/RGB-D/TUM3.yaml ./data/rgbd_dataset_freiburg3_walking_rpy/ ./data/rgbd_dataset_freiburg3_walking_rpy/associated.txt ./data/mask ./data/output
https://blog.csdn.net/weixin_43951792/article/details/117168783
https://blog.csdn.net/u011622208/article/details/115955663
https://blog.csdn.net/qq_42938987/article/details/83795217
https://blog.csdn.net/zbr794866300/article/details/106564588
https://blog.csdn.net/DD_PP_JJ/article/details/113822166