PFCCLab / PPOCRLabel

PPOCRLabelv2 is a semi-automatic graphic annotation tool suitable for OCR field, with built-in PP-OCR model to automatically detect and re-recognize data.
105 stars 32 forks source link

标注矩形框时报错. #17

Closed durongzheng closed 5 months ago

durongzheng commented 5 months ago

我的环境是win11专业版,python 3.10.10, cpu 版的 paddleocr。运行 paddlelabel 命令如下: PPOCRLabel --lang ch --kie True

标注矩形框时,报以下错误: Traceback (most recent call last): File "D:\myCode\python\venv\lib\site-packages\PPOCRLabel\libs\canvas.py", line 596, in paintEvent p.drawRect(leftTop.x(), leftTop.y(), rectWidth, rectHeight) TypeError: arguments did not match any overloaded call: drawRect(self, rect: QRectF): argument 1 has unexpected type 'float' drawRect(self, x: int, y: int, w: int, h: int): argument 1 has unexpected type 'float' drawRect(self, r: QRect): argument 1 has unexpected type 'float' QBackingStore::endPaint() called with active painter; did you forget to destroy it or call QPainter::end() on it?

怎么解决呢?

GreatV commented 5 months ago

加上int(leftTop.x()) ...

durongzheng commented 5 months ago

对了。谢谢!

加上int(leftTop.x()) ...