Tools for classifying the direction of images containing text based ONNXRuntime.
Project description
rapid-orientation
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 ofmodel_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
Release history Release notifications | RSS feed
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
File details
Details for the file rapid_orientation-0.0.9-py3-none-any.whl
.
File metadata
- Download URL: rapid_orientation-0.0.9-py3-none-any.whl
- Upload date:
- Size: 6.3 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.20
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2dd1bd2ff73bcab57120ea69b65124a97d0f75e06448ba2e03ff3ea26051157a |
|
MD5 | 78b783ac2fa25ca3db37ec677f30daf6 |
|
BLAKE2b-256 | ffff94d5d12c2467ff755ead50a90094e06237afd1f8aeb181b60fa5e6e8c0fa |