Skip to main content

Rebuilding only the OCR part of the pororo package for lightweight and fast operation.

Project description

pororo-ocr

pororo-ocr inspired by kakaobrain/pororo, rebuilding only the OCR task of the pororo package for lighteweight and fast performance.

Installation

  • pororo-ocr is based on torch>=1.6(cuda 10.1) and python>=3.6

  • You can install a package through the command below:

pip install pororo-ocr

Usage

  • pororo-ocr can be used as follows:
  • First, in order to import pororo-ocr, you must execute the following snippet
>>> import prrocr
  • After the import, you can check languages currently supported by the pororo-ocr through the following commands
>>> import prrocr
>>> prrocr.ocr.get_available_langs()
"Available lanugages are ['en', 'ko']"
  • To check which models are supported by each task, you can go through the following process
>>> import prrocr
>>> prrocr.ocr.get_available_models()
"Available models are {'en': ['brainocr'], 'ko': ['brainocr']}"
  • If you want to perform in specific language, you can put the language name in the lang argument
>>> import prrocr
>>> ocr = prrocr.ocr(lang="en")
  • After object construction, it can be used in a way that passes the input value as follows:
>>> ocr("sample.jpg")
['MAKE TODAY', 'TOLERABLE']
  • If you want to get position information for each string, you can turn on detail argument as follows:
>>> ocr("sample.jpg", detail=True)
{'description': ['MAKE TODAY', 'TOLERABLE'], 'bounding_poly': [{'description': 'MAKE TODAY', 'vertices': [{'x': 585, 'y': 397}, {'x': 730, 'y': 397}, {'x': 730, 'y': 520}, {'x': 585, 'y': 520}]}, {'description': 'TOLERABLE', 'vertices': [{'x': 588, 'y': 558}, {'x': 884, 'y': 558}, {'x': 884, 'y': 612}, {'x': 588, 'y': 612}]}]}

License

pororo-ocr project is licensed under the terms of the Apache License 2.0.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pororo_ocr-1.0.2-py3-none-any.whl (59.9 kB view details)

Uploaded Python 3

File details

Details for the file pororo_ocr-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: pororo_ocr-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 59.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/6.6.0 pkginfo/1.8.3 requests/2.31.0 requests-toolbelt/0.9.1 tqdm/4.64.1 CPython/3.7.16

File hashes

Hashes for pororo_ocr-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 859158b18000277807991d186f0dcbe2e5f5c886b40311492e2689d185081872
MD5 37d27c3ce623e45a874c54439d1a7c58
BLAKE2b-256 b89db26b3848383c38ef127a2dd2d782e6b88ad7391e16e35c1c87ab94c4c5cc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page