README.md 15.7 KB
Newer Older
qq_25193841's avatar
qq_25193841 已提交
1

2
English | [简体中文](README_ch.md) | [हिन्दी](./doc/doc_i18n/README_हिन्द.md) | [日本語](./doc/doc_i18n/README_日本語.md) | [한국인](./doc/doc_i18n/README_한국어.md) | [Pу́сский язы́к](./doc/doc_i18n/README_Ру́сский_язы́к.md)
W
WenmuZhou 已提交
3

qq_25193841's avatar
qq_25193841 已提交
4 5 6 7 8 9 10 11 12 13 14 15 16
<p align="center">
 <img src="./doc/PaddleOCR_log.png" align="middle" width = "600"/>
<p align="center">
<p align="left">
    <a href="./LICENSE"><img src="https://img.shields.io/badge/license-Apache%202-dfd.svg"></a>
    <a href="https://github.com/PaddlePaddle/PaddleOCR/releases"><img src="https://img.shields.io/github/v/release/PaddlePaddle/PaddleOCR?color=ffa"></a>
    <a href=""><img src="https://img.shields.io/badge/python-3.7+-aff.svg"></a>
    <a href=""><img src="https://img.shields.io/badge/os-linux%2C%20win%2C%20mac-pink.svg"></a>
    <a href=""><img src="https://img.shields.io/pypi/format/PaddleOCR?color=c77"></a>
    <a href="https://pypi.org/project/PaddleOCR/"><img src="https://img.shields.io/pypi/dm/PaddleOCR?color=9cf"></a>
    <a href="https://github.com/PaddlePaddle/PaddleOCR/stargazers"><img src="https://img.shields.io/github/stars/PaddlePaddle/PaddleOCR?color=ccf"></a>
</p>

W
WenmuZhou 已提交
17
## Introduction
qq_25193841's avatar
qq_25193841 已提交
18

L
LDOUBLEV 已提交
19
PaddleOCR aims to create multilingual, awesome, leading, and practical OCR tools that help users train better models and apply them into practice.
W
WenmuZhou 已提交
20

M
MissPenguin 已提交
21
<div align="center">
littletomatodonkey's avatar
littletomatodonkey 已提交
22
    <img src="./doc/imgs_results/PP-OCRv3/en/en_4.png" width="800">
M
MissPenguin 已提交
23 24 25
</div>

<div align="center">
littletomatodonkey's avatar
fix doc  
littletomatodonkey 已提交
26
    <img src="./doc/imgs_results/ch_ppocr_mobile_v2.0/00006737.jpg" width="800">
M
MissPenguin 已提交
27
</div>
G
grasswolfs 已提交
28

