"...text-generation-inference.git" did not exist on "4b49c50f4c9de2a59dc746e0d1f960e358c70fd2"
Commit c1e65c8e authored by sugon_cxj's avatar sugon_cxj
Browse files

update README

parent 392a95de
# PaddleOCR # paddleocr_paddle_onnxruntime
## 论文 ## 论文
PaddleOCR通过det、rec、cls三个模型分别实现字符检测、字符识别和字符方向分类的应用 PaddleOCR通过det、rec、cls三个模型分别实现字符检测、字符识别和字符方向分类的应用
...@@ -26,7 +26,7 @@ cls: ...@@ -26,7 +26,7 @@ cls:
![image](https://developer.hpccube.com/codes/modelzoo/paddleocr/-/raw/main/configs/cls/mobilenetv3-arc.png) ![image](https://developer.hpccube.com/codes/modelzoo/paddleocr/-/raw/main/configs/cls/mobilenetv3-arc.png)
## 算法原理 ## 算法原理
det->cls->rec->text ![image](https://developer.hpccube.com/codes/modelzoo/paddleocr/-/raw/main/configs/ocr.png)
## 数据集 ## 数据集
推荐使用icdar2015数据集[icdar2015](https://rrc.cvc.uab.es/?ch=4&com=downloads) 推荐使用icdar2015数据集[icdar2015](https://rrc.cvc.uab.es/?ch=4&com=downloads)
...@@ -57,9 +57,13 @@ det->cls->rec->text ...@@ -57,9 +57,13 @@ det->cls->rec->text
| ... | ...
``` ```
## 环境配置 ## 环境配置
[光源](https://www.sourcefind.cn/#/service-details)可拉取训练以及推理的docker镜像,在[光合开发者社区](https://cancon.hpccube.com:65024/4/main/)可下载paddle安装包。PaddleOCR推荐的镜像如下: [光源](https://www.sourcefind.cn/#/service-details)可拉取训练以及推理的docker镜像,在[光合开发者社区](https://cancon.hpccube.com:65024/4/main/)可下载paddle、onnxruntime安装包。PaddleOCR推荐的镜像如下:
``` ```
docker pull image.sourcefind.cn:5000/dcu/admin/base/paddlepaddle:2.3.2-centos7.6-dtk-22.10.1-py37-latest docker pull image.sourcefind.cn:5000/dcu/admin/base/paddlepaddle:2.3.2-centos7.6-dtk-22.10.1-py37-latest
docker run -d -t --privileged --device=/dev/kfd --device=/dev/dri/ --network=host --group-add video --name paddleocr-test image.sourcefind.cn:5000/dcu/admin/base/paddlepaddle:2.3.2-centos7.6-dtk-22.10.1-py37-latest
docker exec -it paddleocr-test bash
pip3 install -r requirements.txt
pip3 install onnxruntime.whl
``` ```
## 训练 ## 训练
...@@ -91,7 +95,7 @@ python3 -m paddle.distributed.launch --gpus '0,1,2,3' tools/eval.py -c configs/ ...@@ -91,7 +95,7 @@ python3 -m paddle.distributed.launch --gpus '0,1,2,3' tools/eval.py -c configs/
``` ```
## 推理 ## 推理
``` ```
python3 tools/infer/predict_system.py --image_dir="./doc/imgs/" --det_model_dir="./ch_PP-OCRv3_det_infer/" --rec_model_dir="./ch_PP-OCRv3_rec_infer/" --use_angle_cls=false --rec_image_shape=3,48,320 --warmup=1 python3 tools/infer/predict_system.py --image_dir="./doc/imgs/" --det_model_dir="./ch_PP-OCRv3_det_infer/" --cls_model_dir="./ch_ppocr_mobile_v2.0_cls_infer/" --rec_model_dir="./ch_PP-OCRv3_rec_infer/" --use_angle_cls=true --rec_image_shape=3,48,320 --warmup=1
``` ```
## 推理(ort) ## 推理(ort)
``` ```
......
...@@ -15,3 +15,4 @@ openpyxl ...@@ -15,3 +15,4 @@ openpyxl
attrdict attrdict
onnx==1.12.0 onnx==1.12.0
protobuf==3.20.0 protobuf==3.20.0
pyyaml
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment