Skip to main content

Tools for classifying the direction of images containing text based ONNXRuntime.

Project description

rapid-orientation

PyPI

1. Install package by pypi.

$ pip install rapid-orientation

2. Run by script.

  • RapidOrientation has the default model_path value, you can set the different value of model_path to use different models, e.g. orientation_engine = RapidOrientation(model_path='rapid_orientation.onnx')
  • See details, for README_Layout .
  • 📌 layout.png source: link
from rapid_orientation import RapidOrientation

orientation_engine = RapidOrientation()

with open('test_images/layout.png', 'rb') as f:
    img = f.read()
orientation_res, elapse = orientation_engine(img)
print(orientation_res)

3. Run by command line.

  • Usage:
    $ rapid_orientation -h
    usage: rapid_orientation [-h] -img IMG_PATH [-m MODEL_PATH]
    
    optional arguments:
    -h, --help            show this help message and exit
    -img IMG_PATH, --img_path IMG_PATH
                        Path to image for layout.
    -m MODEL_PATH, --model_path MODEL_PATH
                        The model path used for inference
    
  • Example:
    $ rapid_orientation -img layout.png
    

4. Result.

# Return str, four types::0 | 90 | 180 | 270

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

rapid_orientation-0.0.8-py3-none-any.whl (6.3 MB view details)

Uploaded Python 3

File details

Details for the file rapid_orientation-0.0.8-py3-none-any.whl.

File metadata

File hashes

Hashes for rapid_orientation-0.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 db6ee4d4bea0f98f0ff0df7cd19e6fdb0cfacb85f6e79b9e6129856d5c5f686f
MD5 e41ef5b4050a231924bc8c38ffe8baf8
BLAKE2b-256 63b62cccddad18732ac38a53dc2040068bb7ef4b80d8cbdba4060f2f333264d5

See more details on using hashes here.

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