Giter Club home page Giter Club logo

humansignal / labelimg Goto Github PK

View Code? Open in Web Editor NEW
21.8K 399.0 6.2K 237.14 MB

LabelImg is now part of the Label Studio community. The popular image annotation tool created by Tzutalin is no longer actively being developed, but you can check out Label Studio, the open source data labeling tool for images, text, hypertext, audio, video and time-series data.

Home Page: https://youtu.be/p0nR2YsCY_U

License: MIT License

Makefile 0.31% Python 96.82% Shell 2.88%
python2 python3 annotations tools imagenet deep-learning detection recognition image-classification

labelimg's Introduction

image

Label Studio is a modern, multi-modal data annotation tool =======

LabelImg, the popular image annotation tool created by Tzutalin with the help of dozens contributors, is no longer actively being developed and has become part of the Label Studio community. Check out Label Studio, the most flexible open source data labeling tool for images, text, hypertext, audio, video and time-series data. Install Label Studio and join the slack community to get started.

image

About LabelImg ========

image

GitHub Workflow Status

image

image

image

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.

Demo Image

Demo Image

Watch a demo video

Installation

Get from PyPI but only python3.0 or above

This is the simplest (one-command) install method on modern Linux distributions such as Ubuntu and Fedora.

pip3 install labelImg
labelImg
labelImg [IMAGE_PATH] [PRE-DEFINED CLASS FILE]

Build from source

Linux/Ubuntu/Mac requires at least Python 2.6 and has been tested with PyQt 4.8. However, Python 3 or above and PyQt5 are strongly recommended.

Ubuntu Linux

Python 3 + Qt5

sudo apt-get install pyqt5-dev-tools
sudo pip3 install -r requirements/requirements-linux-python3.txt
make qt5py3
python3 labelImg.py
python3 labelImg.py [IMAGE_PATH] [PRE-DEFINED CLASS FILE]

macOS

Python 3 + Qt5

brew install qt  # Install qt-5.x.x by Homebrew
brew install libxml2

or using pip

pip3 install pyqt5 lxml # Install qt and lxml by pip

make qt5py3
python3 labelImg.py
python3 labelImg.py [IMAGE_PATH] [PRE-DEFINED CLASS FILE]

Python 3 Virtualenv (Recommended)

Virtualenv can avoid a lot of the QT / Python version issues

brew install python3
pip3 install pipenv
pipenv run pip install pyqt5==5.15.2 lxml
pipenv run make qt5py3
pipenv run python3 labelImg.py
[Optional] rm -rf build dist; pipenv run python setup.py py2app -A;mv "dist/labelImg.app" /Applications

Note: The Last command gives you a nice .app file with a new SVG Icon in your /Applications folder. You can consider using the script: build-tools/build-for-macos.sh

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]

If you want to package it into a separate EXE file

Install pyinstaller and execute:

pip install pyinstaller
pyinstaller --hidden-import=pyqt5 --hidden-import=lxml -F -n "labelImg" -c labelImg.py -p ./libs -p ./

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

You can pull the image which has all of the installed and required dependencies. Watch a demo video

Usage

Steps (PascalVOC)

  1. Build and launch using the instructions above.
  2. Click 'Change default saved annotation folder' in Menu/File
  3. Click 'Open Dir'
  4. Click 'Create RectBox'
  5. Click and release left mouse to select a region to annotate the rect box
  6. You 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.

Steps (YOLO)

  1. In data/predefined_classes.txt define the list of classes that will be used for your training.
  2. Build and launch using the instructions above.
  3. Right below "Save" button in the toolbar, click "PascalVOC" button to switch to YOLO format.
  4. You may use Open/OpenDIR to process single or multiple images. When finished with a single image, click save.

A txt file of YOLO format will be saved in the same folder as your image with same name. A file named "classes.txt" is saved to that folder too. "classes.txt" defines the list of class names that your YOLO label refers to.

Note:

  • Your label list shall not change in the middle of processing a list of images. When you save an image, classes.txt will also get updated, while previous annotations will not be updated.
  • You shouldn't use "default class" function when saving to YOLO format, it will not be referred.
  • When saving as YOLO format, "difficult" flag is discarded.

Create pre-defined classes

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

Annotation visualization

  1. Copy the existing lables file to same folder with the images. The labels file name must be same with image file name.
  2. Click File and choose 'Open Dir' then Open the image folder.
  3. Select image in File List, it will appear the bounding box and label for all objects in that image.

