Skip to main content

Multiprocessing library for OCR with WinRT

Project description

Multiprocessing library for OCR with WinRT

pip install winrtocr

Tested against Windows 10 / Python 3.10 / Anaconda

The results are not as good as the ones from Tesseract or EasyOCR, but it is way faster.

from winrtocr import WinRTocr

from time import perf_counter

from a_cv_imwrite_imread_plus import open_image_in_cv







winrto = WinRTocr(cpus=5, language="en-US")

picslinks = [

    r"https://github.com/hansalemaos/screenshots/raw/main/pandsnesteddicthtml.png",

    r"https://github.com/hansalemaos/screenshots/raw/main/cv2_putTrueTypeText_000000.png",

    r"https://github.com/hansalemaos/screenshots/raw/main/cv2_putTrueTypeText_000008.png",

    r"https://github.com/hansalemaos/screenshots/raw/main/cv2_putTrueTypeText_000017.png",

]



picsunique = [open_image_in_cv(x, channels_in_output=4) for x in picslinks]

pics = []

for _ in range(100):

    pics.extend(picsunique)



start = perf_counter()

dfa = winrto.get_ocr_df(pics)

print(f"Multi: {perf_counter()-start}")



dfa2 = winrto.get_ocr_df_and_pics(pics)

Project details


Release history Release notifications | RSS feed

This version

0.10

Download files

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

Source Distribution

winrtocr-0.10.tar.gz (7.0 kB view details)

Uploaded Source

Built Distribution

winrtocr-0.10-py3-none-any.whl (9.0 kB view details)

Uploaded Python 3

File details

Details for the file winrtocr-0.10.tar.gz.

File metadata

  • Download URL: winrtocr-0.10.tar.gz
  • Upload date:
  • Size: 7.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.10

File hashes

Hashes for winrtocr-0.10.tar.gz
Algorithm Hash digest
SHA256 2b6e69e031e3d212158fbdfc0f1d10ae0bb662d66147eeebaf4a6db4ac8028fc
MD5 1b7554d485843ec06774a5303896d17e
BLAKE2b-256 97bcb46ecbcff76d375cb17ca6262637747c516f7ccb48b134be2be80e7f6b3d

See more details on using hashes here.

File details

Details for the file winrtocr-0.10-py3-none-any.whl.

File metadata

  • Download URL: winrtocr-0.10-py3-none-any.whl
  • Upload date:
  • Size: 9.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.10

File hashes

Hashes for winrtocr-0.10-py3-none-any.whl
Algorithm Hash digest
SHA256 ffa805b9622905909390a80ad8c95eae07b5342014edb52af0fcbddfca3ed88b
MD5 76e23df9405e8fb3d1752afb38c6a2fa
BLAKE2b-256 4be0757e9daa4223111bb899432b046a11a4927e273751bdd8ac561e381f11fe

See more details on using hashes here.

Supported by

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