3

i am new in object detection using python tensorflow and i have folder contains images that i need to Label it so i download pyqt5 , lableImg and when i open labelImg and choose The directory of my image folder it work fine and open folder in labelImg But when i choose Create RectBox and go to image to draw the rectangle label on it , labelImg stop running and then this error appear on cmd:
Traceback (most recent call last):
  File "C:\Users\DCLAP\AppData\Local\Programs\Python\Python310\lib\site-packages\libs\canvas.py", line 530, in paintEvent
    p.drawLine(self.prev_point.x(), 0, self.prev_point.x(), self.pixmap.height())
TypeError: arguments did not match any overloaded call:
  drawLine(self, QLineF): argument 1 has unexpected type 'float'
  drawLine(self, QLine): argument 1 has unexpected type 'float'
  drawLine(self, int, int, int, int): argument 1 has unexpected type 'float'
  drawLine(self, QPoint, QPoint): argument 1 has unexpected type 'float'
  drawLine(self, Union[QPointF, QPoint], Union[QPointF, QPoint]): argument 1 has unexpected type 'float'

LabelImg repo on github my folder contain jpg photos and different image size so i hope if anyone can help Thanks.

Ahmed Soliman
  • 95
  • 1
  • 9

1 Answers1

5

Apparently the problem is with Python 3.10: https://github.com/tzutalin/labelImg/issues/811

You can either downgrade to Python 3.9 or use the master branch of labelImg which should already have a fix.

marco romelli
  • 1,143
  • 8
  • 19
  • Since I prefer do not down-grade my python version I've changed my current files using below links: https://github.com/HumanSignal/labelImg/issues/872#issuecomment-1309017766 or https://github.com/HumanSignal/labelImg/issues/811#issuecomment-977605722 – abbas abaei Aug 14 '23 at 23:59