kandi background
Explore Kits

PaddleOCR | Awesome multilingual OCR toolkits based on PaddlePaddle | Machine Learning library

 by   PaddlePaddle Python Version: v2.1.1 License: Apache-2.0

 by   PaddlePaddle Python Version: v2.1.1 License: Apache-2.0

Download this library from

kandi X-RAY | PaddleOCR Summary

PaddleOCR is a Python library typically used in Artificial Intelligence, Machine Learning, Deep Learning, Pytorch applications. PaddleOCR has no bugs, it has no vulnerabilities, it has build file available, it has a Permissive License and it has medium support. You can install using 'pip install PaddleOCR' or download it from GitHub, PyPI.
PaddleOCR aims to create multilingual, awesome, leading, and practical OCR tools that help users train better models and apply them into practice.
Support
Support
Quality
Quality
Security
Security
License
License
Reuse
Reuse

kandi-support Support

  • PaddleOCR has a medium active ecosystem.
  • It has 19581 star(s) with 4128 fork(s). There are 341 watchers for this library.
  • It had no major release in the last 12 months.
  • There are 991 open issues and 3145 have been closed. On average issues are closed in 19 days. There are 85 open pull requests and 0 closed requests.
  • It has a neutral sentiment in the developer community.
  • The latest version of PaddleOCR is v2.1.1
PaddleOCR Support
Best in #Machine Learning
Average in #Machine Learning
PaddleOCR Support
Best in #Machine Learning
Average in #Machine Learning

quality kandi Quality

  • PaddleOCR has 0 bugs and 0 code smells.
PaddleOCR Quality
Best in #Machine Learning
Average in #Machine Learning
PaddleOCR Quality
Best in #Machine Learning
Average in #Machine Learning

securitySecurity

  • PaddleOCR has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
  • PaddleOCR code analysis shows 0 unresolved vulnerabilities.
  • There are 0 security hotspots that need review.
PaddleOCR Security
Best in #Machine Learning
Average in #Machine Learning
PaddleOCR Security
Best in #Machine Learning
Average in #Machine Learning

license License

  • PaddleOCR is licensed under the Apache-2.0 License. This license is Permissive.
  • Permissive licenses have the least restrictions, and you can use them in most projects.
PaddleOCR License
Best in #Machine Learning
Average in #Machine Learning
PaddleOCR License
Best in #Machine Learning
Average in #Machine Learning

buildReuse

  • PaddleOCR releases are available to install and integrate.
  • Deployable package is available in PyPI.
  • Build file is available. You can build the component from source.
  • PaddleOCR saves you 6686 person hours of effort in developing the same functionality from scratch.
  • It has 33455 lines of code, 1199 functions and 201 files.
  • It has medium code complexity. Code complexity directly impacts maintainability of the code.
PaddleOCR Reuse
Best in #Machine Learning
Average in #Machine Learning
PaddleOCR Reuse
Best in #Machine Learning
Average in #Machine Learning
Top functions reviewed by kandi - BETA

kandi has reviewed PaddleOCR and discovered the below as its top functions. This is intended to give you an instant insight into PaddleOCR implemented functionality, and help decide if they suit your requirements.

  • Combine the data into one row .
  • Train the model .
  • Evaluate image .
  • Creates the predictor .
  • Generate the forward beam part of the beam .
  • This method is used to get the mean and accuracy .
  • Generate tcl label map
  • Handles mouse move event .
  • Detects a sast segment .
  • Runs the detection of the groundtruth .

PaddleOCR Key Features

PP-OCR - A series of high-quality pre-trained models, comparable to commercial products Ultra lightweight PP-OCRv2 series models: detection (3.1M) + direction classifier (1.4M) + recognition 8.5M) = 13.0M Ultra lightweight PP-OCR mobile series models: detection (3.0M) + direction classifier (1.4M) + recognition (5.0M) = 9.4M General PP-OCR server series models: detection (47.1M) + direction classifier (1.4M) + recognition (94.9M) = 143.4M Support Chinese, English, and digit recognition, vertical text recognition, and long text recognition Support multi-lingual recognition: about 80 languages like Korean, Japanese, German, French, etc

PP-Structure: a document structurize system Support layout analysis and table recognition (support export to Excel) Support key information extraction Support DocVQA

Rich OCR toolkit Semi-automatic data annotation tool, i.e., PPOCRLabel: support fast and efficient data annotation Data synthesis tool, i.e., Style-Text: easy to synthesize a large number of images which are similar to the target scene image

Support user-defined training, provides rich predictive inference deployment solutions

Support PIP installation, easy to use

Support Linux, Windows, MacOS and other systems

sed replace line by escaping special chars

copy iconCopydownload iconDownload
sed -i '/BASE_DIR = os.path.expanduser("~\/.paddleocr\/")/c\\BASE_DIR = os.path.expanduser("\/tmp\/.teststring/")' test.py
-----------------------
sed -i 's#\(BASE_DIR = os.path.expanduser("\)~/.teststring/\(")\)#\1/tmp.teststring/\2#' test.py.NEW

