Skip to main content

text detection + text recognition

Project description

text-in-image

Refactor code text detection + text recognition

Install

pip install torch==1.7.0+cu101 torchvision==0.8.1+cu101 -f https://download.pytorch.org/whl/torch_stable.html
pip install -r requirements.txt
pip install ultocr

Train

Custom params in each config file of config folder then:

# For detection:
python tools/det_train.py --config ./config/db_resnet50.yaml

# For recognition:
python tools/reg_train.py --config ./config/master.yaml

Inference

# For detection:
python tools/det_infer.py

# For recognition:
python tools/reg_infer.py

Quickstart

from ultocr.inference import End2end
model = End2end(img_path='./', det_model='DB', reg_model='MASTER')
result = model.get_result()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ultocr-0.1.0.tar.gz (48.5 kB view hashes)

Uploaded Source

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