HumanSignal / labelImg

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.
https://youtu.be/p0nR2YsCY_U
MIT License
22.8k stars 6.31k forks source link

labelimg crushed while loading a image has more than one pre-generated label #495

Open gash8222227 opened 5 years ago

gash8222227 commented 5 years ago

[('front', [(299, 97), (321, 97), (321, 127), (299, 127)], None, None, False)] Traceback (most recent call last): File "labelimg.py", line 1282, in openFile self.loadFile(filename) File "labelimg.py", line 1044, in loadFile self.loadYOLOTXTByFilename(txtPath) File "labelimg.py", line 1429, in loadYOLOTXTByFilename tYoloParseReader = YoloReader(txtPath, self.image) File "E:\labelImg-master\libs\yolo_io.py", line 112, in init self.parseYoloFormat() File "E:\labelImg-master\libs\yolo_io.py", line 142, in parseYoloFormat classIndex, xcen, ycen, w, h = bndBox.split(' ') ValueError: too many values to unpack (expected 5)

gash8222227 commented 5 years ago

image with only one pre-generated label is fine. it can also add more rectboxes if you wnat

Leprechault commented 3 years ago

Same problem!!

(base) c:\labelImg>python labelImg.py
labelImg.py:200: DeprecationWarning: an integer is required (got type DockWidgetFeatures).  Implicit conversion to integers using __int__ is deprecated, and may be removed in a future version of Python.
  self.dock.setFeatures(self.dock.features() ^ self.dockFeatures)
[('lca', [(12, 20), (33, 20), (33, 41), (12, 41)], None, None, False)]
Traceback (most recent call last):
  File "labelImg.py", line 1305, in openNextImg
    self.loadFile(filename)
  File "labelImg.py", line 1076, in loadFile
    self.loadYOLOTXTByFilename(txtPath)
  File "labelImg.py", line 1464, in loadYOLOTXTByFilename
    tYoloParseReader = YoloReader(txtPath, self.image)
  File "c:\labelImg\libs\yolo_io.py", line 112, in __init__
    self.parseYoloFormat()
  File "c:\labelImg\libs\yolo_io.py", line 142, in parseYoloFormat
    classIndex, xcen, ycen, w, h = bndBox.split(' ')
ValueError: not enough values to unpack (expected 5, got 1)
vduyhai commented 2 years ago

@Leprechault have you solved your problem?

Michael-OvO commented 2 years ago

same problem