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就可以打標籤了,就可以訓練模型去了!

如果有另外的問題歡迎留言,看到後第一時間會回覆!

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章