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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
pycrafter-0.0.7-py3-none-any.whl
(78.9 MB
view details)
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3f11551ab195c96a6aff71190bbd9465e86a4bb8da218a37bdb180805291bc4b
|
|
| MD5 |
1a5953fe626bb341b0bd26eea3e6262d
|
|
| BLAKE2b-256 |
d956020f9653668a28d7f969ae339f4fac3c5289bf2cd479c3fdd15600c7ab76
|