Skip to main content

Unofficial Clova AI OCR python wrapper

Project description

pyclovaocr

Unofficial python wrapper for Clova AI OCR Service

Install

pip install pyclovaocr

Usage

from pyclovaocr import ClovaOCR

ocr = ClovaOCR()

result = ocr.run_ocr(
    image_path='kor_image.jpg',
    language_code='ko',
    ocr_mode='general'
)
print(result) 
'''
{'lines': [{'boundingBox': [[381, 462], [528, 461], [529, 521], [382, 522]],
            'id': 1,
            'wordIDs': [1]},
           {'boundingBox': [[214, 509], [524, 509], [524, 572], [214, 572]],
            'id': 2,
            'wordIDs': [2]}, ...

 'meta': {'domain': 'general',
          'imageSize': {'height': 800, 'width': 564},
          'language': 'ja',
          'version': 'general_rt__v2.2.0'},

 'words': [{'boundingBox': [[381, 462], [528, 461], [529, 521], [382, 522]],
            'confidence': 1.0,
            'id': 1,
            'isVertical': False,
            'text': '岩手山'},
           {'boundingBox': [[214, 509], [524, 509], [524, 572], [214, 572]],
            'confidence': 0.9989,
            'id': 2,
            'isVertical': False,
            'text': 'アトレッセンス'}, ...
'''

Supported Language Codes

Code Description
ko Korean
ja Japanese
en English

Supported Language OCR Modes

Modes Description Supported Language
general General OCR ko, ja, en
receipt Receipts ko, ja, en
credit-card Credit Cards ko, ja, en
business-license Business Licenses ko
giro Bills ko
name-card Business Cards ko, ja, en
id-card ID Cards ko, ja
invoice Invoice ja

Project details


Release history Release notifications | RSS feed

This version

1.0

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

pyclovaocr-1.0-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

Details for the file pyclovaocr-1.0-py3-none-any.whl.

File metadata

  • Download URL: pyclovaocr-1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.8.8

File hashes

Hashes for pyclovaocr-1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 68b06f1e8906cdbb13967653421ac624857af9f9ad54aecef59d41a727d956c1
MD5 6190a66869fb67990130f9f925ba2ad5
BLAKE2b-256 c7310fa07300b0d0b545ed6d30c9745f66933a2d46f7ee2b9fc16352131763e4

See more details on using hashes here.

Supported by

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