我现在正在研究分类问题,并尝试在线完成所有工作,而无需访问本地计算机。
因此,我已将数据添加到驱动器并将驱动器安装在 Colab 上。现在我想注释我的数据并决定使用LabelImg https://github.com/tzutalin/labelImg注释者。我将 git 克隆到 Colab 并尝试按照步骤建议的方式启动它。但我遇到了一个错误。
尽管查看了其他类似的答案,但我无法解决问题
要克隆和启动的代码:
import os
os.chdir('/content')
!git clone 'https://github.com/tzutalin/labelImg.git'
os.chdir('/content/labelImg')
!sudo apt-get install pyqt5-dev-tools
!sudo pip3 install -r requirements/requirements-linux-python3.txt
!make qt5py3
!python3 labelImg.py
!python3 labelImg.py ['/content/labelImg'] []
错误(以及编译说明):
Reading package lists... Done
Building dependency tree
Reading state information... Done
pyqt5-dev-tools is already the newest version (5.10.1+dfsg-1ubuntu2).
The following package was automatically installed and is no longer required:
libnvidia-common-410
Use 'sudo apt autoremove' to remove it.
0 upgraded, 0 newly installed, 0 to remove and 8 not upgraded.
Requirement already satisfied: pyqt5==5.10.1 in /usr/local/lib/python3.6/dist-packages (from -r requirements/requirements-linux-python3.txt (line 1)) (5.10.1)
Requirement already satisfied: lxml==4.2.4 in /usr/local/lib/python3.6/dist-packages (from -r requirements/requirements-linux-python3.txt (line 2)) (4.2.4)
Requirement already satisfied: sip<4.20,>=4.19.4 in /usr/local/lib/python3.6/dist-packages (from pyqt5==5.10.1->-r requirements/requirements-linux-python3.txt (line 1)) (4.19.8)
pyrcc5 -o libs/resources.py resources.qrc
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
qt.qpa.screen: QXcbConnection: Could not connect to display
Could not connect to any X display.
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
qt.qpa.screen: QXcbConnection: Could not connect to display
Could not connect to any X display.
从错误信息来看,是因为LabelImg使用了QT。
QT 是一个只能在本地计算机上运行的 GUI 库。你不能在云端运行它,然后让它在你的机器上打开一个QT窗口。
您可能需要找到另一个使用网络界面的标签库。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)