Tools for classifying the direction of images containing text based ONNXRuntime.
Project description
rapid-layout Package
1. Install package by pypi.
$ pip install rapid-layout
2. Run by script.
- RapidLayout has the default
model_path
value, you can set the different value ofmodel_path
to use different models, e.g.layout_engine = RapidLayout(model_path='layout_publaynet.onnx')
- See details, for README_Layout .
- 📌
layout.png
source: link
import cv2
from rapid_layout import RapidLayout
layout_engine = RapidLayout()
img = cv2.imread('layout.png')
layout_res, elapse = layout_engine(img)
print(layout_res)
3. Run by command line.
- Usage:
$ rapid_layout -h usage: rapid_layout [-h] [-v] -img IMG_PATH [-m MODEL_PATH] optional arguments: -h, --help show this help message and exit -v, --vis Wheter to visualize the layout results. -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_layout -v -img layout.png
4. Result.
- Return value.
[ {'bbox': array([321.4160495, 91.53214898, 562.06141263, 199.85522603]), 'label': 'text'}, {'bbox': array([58.67292211, 107.29000663, 300.25448676, 199.68142]), 'label': 'table_caption'} ]
- Visualize result.
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.1-py3-none-any.whl
.
File metadata
- Download URL: rapid_orientation-0.0.1-py3-none-any.whl
- Upload date:
- Size: 6.3 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 80cf1acdd17b6b3e2eb9865ac35931a6f4a62caba4e11c5c280f5b964e22a56b |
|
MD5 | 42d5e5d88e2e5452ad65ae688a3f2a76 |
|
BLAKE2b-256 | 091b41c49e42ac9a0ccd7f017ab320cb634bc5318efa03cb9d8f68631a16774b |