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.
标注矩形框时,报以下错误:
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?
我的环境是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?
怎么解决呢?