docs: deduplicate images and streamline repository cloning (#18359)
No files matched your search
|
Before Width: | Height: | Size: 498 KiB |
@@ -143,7 +143,7 @@ More details, please refer to [Multilingual OCR Development Plan](https://github
|
||||
|
||||

|
||||
|
||||

|
||||

|
||||
|
||||
### PP-OCRv3 Multilingual model
|
||||
|
||||
|
||||
@@ -157,24 +157,24 @@ paddleocr --image_dir /your/test/image.jpg --lang=hi
|
||||
<details open>
|
||||
<summary>PP-OCRv3 बहुभाषी मॉडल</summary>
|
||||
<div align="center">
|
||||
<img src="../version2.x/ppocr/images/PP-OCRv3/multi_lang/japan_2.jpg" width="800">
|
||||
<img src="../version2.x/ppocr/images/PP-OCRv3/multi_lang/korean_1.jpg" width="800">
|
||||
<img src="../images/japan_2.jpg" width="800">
|
||||
<img src="../images/korean_1.jpg" width="800">
|
||||
</div>
|
||||
</details>
|
||||
|
||||
<details open>
|
||||
<summary>PP-OCRv3 अंग्रेजी मॉडल</summary>
|
||||
<div align="center">
|
||||
<img src="../version2.x/ppocr/images/PP-OCRv3/en/en_1.png" width="800">
|
||||
<img src="../version2.x/ppocr/images/PP-OCRv3/en/en_2.png" width="800">
|
||||
<img src="../images/en_1.png" width="800">
|
||||
<img src="../images/en_2.png" width="800">
|
||||
</div>
|
||||
</details>
|
||||
<details open>
|
||||
<summary>PP-OCRv3 चीनी मॉडल</summary>
|
||||
<div align="center">
|
||||
<img src="../version2.x/ppocr/images/PP-OCRv3/ch/PP-OCRv3-pic001.jpg" width="800">
|
||||
<img src="../version2.x/ppocr/images/PP-OCRv3/ch/PP-OCRv3-pic002.jpg" width="800">
|
||||
<img src="../version2.x/ppocr/images/PP-OCRv3/ch/PP-OCRv3-pic003.jpg" width="800">
|
||||
<img src="../images/PP-OCRv3-pic001.jpg" width="800">
|
||||
<img src="../images/PP-OCRv3-pic002.jpg" width="800">
|
||||
<img src="../images/PP-OCRv3-pic003.jpg" width="800">
|
||||
</div>
|
||||
</details>
|
||||
|
||||
@@ -182,7 +182,7 @@ paddleocr --image_dir /your/test/image.jpg --lang=hi
|
||||
<summary>PP-Structurev2</summary>
|
||||
1. लेआउट एनालाइस + टेबल रिकोगनाइजेशन
|
||||
<div align="center">
|
||||
<img src="../version2.x/ppstructure/images/ppstructure.gif" width="800">
|
||||
<img src="../images/ppstructure-20240708082235651.gif" width="800">
|
||||
</div>
|
||||
2. SER (सिमेंटिक एंटिटी रिकोगनाइजेशन)
|
||||
<div align="center">
|
||||
|
||||
@@ -167,24 +167,24 @@ paddleocr --image_dir /your/test/image.jpg --lang=japan # change for i18n abbr
|
||||
<details open>
|
||||
<summary>PP-OCRv3 多言語モデル</summary>
|
||||
<div align="center">
|
||||
<img src="../version2.x/ppocr/images/PP-OCRv3/multi_lang/japan_2.jpg" width="800">
|
||||
<img src="../version2.x/ppocr/images/PP-OCRv3/multi_lang/korean_1.jpg" width="800">
|
||||
<img src="../images/japan_2.jpg" width="800">
|
||||
<img src="../images/korean_1.jpg" width="800">
|
||||
</div>
|
||||
</details>
|
||||
|
||||
<details open>
|
||||
<summary>PP-OCRv3 英語 モデル</summary>
|
||||
<div align="center">
|
||||
<img src="../version2.x/ppocr/images/PP-OCRv3/en/en_1.png" width="800">
|
||||
<img src="../version2.x/ppocr/images/PP-OCRv3/en/en_2.png" width="800">
|
||||
<img src="../images/en_1.png" width="800">
|
||||
<img src="../images/en_2.png" width="800">
|
||||
</div>
|
||||
</details>
|
||||
<details open>
|
||||
<summary>PP-OCRv3 中国語 モデル</summary>
|
||||
<div align="center">
|
||||
<img src="../version2.x/ppocr/images/PP-OCRv3/ch/PP-OCRv3-pic001.jpg" width="800">
|
||||
<img src="../version2.x/ppocr/images/PP-OCRv3/ch/PP-OCRv3-pic002.jpg" width="800">
|
||||
<img src="../version2.x/ppocr/images/PP-OCRv3/ch/PP-OCRv3-pic003.jpg" width="800">
|
||||
<img src="../images/PP-OCRv3-pic001.jpg" width="800">
|
||||
<img src="../images/PP-OCRv3-pic002.jpg" width="800">
|
||||
<img src="../images/PP-OCRv3-pic003.jpg" width="800">
|
||||
</div>
|
||||
</details>
|
||||
|
||||
@@ -192,7 +192,7 @@ paddleocr --image_dir /your/test/image.jpg --lang=japan # change for i18n abbr
|
||||
<summary>PP-Structurev2</summary>
|
||||
1. レイアウト分析+テーブル認識
|
||||
<div align="center">
|
||||
<img src="../version2.x/ppstructure/images/ppstructure.gif" width="800">
|
||||
<img src="../images/ppstructure-20240708082235651.gif" width="800">
|
||||
</div>
|
||||
2. SER (セマンティックエンティティ認識)
|
||||
<div align="center">
|
||||
|
||||
@@ -165,24 +165,24 @@ paddleocr --image_dir /your/test/image.jpg --lang=korean
|
||||
<details open>
|
||||
<summary>PP-OCRv3 다중 언어 모델</summary>
|
||||
<div align="center">
|
||||
<img src="../version2.x/ppocr/images/PP-OCRv3/multi_lang/japan_2.jpg" width="800">
|
||||
<img src="../version2.x/ppocr/images/PP-OCRv3/multi_lang/korean_1.jpg" width="800">
|
||||
<img src="../images/japan_2.jpg" width="800">
|
||||
<img src="../images/korean_1.jpg" width="800">
|
||||
</div>
|
||||
</details>
|
||||
|
||||
<details open>
|
||||
<summary>PP-OCRv3 영어 모델</summary>
|
||||
<div align="center">
|
||||
<img src="../version2.x/ppocr/images/PP-OCRv3/en/en_1.png" width="800">
|
||||
<img src="../version2.x/ppocr/images/PP-OCRv3/en/en_2.png" width="800">
|
||||
<img src="../images/en_1.png" width="800">
|
||||
<img src="../images/en_2.png" width="800">
|
||||
</div>
|
||||
</details>
|
||||
<details open>
|
||||
<summary>PP-OCRv3 중국어 모델</summary>
|
||||
<div align="center">
|
||||
<img src="../version2.x/ppocr/images/PP-OCRv3/ch/PP-OCRv3-pic001.jpg" width="800">
|
||||
<img src="../version2.x/ppocr/images/PP-OCRv3/ch/PP-OCRv3-pic002.jpg" width="800">
|
||||
<img src="../version2.x/ppocr/images/PP-OCRv3/ch/PP-OCRv3-pic003.jpg" width="800">
|
||||
<img src="../images/PP-OCRv3-pic001.jpg" width="800">
|
||||
<img src="../images/PP-OCRv3-pic002.jpg" width="800">
|
||||
<img src="../images/PP-OCRv3-pic003.jpg" width="800">
|
||||
</div>
|
||||
</details>
|
||||
|
||||
@@ -190,7 +190,7 @@ paddleocr --image_dir /your/test/image.jpg --lang=korean
|
||||
<summary>PP-Structurev2</summary>
|
||||
1. 레이아웃 분석 + 표 인식
|
||||
<div align="center">
|
||||
<img src="../version2.x/ppstructure/images/ppstructure.gif" width="800">
|
||||
<img src="../images/ppstructure-20240708082235651.gif" width="800">
|
||||
</div>
|
||||
2. SER (의미체 인식)
|
||||
<div align="center">
|
||||
|
||||
@@ -88,7 +88,7 @@ PaddleOCR 由 [PMC](https://github.com/PaddlePaddle/PaddleOCR/issues/12122) 监
|
||||
|
||||
<img src="../images/en_2.png" width="600" />
|
||||
|
||||
<img src="../images/en_3-0398013.png" width="600" />
|
||||
<img src="../images/en_3.png" width="600" />
|
||||
|
||||
#### PP-OCRv3多语言模型
|
||||
|
||||
|
||||
@@ -166,24 +166,24 @@ paddleocr --image_dir /your/test/image.jpg --lang=ru
|
||||
<details open>
|
||||
<summary>PP-OCRv3 Многоязычная модель </summary>
|
||||
<div align="center">
|
||||
<img src="../version2.x/ppocr/images/PP-OCRv3/multi_lang/japan_2.jpg" width="800">
|
||||
<img src="../version2.x/ppocr/images/PP-OCRv3/multi_lang/korean_1.jpg" width="800">
|
||||
<img src="../images/japan_2.jpg" width="800">
|
||||
<img src="../images/korean_1.jpg" width="800">
|
||||
</div>
|
||||
</details>
|
||||
|
||||
<details open>
|
||||
<summary>PP-OCRv3 Aнглийская модель </summary>
|
||||
<div align="center">
|
||||
<img src="../version2.x/ppocr/images/PP-OCRv3/en/en_1.png" width="800">
|
||||
<img src="../version2.x/ppocr/images/PP-OCRv3/en/en_2.png" width="800">
|
||||
<img src="../images/en_1.png" width="800">
|
||||
<img src="../images/en_2.png" width="800">
|
||||
</div>
|
||||
</details>
|
||||
<details open>
|
||||
<summary>PP-OCRv3 Kитайская модель </summary>
|
||||
<div align="center">
|
||||
<img src="../version2.x/ppocr/images/PP-OCRv3/ch/PP-OCRv3-pic001.jpg" width="800">
|
||||
<img src="../version2.x/ppocr/images/PP-OCRv3/ch/PP-OCRv3-pic002.jpg" width="800">
|
||||
<img src="../version2.x/ppocr/images/PP-OCRv3/ch/PP-OCRv3-pic003.jpg" width="800">
|
||||
<img src="../images/PP-OCRv3-pic001.jpg" width="800">
|
||||
<img src="../images/PP-OCRv3-pic002.jpg" width="800">
|
||||
<img src="../images/PP-OCRv3-pic003.jpg" width="800">
|
||||
</div>
|
||||
</details>
|
||||
|
||||
@@ -191,7 +191,7 @@ paddleocr --image_dir /your/test/image.jpg --lang=ru
|
||||
<summary>PP-Structurev2</summary>
|
||||
1. анализ макета + распознавание таблиц
|
||||
<div align="center">
|
||||
<img src="../version2.x/ppstructure/images/ppstructure.gif" width="800">
|
||||
<img src="../images/ppstructure-20240708082235651.gif" width="800">
|
||||
</div>
|
||||
2. SER (Семантическое распознавание объектов)
|
||||
<div align="center">
|
||||
|
||||
@@ -76,7 +76,7 @@ python3 tools/infer/predict_sr.py --sr_model_dir=./inference/sr_out --image_dir=
|
||||
|
||||
After executing the command, the super-resolution result of the above image is as follows:
|
||||
|
||||

|
||||

|
||||
|
||||
### 4.2 C++ Inference
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@ python3 tools/infer/predict_sr.py --sr_model_dir=./inference/sr_out --image_dir=
|
||||
|
||||
执行命令后,图像的超分结果如下:
|
||||
|
||||

|
||||

|
||||
|
||||
### 4.2 C++推理
|
||||
|
||||
|
||||
@@ -54,11 +54,11 @@ python3 -m paddle.distributed.launch --gpus '0' tools/eval.py -c configs/sr/sr_t
|
||||
python3 tools/infer_sr.py -c configs/sr/sr_telescope.yml -o Global.pretrained_model={path/to/weights}/best_accuracy Global.infer_img=doc/imgs_words_en/word_52.png
|
||||
```
|
||||
|
||||

|
||||

|
||||
|
||||
After executing the command, the super-resolution result of the above image is as follows:
|
||||
|
||||

|
||||

|
||||
|
||||
## 4. Inference and Deployment
|
||||
|
||||
@@ -79,7 +79,7 @@ python3 tools/infer/predict_sr.py --sr_model_dir=./inference/sr_out --image_dir=
|
||||
|
||||
After executing the command, the super-resolution result of the above image is as follows:
|
||||
|
||||

|
||||

|
||||
|
||||
### 4.2 C++ Inference
|
||||
|
||||
|
||||
@@ -54,11 +54,11 @@ python3 -m paddle.distributed.launch --gpus '0' tools/eval.py -c configs/sr/sr_t
|
||||
python3 tools/infer_sr.py -c configs/sr/sr_telescope.yml -o Global.pretrained_model={path/to/weights}/best_accuracy Global.infer_img=doc/imgs_words_en/word_52.png
|
||||
```
|
||||
|
||||

|
||||

|
||||
|
||||
执行命令后,上面图像的超分结果如下:
|
||||
|
||||

|
||||

|
||||
|
||||
## 4. 推理部署
|
||||
|
||||
@@ -78,7 +78,7 @@ python3 tools/infer/predict_sr.py --sr_model_dir=./inference/sr_out --image_dir=
|
||||
|
||||
执行命令后,图像的超分结果如下:
|
||||
|
||||

|
||||

|
||||
|
||||
### 4.2 C++推理
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 8.2 KiB |
|
Before Width: | Height: | Size: 8.2 KiB |
|
Before Width: | Height: | Size: 16 KiB |
@@ -55,7 +55,7 @@ python3 tools/infer/predict_det.py --image_dir="./doc/imgs_en/img_10.jpg" --det_
|
||||
|
||||
The visualized text detection results are saved to the `./inference_results` folder by default, and the name of the result file is prefixed with `det_res`. Examples of results are as follows:
|
||||
|
||||

|
||||

|
||||
|
||||
**Note**: Since the ICDAR2015 dataset has only 1,000 training images, mainly for English scenes, the above model has very poor detection result on Chinese text images.
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ python3 tools/infer/predict_det.py --image_dir="./doc/imgs_en/img_10.jpg" --det_
|
||||
|
||||
可视化文本检测结果默认保存到`./inference_results`文件夹里面,结果文件的名称前缀为`det_res`。结果示例如下:
|
||||
|
||||

|
||||

|
||||
|
||||
**注意**:由于ICDAR2015数据集只有1000张训练图像,且主要针对英文场景,所以上述模型对中文文本图像检测效果会比较差。
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ python3 tools/infer/predict_det.py --image_dir="./doc/imgs_en/img_10.jpg" --det_
|
||||
|
||||
The visualized text detection results are saved to the `./inference_results` folder by default, and the name of the result file is prefixed with `det_res`.
|
||||
|
||||

|
||||

|
||||
|
||||
### 4.2 C++ Inference
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ python3 tools/infer/predict_det.py --image_dir="./doc/imgs_en/img_10.jpg" --det_
|
||||
|
||||
可视化文本检测结果默认保存到`./inference_results`文件夹里面,结果文件的名称前缀为`det_res`。
|
||||
|
||||

|
||||

|
||||
|
||||
### 4.2 C++推理
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ python3 tools/infer/predict_det.py --det_algorithm="SAST" --image_dir="./doc/img
|
||||
|
||||
The visualized text detection results are saved to the `./inference_results` folder by default, and the name of the result file is prefixed with 'det_res'. Examples of results are as follows:
|
||||
|
||||

|
||||

|
||||
|
||||
#### (2). Curved text detection model (Total-Text)
|
||||
|
||||
@@ -70,7 +70,7 @@ python3 tools/infer/predict_det.py --det_algorithm="SAST" --image_dir="./doc/img
|
||||
|
||||
The visualized text detection results are saved to the `./inference_results` folder by default, and the name of the result file is prefixed with 'det_res'. Examples of results are as follows:
|
||||
|
||||

|
||||

|
||||
|
||||
**Note**: SAST post-processing locality aware NMS has two versions: Python and C++. The speed of C++ version is obviously faster than that of Python version. Due to the compilation version problem of NMS of C++ version, C++ version NMS will be called only in Python 3.5 environment, and python version NMS will be called in other cases.
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ python3 tools/infer/predict_det.py --det_algorithm="SAST" --image_dir="./doc/img
|
||||
|
||||
可视化文本检测结果默认保存到`./inference_results`文件夹里面,结果文件的名称前缀为'det_res'。结果示例如下:
|
||||
|
||||

|
||||

|
||||
|
||||
#### (2). 弯曲文本检测模型(Total-Text)
|
||||
|
||||
@@ -70,7 +70,7 @@ python3 tools/infer/predict_det.py --det_algorithm="SAST" --image_dir="./doc/img
|
||||
|
||||
可视化文本检测结果默认保存到`./inference_results`文件夹里面,结果文件的名称前缀为'det_res'。结果示例如下:
|
||||
|
||||

|
||||

|
||||
|
||||
**注意**:本代码库中,SAST后处理Locality-Aware NMS有python和c++两种版本,c++版速度明显快于python版。由于c++版本nms编译版本问题,只有python3.5环境下会调用c++版nms,其他情况将调用python版nms。
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 125 KiB |
|
Before Width: | Height: | Size: 331 KiB |
|
Before Width: | Height: | Size: 332 KiB |
|
Before Width: | Height: | Size: 332 KiB |
@@ -69,7 +69,7 @@ CRNN 文本识别模型推理,可以执行如下命令:
|
||||
python3 tools/infer/predict_rec.py --image_dir="./doc/imgs_words_en/word_336.png" --rec_model_dir="./inference/rec_crnn/" --rec_image_shape="3, 32, 100" --rec_char_dict_path="./ppocr/utils/ic15_dict.txt"
|
||||
```
|
||||
|
||||

|
||||

|
||||
|
||||
执行命令后,上面图像的识别结果如下:
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ python3 tools/infer/predict_rec.py --image_dir="doc/imgs_words/en/word_1.png" --
|
||||
|
||||
The inference results are as follows:
|
||||
|
||||

|
||||

|
||||
|
||||
````text linenums="1"
|
||||
Predicts of doc/imgs_words/en/word_1.png:('joint ', 0.9999969601631165)
|
||||
|
||||
@@ -66,7 +66,7 @@ python3 tools/infer/predict_rec.py --image_dir="doc/imgs_words/en/word_1.png" --
|
||||
|
||||
推理结果如下所示:
|
||||
|
||||

|
||||

|
||||
|
||||
```text linenums="1"
|
||||
Predicts of doc/imgs_words/en/word_1.png:('joint ', 0.9999969601631165)
|
||||
|
||||
@@ -66,7 +66,7 @@ python3 tools/infer/predict_rec.py --image_dir="doc/imgs_words/en/word_1.png" --
|
||||
|
||||
The inference results are as follows:
|
||||
|
||||

|
||||

|
||||
|
||||
```bash linenums="1"
|
||||
Predicts of doc/imgs_words/en/word_1.png:('joint', 0.9999982714653015)
|
||||
|
||||
@@ -67,7 +67,7 @@ python3 tools/infer/predict_rec.py --image_dir="doc/imgs_words/en/word_1.png" --
|
||||
|
||||
推理结果如下所示:
|
||||
|
||||

|
||||

|
||||
|
||||
```bash linenums="1"
|
||||
Predicts of doc/imgs_words/en/word_1.png:('joint', 0.9999982714653015)
|
||||
|
||||
@@ -66,7 +66,7 @@ STAR-Net text recognition model inference, you can execute the following command
|
||||
python3 tools/infer/predict_rec.py --image_dir="./doc/imgs_words_en/word_336.png" --rec_model_dir="./inference/rec_starnet/" --rec_image_shape="3, 32, 100" --rec_char_dict_path="./ppocr/utils/ic15_dict.txt"
|
||||
```
|
||||
|
||||

|
||||

|
||||
|
||||
The inference results are as follows:
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@ STAR-Net 文本识别模型推理,可以执行如下命令:
|
||||
python3 tools/infer/predict_rec.py --image_dir="./doc/imgs_words_en/word_336.png" --rec_model_dir="./inference/rec_starnet/" --rec_image_shape="3, 32, 100" --rec_char_dict_path="./ppocr/utils/ic15_dict.txt"
|
||||
```
|
||||
|
||||

|
||||

|
||||
|
||||
执行命令后,上面图像的识别结果如下:
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 17 KiB |
|
Before Width: | Height: | Size: 17 KiB |
@@ -80,7 +80,7 @@ The expected output for each mode is as follows:
|
||||
|
||||
| **Detection + Classification + Recognition** | **Detection + Recognition** | **Classification + Recognition** |
|
||||
|----------------------------------------------------------------------------------|--------------------------------------------------------|--------------------------------------------------------|
|
||||
| <img src="./images/run_det_cls_rec-20240806100407184.jpg" width="400"> | <img src="./images/run_det_rec.jpg" width="400"> | <img src="./images/run_cls_rec.jpg" width="400"> |
|
||||
| <img src="images/run_det_cls_rec.jpg" width="400"> | <img src="./images/run_det_rec.jpg" width="400"> | <img src="./images/run_cls_rec.jpg" width="400"> |
|
||||
|
||||
| **Detection** | **Recognition** | **Classification** |
|
||||
|--------------------------------------------------------------------------------|--------------------------------------------------------|--------------------------------------------------------|
|
||||
|
||||
@@ -81,7 +81,7 @@ PaddleOCR demo共提供了6种运行模式,如下图
|
||||
|
||||
| 检测+分类+识别 | 检测+识别 | 分类+识别 |
|
||||
| ------------------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ |
|
||||
| <img src="./images/run_det_cls_rec-20240806100407184.jpg" width="400"> | <img src="./images/run_det_rec.jpg" width="400"> | <img src="./images/run_cls_rec.jpg" width="400"> |
|
||||
| <img src="images/run_det_cls_rec.jpg" width="400"> | <img src="./images/run_det_rec.jpg" width="400"> | <img src="./images/run_cls_rec.jpg" width="400"> |
|
||||
|
||||
| 检测 | 识别 | 分类 |
|
||||
| -------------------------------------------- | -------------------------------------------- | -------------------------------------------- |
|
||||
|
||||
|
Before Width: | Height: | Size: 213 KiB |
@@ -8,15 +8,17 @@ comments: true
|
||||
|
||||
```bash linenums="1"
|
||||
# Recommend
|
||||
git clone https://github.com/PaddlePaddle/PaddleOCR
|
||||
git clone --depth 1 https://github.com/PaddlePaddle/PaddleOCR
|
||||
|
||||
# If you cannot pull successfully due to network problems, you can switch to the mirror hosted on Gitee:
|
||||
|
||||
git clone https://gitee.com/paddlepaddle/PaddleOCR
|
||||
git clone --depth 1 https://gitee.com/paddlepaddle/PaddleOCR
|
||||
|
||||
# Note: The mirror on Gitee may not keep in synchronization with the latest project on GitHub. There might be a delay of 3-5 days. Please try GitHub at first.
|
||||
```
|
||||
|
||||
A shallow clone downloads only the latest revision of the default branch. Add `--branch <branch-name>` when cloning to select another branch. To retrieve the full commit history later, run `git fetch --unshallow` inside the repository.
|
||||
|
||||
## 2. Install third-party libraries
|
||||
|
||||
```bash linenums="1"
|
||||
|
||||
@@ -7,17 +7,19 @@ comments: true
|
||||
## 1. 克隆PaddleOCR repo代码
|
||||
|
||||
```bash linenums="1"
|
||||
git clone https://github.com/PaddlePaddle/PaddleOCR
|
||||
git clone --depth 1 https://github.com/PaddlePaddle/PaddleOCR
|
||||
```
|
||||
|
||||
如果因为网络问题无法pull成功,也可选择使用码云上的托管:
|
||||
|
||||
```bash linenums="1"
|
||||
git clone https://gitee.com/paddlepaddle/PaddleOCR
|
||||
git clone --depth 1 https://gitee.com/paddlepaddle/PaddleOCR
|
||||
```
|
||||
|
||||
注:码云托管代码可能无法实时同步本github项目更新,存在3~5天延时,请优先使用推荐方式。
|
||||
|
||||
浅克隆只下载当前分支的最新版本。若需指定分支,在克隆时增加 `--branch <分支名>`;若需完整提交历史,进入仓库目录后执行 `git fetch --unshallow`。
|
||||
|
||||
## 2. 安装第三方库
|
||||
|
||||
```bash linenums="1"
|
||||
|
||||
|
Before Width: | Height: | Size: 64 KiB |
|
Before Width: | Height: | Size: 461 KiB |
@@ -22,7 +22,7 @@ letters and common punctuation, and the recognition of space characters is optim
|
||||
|
||||
The multilingual models cover Latin, Arabic, Traditional Chinese, Korean, Japanese, etc.:
|
||||
|
||||

|
||||

|
||||
|
||||

|
||||
|
||||
@@ -76,7 +76,7 @@ The supported languages are listed in the [table](#5-support-languages-and-abbre
|
||||
paddleocr --image_dir doc/imgs_en/254.jpg --lang=en
|
||||
```
|
||||
|
||||

|
||||

|
||||
|
||||

|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ PaddleOCR 旨在打造一套丰富、领先、且实用的OCR工具库,不仅
|
||||
|
||||
小语种模型覆盖了拉丁语系、阿拉伯语系、中文繁体、韩语、日语等等:
|
||||
|
||||

|
||||

|
||||
|
||||

|
||||
|
||||
@@ -75,7 +75,7 @@ Paddleocr目前支持80个语种,可以通过修改--lang参数进行切换,
|
||||
paddleocr --image_dir doc/imgs_en/254.jpg --lang=en
|
||||
```
|
||||
|
||||

|
||||

|
||||
|
||||

|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 97 KiB |
|
Before Width: | Height: | Size: 139 KiB |
|
Before Width: | Height: | Size: 89 KiB |
|
Before Width: | Height: | Size: 636 KiB |
|
Before Width: | Height: | Size: 626 KiB |
|
Before Width: | Height: | Size: 498 KiB |
|
Before Width: | Height: | Size: 478 KiB |
|
Before Width: | Height: | Size: 158 KiB |
|
Before Width: | Height: | Size: 213 KiB |
|
Before Width: | Height: | Size: 78 KiB |
|
Before Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 249 KiB |
|
Before Width: | Height: | Size: 231 KiB |
|
Before Width: | Height: | Size: 921 KiB |
@@ -139,7 +139,7 @@ python3 tools/infer_cls.py -c configs/cls/cls_mv3.yml -o Global.pretrained_model
|
||||
|
||||
Input image:
|
||||
|
||||

|
||||

|
||||
|
||||
Get the prediction result of the input image:
|
||||
|
||||
|
||||
@@ -141,7 +141,7 @@ python3 tools/infer_cls.py -c configs/cls/cls_mv3.yml -o Global.pretrained_model
|
||||
|
||||
预测图片:
|
||||
|
||||

|
||||

|
||||
|
||||
得到输入图像的预测结果:
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 921 KiB |
|
Before Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 12 KiB |
@@ -106,7 +106,7 @@ python gen_label.py --mode="rec" --input_path="{path/of/origin/label}" --output_
|
||||
|
||||
The data format is as follows, (a) is the original picture, (b) is the Ground Truth text file corresponding to each picture:
|
||||
|
||||

|
||||

|
||||
|
||||
- Multilingual Datasets
|
||||
|
||||
@@ -469,7 +469,7 @@ python3 tools/infer_rec.py -c configs/rec/PP-OCRv3/en_PP-OCRv3_mobile_rec.yml -o
|
||||
|
||||
Input image:
|
||||
|
||||

|
||||

|
||||
|
||||
Get the prediction result of the input image:
|
||||
|
||||
@@ -487,7 +487,7 @@ python3 tools/infer_rec.py -c configs/rec/ch_ppocr_v2.0/rec_chinese_lite_train_v
|
||||
|
||||
Input image:
|
||||
|
||||

|
||||

|
||||
|
||||
Get the prediction result of the input image:
|
||||
|
||||
|
||||
@@ -104,7 +104,7 @@ python gen_label.py --mode="rec" --input_path="{path/of/origin/label}" --output_
|
||||
```
|
||||
|
||||
数据样式格式如下,(a)为原始图片,(b)为每张图片对应的 Ground Truth 文本文件:
|
||||

|
||||

|
||||
|
||||
- 多语言数据集
|
||||
|
||||
@@ -495,7 +495,7 @@ python3 tools/infer_rec.py -c configs/rec/PP-OCRv3/en_PP-OCRv3_mobile_rec.yml -o
|
||||
|
||||
预测图片:
|
||||
|
||||

|
||||

|
||||
|
||||
得到输入图像的预测结果:
|
||||
|
||||
@@ -514,7 +514,7 @@ python3 tools/infer_rec.py -c configs/rec/ch_ppocr_v2.0/rec_chinese_lite_train_v
|
||||
|
||||
预测图片:
|
||||
|
||||

|
||||

|
||||
|
||||
得到输入图像的预测结果:
|
||||
|
||||
|
||||
@@ -54,19 +54,19 @@ For the performance comparison between PP-OCR series models, please check the [b
|
||||
|
||||
### PP-OCRv3 Chinese model
|
||||
|
||||

|
||||

|
||||

|
||||

|
||||

|
||||

|
||||
|
||||
### PP-OCRv3 English model
|
||||
|
||||

|
||||

|
||||

|
||||

|
||||
|
||||
### PP-OCRv3 Multilingual model
|
||||
|
||||

|
||||

|
||||

|
||||

|
||||
|
||||
## 5. Tutorial
|
||||
|
||||
|
||||
@@ -61,21 +61,21 @@ PP-OCRv3系统pipeline如下:
|
||||
|
||||
### PP-OCRv3 中文模型
|
||||
|
||||

|
||||

|
||||
|
||||

|
||||

|
||||
|
||||

|
||||

|
||||
|
||||
### PP-OCRv3 英文模型
|
||||
|
||||

|
||||

|
||||

|
||||

|
||||
|
||||
### PP-OCRv3 多语言模型
|
||||
|
||||

|
||||

|
||||

|
||||

|
||||
|
||||
## 5. 使用教程
|
||||
|
||||
|
||||
@@ -122,7 +122,7 @@ paddleocr --image_dir ./doc/imgs_en/254.jpg --lang=en
|
||||
|
||||

|
||||
|
||||

|
||||

|
||||
|
||||
The result is a list, each item contains a text box, text and recognition confidence
|
||||
|
||||
|
||||
@@ -119,7 +119,7 @@ paddleocr --image_dir ./imgs_en/254.jpg --lang=en
|
||||
|
||||

|
||||
|
||||

|
||||

|
||||
|
||||
结果是一个list,每个item包含了文本框,文字和识别置信度
|
||||
|
||||
|
||||
@@ -8,25 +8,25 @@ comments: true
|
||||
|
||||
### PP-OCRv3 Chinese model
|
||||
|
||||

|
||||

|
||||
|
||||

|
||||

|
||||
|
||||

|
||||

|
||||
|
||||
### PP-OCRv3 English model
|
||||
|
||||

|
||||

|
||||
|
||||

|
||||

|
||||
|
||||

|
||||

|
||||
|
||||
### PP-OCRv3 Multilingual model
|
||||
|
||||

|
||||

|
||||
|
||||

|
||||

|
||||
|
||||
## PP-OCRv2
|
||||
|
||||
@@ -38,7 +38,7 @@ comments: true
|
||||
|
||||
## ch_ppocr_server_2.0
|
||||
|
||||

|
||||

|
||||
|
||||

|
||||
|
||||
@@ -50,6 +50,6 @@ comments: true
|
||||
|
||||
## (multilingual)_ppocr_mobile_2.0
|
||||
|
||||

|
||||

|
||||
|
||||

|
||||

|
||||
@@ -8,25 +8,25 @@ comments: true
|
||||
|
||||
### PP-OCRv3中文模型
|
||||
|
||||

|
||||

|
||||
|
||||

|
||||

|
||||
|
||||

|
||||

|
||||
|
||||
### PP-OCRv3英文数字模型
|
||||
|
||||

|
||||

|
||||
|
||||

|
||||

|
||||
|
||||

|
||||

|
||||
|
||||
### PP-OCRv3多语言模型
|
||||
|
||||

|
||||

|
||||
|
||||

|
||||

|
||||
|
||||
## 超轻量PP-OCRv2效果展示
|
||||
|
||||
@@ -38,7 +38,7 @@ comments: true
|
||||
|
||||
## 通用PP-OCR server 效果展示
|
||||
|
||||

|
||||

|
||||
|
||||

|
||||
|
||||
@@ -50,6 +50,6 @@ comments: true
|
||||
|
||||
## 多语言识别模型效果展示
|
||||
|
||||

|
||||

|
||||
|
||||

|
||||

|
||||
|
Before Width: | Height: | Size: 234 KiB |
|
Before Width: | Height: | Size: 143 KiB |
|
Before Width: | Height: | Size: 247 KiB |
|
Before Width: | Height: | Size: 189 KiB |
|
Before Width: | Height: | Size: 344 KiB |
|
Before Width: | Height: | Size: 2.5 MiB |
|
Before Width: | Height: | Size: 385 KiB |
@@ -29,7 +29,7 @@ The following figure shows the effect of restoring the layout of documents by us
|
||||
|
||||
The following figures show the effect of restoring the layout of English and Chinese documents by using OCR technique:
|
||||
|
||||

|
||||

|
||||
|
||||

|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ comments: true
|
||||
|
||||
下图分别展示了通过OCR技术,英文文档和中文文档版面恢复的效果:
|
||||
|
||||

|
||||

|
||||
|
||||

|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ PP-StructureV2 supports the independent use or flexible collocation of each modu
|
||||
|
||||
The figure shows the pipeline of layout analysis + table recognition. The image is first divided into four areas of image, text, title and table by layout analysis, and then OCR detection and recognition is performed on the three areas of image, text and title, and the table is performed table recognition, where the image will also be stored for use.
|
||||
|
||||

|
||||

|
||||
|
||||
### 3.1.1 Layout recognition returns the coordinates of a single word
|
||||
|
||||
@@ -67,11 +67,11 @@ Different colored boxes in the figure represent different categories.
|
||||
|
||||

|
||||
|
||||

|
||||

|
||||
|
||||

|
||||
|
||||

|
||||

|
||||
|
||||

|
||||
|
||||
@@ -79,11 +79,11 @@ Different colored boxes in the figure represent different categories.
|
||||
|
||||
In the figure, the red box represents `Question`, the blue box represents `Answer`, and `Question` and `Answer` are connected by green lines.
|
||||
|
||||

|
||||

|
||||
|
||||

|
||||

|
||||
|
||||

|
||||

|
||||
|
||||

|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ PP-StructureV2支持各个模块独立使用或灵活搭配,如,可以单独
|
||||
|
||||
下图展示了版面分析+表格识别的整体流程,图片先有版面分析划分为图像、文本、标题和表格四种区域,然后对图像、文本和标题三种区域进行OCR的检测识别,对表格进行表格识别,其中图像还会被存储下来以便使用。
|
||||
|
||||

|
||||

|
||||
|
||||
### 3.1.1 版面识别返回单字坐标
|
||||
|
||||
@@ -67,11 +67,11 @@ PP-StructureV2支持各个模块独立使用或灵活搭配,如,可以单独
|
||||
|
||||

|
||||
|
||||

|
||||

|
||||
|
||||

|
||||
|
||||

|
||||

|
||||
|
||||

|
||||
|
||||
@@ -79,11 +79,11 @@ PP-StructureV2支持各个模块独立使用或灵活搭配,如,可以单独
|
||||
|
||||
图中红色框表示`问题`,蓝色框表示`答案`,`问题`和`答案`之间使用绿色线连接。
|
||||
|
||||

|
||||

|
||||
|
||||

|
||||

|
||||
|
||||

|
||||

|
||||
|
||||

|
||||
|
||||
|
||||
@@ -59,19 +59,21 @@ To train models or export models, install the training-related dependencies sepa
|
||||
Clone this repository locally, then install the remaining dependencies:
|
||||
|
||||
```bash
|
||||
# Recommended method
|
||||
git clone https://github.com/PaddlePaddle/PaddleOCR
|
||||
|
||||
# (Optional) Switch to a specific branch
|
||||
git checkout release/3.5
|
||||
|
||||
# If cloning fails because of network issues, you can also use the Gitee repository:
|
||||
git clone https://gitee.com/paddlepaddle/PaddleOCR
|
||||
|
||||
# Note: The code hosted on Gitee may lag behind the GitHub repository by 3 to 5 days.
|
||||
# Please prioritize the recommended method.
|
||||
git clone --depth 1 https://github.com/PaddlePaddle/PaddleOCR.git
|
||||
cd PaddleOCR
|
||||
```
|
||||
|
||||
Download only the latest revision of the default branch for training and export. To retrieve its full commit history later, run `git fetch --unshallow` inside the repository.
|
||||
|
||||
To use a specific version, select the branch when cloning, for example:
|
||||
|
||||
```bash
|
||||
git clone --depth 1 --branch release/3.5 https://github.com/PaddlePaddle/PaddleOCR.git PaddleOCR-3.5
|
||||
cd PaddleOCR-3.5
|
||||
```
|
||||
|
||||
Choose one of these two alternatives. If GitHub is unavailable, replace the clone URL with `https://gitee.com/paddlepaddle/PaddleOCR.git`; the mirror may lag by 3–5 days.
|
||||
|
||||
Run the following command to install the remaining training dependencies:
|
||||
|
||||
```bash
|
||||
|
||||
@@ -57,18 +57,21 @@ PaddleOCR 3.5 采用统一推理引擎配置,底层可对接飞桨、Transform
|
||||
将本仓库克隆到本地后安装其余依赖:
|
||||
|
||||
```bash
|
||||
# 推荐方式
|
||||
git clone https://github.com/PaddlePaddle/PaddleOCR
|
||||
|
||||
# (可选)切换到指定分支
|
||||
git checkout release/3.5
|
||||
|
||||
# 如果因为网络问题无法克隆成功,也可选择使用码云上的仓库:
|
||||
git clone https://gitee.com/paddlepaddle/PaddleOCR
|
||||
|
||||
# 注:码云托管代码可能无法实时同步本 GitHub 项目更新,存在3~5天延时,请优先使用推荐方式。
|
||||
git clone --depth 1 https://github.com/PaddlePaddle/PaddleOCR.git
|
||||
cd PaddleOCR
|
||||
```
|
||||
|
||||
默认只下载当前分支的最新版本,适合训练和导出。需要完整提交历史时,在仓库目录执行 `git fetch --unshallow`。
|
||||
|
||||
若需要指定版本,请在克隆时选择分支,例如:
|
||||
|
||||
```bash
|
||||
git clone --depth 1 --branch release/3.5 https://github.com/PaddlePaddle/PaddleOCR.git PaddleOCR-3.5
|
||||
cd PaddleOCR-3.5
|
||||
```
|
||||
|
||||
以上两种方式二选一。如果 GitHub 网络不可用,可将克隆地址替换为 `https://gitee.com/paddlepaddle/PaddleOCR.git`;镜像可能延迟 3–5 天。
|
||||
|
||||
执行如下命令安装其余训练依赖:
|
||||
|
||||
```bash
|
||||
|
||||