栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Python

旋转目标标注roLabelImg

Python 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

旋转目标标注roLabelImg

参考旋转目标标注roLabelImg - 云+社区 - 腾讯云

roLabelImg is a graphical image annotation tool can label ROTATED rectangle regions, which is rewrite from 'labelImg'.

The original version 'labelImg''s link is here.

It is written in Python and uses Qt for its graphical interface.

https://youtu.be/7D5lvol_QRA

Annotations are saved as XML files almost like PASCAL VOC format, the format used by ImageNet.

XML Format
  hsrc
  100000001
  /Users/haoyou/Library/Mobile documents/com~apple~CloudDocs/OneDrive/hsrc/100000001.bmp
  
    Unknown
  
  
    1166
    753
    3
  
  0
  
    bndbox
    ship
    Unspecified
    0
    0
    
      178
      246
      974
      504
    
  
  
    robndbox
    ship
    Unspecified
    0
    0
    
      580.7887
      343.2913
      775.0449
      170.2159
      2.889813
    
  
Installation

Download prebuilt binaries of original 'labelImg'

Windows & LinuxOS X. Binaries for OS X are not yet available. Help would be appreciated. At present, it must be built from source.

Build from source

Linux/Ubuntu/Mac requires at least Python 2.6 and has been tested with PyQt 4.8.

Ubuntu Linux

sudo apt-get install pyqt4-dev-tools
sudo pip install lxml
make all
./roLabelImg.py
./roLabelImg.py [IMAGE_PATH] [PRE-DEFINED CLASS FILE]

OS X

brew install qt qt4
brew install libxml2
make all
./roLabelImg.py
./roLabelImg.py [IMAGE_PATH] [PRE-DEFINED CLASS FILE]

Windows

Download and setup Python 2.6 or later, PyQt4 and install lxml.

Open cmd and go to roLabelImg directory

pyrcc4 -o resources.py resources.qrc
python roLabelImg.py
python roLabelImg.py [IMAGE_PATH] [PRE-DEFINED CLASS FILE]
Use Docker
docker pull tzutalin/py2qt4

docker run -it 
--user $(id -u) 
-e DISPLAY=unix$DISPLAY 
--workdir=$(pwd) 
--volume="/home/$USER:/home/$USER" 
--volume="/etc/group:/etc/group:ro" 
--volume="/etc/passwd:/etc/passwd:ro" 
--volume="/etc/shadow:/etc/shadow:ro" 
--volume="/etc/sudoers.d:/etc/sudoers.d:ro" 
-v /tmp/.X11-unix:/tmp/.X11-unix 
tzutalin/py2qt4

You can pull the image which has all of the installed and required dependencies.

Usage

Steps
    Build and launch using the instructions above.Click 'Change default saved annotation folder' in Menu/FileClick 'Open Dir'Click 'Create RectBox'Click and release left mouse to select a region to annotate the rect boxYou can use right mouse to drag the rect box to copy or move it

The annotation will be saved to the folder you specify.

You can refer to the below hotkeys to speed up your workflow.

Create pre-defined classes

You can edit the data/predefined_classes.txt to load pre-defined classes

Hotkeys
Ctrl + uLoad all of the images from a directory
Ctrl + rChange the default annotation target dir
Ctrl + sSave
Ctrl + dCopy the current label and rect box
SpaceFlag the current image as verified
wCreate a rect box
eCreate a Rotated rect box
dNext image
aPrevious image
rHidden/Show Rotated Rect boxes
nHidden/Show Normal Rect boxes
delDelete the selected rect box
Ctrl++Zoom in
Ctrl--Zoom out
↑→↓←Keyboard arrows to move selected rect box
zxcvKeyboard to rotate selected rect box

How to contribute

Send a pull request

License

Free software: MIT license

Related
    ImageNet Utils to download image, create a label text for machine learning, etcDocker hub to run it

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/755126.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号