(Choose Display Labels mode in View to show/hide lablels)

Hotkeys

Ctrl + u Load all of the images from a directory
Ctrl + r Change the default annotation target dir
Ctrl + s Save
Ctrl + d Copy the current label and rect box
Ctrl + Shift + d Delete the current image
Space Flag the current image as verified
w Create a rect box
d Next image
a Previous image
del Delete the selected rect box
Ctrl++ Zoom in
Ctrl-- Zoom out
↑→↓← Keyboard arrows to move selected rect box

Verify Image:

When pressing space, the user can flag the image as verified, a green background will appear. This is used when creating a dataset automatically, the user can then through all the pictures and flag them instead of annotate them.

Difficult:

The difficult field is set to 1 indicates that the object has been annotated as "difficult", for example, an object which is clearly visible but difficult to recognize without substantial use of context. According to your deep neural network implementation, you can include or exclude difficult objects during training.

How to reset the settings

In case there are issues with loading the classes, you can either:

  1. From the top menu of the labelimg click on Menu/File/Reset All
  2. Remove the .labelImgSettings.pkl from your home directory. In Linux and Mac you can do:

    rm ~/.labelImgSettings.pkl

How to contribute

Send a pull request

License

Free software: MIT license

Citation: Tzutalin. LabelImg. Git code (2015). https://github.com/tzutalin/labelImg

  1. Label Studio to label images, text, audio, video and time-series data for machine learning and AI
  2. ImageNet Utils to download image, create a label text for machine learning, etc
  3. Use Docker to run labelImg
  4. Generating the PASCAL VOC TFRecord files
  5. App Icon based on Icon by Nick Roach (GPL)
  6. Setup python development in vscode
  7. The link of this project on iHub platform
  8. Convert annotation files to CSV format or format for Google Cloud AutoML

Stargazers over time

image

labelimg's People

Contributors

alanyee avatar breunigs avatar chieveit avatar chrisdal avatar chrisrapson avatar dependabot[bot] avatar isvoid avatar jaewchoi avatar jorlogicus avatar keitotobi1 avatar ledorub avatar lgov avatar lhk avatar madhavajay avatar nhancv avatar pletnes avatar pta00 avatar regiswang avatar rflynn avatar rodolfoferro avatar sammiee5311 avatar sebasrivera96 avatar thinh276 avatar tmattio avatar tomasra avatar tzutalin avatar vdalv avatar wenh06 avatar xunchangqing avatar yjmade avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

labelimg's Issues

In the xml file, the value of width and height are both zero.

I cloned the newest version of labelImg in Ubuntu 16.04, I tried to label my pictures, but found the value of width and height are both zero in xml file. need help, thanks!

 <annotation>
<folder>mx</folder>
<filename>timg</filename>
<path>/home/mx/timg.xml</path>
<source>
<database>Unknown</database>
</source>
<size>
<width>0</width> #here
<height>0</height> #here
<depth>3</depth>
</size>
<segmented>0</segmented>
<object>
<name>person</name>
<pose>Unspecified</pose>
<truncated>0</truncated>
<difficult>0</difficult>
<bndbox>
<xmin>189</xmin>
<ymin>136</ymin>
<xmax>762</xmax>
<ymax>573</ymax>
</bndbox>
</object>
</annotation>

Can not open HD Photo

Our Image shape is 7360*4912, I try to open them, but nothing happened. On the other other hand, some small image can be opened success, so I think maybe our image is so bigger then this application allowed. Now, what can I do except resize our Image? who can help me? thx!

can not save xml file on win10

when I have finished annotation the image that I can't save xml files in window 10.when I tick the button to save the xml file to my folder .I can find nothing in my computer. I have installed python2.7, pyQt4, numpy, and lxml, PIL on my computer.

Question / Fast Annotation

Hi,

I have already one folder with a database, where the images only contain the object of interest to classify.

Is there exist any fast method to create the xml file to all the images of that folder without selecting the BB on each one of them ? (the object is represented in the entire image)

Thanks

can't use in OS X with qt5py3

after completing make qt5py3 without any warning, do python3 labeling.py,get below:

2017-03-13 13:44:24.522 Python[31249:2190288] *** Assertion failure in -[NSBitmapImageRep initWithCGImage:], /Library/Caches/com.apple.xbs/Sources/AppKit/AppKit-1504.81.100/AppKit.subproj/NSBitmapImageRep.m:1296
2017-03-13 13:44:24.525 Python[31249:2190288] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid parameter not satisfying: cgImage != NULL'

how can I fix it?

mac sierra run program crash

I installed requirments software:

brew install libxml2
brew install pyqt5
pip3 install lxml

My pyqt5 verson is 5.8.1

And when I run command:

make qt5py3

It's fine.

But when I run command:

python3 labelImg.py

the program crash. error info as below:

2017-03-17 11:08:33.287 Python[20334:13481395] *** Assertion failure in -[NSBitmapImageRep initWithCGImage:], /Library/Caches/com.apple.xbs/Sources/AppKit/AppKit-1504.81.100/AppKit.subproj/NSBitmapImageRep.m:1296
2017-03-17 11:08:33.317 Python[20334:13481395] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid parameter not satisfying: cgImage != NULL'
*** First throw call stack:
(
	0   CoreFoundation                      0x00007fff98916e7b __exceptionPreprocess + 171
	1   libobjc.A.dylib                     0x00007fffad500cad objc_exception_throw + 48
	2   CoreFoundation                      0x00007fff9891bb82 +[NSException raise:format:arguments:] + 98
	3   Foundation                          0x00007fff9a365d50 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 195
	4   AppKit                              0x00007fff9650c112 -[NSBitmapImageRep initWithCGImage:] + 149
	5   QtGui                               0x000000010e93c79c _Z21qt_mac_create_nsimageRK5QIconi + 748
	6   libqcocoa.dylib                     0x000000011262cb00 qt_plugin_instance + 151216
	7   libqcocoa.dylib                     0x0000000112629db7 qt_plugin_instance + 139623
	8   QtWidgets                           0x000000010fa2fa14 _ZN5QMenu11actionEventEP12QActionEvent + 1380
	9   QtWidgets                           0x000000010f8ec53b _ZN7QWidget5eventEP6QEvent + 299
	10  QtWidgets                           0x000000010fa2d5d7 _ZN5QMenu5eventEP6QEvent + 1175
	11  QtWidgets                           0x000000010f8abd3d _ZN19QApplicationPrivate13notify_helperEP7QObjectP6QEvent + 301
	12  QtWidgets                           0x000000010f8ad0e1 _ZN12QApplication6notifyEP7QObjectP6QEvent + 369
	13  QtWidgets.so                        0x000000010f396222 _ZN15sipQApplication6notifyEP7QObjectP6QEvent + 114
	14  QtCore                              0x000000010ed46a34 _ZN16QCoreApplication15notifyInternal2EP7QObjectP6QEvent + 164
	15  QtWidgets                           0x000000010f8e060f _ZN7QWidget12insertActionEP7QActionS1_ + 367
	16  QtWidgets.so                        0x000000010f4aec42 _ZL20meth_QMenu_addActionP7_objectS0_S0_ + 146
	17  Python                              0x000000010dc81447 _PyCFunction_FastCallDict + 461
	18  Python                              0x000000010dce8959 call_function + 562
	19  Python                              0x000000010dce5d10 _PyEval_EvalFrameDefault + 26835
	20  Python                              0x000000010dce9aa3 _PyFunction_FastCall + 121
	21  Python                              0x000000010dce8933 call_function + 524
	22  Python                              0x000000010dce5d10 _PyEval_EvalFrameDefault + 26835
	23  Python                              0x000000010dce9136 _PyEval_EvalCodeWithName + 1910
	24  Python                              0x000000010dce99f9 _PyFunction_FastCallDict + 477
	25  Python                              0x000000010dc483dd _PyObject_FastCallDict + 218
	26  Python                              0x000000010dc484fc _PyObject_Call_Prepend + 149
	27  Python                              0x000000010dc48244 PyObject_Call + 101
	28  Python                              0x000000010dc948d8 slot_tp_init + 57
	29  Python                              0x000000010dc91868 type_call + 184
	30  Python                              0x000000010dc483a6 _PyObject_FastCallDict + 163
	31  Python                              0x000000010dce8800 call_function + 217
	32  Python                              0x000000010dce5d10 _PyEval_EvalFrameDefault + 26835
	33  Python                              0x000000010dce9136 _PyEval_EvalCodeWithName + 1910
	34  Python                              0x000000010dce980f fast_function + 241
	35  Python                              0x000000010dce8933 call_function + 524
	36  Python                              0x000000010dce5d10 _PyEval_EvalFrameDefault + 26835
	37  Python                              0x000000010dce9aa3 _PyFunction_FastCall + 121
	38  Python                              0x000000010dce8933 call_function + 524
	39  Python                              0x000000010dce5d10 _PyEval_EvalFrameDefault + 26835
	40  Python                              0x000000010dce9136 _PyEval_EvalCodeWithName + 1910
	41  Python                              0x000000010dcdf394 PyEval_EvalCode + 100
	42  Python                              0x000000010dd0856b run_mod + 58
	43  Python                              0x000000010dd08842 PyRun_FileExFlags + 178
	44  Python                              0x000000010dd07f69 PyRun_SimpleFileExFlags + 668
	45  Python                              0x000000010dd1be57 Py_Main + 3387
	46  Python                              0x000000010dc3ae19 Python + 7705
	47  libdyld.dylib                       0x00007fffadde4255 start + 1
	48  ???                                 0x0000000000000002 0x0 + 2
)
libc++abi.dylib: terminating with uncaught exception of type NSException