OCR - How to recognize numbers inside square boxes using python?

copy iconCopydownload iconDownload
import cv2
import imutils
import numpy as np
import matplotlib.pyplot as plt
from matplotlib import pyplot as plt
  

def square_number_box_denoiser(image_path="/content/9.png",is_resize = False, resize_width = 768):
    '''
    ref : https://pretagteam.com/question/removing-horizontal-lines-in-image-opencv-python-matplotlib

    Args : 
      image_path (str) : path of the image containing numbers/digits inside square box
      is_resize (int) : whether to resize the input image or not? default : False
      resize_width (int) : resizable image width for resizing the image by maintaining aspect ratio. default : 768 

    '''
    img=cv2.imread(image_path)
    if(is_resize):
      print("resizing...")
      img = imutils.resize(img, width=resize_width)
    image = cv2.rotate(img, cv2.ROTATE_90_CLOCKWISE)
    gray = cv2.cvtColor(image,cv2.COLOR_BGR2GRAY)
    thresh = cv2.threshold(gray, 0, 255, cv2.THRESH_BINARY_INV + cv2.THRESH_OTSU)[1]

    # Remove horizontal
    horizontal_kernel = cv2.getStructuringElement(cv2.MORPH_RECT, (25,1))
    detected_lines = cv2.morphologyEx(thresh, cv2.MORPH_OPEN, horizontal_kernel, iterations=2)
    cnts = cv2.findContours(detected_lines, cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE)
    cnts = cnts[0] if len(cnts) == 2 else cnts[1]
    for c in cnts:
        cv2.drawContours(image, [c], -1, (255,255,255), 2)

    # Repair image
    repair_kernel = cv2.getStructuringElement(cv2.MORPH_RECT, (1,6))
    result = 255 - cv2.morphologyEx(255 - image, cv2.MORPH_CLOSE, repair_kernel, iterations=2)

    # create figure
    fig = plt.figure(figsize=(20, 20))
    # setting values to rows and column variables
    rows = 3
    columns = 3

    fig.add_subplot(rows,  columns, 1)
    plt.imshow(img)
    fig.add_subplot(rows,  columns, 2)
    plt.imshow(thresh)
    fig.add_subplot(rows,  columns, 3)
    plt.imshow(detected_lines)
    fig.add_subplot(rows,  columns, 4)
    plt.imshow(image)
    fig.add_subplot(rows,  columns, 5)
    plt.imshow(result)
    result = cv2.rotate(result,cv2.ROTATE_90_COUNTERCLOCKWISE)
    fig.add_subplot(rows,  columns, 6)
    plt.imshow(result)
    cv2.imwrite("result.jpg", result)

    plt.show()

Community Discussions

Trending Discussions on PaddleOCR
  • sed replace line by escaping special chars
  • OCR - How to recognize numbers inside square boxes using python?
  • PaddleOCR error OSError: [WinError 126] The specified module could not be found
Trending Discussions on PaddleOCR

QUESTION

sed replace line by escaping special chars

Asked 2022-Mar-07 at 15:21

I am trying to replace lines using sed, and usually this works fine, but I am now encountering a string which does not seem to play ball with sed :(

file: test.py

$ cat test.py
BASE_DIR = os.path.expanduser("~/.teststring/")

I replace this line using:

sed -i '/BASE_DIR = os.path.expanduser("~/.paddleocr/")/c\BASE_DIR = os.path.expanduser("/tmp/.teststring/")' test.py

I get:

sed: -e expression #1, char 35: unknown command: `.'

Not sure what is causing this. I tried escaping the . using \. but this does not help either :(

ANSWER

Answered 2022-Mar-07 at 14:41

I think your first " should be a '

Also, you need to escape the \ which aren't part of the sed syntax e.g.:

sed -i '/BASE_DIR = os.path.expanduser("~\/.paddleocr\/")/c\\BASE_DIR = os.path.expanduser("\/tmp\/.teststring/")' test.py

Source https://stackoverflow.com/questions/71382615

Community Discussions, Code Snippets contain sources that include Stack Exchange Network

Vulnerabilities

No vulnerabilities reported

Install PaddleOCR

You can install using 'pip install PaddleOCR' or download it from GitHub, PyPI.
You can use PaddleOCR like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.

Support

Scan the QR code below with your Wechat, you can join the official technical discussion group. Looking forward to your participation.

DOWNLOAD this Library from

Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from
over 430 million Knowledge Items
Find more libraries
Reuse Solution Kits and Libraries Curated by Popular Use Cases

Save this library and start creating your kit

Share this Page

share link
Compare Machine Learning Libraries with Highest Support
Compare Machine Learning Libraries with Highest Quality
Compare Machine Learning Libraries with Highest Security
Compare Machine Learning Libraries with Permissive License
Compare Machine Learning Libraries with Highest Reuse
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from
over 430 million Knowledge Items
Find more libraries
Reuse Solution Kits and Libraries Curated by Popular Use Cases

Save this library and start creating your kit

  • © 2022 Open Weaver Inc.