Skip to main content

Text extraction from images using ONNX runtime and CRAFT net

Project description

Crafter

CRAFT text detection with ONNX Runtime

Based on the craft-text-detector. See also the source of the fork here.

Installation

$ pip install crafter

Usage

from crafter import Crafter

crafter = Crafter()

prediction = crafter('crafter/test/resources/idcard2.jpg')
for p1, p2, p3, p4 in prediction['boxes']:
    print(p1, p2, p3, p4)

Developing

$ pip install .
$ pip install onnx git@github.com:innodatalabs/craft-text-detector.git pytest

To download Pytorch weights and convert to ONNX, run this (once):

$ python convert/craftnet.py
$ python convert/refinenet.py

This will (re-)create the ONNX files in crafter/resources.

Testing

$ PYTHONPATH+. pytest

Building

$ make

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.

pycrafter-0.0.7-py3-none-any.whl (78.9 MB view details)

Uploaded Python 3

File details

Details for the file pycrafter-0.0.7-py3-none-any.whl.

File metadata

  • Download URL: pycrafter-0.0.7-py3-none-any.whl
  • Upload date:
  • Size: 78.9 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.0rc1

File hashes

Hashes for pycrafter-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 3f11551ab195c96a6aff71190bbd9465e86a4bb8da218a37bdb180805291bc4b
MD5 1a5953fe626bb341b0bd26eea3e6262d
BLAKE2b-256 d956020f9653668a28d7f969ae339f4fac3c5289bf2cd479c3fdd15600c7ab76

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