圖像標注工具labelImg安裝記錄


這里僅記載下labelImg的安裝過程,因為有坑。

我的安裝方式是從源碼編譯,環境ubuntu16.04,一開始是使用python2安裝,從github上下載好源碼,然后執行安裝命令

sudo apt-get install pyqt4-dev-tools
sudo pip install lxml
make qt4py2
python labelImg.py

make qt4py2的時候,會顯示如下

pyrcc4 -py2 -o resources.py resources.qrc
Couldn't open /home/wzy/labelImg-master/icons/next.png
Couldn't open /home/wzy/labelImg-master/icons/zoom-out.png
Couldn't open /home/wzy/labelImg-master/icons/format_voc.png
Couldn't open /home/wzy/labelImg-master/icons/expert2.png
Couldn't open /home/wzy/labelImg-master/icons/copy.png
Couldn't open /home/wzy/labelImg-master/icons/format_yolo.png
Couldn't open /home/wzy/labelImg-master/icons/color_line.png
Couldn't open /home/wzy/labelImg-master/icons/prev.png
Couldn't open /home/wzy/labelImg-master/icons/cancel.png
Couldn't open /home/wzy/labelImg-master/icons/edit.png
Couldn't open /home/wzy/labelImg-master/icons/labels.png
Couldn't open /home/wzy/labelImg-master/icons/color.png
Couldn't open /home/wzy/labelImg-master/icons/close.png
Couldn't open /home/wzy/labelImg-master/icons/quit.png
Couldn't open /home/wzy/labelImg-master/icons/fit-window.png
Couldn't open /home/wzy/labelImg-master/icons/fit-width.png
Couldn't open /home/wzy/labelImg-master/icons/resetall.png
Couldn't open /home/wzy/labelImg-master/icons/eye.png
Couldn't open /home/wzy/labelImg-master/icons/undo.png
Couldn't open /home/wzy/labelImg-master/icons/save-as.png
Couldn't open /home/wzy/labelImg-master/icons/done.png
Couldn't open /home/wzy/labelImg-master/icons/open.png
Couldn't open /home/wzy/labelImg-master/icons/app.png
Couldn't open /home/wzy/labelImg-master/icons/file.png
Couldn't open /home/wzy/labelImg-master/icons/help.png
Couldn't open /home/wzy/labelImg-master/icons/zoom.png
Couldn't open /home/wzy/labelImg-master/icons/save.png
Couldn't open /home/wzy/labelImg-master/icons/zoom-in.png
Couldn't open /home/wzy/labelImg-master/icons/verify.png
Couldn't open /home/wzy/labelImg-master/icons/objects.png

再然后執行labelImg.py會報錯

Traceback (most recent call last):
  File "labelImg.py", line 29, in <module>
    import resources
  File "/home/wzy/文檔/labelImg-master/resources.py", line 9, in <module>
    from PyQt4 import QtCore
ImportError: No module named PyQt4

找不到pyqt4,然額明明安裝過。

於是改用python3,OK了,命令如下,與Python2很像。

sudo apt-get install pyqt5-dev-tools
sudo pip3 install lxml
make qt5py3
python3 labelImg.py

軟件截圖如下


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM