Skip to content

Commit 523763d

Browse files
committed
chore: Add new pypi token for submit table_cls
1 parent 9ebae19 commit 523763d

File tree

6 files changed

+23
-17
lines changed

6 files changed

+23
-17
lines changed

.github/workflows/table_cls.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ jobs:
4242
steps:
4343
- uses: actions/checkout@v3
4444

45-
- name: Set up Python 3.7
45+
- name: Set up Python 3.10
4646
uses: actions/setup-python@v4
4747
with:
48-
python-version: '3.7'
48+
python-version: '3.10'
4949
architecture: 'x64'
5050

5151
- name: Run setup.py
@@ -60,9 +60,8 @@ jobs:
6060
6161
python setup_table_cls.py bdist_wheel "${{ github.event.head_commit.message }}"
6262
63-
6463
- name: Publish distribution 📦 to PyPI
6564
uses: pypa/gh-action-pypi-publish@v1.5.0
6665
with:
67-
password: ${{ secrets.PYPI_API_TOKEN }}
66+
password: ${{ secrets.TABLE_CLS }}
6867
packages_dir: dist/

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
</div>
1616

1717
### Introduction
18+
1819
This repo is an inference library used for structured recognition of tables in documents, including table structure recognition algorithm models from PaddleOCR, wired and wireless table recognition algorithm models from Alibaba Duguang, etc.
1920

2021
The repo has improved the pre- and post-processing of form recognition and combined with OCR to ensure that the form recognition part can be used directly.
@@ -24,6 +25,7 @@ The repo will continue to focus on the field of table recognition, integrate the
2425
Welcome everyone to continue to pay attention.
2526

2627
### What is Table Structure Recognition?
28+
2729
Table Structure Recognition (TSR) aims to extract the logical or physical structure of table images, thereby converting unstructured table images into machine-readable formats.
2830

