labelImg icon indicating copy to clipboard operation
labelImg copied to clipboard

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

Open gash8222227 opened this issue 6 years ago • 4 comments

[('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)

  • **OS:windows10+anaconda
  • PyQt version:

gash8222227 avatar Aug 25 '19 05:08 gash8222227

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

gash8222227 avatar Aug 25 '19 05:08 gash8222227

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)

Leprechault avatar Dec 30 '20 23:12 Leprechault

@Leprechault have you solved your problem?

vduyhai avatar May 04 '22 03:05 vduyhai

same problem

Michael-OvO avatar Jul 14 '22 15:07 Michael-OvO