roLabelImg标注工具的安装与使用

roLabelImg

roLabelImg可以理解为Labelme和LabelImg的升级版,多了旋转bbox的功能

你好! 这是你第一次使用 Markdown编辑器 所展示的欢迎页。如果你想学习如何使用Markdown编辑器, 可以仔细阅读这篇文章,了解一下Markdown的基本语法知识。

环境准备

前提:已经安装过anaconda并添加到环境变量,如何判断有没有装,打开cmd输入conda 如果出现对应信息表示已安装并添加到环境变量,如果没有那就装一个吧

下载roLabelImg源码解压到目标路径

源码地址:https://github.com/cgvict/roLabelImg
也可以点击该链接跳转

创建编译环境及安装依赖库

1、利用anaconda创建一个名为rolabel的编译环境,编译器为python37

python的版本针对需要设置,建议设3.7及以下,如果设置太高版本的编译器有些包可能支持不了

conda create -n rolabel python=3.7

2、激活环境

activate rolabel

3、安装依赖库

(1)安装pyqt5-tools

python install pyqt5-tools

如果安装报错了别慌可能是源有问题,试试下面的命令换个源下载包

pip install -i http://pypi.douban.com/simple/ --trusted-host=pypi.douban.com/simple pyqt5-tools

上面还是安装失败的话可以换个源试试:
阿里云 http://mirrors.aliyun.com/pypi/simple/
中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/
豆瓣(douban) http://pypi.douban.com/simple/
清华大学 https://pypi.tuna.tsinghua.edu.cn/simple/
中国科学技术大学 http://pypi.mirrors.ustc.edu.cn/simple/
(2)安装pyqt5-tools

python install lxml

如果安装失败,同理如上换个源安装

4、跳转到roLableImg文件路径下,输入如下代码

yrcc5 -o resources.py resources.qrc 
python roLabelImg.py

5、如果出现如下报错

(rolabel) D:\project\roLabelImg-master>python roLabelImg.py
running with lxml.etree
libpng warning: iCCP: known incorrect sRGB profile
Traceback (most recent call last):
  File "roLabelImg.py", line 1363, in <module>
    if __name__ == '__main__':
  File "roLabelImg.py", line 1359, in main
    '''construct main app and run it'''
  File "roLabelImg.py", line 1352, in get_main_app
    win = MainWindow(argv[1] if len(argv) >= 2 else None,
  File "roLabelImg.py", line 402, in __init__
    # Load predefined classes to the list
  File "roLabelImg.py", line 1274, in loadPredefinedClasses
    if os.path.exists(predefClassesFile) is True:
NameError: name 'codecs' is not defined

解决方案:将roLabelImg.py文件中的改成

# -- coding: utf8 --

改成下面的代码

# -- coding: utf-8 --

6、roLabelImg.py成功运行

7、快捷键使用:
w:Create RectBox
e:Create RotetedRBox
d:next image
ctrl+d:Duplicate RectBox
z、x:Anti-clock rotate
c、v:clock rotate

评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值