tools

LabelImg

LabelImg is a graphical image annotation tool.

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

Annotations are saved as XML files in PASCAL VOC format, the format used by ImageNet. Besides, it also supports YOLO and CreateML formats.

Screenshot_2

Installation

Windows

Install Python, PyQt5 and install lxml.

Open cmd and go to the labelImg directory

pyrcc4 -o libs/resources.py resources.qrc For pyqt5, pyrcc5 -o libs/resources.py resources.qrc

python labelImg.py python labelImg.py [IMAGE_PATH] [PRE-DEFINED CLASS FILE]

Windows + Anaconda

Download and install Anaconda (Python 3+)

Open the Anaconda Prompt and go to the labelImg directory

conda install pyqt=5 conda install -c anaconda lxml pyrcc5 -o libs/resources.py resources.qrc python labelImg.py python labelImg.py [IMAGE_PATH] [PRE-DEFINED CLASS FILE]

Use Docker

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

make qt4py2;./labelImg.py