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

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

Uploaded Python 3

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