rapid-orientation


Namerapid-orientation JSON
Version 0.0.8 PyPI version JSON
download
home_pagehttps://github.com/RapidAI/RapidStructure
SummaryTools for classifying the direction of images containing text based ONNXRuntime.
upload_time2023-07-06 10:34:53
maintainer
docs_urlNone
authorSWHL
requires_python>=3.6,<3.12
licenseApache-2.0
keywords ppstructure layout rapidocr rapid_orientation
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ## rapid-orientation
<p align="left">
    <a href=""><img src="https://img.shields.io/badge/Python->=3.6,<3.12-aff.svg"></a>
    <a href=""><img src="https://img.shields.io/badge/OS-Linux%2C%20Win%2C%20Mac-pink.svg"></a>
    <a href="https://pypi.org/project/rapid-orientation/"><img alt="PyPI" src="https://img.shields.io/pypi/v/rapid-orientation"></a>
    <a href="https://pepy.tech/project/rapid-orientation"><img src="https://static.pepy.tech/personalized-badge/rapid-orientation?period=total&units=abbreviation&left_color=grey&right_color=blue&left_text=Downloads"></a>
</p>


### 1. Install package by pypi.
```bash
$ 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](https://github.com/RapidAI/RapidStructure/blob/main/docs/README_Orientation.md) .
- 📌 `layout.png` source: [link](https://github.com/RapidAI/RapidStructure/blob/main/test_images/layout.png)

```python
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:
    ```bash
    $ 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:
    ```bash
    $ rapid_orientation -img layout.png
    ```

### 4. Result.
```python
# Return str, four types::0 | 90 | 180 | 270
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/RapidAI/RapidStructure",
    "name": "rapid-orientation",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6,<3.12",
    "maintainer_email": "",
    "keywords": "ppstructure,layout,rapidocr,rapid_orientation",
    "author": "SWHL",
    "author_email": "liekkaskono@163.com",
    "download_url": "",
    "platform": "Any",
    "description": "## rapid-orientation\n<p align=\"left\">\n    <a href=\"\"><img src=\"https://img.shields.io/badge/Python->=3.6,<3.12-aff.svg\"></a>\n    <a href=\"\"><img src=\"https://img.shields.io/badge/OS-Linux%2C%20Win%2C%20Mac-pink.svg\"></a>\n    <a href=\"https://pypi.org/project/rapid-orientation/\"><img alt=\"PyPI\" src=\"https://img.shields.io/pypi/v/rapid-orientation\"></a>\n    <a href=\"https://pepy.tech/project/rapid-orientation\"><img src=\"https://static.pepy.tech/personalized-badge/rapid-orientation?period=total&units=abbreviation&left_color=grey&right_color=blue&left_text=Downloads\"></a>\n</p>\n\n\n### 1. Install package by pypi.\n```bash\n$ pip install rapid-orientation\n```\n\n### 2. Run by script.\n- 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')`\n- See details, for [README_Layout](https://github.com/RapidAI/RapidStructure/blob/main/docs/README_Orientation.md) .\n- \ud83d\udccc `layout.png` source: [link](https://github.com/RapidAI/RapidStructure/blob/main/test_images/layout.png)\n\n```python\nfrom rapid_orientation import RapidOrientation\n\norientation_engine = RapidOrientation()\n\nwith open('test_images/layout.png', 'rb') as f:\n    img = f.read()\norientation_res, elapse = orientation_engine(img)\nprint(orientation_res)\n```\n\n### 3. Run by command line.\n- Usage:\n    ```bash\n    $ rapid_orientation -h\n    usage: rapid_orientation [-h] -img IMG_PATH [-m MODEL_PATH]\n\n    optional arguments:\n    -h, --help            show this help message and exit\n    -img IMG_PATH, --img_path IMG_PATH\n                        Path to image for layout.\n    -m MODEL_PATH, --model_path MODEL_PATH\n                        The model path used for inference\n    ```\n- Example:\n    ```bash\n    $ rapid_orientation -img layout.png\n    ```\n\n### 4. Result.\n```python\n# Return str, four types:\uff1a0 | 90 | 180 | 270\n```\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "Tools for classifying the direction of images containing text based ONNXRuntime.",
    "version": "0.0.8",
    "project_urls": {
        "Homepage": "https://github.com/RapidAI/RapidStructure"
    },
    "split_keywords": [
        "ppstructure",
        "layout",
        "rapidocr",
        "rapid_orientation"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "63b62cccddad18732ac38a53dc2040068bb7ef4b80d8cbdba4060f2f333264d5",
                "md5": "e41ef5b4050a231924bc8c38ffe8baf8",
                "sha256": "db6ee4d4bea0f98f0ff0df7cd19e6fdb0cfacb85f6e79b9e6129856d5c5f686f"
            },
            "downloads": -1,
            "filename": "rapid_orientation-0.0.8-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e41ef5b4050a231924bc8c38ffe8baf8",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6,<3.12",
            "size": 6289944,
            "upload_time": "2023-07-06T10:34:53",
            "upload_time_iso_8601": "2023-07-06T10:34:53.189912Z",
            "url": "https://files.pythonhosted.org/packages/63/b6/2cccddad18732ac38a53dc2040068bb7ef4b80d8cbdba4060f2f333264d5/rapid_orientation-0.0.8-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-07-06 10:34:53",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "RapidAI",
    "github_project": "RapidStructure",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "rapid-orientation"
}
        
Elapsed time: 0.09380s