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)
Close
Hashes for pycrafter-0.0.7-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3f11551ab195c96a6aff71190bbd9465e86a4bb8da218a37bdb180805291bc4b |
|
MD5 | 1a5953fe626bb341b0bd26eea3e6262d |
|
BLAKE2b-256 | d956020f9653668a28d7f969ae339f4fac3c5289bf2cd479c3fdd15600c7ab76 |