未验证 提交 88982eae 编写于 作者: 文幕地方's avatar 文幕地方 提交者: GitHub

add model train doc of PP-OCRv2 and PP-OCRv3 (#5556)

* add PP-OCRv2

* add PP-OCRv2 benckmark

* update app

* update introduction

* update PP-OCRv2 introduction

* add pipeline of PP-OCRv2

* add PP-OCRv3

* update benckmark

* add paddleocr to requirements

* update

* support paddleocr 2.6.0.1

* rm print code

* add image download

* add model train
上级 48704761
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
"source": [ "source": [
"## 3. 模型如何使用\n", "## 3. 模型如何使用\n",
"\n", "\n",
"### 3.1 模型推理\n", "### 3.1 模型推理\n",
"* 安装PaddleOCR whl包" "* 安装PaddleOCR whl包"
] ]
}, },
...@@ -90,7 +90,8 @@ ...@@ -90,7 +90,8 @@
"outputs": [], "outputs": [],
"source": [ "source": [
"# 命令行使用\n", "# 命令行使用\n",
"! paddleocr --image_dir PaddleOCR/doc/imgs/11.jpg --use_angle_cls true --ocr_version PP-OCRv2" "! wget https://raw.githubusercontent.com/PaddlePaddle/PaddleOCR/dygraph/doc/imgs/11.jpg\n",
"! paddleocr --image_dir 11.jpg --use_angle_cls true --ocr_version PP-OCRv2"
] ]
}, },
{ {
...@@ -108,6 +109,23 @@ ...@@ -108,6 +109,23 @@
"\n" "\n"
] ]
}, },
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### 3.2 模型训练\n",
"PP-OCR系统由文本检测模型、方向分类器和文本识别模型构成,三个模型训练教程可参考如下文档:\n",
"1. 文本检测模型:[文本检测训练教程](https://github.com/PaddlePaddle/PaddleOCR/blob/release%2F2.6/doc/doc_ch/detection.md)\n",
"1. 方向分类器: [方向分类器训练教程](https://github.com/PaddlePaddle/PaddleOCR/blob/release%2F2.6/doc/doc_ch/angle_class.md)\n",
"1. 文本识别模型:[文本识别训练教程](https://github.com/PaddlePaddle/PaddleOCR/blob/release%2F2.6/doc/doc_ch/recognition.md)\n",
"\n",
"模型训练完成后,可以通过指定模型路径的方式串联使用\n",
"命令参考如下:\n",
"```python\n",
"paddleocr --image_dir 11.jpg --use_angle_cls true --ocr_version PP-OCRv2 --det_model_dir=/path/to/det_inference_model --cls_model_dir=/path/to/cls_inference_model --rec_model_dir=/path/to/rec_inference_model\n",
"```"
]
},
{ {
"cell_type": "markdown", "cell_type": "markdown",
"metadata": {}, "metadata": {},
......
...@@ -89,7 +89,8 @@ ...@@ -89,7 +89,8 @@
"outputs": [], "outputs": [],
"source": [ "source": [
"# command line usage\n", "# command line usage\n",
"! paddleocr --image_dir PaddleOCR/doc/imgs/11.jpg --use_angle_cls true --ocr_version PP-OCRv2" "! wget https://raw.githubusercontent.com/PaddlePaddle/PaddleOCR/dygraph/doc/imgs/11.jpg\n",
"! paddleocr --image_dir 11.jpg --use_angle_cls true --ocr_version PP-OCRv2"
] ]
}, },
{ {
...@@ -107,6 +108,22 @@ ...@@ -107,6 +108,22 @@
"\n" "\n"
] ]
}, },
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### 3.2 Train the model.\n",
"The PP-OCR system consists of a text detection model, an angle classifier and a text recognition model. For the three model training tutorials, please refer to the following documents:\n",
"1. text detection model: [text detection training tutorial](https://github.com/PaddlePaddle/PaddleOCR/blob/release%2F2.6/doc/doc_ch/detection.md)\n",
"1. angle classifier: [angle classifier training tutorial](https://github.com/PaddlePaddle/PaddleOCR/blob/release%2F2.6/doc/doc_ch/angle_class.md)\n",
"1. text recognition model: [text recognition training tutorial](https://github.com/PaddlePaddle/PaddleOCR/blob/release%2F2.6/doc/doc_ch/recognition.md)\n",
"\n",
"After the model training is completed, it can be used in series by specifying the model path. The command reference is as follows:\n",
"```python\n",
"paddleocr --image_dir 11.jpg --use_angle_cls true --ocr_version PP-OCRv2 --det_model_dir=/path/to/det_inference_model --cls_model_dir=/path/to/cls_inference_model --rec_model_dir=/path/to/rec_inference_model\n",
"```"
]
},
{ {
"cell_type": "markdown", "cell_type": "markdown",
"metadata": {}, "metadata": {},
......
...@@ -104,7 +104,8 @@ ...@@ -104,7 +104,8 @@
"outputs": [], "outputs": [],
"source": [ "source": [
"# 命令行使用\n", "# 命令行使用\n",
"! paddleocr --image_dir PaddleOCR/doc/imgs/11.jpg --use_angle_cls true" "! wget https://raw.githubusercontent.com/PaddlePaddle/PaddleOCR/dygraph/doc/imgs/11.jpg\n",
"! paddleocr --image_dir 11.jpg --use_angle_cls true"
] ]
}, },
{ {
...@@ -122,6 +123,23 @@ ...@@ -122,6 +123,23 @@
"\n" "\n"
] ]
}, },
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### 3.2 模型训练\n",
"PP-OCR系统由文本检测模型、方向分类器和文本识别模型构成,三个模型训练教程可参考如下文档:\n",
"1. 文本检测模型:[文本检测训练教程](https://github.com/PaddlePaddle/PaddleOCR/blob/release%2F2.6/doc/doc_ch/detection.md)\n",
"1. 方向分类器: [方向分类器训练教程](https://github.com/PaddlePaddle/PaddleOCR/blob/release%2F2.6/doc/doc_ch/angle_class.md)\n",
"1. 文本识别模型:[文本识别训练教程](https://github.com/PaddlePaddle/PaddleOCR/blob/release%2F2.6/doc/doc_ch/recognition.md)\n",
"\n",
"模型训练完成后,可以通过指定模型路径的方式串联使用\n",
"命令参考如下:\n",
"```python\n",
"paddleocr --image_dir 11.jpg --use_angle_cls true --ocr_version PP-OCRv2 --det_model_dir=/path/to/det_inference_model --cls_model_dir=/path/to/cls_inference_model --rec_model_dir=/path/to/rec_inference_model\n",
"```"
]
},
{ {
"cell_type": "markdown", "cell_type": "markdown",
"metadata": {}, "metadata": {},
......
...@@ -106,7 +106,8 @@ ...@@ -106,7 +106,8 @@
"outputs": [], "outputs": [],
"source": [ "source": [
"# command line usage\n", "# command line usage\n",
"! paddleocr --image_dir PaddleOCR/doc/imgs/11.jpg --use_angle_cls true" "! wget https://raw.githubusercontent.com/PaddlePaddle/PaddleOCR/dygraph/doc/imgs/11.jpg\n",
"! paddleocr --image_dir 11.jpg --use_angle_cls true"
] ]
}, },
{ {
...@@ -124,6 +125,22 @@ ...@@ -124,6 +125,22 @@
"\n" "\n"
] ]
}, },
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### 3.2 Train the model.\n",
"The PP-OCR system consists of a text detection model, an angle classifier and a text recognition model. For the three model training tutorials, please refer to the following documents:\n",
"1. text detection model: [text detection training tutorial](https://github.com/PaddlePaddle/PaddleOCR/blob/release%2F2.6/doc/doc_ch/detection.md)\n",
"1. angle classifier: [angle classifier training tutorial](https://github.com/PaddlePaddle/PaddleOCR/blob/release%2F2.6/doc/doc_ch/angle_class.md)\n",
"1. text recognition model: [text recognition training tutorial](https://github.com/PaddlePaddle/PaddleOCR/blob/release%2F2.6/doc/doc_ch/recognition.md)\n",
"\n",
"After the model training is completed, it can be used in series by specifying the model path. The command reference is as follows:\n",
"```python\n",
"paddleocr --image_dir 11.jpg --use_angle_cls true --ocr_version PP-OCRv2 --det_model_dir=/path/to/det_inference_model --cls_model_dir=/path/to/cls_inference_model --rec_model_dir=/path/to/rec_inference_model\n",
"```"
]
},
{ {
"cell_type": "markdown", "cell_type": "markdown",
"metadata": {}, "metadata": {},
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册