Thanks for your reply!

make all fails on OSX

$ make all

pyrcc4 -o resources.py resources.qrc
make: pyrcc4: No such file or directory
make: *** [resources.py] Error 1

Thanks :)

Please update to pyqt5 for mac

pyqt4 could not be found in mac

localhost:labelImg didi$ brew install pyqt4
Error: No available formula with the name "pyqt4"
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
==> Searching taps...
Error: No formulae found in taps.

after installing

brew install pyqt5
brew install libxml2 --force
make pyqt5

something wrong...

localhost:labelImg didi$ python labelImg.py
Traceback (most recent call last):
  File "labelImg.py", line 25, in <module>
    from PyQt4.QtGui import *
ImportError: No module named PyQt4.QtGui
localhost:labelImg didi$

May add function of landmarks?

 Thanks for your great work. It's clean and simple.
 I want to add some labels such as facial landmarks. Have you any plan ? Or have any suggestion?

When import resouces Error

I download the pyqt
but I can't get the resource from the link you gived on the Read.me page. The link is 404 error.
Can you give me some suggestion .
Thank you very much!

cant use in ubuntu 16.04

cant use in ubuntu 16.04, i download linux1.2.2 and unzip , then click the labelImg , but without any reaction

How to change GUI color

Hi,
I am using your amazing tool for some picture all with dark background. I was wondering if I can change the background to black. so when I "scroll" through all the images, it won't blink so much.
Thank you!

Needs updates

Python 3.5 and PyQT5 and latest Anaconda. Testing on windows 10 with latest stack.

User interface quicker. Too many clicks per annotation.

Hi,
I am using this tools to distribute it to students so they can annotate images. We have been trying it for a while, in UBUNTU 16.04 machines and it is a very simple and straight forward tool. Perfect for the job.

However, our students claim that they need too many mouse clicks per image, and after evaluating the user interface and usability, we have come to the conclusion that the label image tool would need an improvement in the usability.

At the moment, a whole annotation requires:

Next Image button (1 click) -> Create Box button (1 click)-> actual box creation (2 clicks) -> Select label dialogue (2 fast clicks) -> Save button (1 click) -> Enter (1 touch key) ->

Next Image ... -> ...

That is 7 clicks plus 1 enter key.

Our request (as we dont have the knowledge or resources to accomplish it) would be to reduce it to 2 clicks.

That would be, once the image to work with is on the screen:

  • 1st click: Selecting the first corner of bounding box (xmin, ymin)
  • 2nd click: Selecting the second corner of bounding box (xmax, ymax), select automatically the label (the previous selected one), save it with the recommended name in the previous location(name of image.xml) with no dialogue box, then go to next image and activate the Create box tool, signaling the image as a non edited one (not to confuse the operator), as after half an hour, the operator start to get confused with the images, so it would be perfect a visual signal to see if the image is being edited.

That way, we reduce the work form 8 interactions to 2. Obviously, that would be implemented with a mode that user could select (turbo mode), so the user can always go back to the normal mode, to change the label, location..or any other setting.

Well, that is our result of a studding after using it for a while.

Thanks for the good work.

Alex

Fail to start the program

use python3 and pyqt5 in mac

brew install pyqt5
pip3 install lxml
brew install libxml2 --force
make qt5py3
python3 labelImg.py

and then

