Metadata-Version: 2.1
Name: rapid-layout
Version: 0.0.2
Summary: RapidLayout
Home-page: https://github.com/RapidAI/RapidOCR
Author: SWHL
Author-email: liekkaskono@163.com
License: Apache-2.0
Keywords: ppstructure,layout,rapidocr
Platform: Any
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Description-Content-Type: text/markdown
Requires-Dist: PyYAML (>=6.0)
Requires-Dist: numpy (>=1.21.6)
Requires-Dist: onnxruntime (>=1.7.0)
Requires-Dist: opencv-python (>=4.5.1.48)

## rapid-layout Package
<p>
    <a href=""><img src="https://img.shields.io/badge/Python-3.6+-aff.svg"></a>
    <a href=""><img src="https://img.shields.io/badge/OS-Linux%2C%20Win%2C%20Mac-pink.svg"></a>
</p>

### 1. Install package by pypi.
```bash
$ pip install rapidocr-layout
```

### 2. Run by script.
```python
import cv2
from rapid_layout import RapidLayout

layout_engine = RapidLayout()

img = cv2.imread('test_images/ch.png')

layout_res, elapse = layout_engine(img)
print(layout_res)
```

### 3. Run by command line.
```bash
$ rapid_layout --img_path test_images/ch.png
```

### 4. Result.
- Return value.
    ```text
    [
    {'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.
    <div align="center">
        <img src="./test_images/layout_result.jpg" width="80%" height="80%">
    </div>