M
MissPenguin 已提交
29
## Recent updates
M
MissPenguin 已提交
30
- **🔥2022.8.24 Release PaddleOCR [release/2.6](https://github.com/PaddlePaddle/PaddleOCR/tree/release/2.6)**
littletomatodonkey's avatar
littletomatodonkey 已提交
31
  - Release [PP-StructureV2](./ppstructure/),with functions and performance fully upgraded, adapted to Chinese scenes, and new support for [Layout Recovery](./ppstructure/recovery) and **one line command to convert PDF to Word**;
M
MissPenguin 已提交
32 33 34
  - [Layout Analysis](./ppstructure/layout) optimization: model storage reduced by 95%, while speed increased by 11 times, and the average CPU time-cost is only 41ms;
  - [Table Recognition](./ppstructure/table) optimization: 3 optimization strategies are designed, and the model accuracy is improved by 6% under comparable time consumption;
  - [Key Information Extraction](./ppstructure/kie) optimization:a visual-independent model structure is designed, the accuracy of semantic entity recognition is increased by 2.8%, and the accuracy of relation extraction is increased by 9.1%.
littletomatodonkey's avatar
littletomatodonkey 已提交
35

M
MissPenguin 已提交
36 37 38
- **🔥2022.7 Release [OCR scene application collection](./applications/README_en.md)**
    - Release **9 vertical models** such as digital tube, LCD screen, license plate, handwriting recognition model, high-precision SVTR model, etc, covering the main OCR vertical applications in general, manufacturing, finance, and transportation industries.

M
MissPenguin 已提交
39 40 41 42
- **🔥2022.5.9 Release PaddleOCR [release/2.5](https://github.com/PaddlePaddle/PaddleOCR/tree/release/2.5)**
    - Release [PP-OCRv3](./doc/doc_en/ppocr_introduction_en.md#pp-ocrv3): With comparable speed, the effect of Chinese scene is further improved by 5% compared with PP-OCRv2, the effect of English scene is improved by 11%, and the average recognition accuracy of 80 language multilingual models is improved by more than 5%.
    - Release [PPOCRLabelv2](./PPOCRLabel): Add the annotation function for table recognition task, key information extraction task and irregular text image.
    - Release interactive e-book [*"Dive into OCR"*](./doc/doc_en/ocr_book_en.md), covers the cutting-edge theory and code practice of OCR full stack technology.
qq_25193841's avatar
qq_25193841 已提交
43

W
WenmuZhou 已提交
44 45
- [more](./doc/doc_en/update_en.md)

46

M
update  
MissPenguin 已提交
47
## Features
W
WenmuZhou 已提交
48

M
update  
MissPenguin 已提交
49
PaddleOCR support a variety of cutting-edge algorithms related to OCR, and developed industrial featured models/solution [PP-OCR](./doc/doc_en/ppocr_introduction_en.md) and [PP-Structure](./ppstructure/README.md) on this basis, and get through the whole process of data production, model training, compression, inference and deployment.
D
dyning 已提交
50

M
MissPenguin 已提交
51 52 53
<div align="center">
    <img src="https://user-images.githubusercontent.com/25809855/186171245-40abc4d7-904f-4949-ade1-250f86ed3a90.png">
</div>
L
LDOUBLEV 已提交
54

M
update  
MissPenguin 已提交
55
> It is recommended to start with the “quick experience” in the document tutorial
L
LDOUBLEV 已提交
56 57


W
WenmuZhou 已提交
58
## Quick Experience
D
dyning 已提交
59

M
update  
MissPenguin 已提交
60 61 62 63 64 65 66 67 68 69 70 71
- Web online experience for the ultra-lightweight OCR: [Online Experience](https://www.paddlepaddle.org.cn/hub/scene/ocr)
- Mobile DEMO experience (based on EasyEdge and Paddle-Lite, supports iOS and Android systems): [Sign in to the website to obtain the QR code for  installing the App](https://ai.baidu.com/easyedge/app/openSource?from=paddlelite)
- One line of code quick use: [Quick Start](./doc/doc_en/quickstart_en.md)


<a name="book"></a>
## E-book: *Dive Into OCR*
- [Dive Into OCR 📚](./doc/doc_en/ocr_book_en.md)


<a name="Community"></a>
## Community
D
dyning 已提交
72

M
update  
MissPenguin 已提交
73
- **Join us**👬: Scan the QR code below with your Wechat, you can join the official technical discussion group. Looking forward to your participation.
T
tink2123 已提交
74

L
LDOUBLEV 已提交
75

G
grasswolfs 已提交
76
<div align="center">
M
update  
MissPenguin 已提交
77
<img src="https://raw.githubusercontent.com/PaddlePaddle/PaddleOCR/dygraph/doc/joinus.PNG"  width = "200" height = "200" />
G
grasswolfs 已提交
78
</div>
W
WenmuZhou 已提交
79
<a name="Supported-Chinese-model-list"></a>
M
MissPenguin 已提交
80

81
## PP-OCR Series Model List(Update on September 8th)
W
WenmuZhou 已提交
82 83 84

| Model introduction                                           | Model name                   | Recommended scene | Detection model                                              | Direction classifier                                         | Recognition model                                            |
| ------------------------------------------------------------ | ---------------------------- | ----------------- | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ |
littletomatodonkey's avatar
littletomatodonkey 已提交
85 86
| Chinese and English ultra-lightweight PP-OCRv3 model(16.2M)     | ch_PP-OCRv3_xx          | Mobile & Server | [inference model](https://paddleocr.bj.bcebos.com/PP-OCRv3/chinese/ch_PP-OCRv3_det_infer.tar) / [trained model](https://paddleocr.bj.bcebos.com/PP-OCRv3/chinese/ch_PP-OCRv3_det_distill_train.tar) | [inference model](https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_cls_infer.tar) / [trained model](https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_cls_train.tar) | [inference model](https://paddleocr.bj.bcebos.com/PP-OCRv3/chinese/ch_PP-OCRv3_rec_infer.tar) / [trained model](https://paddleocr.bj.bcebos.com/PP-OCRv3/chinese/ch_PP-OCRv3_rec_train.tar) |
| English ultra-lightweight PP-OCRv3 model(13.4M)     | en_PP-OCRv3_xx          | Mobile & Server | [inference model](https://paddleocr.bj.bcebos.com/PP-OCRv3/english/en_PP-OCRv3_det_infer.tar) / [trained model](https://paddleocr.bj.bcebos.com/PP-OCRv3/english/en_PP-OCRv3_det_distill_train.tar) | [inference model](https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_cls_infer.tar) / [trained model](https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_cls_train.tar) | [inference model](https://paddleocr.bj.bcebos.com/PP-OCRv3/english/en_PP-OCRv3_rec_infer.tar) / [trained model](https://paddleocr.bj.bcebos.com/PP-OCRv3/english/en_PP-OCRv3_rec_train.tar) |
L
reset  
LDOUBLEV 已提交
87
| Chinese and English ultra-lightweight PP-OCRv2 model(11.6M) |  ch_PP-OCRv2_xx |Mobile & Server|[inference model](https://paddleocr.bj.bcebos.com/PP-OCRv2/chinese/ch_PP-OCRv2_det_infer.tar) / [trained model](https://paddleocr.bj.bcebos.com/PP-OCRv2/chinese/ch_PP-OCRv2_det_distill_train.tar)| [inference model](https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_cls_infer.tar) / [trained model](https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_cls_train.tar) |[inference model](https://paddleocr.bj.bcebos.com/PP-OCRv2/chinese/ch_PP-OCRv2_rec_infer.tar) / [trained model](https://paddleocr.bj.bcebos.com/PP-OCRv2/chinese/ch_PP-OCRv2_rec_train.tar)|
qq_25193841's avatar
qq_25193841 已提交
88
| Chinese and English ultra-lightweight PP-OCR model (9.4M)       | ch_ppocr_mobile_v2.0_xx      | Mobile & server   |[inference model](https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_det_infer.tar) / [trained model](https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_det_train.tar)|[inference model](https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_cls_infer.tar) / [trained model](https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_cls_train.tar) |[inference model](https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_rec_infer.tar) / [trained model](https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_rec_train.tar)      |
89
| Chinese and English general PP-OCR model (143.4M)               | ch_ppocr_server_v2.0_xx      | Server            |[inference model](https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_server_v2.0_det_infer.tar) / [trained model](https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_server_v2.0_det_train.tar)    |[inference model](https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_cls_infer.tar) / [trained model](https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_mobile_v2.0_cls_train.tar)    |[inference model](https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_server_v2.0_rec_infer.tar) / [trained model](https://paddleocr.bj.bcebos.com/dygraph_v2.0/ch/ch_ppocr_server_v2.0_rec_train.tar)  |
L
LDOUBLEV 已提交
90

W
WenmuZhou 已提交
91

M
update  
MissPenguin 已提交
92 93 94
- For more model downloads (including multiple languages), please refer to [PP-OCR series model downloads](./doc/doc_en/models_list_en.md).
- For a new language request, please refer to [Guideline for new language_requests](#language_requests).
- For structural document analysis models, please refer to [PP-Structure models](./ppstructure/docs/models_list_en.md).
W
WenmuZhou 已提交
95 96

## Tutorials
qq_25193841's avatar
qq_25193841 已提交
97
- [Environment Preparation](./doc/doc_en/environment_en.md)
M
update  
MissPenguin 已提交
98 99 100 101
- [PP-OCR 🔥](./doc/doc_en/ppocr_introduction_en.md)
    - [Quick Start](./doc/doc_en/quickstart_en.md)
    - [Model Zoo](./doc/doc_en/models_en.md)
    - [Model training](./doc/doc_en/training_en.md)
qq_25193841's avatar
qq_25193841 已提交
102 103
        - [Text Detection](./doc/doc_en/detection_en.md)
        - [Text Recognition](./doc/doc_en/recognition_en.md)
104
        - [Text Direction Classification](./doc/doc_en/angle_class_en.md)
M
update  
MissPenguin 已提交
105
    - Model Compression
qq_25193841's avatar
qq_25193841 已提交
106 107
        - [Model Quantization](./deploy/slim/quantization/README_en.md)
        - [Model Pruning](./deploy/slim/prune/README_en.md)
M
update  
MissPenguin 已提交
108
        - [Knowledge Distillation](./doc/doc_en/knowledge_distillation_en.md)
M
update  
MissPenguin 已提交
109
    - [Inference and Deployment](./deploy/README.md)
M
update  
MissPenguin 已提交
110 111
        - [Python Inference](./doc/doc_en/inference_ppocr_en.md)
        - [C++ Inference](./deploy/cpp_infer/readme.md)
qq_25193841's avatar
qq_25193841 已提交
112
        - [Serving](./deploy/pdserving/README.md)
M
update  
MissPenguin 已提交
113 114
        - [Mobile](./deploy/lite/readme.md)
        - [Paddle2ONNX](./deploy/paddle2onnx/readme.md)
Jeffrey Chen's avatar
Jeffrey Chen 已提交
115
        - [PaddleCloud](./deploy/paddlecloud/README.md)
qq_25193841's avatar
qq_25193841 已提交
116
        - [Benchmark](./doc/doc_en/benchmark_en.md)  
M
update  
MissPenguin 已提交
117 118 119
- [PP-Structure 🔥](./ppstructure/README.md)
    - [Quick Start](./ppstructure/docs/quickstart_en.md)
    - [Model Zoo](./ppstructure/docs/models_list_en.md)
120
    - [Model training](./doc/doc_en/training_en.md)  
M
MissPenguin 已提交
121
        - [Layout Analysis](./ppstructure/layout/README.md)
M
update  
MissPenguin 已提交
122
        - [Table Recognition](./ppstructure/table/README.md)
M
MissPenguin 已提交
123
        - [Key Information Extraction](./ppstructure/kie/README.md)
M
update  
MissPenguin 已提交
124 125
    - [Inference and Deployment](./deploy/README.md)
        - [Python Inference](./ppstructure/docs/inference_en.md)
M
MissPenguin 已提交
126
        - [C++ Inference](./deploy/cpp_infer/readme.md)
M
MissPenguin 已提交
127
        - [Serving](./deploy/hubserving/readme_en.md)
M
MissPenguin 已提交
128
- [Academic Algorithms](./doc/doc_en/algorithm_overview_en.md)
M
update  
MissPenguin 已提交
129 130
    - [Text detection](./doc/doc_en/algorithm_overview_en.md)
    - [Text recognition](./doc/doc_en/algorithm_overview_en.md)
M
MissPenguin 已提交
131 132
    - [End-to-end OCR](./doc/doc_en/algorithm_overview_en.md)
    - [Table Recognition](./doc/doc_en/algorithm_overview_en.md)
littletomatodonkey's avatar
littletomatodonkey 已提交
133
    - [Key Information Extraction](./doc/doc_en/algorithm_overview_en.md)  
M
update  
MissPenguin 已提交
134
    - [Add New Algorithms to PaddleOCR](./doc/doc_en/add_new_algorithm_en.md)
L
LDOUBLEV 已提交
135
- Data Annotation and Synthesis
G
grasswolfs 已提交
136
    - [Semi-automatic Annotation Tool: PPOCRLabel](./PPOCRLabel/README.md)
D
dyning 已提交
137
    - [Data Synthesis Tool: Style-Text](./StyleText/README.md)
G
grasswolfs 已提交
138 139
    - [Other Data Annotation Tools](./doc/doc_en/data_annotation_en.md)
    - [Other Data Synthesis Tools](./doc/doc_en/data_synthesis_en.md)
W
WenmuZhou 已提交
140
- Datasets
141 142 143
    - [General OCR Datasets(Chinese/English)](doc/doc_en/dataset/datasets_en.md)
    - [HandWritten_OCR_Datasets(Chinese)](doc/doc_en/dataset/handwritten_datasets_en.md)
    - [Various OCR Datasets(multilingual)](doc/doc_en/dataset/vertical_and_multilingual_datasets_en.md)
M
MissPenguin 已提交
144 145 146
    - [Layout Analysis](doc/doc_en/dataset/layout_datasets_en.md)
    - [Table Recognition](doc/doc_en/dataset/table_datasets_en.md)
    - [Key Information Extraction](doc/doc_en/dataset/kie_datasets_en.md)
M
update  
MissPenguin 已提交
147
- [Code Structure](./doc/doc_en/tree_en.md)
W
WenmuZhou 已提交
148
- [Visualization](#Visualization)
M
update  
MissPenguin 已提交
149
- [Community](#Community)
L
LDOUBLEV 已提交
150
- [New language requests](#language_requests)
W
WenmuZhou 已提交
151 152 153
- [FAQ](./doc/doc_en/FAQ_en.md)
- [References](./doc/doc_en/reference_en.md)
- [License](#LICENSE)
D
dyning 已提交
154

T
tink2123 已提交
155

M
update  
MissPenguin 已提交
156
<a name="Visualization"></a>
W
WenmuZhou 已提交
157
## Visualization [more](./doc/doc_en/visualization_en.md)
M
MissPenguin 已提交
158 159

<details open>
littletomatodonkey's avatar
littletomatodonkey 已提交
160
<summary>PP-OCRv3 Chinese model</summary>
D
dyning 已提交
161
<div align="center">
littletomatodonkey's avatar
littletomatodonkey 已提交
162 163 164
    <img src="doc/imgs_results/PP-OCRv3/ch/PP-OCRv3-pic001.jpg" width="800">
    <img src="doc/imgs_results/PP-OCRv3/ch/PP-OCRv3-pic002.jpg" width="800">
    <img src="doc/imgs_results/PP-OCRv3/ch/PP-OCRv3-pic003.jpg" width="800">
D
dyning 已提交
165
</div>
M
MissPenguin 已提交
166
</details>
T
tink2123 已提交
167

M
MissPenguin 已提交
168
<details open>
littletomatodonkey's avatar
littletomatodonkey 已提交
169
<summary>PP-OCRv3 English model</summary>
D
dyning 已提交
170
<div align="center">
littletomatodonkey's avatar
littletomatodonkey 已提交
171 172
    <img src="doc/imgs_results/PP-OCRv3/en/en_1.png" width="800">
    <img src="doc/imgs_results/PP-OCRv3/en/en_2.png" width="800">
D
dyning 已提交
173
</div>
M
MissPenguin 已提交
174
</details>
175

M
MissPenguin 已提交
176
<details open>
littletomatodonkey's avatar
littletomatodonkey 已提交
177
<summary>PP-OCRv3 Multilingual model</summary>
D
dyning 已提交
178
<div align="center">
littletomatodonkey's avatar
littletomatodonkey 已提交
179 180
    <img src="doc/imgs_results/PP-OCRv3/multi_lang/japan_2.jpg" width="800">
    <img src="doc/imgs_results/PP-OCRv3/multi_lang/korean_1.jpg" width="800">
D
dyning 已提交
181
</div>
M
MissPenguin 已提交
182
</details>
D
dyning 已提交
183

M
MissPenguin 已提交
184
<details open>
littletomatodonkey's avatar
littletomatodonkey 已提交
185
<summary>PP-StructureV2</summary>
M
MissPenguin 已提交
186 187 188 189 190 191 192 193

- layout analysis + table recognition  
<div align="center">
    <img src="./ppstructure/docs/table/ppstructure.GIF" width="800">
</div>

- SER (Semantic entity recognition)
<div align="center">
littletomatodonkey's avatar
littletomatodonkey 已提交
194
    <img src="https://user-images.githubusercontent.com/14270174/197464552-69de557f-edff-4c7f-acbf-069df1ba097f.png" width="600">
M
MissPenguin 已提交
195
</div>
littletomatodonkey's avatar
littletomatodonkey 已提交
196

M
MissPenguin 已提交
197 198 199 200 201 202
<div align="center">
    <img src="https://user-images.githubusercontent.com/14270174/185310636-6ce02f7c-790d-479f-b163-ea97a5a04808.jpg" width="600">
</div>

<div align="center">
    <img src="https://user-images.githubusercontent.com/14270174/185539517-ccf2372a-f026-4a7c-ad28-c741c770f60a.png" width="600">
M
MissPenguin 已提交
203 204 205 206
</div>

- RE (Relation Extraction)
<div align="center">
M
MissPenguin 已提交
207
    <img src="https://user-images.githubusercontent.com/25809855/186094813-3a8e16cc-42e5-4982-b9f4-0134dfb5688d.png" width="600">
littletomatodonkey's avatar
littletomatodonkey 已提交
208
</div>  
M
MissPenguin 已提交
209 210 211 212 213 214 215

<div align="center">
    <img src="https://user-images.githubusercontent.com/14270174/185393805-c67ff571-cf7e-4217-a4b0-8b396c4f22bb.jpg" width="600">
</div>

<div align="center">
    <img src="https://user-images.githubusercontent.com/14270174/185540080-0431e006-9235-4b6d-b63d-0b3c6e1de48f.jpg" width="600">
M
MissPenguin 已提交
216 217 218 219
</div>

</details>

L
LDOUBLEV 已提交
220
<a name="language_requests"></a>
221
## Guideline for New Language Requests
L
LDOUBLEV 已提交
222

A
andyjpaddle 已提交
223
If you want to request a new language support, a PR with 1 following files are needed:
L
LDOUBLEV 已提交
224

G
grasswolfs 已提交
225
1. In folder [ppocr/utils/dict](./ppocr/utils/dict),
L
LDOUBLEV 已提交
226 227 228 229 230 231
it is necessary to submit the dict text to this path and name it with `{language}_dict.txt` that contains a list of all characters. Please see the format example from other files in that folder.

If your language has unique elements, please tell me in advance within any way, such as useful links, wikipedia and so on.

More details, please refer to [Multilingual OCR Development Plan](https://github.com/PaddlePaddle/PaddleOCR/issues/1048).

M
MissPenguin 已提交
232

W
WenmuZhou 已提交
233 234
<a name="LICENSE"></a>
## License
235
This project is released under <a href="https://github.com/PaddlePaddle/PaddleOCR/blob/master/LICENSE">Apache 2.0 license</a>