localhost:labelImg didi$ python3 labelImg.py
2017-03-16 16:55:15.129 Python[77604:6980074] *** Assertion failure in -[NSBitmapImageRep initWithCGImage:], /Library/Caches/com.apple.xbs/Sources/AppKit/AppKit-1504.81.100/AppKit.subproj/NSBitmapImageRep.m:1296
2017-03-16 16:55:15.131 Python[77604:6980074] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid parameter not satisfying: cgImage != NULL'
*** First throw call stack:
(
	0   CoreFoundation                      0x00007fffa8a94e7b __exceptionPreprocess + 171
	1   libobjc.A.dylib                     0x00007fffbd67ecad objc_exception_throw + 48
	2   CoreFoundation                      0x00007fffa8a99b82 +[NSException raise:format:arguments:] + 98
	3   Foundation                          0x00007fffaa4e3d50 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 195
	4   AppKit                              0x00007fffa668a112 -[NSBitmapImageRep initWithCGImage:] + 149
	5   QtGui                               0x000000011096679c _Z21qt_mac_create_nsimageRK5QIconi + 748
	6   libqcocoa.dylib                     0x00000001144acb00 qt_plugin_instance + 151216
	7   libqcocoa.dylib                     0x00000001144a9db7 qt_plugin_instance + 139623
	8   QtWidgets                           0x0000000111a59a14 _ZN5QMenu11actionEventEP12QActionEvent + 1380
	9   QtWidgets                           0x000000011191653b _ZN7QWidget5eventEP6QEvent + 299
	10  QtWidgets                           0x0000000111a575d7 _ZN5QMenu5eventEP6QEvent + 1175
	11  QtWidgets                           0x00000001118d5d3d _ZN19QApplicationPrivate13notify_helperEP7QObjectP6QEvent + 301
	12  QtWidgets                           0x00000001118d70e1 _ZN12QApplication6notifyEP7QObjectP6QEvent + 369
	13  QtWidgets.so                        0x00000001113c0222 _ZN15sipQApplication6notifyEP7QObjectP6QEvent + 114
	14  QtCore                              0x0000000110d70a34 _ZN16QCoreApplication15notifyInternal2EP7QObjectP6QEvent + 164
	15  QtWidgets                           0x000000011190a60f _ZN7QWidget12insertActionEP7QActionS1_ + 367
	16  QtWidgets.so                        0x00000001114d8c42 _ZL20meth_QMenu_addActionP7_objectS0_S0_ + 146
	17  Python                              0x000000010fc4640a _PyCFunction_FastCallDict + 468
	18  Python                              0x000000010fcb116e call_function + 584
	19  Python                              0x000000010fcae110 _PyEval_EvalFrameDefault + 28303
	20  Python                              0x000000010fcb2347 _PyFunction_FastCall + 122
	21  Python                              0x000000010fcb1141 call_function + 539
	22  Python                              0x000000010fcae110 _PyEval_EvalFrameDefault + 28303
	23  Python                              0x000000010fcb1990 _PyEval_EvalCodeWithName + 1978
	24  Python                              0x000000010fcb2295 _PyFunction_FastCallDict + 477
	25  Python                              0x000000010fc0beb3 _PyObject_FastCallDict + 231
	26  Python                              0x000000010fc0bfd3 _PyObject_Call_Prepend + 149
	27  Python                              0x000000010fc0bd0b PyObject_Call + 102
	28  Python                              0x000000010fc5a164 slot_tp_init + 61
	29  Python                              0x000000010fc56f03 type_call + 184
	30  Python                              0x000000010fc0be74 _PyObject_FastCallDict + 168
	31  Python                              0x000000010fcb1007 call_function + 225
	32  Python                              0x000000010fcae110 _PyEval_EvalFrameDefault + 28303
	33  Python                              0x000000010fcb1990 _PyEval_EvalCodeWithName + 1978
	34  Python                              0x000000010fcb20ab fast_function + 241
	35  Python                              0x000000010fcb1141 call_function + 539
	36  Python                              0x000000010fcae110 _PyEval_EvalFrameDefault + 28303
	37  Python                              0x000000010fcb2347 _PyFunction_FastCall + 122
	38  Python                              0x000000010fcb1141 call_function + 539
	39  Python                              0x000000010fcae110 _PyEval_EvalFrameDefault + 28303
	40  Python                              0x000000010fcb1990 _PyEval_EvalCodeWithName + 1978
	41  Python                              0x000000010fca71d8 PyEval_EvalCode + 100
	42  Python                              0x000000010fcd1d82 run_mod + 58
	43  Python                              0x000000010fcd2097 PyRun_FileExFlags + 178
	44  Python                              0x000000010fcd1730 PyRun_SimpleFileExFlags + 676
	45  Python                              0x000000010fce5ea8 Py_Main + 3472
	46  Python                              0x000000010fbfbe17 Python + 7703
	47  libdyld.dylib                       0x00007fffbdf62255 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Abort trap: 6

Can't reopen filedock after close

When you click on the "x" button to close the filedock widget, there is no easy way to get it back. Or is there? I didn't see anything in the dropdown menus. There probably should be a toggle under the view menu.

No available formula with the name "pyqt4-dev-tools"

Hi , How do I instal the "pyqt4-dev-tools for mac?
Brew install pyqt4-dev-tools raises the error : Error: No available formula with the name "pyqt4-dev-tools"

I am using conda to install everything. Any idea how to get it running for mac?

depth of 1-channel image and load annotation

Hello,

(1) If I annotate 1-channel image, in the xml the will still be 3, do you know where to fix this?
(2) Can you load annotation xml automatically if it's exist for the image?

Thanks!

How to add shortcut when I create a label?

When I labeled an image, I find there are so many car than other categories.
I want to create a shortcut when I add the car label instead of making double click.

Please help~ Thanks a lot.

Can't open annotations with more than 6 boxes

We are using the prebuilt files (v1.2.1) for Windows and when entering more than 6 boxes than the annotations cannot be opened again. Everything looks fine for one up to 6 boxes but when a page contains 7 or more boxes then I cannot open the annotation again. Actually the following errors shows up in the command line window:

Traceback (most recent call last):
  File "<string>", line 919, in openNextImg
  File "<string>", line 741, in loadFile
  File "<string>", line 1078, in loadPascalXMLByFilename
  File "Z:\home\darrenl\tools\labelImg\build-tools\build\labelImg\out00-PYZ.pyz\
pascal_voc_io", line 115, in __init__
  File "Z:\home\darrenl\tools\labelImg\build-tools\build\labelImg\out00-PYZ.pyz\
pascal_voc_io", line 131, in parseXML
  File "Z:\home\darrenl\tools\labelImg\build-tools\build\labelImg\out00-PYZ.pyz\
xml.etree.ElementTree", line 1182, in parse
  File "Z:\home\darrenl\tools\labelImg\build-tools\build\labelImg\out00-PYZ.pyz\
xml.etree.ElementTree", line 657, in parse
  File "parser.pxi", line 1166, in lxml.etree._FeedParser.close (src/lxml/lxml.e
tree.c:76950)
  File "parser.pxi", line 556, in lxml.etree._ParserContext._handleParseResult (
src/lxml/lxml.etree.c:71680)
  File "parser.pxi", line 645, in lxml.etree._handleParseResult (src/lxml/lxml.e
tree.c:72614)
  File "parser.pxi", line 585, in lxml.etree._raiseParseError (src/lxml/lxml.etr
ee.c:71955)
lxml.etree.XMLSyntaxError: internal error, line 6, column 15

I don't have any path beginning with "Z:\home\darrenl\tools\labelImg".

Fast move feature.

Hi,
Your tool is awesome now. It is more useful than LabelMe (MIT-CSAIL format).
It will be better if there is a feature to move to an image fast. Such as I am in 1000.jpg, but I want to come back 500.jpg to edit. Or already created 500 images, computer is shutdown or close application, next time?
Now, it seems you must to click back or next 500 times.

Enhancement Request- Support for Unicode labels

I wanted to assign unicode strings to my bounding boxes. I can enter my strings to the text box in UI and is being rendered correctly. But upon save it throws an error.

Traceback (most recent call last):
  File "./labelImg.py", line 945, in saveFile
    else self.saveFileDialog())
  File "./labelImg.py", line 968, in _saveFile
    if filename and self.saveLabels(filename):
  File "./labelImg.py", line 589, in saveLabels
    self.lineColor.getRgb(), self.fillColor.getRgb())
  File "libs/labelFile.py", line 46, in savePascalVocFormat
    writer.save(targetFile = filename)
  File "libs/pascal_voc_io.py", line 96, in save
    self.appendObjects(root)
  File "libs/pascal_voc_io.py", line 77, in appendObjects
    name.text = str(each_object['name'])
UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-10: ordinal not in range(128)

I tried to fix it by the way the string is encoded before being written to xml. But the best I could get was a sequence of unicode points like this written to the xml in place of the actual unicode string.
<name>&#3381;&#3391;&#3349;&#3405;&#3349;&#3391;&#3370;&#3392;&#3361;&#3391;&#3375;</name>

An enhancement to support unicode strings would of great help for all who want to assign labels in languages other than English

result xml not readable by devkit

Hi, I annotated some results but are unreadable by official devkit.
I think the problem is, in the xml file spaces are used instead of tabs (or no space, because I got rid of all spaces by hand and is then readable by VOC devkit).

I wonder if you have a solution for that, thank you.

whether can you simplify choose label operation when we only have one label situation?

Hi @tzutalin ,
sometimes we make a dataset for only one label ,such as "dog". However,everytime i create Rectbox, a dialog show to choose a label. For this situation,this operation to choose label is redundant.

In my opinion,this porject could set two modes to fit two situations:one label and multilabel.
In one label mode,when we create a rectbox, the dialog will not show and the label defaultly write into the xml file.

appreciate your excellent work!

about the annotation of gray image

Can this tool be used in the annotation of gray image? When i use it for the gray image annotation i meet some problem and i can't save the label.

Cann't process .jpg image, but work well for .png

