Ubuntu 19.04安装dlib库imglab(解决libx11-dev等报错)

Ubuntu 19.04安装dlib库imglab(解决libx11-dev等报错)

dlib这个库虽然说非常强大,但是安装使用起来却非常困难,另外新手在使用dlib库做机器学习深度学习的时候强烈建议不要使用Windows系统,最好使用Mac或者Ubuntu系统(CentOS也最好不要用,到处都是坑),博主便是一步一步爬过来的。

首先dlib安装参考我前面的博客(Windows的话也可以安装,但是切记用pip安装python的版本不能高于3.6.5)

https://blog.csdn.net/qq_40695642/article/details/102980444

在安装dlib库中的imglab切记不要去CSDN上下载用积分的,要去官网下载完整的dlib项目!!!

https://github.com/davisking/dlib/tree/master/tools/imglab

把整个项目下载下来

官网上是这样说的

You can compile imglab with the following commands:
    cd dlib/tools/imglab
    mkdir build
    cd build
    cmake ..
    cmake --build . --config Release
Note that you may need to install CMake (www.cmake.org) for this to work.  On a
unix system you can also install imglab into /usr/local/bin by running 
    sudo make install  
This will make running it more convenient.

那么步骤就是如上

错误:

1.在cmake ..时候报错   # 你没有把整个项目都copy下来缺少依赖

2.在cmake --build . --config Release 报错如下

'DLIB_NO_GUI_SUPPORT is defined so you can't use the GUI code. Turn DLIB_NO_GUI_SUPPORT off if you want to use it.' and 'Also make sure you have libx11-dev installed on your system'

首先使用sudo apt install libx11-dev下载libx11-dev

然后su root ## 在root用户下再使用cmake --build . --config Release 亲测有效

如果所安装都正确直接使用imglab就可以打标签了,就可以训练模型去了!

如果有另外的问题欢迎留言,看到后第一时间会回复!

猜你喜欢

转载自blog.csdn.net/qq_40695642/article/details/103137997