Giter VIP home page Giter VIP logo

evezerest / ppocrlabel Goto Github PK

View Code? Open in Web Editor NEW
181.0 181.0 42.0 70.35 MB

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.

Python 99.72% Makefile 0.28%
deep-learning label labeling-tool ocr paddleocr pyqt5 python3 tool

ppocrlabel's People

Contributors

1084667371 avatar beyondyourself avatar edencfc avatar evezerest avatar ninetailskim avatar wei-jl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

ppocrlabel's Issues

PPOCRLabel保存识别结果时可否将合并保存改为单独保存?

当前PPOCRLabel 点“保存识别结果” 后会将所有图片识别出来的文本保存到一个 rec_gt.txt 文件中,请问能不能设置为各个图片识别出来的文本进行单独保存呢?谢谢
例如:001.jpg、002.jpg、003.jpg、004.jpg、005.jpg
识别结果保存为:001.txt、002.txt、003.txt、004.txt、005.txt

CANNOT OPEN .xlsx

CANNOT OPEN .xlsx. It could be one of the following reasons: Only support Windows | No python win32com
CANNOT OPEN .xlsx. It could be the following reasons: .xlsx is not existed

进行识别的时候会报错:setText(self, atext: str): argument 1 has unexpected type 'tuple'

环境:

Windows10
Python 3.8
CUDA Toolkit 11.2.2
CUDA 12.1
pyqt5 5.15.9

错误信息:

initPos PyQt5.QtCore.QPointF(1018.2962962962963, 119.0)
result in reRec is [[[1018, 119], [1214, 119], [1214, 163], [1018, 163]], [('S1.00', 0.9850572347640991)]]
Traceback (most recent call last):
File "PPOCRLabel.py", line 2139, in singleRerecognition
self.singleLabel(shape)
File "PPOCRLabel.py", line 1112, in singleLabel
item.setText(shape.label)
TypeError: setText(self, atext: str): argument 1 has unexpected type 'tuple'

2023.8 Ubuntu Install Guide

enviroment: Ubuntu 20.04, Python 3.7

  1. pip install paddlepaddle
  2. pip install PPOCRLabel
  3. sudo apt-get install libxcb-xinerama0
  4. pip uninstall opencv-python
  5. pip install opencv-python-headless

折腾了半天,就是需要这样安装。至于opencv-python-headless 的版本,最新的我这里可以,但也可以用4.2.0.32
至于 opencv-contrib-headless 需不需要安装,我这里是不需要安装。但是绝对不能安装 opencv-python。

Convert Label.txt from PPOCRLabel to COCO annotations (.json) format

I had been using PPOCRLabel to create labels for layout detection. The output of PPOCRLabel is a label.txt file that has its own format. I need to know if can I use this label.txt file directly to train a layout model (in PPStructure) or do I need to convert it to COCO annotations format. Is there an available option to convert it to COCO annotations (.json) format?

Thank you

PyQt5/QtCore.abi3.so: undefined symbol: _ZdaPvm, version Qt_5

`
(paddle) root@ubuntu-3090ti:/home/ubuntu/github/PaddleOCR/PPOCRLabel# python PPOCRLabel.py --lang ch
Traceback (most recent call last):
File "/home/ubuntu/github/PaddleOCR/PPOCRLabel/PPOCRLabel.py", line 27, in
from PyQt5.QtCore import QSize, Qt, QPoint, QByteArray, QTimer, QFileInfo, QPointF, QProcess
ImportError: /root/anaconda3/envs/paddle/lib/python3.9/site-packages/PyQt5/QtCore.abi3.so: undefined symbol: _ZdaPvm, version Qt_5

Linux ubuntu-3090ti 5.15.0-48-generic #54-Ubuntu SMP Fri Aug 26 13:26:29 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
`

Unexpected type 'float' when scrolling and trying to draw rectbox

When scrolling:

Traceback (most recent call last):
File "C:\Users\thomas\AppData\Local\Programs\Python\Python310\lib\site-packages\PPOCRLabel\PPOCRLabel.py", line 1425, in scrollRequest
bar.setValue(bar.value() + bar.singleStep() * units)
TypeError: setValue(self, a0: int): argument 1 has unexpected type 'float'

When trying to draw RectBox:

Traceback (most recent call last):
File "C:\Users\thomas\AppData\Local\Programs\Python\Python310\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'

QObject::moveToThread Cannot move to target thread.

Hi,

I got this error when try to launch PPOCRLabel:

$ PPOCRLabel
QObject::moveToThread: Current thread (0x213f630) is not the object's thread (0x51f3a50).
Cannot move to target thread (0x213f630)

qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "/home/nicola/miniconda3/envs/head-less/lib/python3.11/site-packages/cv2/qt/plugins" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: xcb, eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl.

Any idea?

Thank you.

re-recongnition error

os: Macos BigSur 11.7
Paddle: 2.32, PaddleOCR: 2.6.1.0, PPOCRLabel: 2.1.1, PyQt5 : 5.15.7, PyQt5-Qt5: 5.15.2, PyQt5-sip: 12.11.0

File "/opt/anaconda3/envs/pythonProject/lib/python3.8/site-packages/PPOCRLabel/libs/hashableQListWidgetItem.py", line 37, in __init__
    super(HashableQListWidgetItem, self).__init__(*args)
TypeError: arguments did not match any overloaded call:
  QListWidgetItem(parent: QListWidget = None, type: int = QListWidgetItem.Type): argument 1 has unexpected type 'tuple'
  QListWidgetItem(str, parent: QListWidget = None, type: int = QListWidgetItem.Type): argument 1 has unexpected type 'tuple'
  QListWidgetItem(QIcon, str, parent: QListWidget = None, type: int = QListWidgetItem.Type): argument 1 has unexpected type 'tuple'
  QListWidgetItem(QListWidgetItem): argument 1 has unexpected type 'tuple'
zsh: abort      PPOCRLabel

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

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 !!

换行的文字如何识别?需要手动输入?

屏幕截图 2024-08-05 094606 像这种换行的文字,在表格标注时是不是按整个单元格画框,但是这个框里的文字,在重新识别时,换行的只能识别第一行,下面的几行文字就要手动输入么?

Deleted crop is not being removed from the directory

Hey team,

We found an issue here:

Say if we have an image and three bounding boxes A, B and C, and save them by Export Recognition Result. Then after a while, we notice A is being mislabeled. So we deleted A inside the app. However, if we hit Export Recognition Result again, we'll notice the cropped image of A is still there in the file system.

Any thoughts in removing deleted bounding boxes in the file system?

how to label detection as "difficult" or not?

I notice each detection box is associated with a "difficult" field in the Label.txt, but I didn't find any way to modify this field in the UI, how can we achieve this?

Furthermore, is it possible for us to customize this field? For example, I wanted to add a "logo" field there to denote whether the content inside the bounding box is a logo, any easy way to achieve this?

Can't use rect box feature

Hello , when i try to use rect box i have bug like
AppData\Local\Programs\Python\Python310\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, QRectF): argument 1 has unexpected type 'float'
drawRect(self, int, int, int, int): argument 1 has unexpected type 'float'
drawRect(self, QRect): argument 1 has unexpected type 'float'
What should i do to fix this bug ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.