2931
Logical structure: represents the row/column relationship of cells (such as the same row, the same column) and the span information of cells.
@@ -37,28 +39,32 @@ Physical structure: includes not only the logical structure, but also the cell's
3739
Figure from: [Improving Table Structure Recognition with Visual-Alignment Sequential Coordinate Modeling](https://openaccess.thecvf.com/content/CVPR2023/html/Huang_Improving_Table_Structure_Recognition_With_Visual-Alignment_Sequential_Coordinate_Modeling_CVPR_2023_paper.html)
3840

3941
### Documentation
42+
4043
Full documentation can be found on [docs](https://rapidai.github.io/TableStructureRec/docs/), in Chinese.
4144

4245
### Acknowledgements
46+
4347
[PaddleOCR Table](https://github.com/PaddlePaddle/PaddleOCR/blob/4b17511491adcfd0f3e2970895d06814d1ce56cc/ppstructure/table/README_ch.md)
4448

4549
[Cycle CenterNet](https://www.modelscope.cn/models/damo/cv_dla34_table-structure-recognition_cycle-centernet/summary)
4650

4751
[LORE](https://www.modelscope.cn/models/damo/cv_resnet-transformer_table-structure-recognition_lore/summary)
4852

49-
5053
### Contributing
54+
5155
Pull requests are welcome. For major changes, please open an issue first
5256
to discuss what you would like to change.
5357

5458
Please make sure to update tests as appropriate.
5559

5660
### [Sponsor](https://rapidai.github.io/Knowledge-QA-LLM/docs/sponsor/)
61+
5762
If you want to sponsor the project, you can directly click the **Buy me a coffee** image, please write a note (e.g. your github account name) to facilitate adding to the sponsorship list below.
5863

5964
<div align="left">
6065
<a href="https://www.buymeacoffee.com/SWHL"><img src="https://raw.githubusercontent.com/RapidAI/.github/main/assets/buymeacoffe.png" width="30%" height="30%"></a>
6166
</div>
6267

6368
### License
64-
This project is released under the [Apache 2.0 license](https://github.com/RapidAI/TableStructureRec/blob/c41bbd23898cb27a957ed962b0ffee3c74dfeff1/LICENSE).
69+
70+
This project is released under the [Apache 2.0 license](https://github.com/RapidAI/TableStructureRec/blob/c41bbd23898cb27a957ed962b0ffee3c74dfeff1/LICENSE).

demo_table_cls.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
from table_cls import TableCls
33

44
table_cls = TableCls()
5-
output_dir = "outputs"
65
img_path = "tests/test_files/table_cls/lineless_table.png"
76
cls_str, elapse = table_cls(img_path)
87
print(cls_str)

docs/README_zh.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
</div>
1616

1717
### 简介
18+
1819
该仓库是用来对文档中表格做结构化识别的推理库,包括来自PaddleOCR的表格结构识别算法模型、来自阿里读光有线和无线表格识别算法模型等。
1920

2021
该仓库将表格识别前后处理做了完善,并结合OCR,保证表格识别部分可直接使用。
@@ -24,6 +25,7 @@
2425
欢迎大家持续关注。
2526

2627
### 表格结构化识别
28+
2729
表格结构识别(Table Structure Recognition, TSR)旨在提取表格图像的逻辑或物理结构,从而将非结构化的表格图像转换为机器可读的格式。
2830

2931
逻辑结构:表示单元格的行/列关系(例如同行、同列)和单元格的跨度信息。
@@ -37,24 +39,27 @@
3739
图来自: [Improving Table Structure Recognition with Visual-Alignment Sequential Coordinate Modeling](https://openaccess.thecvf.com/content/CVPR2023/html/Huang_Improving_Table_Structure_Recognition_With_Visual-Alignment_Sequential_Coordinate_Modeling_CVPR_2023_paper.html)
3840

3941
### 文档
42+
4043
完整文档请移步:[docs](https://rapidai.github.io/TableStructureRec/docs/)
4144

4245
### 致谢
46+
4347
[PaddleOCR 表格识别](https://github.com/PaddlePaddle/PaddleOCR/blob/4b17511491adcfd0f3e2970895d06814d1ce56cc/ppstructure/table/README_ch.md)
4448

4549
[读光-表格结构识别-有线表格](https://www.modelscope.cn/models/damo/cv_dla34_table-structure-recognition_cycle-centernet/summary)
4650

4751
[读光-表格结构识别-无线表格](https://www.modelscope.cn/models/damo/cv_resnet-transformer_table-structure-recognition_lore/summary)
4852

49-
5053
### 贡献指南
54+
5155
欢迎提交请求。对于重大更改,请先打开issue讨论您想要改变的内容。
5256

5357
请确保适当更新测试。
5458

5559
### [赞助](https://rapidai.github.io/Knowledge-QA-LLM/docs/sponsor/)
56-
如果您想要赞助该项目,可直接点击当前页最上面的Sponsor按钮,请写好备注(**您的Github账号名称**),方便添加到赞助列表中。
5760

61+
如果您想要赞助该项目,可直接点击当前页最上面的Sponsor按钮,请写好备注(**您的Github账号名称**),方便添加到赞助列表中。
5862

5963
### 开源许可证
60-
该项目采用[Apache 2.0](https://github.com/RapidAI/TableStructureRec/blob/c41bbd23898cb27a957ed962b0ffee3c74dfeff1/LICENSE)开源许可证。
64+
65+
该项目采用[Apache 2.0](https://github.com/RapidAI/TableStructureRec/blob/c41bbd23898cb27a957ed962b0ffee3c74dfeff1/LICENSE)开源许可证。

table_cls/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import time
2-
32
from pathlib import Path
3+
44
import numpy as np
55
import onnxruntime
66
from PIL import Image

table_cls/utils.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,9 @@
22
from pathlib import Path
33
from typing import Union
44

5-
from PIL import UnidentifiedImageError
6-
from PIL import Image
7-
import numpy as np
85
import cv2
6+
import numpy as np
7+
from PIL import Image, UnidentifiedImageError
98

109
InputType = Union[str, np.ndarray, bytes, Path, Image.Image]
1110

@@ -15,9 +14,7 @@ class LoadImageError(Exception):
1514

1615

1716
class LoadImage:
18-
def __init__(
19-
self,
20-
):
17+
def __init__(self):
2118
pass
2219

2320
def __call__(self, img: InputType) -> np.ndarray:

0 commit comments

Comments
 (0)