ubuntu18.04+GPU+CUDA环境下使用dlib流程整理

前端之家收集整理的这篇文章主要介绍了ubuntu18.04+GPU+CUDA环境下使用dlib流程整理前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

GPU部分参考:ubuntu使用命令安装GPU驱动和CUDA

1、下载dlib

git clone https://github.com/davisking/dlib.git

2、编译安装dlib

cd dlib

mkdir build && cd build && cmake .. && make -j8

sudo make install

sudo apt-get -y install libopenblas-dev

sudo python setup.py install --yes USE_AVX_INSTRUCTIONS

3、安装依赖:

sudo apt-get install python-dev

sudo apt-get update --fix-missing

sudo apt-get install python-opencv

sudo apt-get install python-scipy

sudo apt-get install python-numpy

sudo apt-get install python-matplotlib

这里可以一条命令安装完,不再赘述。

4、安装dlib:

sudo python setup.py install --yes USE_AVX_INSTRUCTIONS

5、编译时出现过的问题:

a、error--unsupportedGNUversion!gccversionslaterthan5.3arenotsupported!

解决方法

find / -name "host_config.h"

找到相应路径打开并修改,如下:

  1. #if__GNUC__>5||(__GNUC__==5&&__GNUC_MINOR__>3)
  2. //#error--unsupportedGNUversion!gccversionslaterthan5.3arenotsupported!
  3. #endif/*__GNUC__>5||(__GNUC__==5&&__GNUC_MINOR__>1)*/
原文链接:https://www.f2er.com/ubuntu/349414.html

猜你在找的Ubuntu相关文章