Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update docs and remove old docs #13662

Merged
merged 2 commits into from
Aug 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
150 changes: 0 additions & 150 deletions doc/doc_ch/algorithm_rec_svtrv2.md

This file was deleted.

111 changes: 0 additions & 111 deletions doc/doc_ch/algorithm_table_slanet.md

This file was deleted.

10 changes: 5 additions & 5 deletions docs/algorithm/table_recognition/algorithm_table_slanet.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ comments: true

## 1. 算法简介

PaddleOCR 算法模型挑战赛 - 赛题二:通用表格识别任务排行榜第一算法。核心思路
该算法由来自北京交通大学机器学习与认识计算研究团队的ocr识别队研发,其在PaddleOCR算法模型挑战赛 - 赛题二:通用表格识别任务中排行榜荣获一等奖,排行榜精度相比PP-Structure表格识别模型提升0.8%,推理速度提升3倍。优化思路如下

- 1. 改善推理过程,至EOS停止,速度提升3倍
- 2. 升级Backbone为LCNetV2(SSLD版本)
Expand All @@ -16,9 +16,9 @@ PaddleOCR 算法模型挑战赛 - 赛题二:通用表格识别任务排行榜

在PubTabNet表格识别公开数据集上,算法复现效果如下:

|模型|骨干网络|配置文件|acc|
| --- | --- | --- | --- |
|SLANet|LCNetV2|[configs/table/SLANet_lcnetv2.yml](../../configs/table/SLANet_lcnetv2.yml)|76.67%|
|模型|骨干网络|配置文件|acc|下载链接|
| --- | --- | --- | --- | --- |
|SLANet|LCNetV2|[configs/table/SLANet_lcnetv2.yml](https://github.com/PaddlePaddle/PaddleOCR/tree/main/configs/table/SLANet_lcnetv2.yml)|76.67%| [训练模型](https://paddleocr.bj.bcebos.com/openatom/ch_ppstructure_openatom_SLANetv2_train.tar) /[推理模型](https://paddleocr.bj.bcebos.com/openatom/ch_ppstructure_openatom_SLANetv2_infer.tar) |

## 2. 环境配置

Expand Down Expand Up @@ -67,7 +67,7 @@ python3 tools/export_model.py -c configs/table/SLANet_lcnetv2.yml -o Global.pret

```bash linenums="1"
cd ppstructure/
python3.7 table/predict_structure.py --table_model_dir=../inference/slanet_lcnetv2_infer/ --table_char_dict_path=../ppocr/utils/dict/table_structure_dict.txt --image_dir=docs/table/table.jpg --output=../output/table_slanet_lcnetv2 --use_gpu=False --benchmark=True --enable_mkldnn=True
python table/predict_structure.py --table_model_dir=../inference/slanet_lcnetv2_infer/ --table_char_dict_path=../ppocr/utils/dict/table_structure_dict.txt --image_dir=docs/table/table.jpg --output=../output/table_slanet_lcnetv2 --use_gpu=False --benchmark=True --enable_mkldnn=True --table_max_len=512
# 预测文件夹下所有图像时,可修改image_dir为文件夹,如 --image_dir='docs/table'。
```

Expand Down
16 changes: 12 additions & 4 deletions docs/algorithm/text_recognition/algorithm_rec_svtrv2.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,15 @@ comments: true

### SVTRv2算法简介

[PaddleOCR 算法模型挑战赛 - 赛题一:OCR 端到端识别任务](https://aistudio.baidu.com/competition/detail/1131/0/introduction)排行榜第一算法。主要思路:1、检测和识别模型的Backbone升级为RepSVTR;2、识别教师模型升级为SVTRv2,可识别长文本。
🔥 该算法由来自复旦大学视觉与学习实验室([FVL](https://fvl.fudan.edu.cn))的[OpenOCR](https://github.com/Topdu/OpenOCR)团队研发,其在[PaddleOCR算法模型挑战赛 - 赛题一:OCR端到端识别任务](https://aistudio.baidu.com/competition/detail/1131/0/introduction)中荣获一等奖,B榜端到端识别精度相比PP-OCRv4提升2.5%,推理速度持平。主要思路:1、检测和识别模型的Backbone升级为RepSVTR;2、识别教师模型升级为SVTRv2,可识别长文本。

|模型|配置文件|端到端|下载链接|
| --- | --- | --- | --- |
|PP-OCRv4| |A榜 62.77% <br> B榜 62.51%| [Model List](../../ppocr/model_list.md) |
|SVTRv2(Rec Sever)|[configs/rec/SVTRv2/rec_svtrv2_ch.yml](https://github.com/PaddlePaddle/PaddleOCR/tree/main/configs/rec/SVTRv2/rec_svtrv2_ch.yml)|A榜 68.81% (使用PP-OCRv4检测模型)| [训练模型](https://paddleocr.bj.bcebos.com/openatom/openatom_rec_svtrv2_ch_train.tar) / [推理模型](https://paddleocr.bj.bcebos.com/openatom/openatom_rec_svtrv2_ch_infer.tar) |
|RepSVTR(Mobile)|[识别](https://github.com/PaddlePaddle/PaddleOCR/tree/main/configs/rec/SVTRv2/rec_repsvtr_ch.yml) <br> [识别蒸馏](https://github.com/PaddlePaddle/PaddleOCR/tree/main/configs/rec/SVTRv2/rec_svtrv2_ch_distillation.yml) <br> [检测](https://github.com/PaddlePaddle/PaddleOCR/tree/main/configs/det/det_repsvtr_db.yml)|B榜 65.07%| 识别: [训练模型](https://paddleocr.bj.bcebos.com/openatom/openatom_rec_repsvtr_ch_train.tar) / [推理模型](https://paddleocr.bj.bcebos.com/openatom/openatom_rec_repsvtr_ch_infer.tar) <br> 识别蒸馏: [训练模型](https://paddleocr.bj.bcebos.com/openatom/openatom_rec_svtrv2_distill_ch_train.tar) / [推理模型](https://paddleocr.bj.bcebos.com/openatom/openatom_rec_svtrv2_distill_ch_infer.tar) <br> 检测: [训练模型](https://paddleocr.bj.bcebos.com/openatom/openatom_det_repsvtr_ch_train.tar) / [推理模型](https://paddleocr.bj.bcebos.com/openatom/openatom_det_repsvtr_ch_infer.tar) |

🚀 快速使用:参考PP-OCR推理[说明文档](https://github.com/PaddlePaddle/PaddleOCR/blob/main/doc/doc_ch/inference_ppocr.md),将检测和识别模型替换为上表中对应的RepSVTR或SVTRv2推理模型即可使用。

## 2. 环境配置

Expand Down Expand Up @@ -79,7 +87,7 @@ python3 tools/infer/predict_rec.py --image_dir='./doc/imgs_words_en/word_10.png'
# 预测文件夹下所有图像时,可修改image_dir为文件夹,如 --image_dir='./doc/imgs_words_en/'。
```

![](../imgs_words_en/word_10.png)
![](../../ppocr/infer_deploy/images/word_10.png)

执行命令后,上面图像的预测结果(识别的文本和得分)会打印到屏幕上,示例如下:
结果如下:
Expand All @@ -96,15 +104,15 @@ Predicts of ./doc/imgs_words_en/word_10.png:('pain', 0.9999998807907104)

### 4.2 C++推理部署

由于C++预处理后处理还未支持SVTRv2
准备好推理模型后,参考[cpp infer](https://github.com/PaddlePaddle/PaddleOCR/tree/main/deploy/cpp_infer)教程进行操作即可。

### 4.3 Serving服务化部署

暂不支持

### 4.4 更多推理部署

暂不支持
- Paddle2ONNX推理:准备好推理模型后,参考[paddle2onnx](https://github.com/PaddlePaddle/PaddleOCR/tree/main/deploy/paddle2onnx)教程操作。

## 5. FAQ

Expand Down