🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

pororo-ocr

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pororo-ocr

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

1.0.2
PyPI
Maintainers
1

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.

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts