Evezerest / PPOCRLabel

PPOCRLabel is a semi-automatic graphic annotation tool suitable for OCR field, with built-in PP-OCR model to automatically detect and re-recognize data. It is written in Python 3 and PyQT5, supporting rectangular box annotation and four-point annotation modes. Annotations can be directly used for the training of PP-OCR detection and recognition models.
175 stars 41 forks source link

ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all() #59

Open rishabhgupta93 opened 6 months ago

rishabhgupta93 commented 6 months ago

I am trying to annotate a table using PPOcrLabel. Following the instructions here (https://github.com/Evezerest/PPOCRLabel/tree/release2.0?tab=readme-ov-file#22-table-annotation ). But when I change the value of any cell and run Cell Re-Recognition. I am getting the following error and application crashes.

Traceback (most recent call last): File "f:\pycharmprojects\ppstructurelearning\venv\lib\site-packages\PPOCRLabel\PPOCRLabel.py", line 2424, in cellreRecognition bboxes = self.ocr.ocr(img_crop, det=True, rec=False, cls=False)[0] File "f:\pycharmprojects\ppstructurelearning\venv\lib\site-packages\paddleocr\paddleocr.py", line 674, in ocr if not dt_boxes: ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()

Please help !!