{"id":18273594,"url":"https://github.com/rapidai/rapidorientation","last_synced_at":"2025-05-16T09:03:05.064Z","repository":{"id":153535936,"uuid":"629757386","full_name":"RapidAI/RapidOrientation","owner":"RapidAI","description":"文档方向分类","archived":false,"fork":false,"pushed_at":"2024-11-20T15:25:26.000Z","size":741,"stargazers_count":218,"open_issues_count":1,"forks_count":15,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-05-11T16:03:19.462Z","etag":null,"topics":["classification","ppstructure","table-recognition"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RapidAI.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":"https://raw.githubusercontent.com/RapidAI/.github/6db6b6b9273f3151094a462a61fbc8e88564562c/assets/Sponsor.png"}},"created_at":"2023-04-19T01:02:41.000Z","updated_at":"2025-05-06T09:05:10.000Z","dependencies_parsed_at":"2024-01-02T01:38:10.164Z","dependency_job_id":"32a6df66-dd7e-42e1-ad50-9e37402fdaaf","html_url":"https://github.com/RapidAI/RapidOrientation","commit_stats":null,"previous_names":["rapidai/rapidorientation","rapidai/rapidstructure"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RapidAI%2FRapidOrientation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RapidAI%2FRapidOrientation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RapidAI%2FRapidOrientation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RapidAI%2FRapidOrientation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RapidAI","download_url":"https://codeload.github.com/RapidAI/RapidOrientation/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254501555,"owners_count":22081528,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["classification","ppstructure","table-recognition"],"created_at":"2024-11-05T12:06:59.823Z","updated_at":"2025-05-16T09:03:05.041Z","avatar_url":"https://github.com/RapidAI.png","language":"Python","funding_links":["https://raw.githubusercontent.com/RapidAI/.github/6db6b6b9273f3151094a462a61fbc8e88564562c/assets/Sponsor.png"],"categories":[],"sub_categories":[],"readme":"\n\u003e ## 📣 原有RapidStructure仓库已经移到[RapidDoc](https://github.com/RapidAI/RapidDoc)下了，RapidStructure也将以RapidDoc方式重生\n\n\u003cdiv align=\"center\"\u003e\n  \u003cdiv align=\"center\"\u003e\n    \u003ch1\u003e\u003cb\u003eRapid Orientation\u003c/b\u003e\u003c/h1\u003e\n  \u003c/div\u003e\n\n\u003ca href=\"\"\u003e\u003cimg src=\"https://img.shields.io/badge/Python-\u003e=3.6,\u003c3.12-aff.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"\"\u003e\u003cimg src=\"https://img.shields.io/badge/OS-Linux%2C%20Win%2C%20Mac-pink.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://pypi.org/project/rapid-orientation/\"\u003e\u003cimg alt=\"PyPI\" src=\"https://img.shields.io/pypi/v/rapid-orientation\"\u003e\u003c/a\u003e\n\u003ca href=\"https://pepy.tech/project/rapid-orientation\"\u003e\u003cimg src=\"https://static.pepy.tech/personalized-badge/rapid-orientation?period=total\u0026units=abbreviation\u0026left_color=grey\u0026right_color=blue\u0026left_text=Downloads\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/RapidAI/RapidOrientation/stargazers\"\u003e\u003cimg src=\"https://img.shields.io/github/stars/RapidAI/RapidOrientation?color=ccf\"\u003e\u003c/a\u003e\n\u003ca href=\"https://semver.org/\"\u003e\u003cimg alt=\"SemVer2.0\" src=\"https://img.shields.io/badge/SemVer-2.0-brightgreen\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/psf/black\"\u003e\u003cimg src=\"https://img.shields.io/badge/code%20style-black-000000.svg\"\u003e\u003c/a\u003e\n\n\u003c/div\u003e\n\n### 简介和说明\n\n该部分主要是做含文字图像方向分类模型。模型来源：[PaddleClas 含文字图像方向分类模型](https://github.com/PaddlePaddle/PaddleClas/blob/177e4be74639c0960efeae2c5166d3226c9a02eb/docs/zh_CN/models/PULC/PULC_text_image_orientation.md)\n\n| 模型类型  |        模型名称         | 模型大小 |                           支持种类                           |\n|:---:|:---:|:---:|:---:|\n|   四方向分类   |   `rapid_orientation.onnx`   |  6.5M | `0 90 180 270`|\n\n### 安装\n\n模型手动下载位置：[link](https://github.com/RapidAI/RapidOrientation/releases/tag/v0.0.0)\n\n由于模型较小，已经将分类模型(`rapid_orientation.onnx`)打包进了whl包内：\n\n  ```bash\n  pip install rapid-orientation\n  ```\n\n### Python脚本运行\n\n```python\nimport cv2\n\nfrom rapid_orientation import RapidOrientation\n\norientation_engine = RapidOrientation()\nimg = cv2.imread(\"tests/test_files/img_rot180_demo.jpg\")\ncls_result, _ = orientation_engine(img)\nprint(cls_result)\n```\n\n### 终端运行\n\n用法:\n\n```bash\n$ rapid_orientation -h\nusage: rapid_orientation [-h] -img IMG_PATH [-m MODEL_PATH]\n\noptional 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\n示例:\n\n```bash\nrapid_orientation -img test_images/layout.png\n```\n\n结果\n\n```python\n# 返回结果为str类型，有四类：0 | 90 | 180 | 270\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frapidai%2Frapidorientation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frapidai%2Frapidorientation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frapidai%2Frapidorientation/lists"}