Skip to content

Text detection from images using CRAFT net and ONNX runtime

License

Notifications You must be signed in to change notification settings

innodatalabs/crafter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 [email protected]: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

About

Text detection from images using CRAFT net and ONNX runtime

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published