Every time I choose a .jpg file, it pops up an error message:

Error opening file
Make sure /Users/zqsu/Documents/apps/labelImg/demo/demo3.jpg is a valid image file.

I tried my own image and the demo image, all got the same error, but .png and .bmp file work ok.

Here is some information may help:
OS: Mac OS Sierra
python 2.7.13
opencv 2.4.8
libxml2 2.9.4 0
lxml 3.7.3 py27_0
pyqt 4.11.4 py27_4
qt 4.8.7 4

Please help~ Thanks a lot.

about Next/Prev Image

Hi Lin:
I have many picture named frame000.jpg to framexxx.jpg in same directory.
When i running labelImg.py and open Dir.
After labeling frame000.jpg i want to next pic but next pic showed isn't frame001.jpg .
Does any solution about it?

No module named lxml

Running OSX 10.11, python 2.7, for some reason my environment is missing lxml.

$ python labelImg.py
Traceback (most recent call last):
File "labelImg.py", line 23, in
from labelFile import LabelFile, LabelFileError
File "libs/labelFile.py", line 6, in
from pascal_voc_io import PascalVocWriter
File "libs/pascal_voc_io.py", line 5, in
from lxml import etree
ImportError: No module named lxml

Any ideas on how to fix this?

rm cv2 module

I think that there is no need to import cv2 module in labelfile.py to get the image shape.

There seems to be a bug when opening the annotation file and visually adjust the size and location of the previously labeled bboxes?

Hi @tzutalin ~ This labeling tool is pretty convenient and I like it very much! However, when I click the "open annotation" button, open a previously saved xml file and try to adjust the size and location of the bbox visually, the shape of the bboxes are no longer rectangles. Maybe there is a bug here.

I did this because I wanted to use CNN to pre-label the bboxes so that we can just make some adjustment, which can reduce the workload.

I 'm looking forward to your reply : )

python3 && PyQt5 中滚轮问题?

Traceback (most recent call last):
  File "libs/canvas.py", line 504, in wheelEvent
    if ev.orientation() == Qt.Vertical:
AttributeError: 'QWheelEvent' object has no attribute 'orientation'
[1]    4683 abort      python3 labelImg.py

can't save xml in ubuntu16.04

when I have finished annotation the image that I can't save xml files in ubuntu16.04 .when I tick the button to save the xml file to my folder .I can find nothing in my computer .

Can't save unicode labels

I'm getting a UnicodeEncodeError every time I try to save unicode labels.

Exception traceback:

Traceback (most recent call last):
  File "labelImg/labelImg.py", line 946, in saveFile
    else self.saveFileDialog())
  File "labelImg/labelImg.py", line 969, in _saveFile
    if filename and self.saveLabels(filename):
  File "labelImg/labelImg.py", line 588, in saveLabels
    print 'savePascalVocFormat save to:' + filename
UnicodeEncodeError: 'ascii' codec can't encode characters in position 49-54: ordinal not in range(128)

I'm currently working around this by replacing the call to str() in PascalVocWriter.appendObjects with repr(Don't know if this complies with the pascal voc format).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.