README.md 15 KB
Newer Older
WenmuZhou's avatar
WenmuZhou committed
1
2
English | [简体中文](README_ch.md)

Leif's avatar
Leif committed
3
4
5
6
7
8
9
10
11
12
13
14
15
<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>

WenmuZhou's avatar
WenmuZhou committed
16
## Introduction
Leif's avatar
Leif committed
17

LDOUBLEV's avatar
LDOUBLEV committed
18
PaddleOCR aims to create multilingual, awesome, leading, and practical OCR tools that help users train better models and apply them into practice.
WenmuZhou's avatar
WenmuZhou committed
19

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

<div align="center">
littletomatodonkey's avatar
fix doc  
littletomatodonkey committed
25
    <img src="./doc/imgs_results/ch_ppocr_mobile_v2.0/00006737.jpg" width="800">
MissPenguin's avatar
MissPenguin committed
26
</div>
grasswolfs's avatar
grasswolfs committed
27

MissPenguin's avatar
MissPenguin committed
28
## Recent updates
Leif's avatar
Leif committed
29
30
- **🔥2022.7 Release [OCR scene application collection](./applications/README_en.md)**
    - PaddleOCR scene application covers general, manufacturing, finance, transportation industry of the main OCR vertical applications, including digital tube, LCD screen character, license plate, high-precision SVTR model, etc. **7 vertical models**.
MissPenguin's avatar
MissPenguin committed
31
32
33
34
35
- **🔥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.
- 2021.12.21 Release PaddleOCR [release/2.4](https://github.com/PaddlePaddle/PaddleOCR/tree/release/2.4)
MissPenguin's avatar
MissPenguin committed
36
37
    - Release 1 text detection algorithm ([PSENet](./doc/doc_en/algorithm_det_psenet_en.md)), 3 text recognition algorithms ([NRTR](./doc/doc_en/algorithm_rec_nrtr_en.md)[SEED](./doc/doc_en/algorithm_rec_seed_en.md)[SAR](./doc/doc_en/algorithm_rec_nrtr_en.md)).
    - Release 1 key information extraction algorithm [SDMGR](./ppstructure/docs/kie_en.md) and 3 [DocVQA](./ppstructure/vqa) algorithms (LayoutLM, LayoutLMv2, LayoutXLM).
MissPenguin's avatar
MissPenguin committed
38
39
40
41
- 2021.9.7 Release PaddleOCR [release/2.3](https://github.com/PaddlePaddle/PaddleOCR/tree/release/2.3)
    - Release [PP-OCRv2](./doc/doc_en/ppocr_introduction_en.md#pp-ocrv2). The inference speed of PP-OCRv2 is 220% higher than that of PP-OCR server in CPU device. The F-score of PP-OCRv2 is 7% higher than that of PP-OCR mobile.
- 2021.8.3 Release PaddleOCR [release/2.2](https://github.com/PaddlePaddle/PaddleOCR/tree/release/2.2)
    - Release a new structured documents analysis toolkit, i.e., [PP-Structure](./ppstructure/README.md), support layout analysis and table recognition (One-key to export chart images to Excel files).
WenmuZhou's avatar
WenmuZhou committed
42
43
- [more](./doc/doc_en/update_en.md)

44

MissPenguin's avatar
update  
MissPenguin committed
45
## Features
WenmuZhou's avatar
WenmuZhou committed
46

MissPenguin's avatar
update  
MissPenguin committed
47
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.
dyning's avatar
dyning committed
48

MissPenguin's avatar
update  
MissPenguin committed
49
![](./doc/features_en.png)
LDOUBLEV's avatar
LDOUBLEV committed
50

Evezerest's avatar
Evezerest committed
51
> It is recommended to start with the “quick start” in the document tutorial
LDOUBLEV's avatar
LDOUBLEV committed
52
53


WenmuZhou's avatar
WenmuZhou committed
54
## Quick Experience
dyning's avatar
dyning committed
55

Evezerest's avatar
Evezerest committed
56
- One line of code quick use: [Quick Start](./doc/doc_en/quickstart_en.md)
MissPenguin's avatar
update  
MissPenguin committed
57
58
- 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)
Evezerest's avatar
Evezerest committed
59

MissPenguin's avatar
update  
MissPenguin committed
60
61
62
63
64
65
66
67


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


<a name="Community"></a>
Evezerest's avatar
Evezerest committed
68
## Community👬
dyning's avatar
dyning committed
69

Evezerest's avatar
Evezerest committed
70
- For international developers, we regard [PaddleOCR Discussions](https://github.com/PaddlePaddle/PaddleOCR/discussions) as our international community platform. All ideas and questions can be discussed here in English.
tink2123's avatar
tink2123 committed
71

Evezerest's avatar
Evezerest committed
72
- For Chinese develops, Scan the QR code below with your Wechat, you can join the official technical discussion group. For richer community content, please refer to [中文README](README_ch.md), looking forward to your participation.
LDOUBLEV's avatar
LDOUBLEV committed
73

grasswolfs's avatar
grasswolfs committed
74
<div align="center">
Leif's avatar
Leif committed
75
<img src="https://raw.githubusercontent.com/PaddlePaddle/PaddleOCR/dygraph/doc/joinus.PNG"  width = "150" height = "150" />
grasswolfs's avatar
grasswolfs committed
76
</div>
Leif's avatar
Leif committed
77

WenmuZhou's avatar
WenmuZhou committed
78
<a name="Supported-Chinese-model-list"></a>
Evezerest's avatar
Evezerest committed
79

80
## PP-OCR Series Model List(Update on September 8th)
WenmuZhou's avatar
WenmuZhou committed
81
82
83

| Model introduction                                           | Model name                   | Recommended scene | Detection model                                              | Direction classifier                                         | Recognition model                                            |
| ------------------------------------------------------------ | ---------------------------- | ----------------- | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ |
littletomatodonkey's avatar
littletomatodonkey committed
84
85
| 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) |
LDOUBLEV's avatar
reset  
LDOUBLEV committed
86
| 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)|
Leif's avatar
Leif committed
87
| 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)      |
88
| 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)  |
LDOUBLEV's avatar
LDOUBLEV committed
89

WenmuZhou's avatar
WenmuZhou committed
90

MissPenguin's avatar
update  
MissPenguin committed
91
92
93
- 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).
WenmuZhou's avatar
WenmuZhou committed
94
95

## Tutorials
Leif's avatar
Leif committed
96
- [Environment Preparation](./doc/doc_en/environment_en.md)
MissPenguin's avatar
update  
MissPenguin committed
97
98
99
100
- [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)
Leif's avatar
Leif committed
101
102
        - [Text Detection](./doc/doc_en/detection_en.md)
        - [Text Recognition](./doc/doc_en/recognition_en.md)
103
        - [Text Direction Classification](./doc/doc_en/angle_class_en.md)
MissPenguin's avatar
update  
MissPenguin committed
104
    - Model Compression
Leif's avatar
Leif committed
105
106
        - [Model Quantization](./deploy/slim/quantization/README_en.md)
        - [Model Pruning](./deploy/slim/prune/README_en.md)
MissPenguin's avatar
update  
MissPenguin committed
107
        - [Knowledge Distillation](./doc/doc_en/knowledge_distillation_en.md)
MissPenguin's avatar
update  
MissPenguin committed
108
    - [Inference and Deployment](./deploy/README.md)
MissPenguin's avatar
update  
MissPenguin committed
109
110
        - [Python Inference](./doc/doc_en/inference_ppocr_en.md)
        - [C++ Inference](./deploy/cpp_infer/readme.md)
Leif's avatar
Leif committed
111
        - [Serving](./deploy/pdserving/README.md)
MissPenguin's avatar
update  
MissPenguin committed
112
113
        - [Mobile](./deploy/lite/readme.md)
        - [Paddle2ONNX](./deploy/paddle2onnx/readme.md)
chenenquan's avatar
chenenquan committed
114
        - [PaddleCloud](./deploy/paddlecloud/README.md)
Leif's avatar
Leif committed
115
        - [Benchmark](./doc/doc_en/benchmark_en.md)  
MissPenguin's avatar
update  
MissPenguin committed
116
117
118
- [PP-Structure 🔥](./ppstructure/README.md)
    - [Quick Start](./ppstructure/docs/quickstart_en.md)
    - [Model Zoo](./ppstructure/docs/models_list_en.md)
119
    - [Model training](./doc/doc_en/training_en.md)  
MissPenguin's avatar
update  
MissPenguin committed
120
121
122
123
124
125
126
127
128
129
130
131
132
        - [Layout Parser](./ppstructure/layout/README.md)
        - [Table Recognition](./ppstructure/table/README.md)
        - [DocVQA](./ppstructure/vqa/README.md)
        - [Key Information Extraction](./ppstructure/docs/kie_en.md)
    - [Inference and Deployment](./deploy/README.md)
        - [Python Inference](./ppstructure/docs/inference_en.md)
        - [C++ Inference]()
        - [Serving](./deploy/pdserving/README.md)
- [Academic algorithms](./doc/doc_en/algorithms_en.md)
    - [Text detection](./doc/doc_en/algorithm_overview_en.md)
    - [Text recognition](./doc/doc_en/algorithm_overview_en.md)
    - [End-to-end](./doc/doc_en/algorithm_overview_en.md)
    - [Add New Algorithms to PaddleOCR](./doc/doc_en/add_new_algorithm_en.md)
LDOUBLEV's avatar
LDOUBLEV committed
133
- Data Annotation and Synthesis
grasswolfs's avatar
grasswolfs committed
134
    - [Semi-automatic Annotation Tool: PPOCRLabel](./PPOCRLabel/README.md)
dyning's avatar
dyning committed
135
    - [Data Synthesis Tool: Style-Text](./StyleText/README.md)
grasswolfs's avatar
grasswolfs committed
136
137
    - [Other Data Annotation Tools](./doc/doc_en/data_annotation_en.md)
    - [Other Data Synthesis Tools](./doc/doc_en/data_synthesis_en.md)
WenmuZhou's avatar
WenmuZhou committed
138
- Datasets
139
140
141
    - [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)
MissPenguin's avatar
MissPenguin committed
142
143
144
    - [layout analysis](doc/doc_en/dataset/layout_datasets_en.md)
    - [table recognition](doc/doc_en/dataset/table_datasets_en.md)
    - [DocVQA](doc/doc_en/dataset/docvqa_datasets_en.md)
MissPenguin's avatar
update  
MissPenguin committed
145
- [Code Structure](./doc/doc_en/tree_en.md)
WenmuZhou's avatar
WenmuZhou committed
146
- [Visualization](#Visualization)
MissPenguin's avatar
update  
MissPenguin committed
147
- [Community](#Community)
LDOUBLEV's avatar
LDOUBLEV committed
148
- [New language requests](#language_requests)
WenmuZhou's avatar
WenmuZhou committed
149
150
151
- [FAQ](./doc/doc_en/FAQ_en.md)
- [References](./doc/doc_en/reference_en.md)
- [License](#LICENSE)
dyning's avatar
dyning committed
152

tink2123's avatar
tink2123 committed
153

MissPenguin's avatar
update  
MissPenguin committed
154
<a name="Visualization"></a>
WenmuZhou's avatar
WenmuZhou committed
155
## Visualization [more](./doc/doc_en/visualization_en.md)
MissPenguin's avatar
MissPenguin committed
156
157

<details open>
littletomatodonkey's avatar
littletomatodonkey committed
158
<summary>PP-OCRv3 Chinese model</summary>
dyning's avatar
dyning committed
159
<div align="center">
littletomatodonkey's avatar
littletomatodonkey committed
160
161
162
    <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">
dyning's avatar
dyning committed
163
</div>
MissPenguin's avatar
MissPenguin committed
164
</details>
tink2123's avatar
tink2123 committed
165

MissPenguin's avatar
MissPenguin committed
166
<details open>
littletomatodonkey's avatar
littletomatodonkey committed
167
<summary>PP-OCRv3 English model</summary>
dyning's avatar
dyning committed
168
<div align="center">
littletomatodonkey's avatar
littletomatodonkey committed
169
170
    <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">
dyning's avatar
dyning committed
171
</div>
MissPenguin's avatar
MissPenguin committed
172
</details>
173

MissPenguin's avatar
MissPenguin committed
174
<details open>
littletomatodonkey's avatar
littletomatodonkey committed
175
<summary>PP-OCRv3 Multilingual model</summary>
dyning's avatar
dyning committed
176
<div align="center">
littletomatodonkey's avatar
littletomatodonkey committed
177
178
    <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">
dyning's avatar
dyning committed
179
</div>
MissPenguin's avatar
MissPenguin committed
180
</details>
dyning's avatar
dyning committed
181

MissPenguin's avatar
MissPenguin committed
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
<details open>
<summary>PP-Structure</summary>

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

- SER (Semantic entity recognition)
<div align="center">
    <img src="./ppstructure/docs/vqa/result_ser/zh_val_0_ser.jpg" width="800">
</div>

- RE (Relation Extraction)
<div align="center">
    <img src="./ppstructure/docs/vqa/result_re/zh_val_21_re.jpg" width="800">
</div>

</details>

LDOUBLEV's avatar
LDOUBLEV committed
202
<a name="language_requests"></a>
203
## Guideline for New Language Requests
LDOUBLEV's avatar
LDOUBLEV committed
204

andyjpaddle's avatar
andyjpaddle committed
205
If you want to request a new language support, a PR with 1 following files are needed:
LDOUBLEV's avatar
LDOUBLEV committed
206

grasswolfs's avatar
grasswolfs committed
207
1. In folder [ppocr/utils/dict](./ppocr/utils/dict),
LDOUBLEV's avatar
LDOUBLEV committed
208
209
210
211
212
213
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).

MissPenguin's avatar
MissPenguin committed
214

WenmuZhou's avatar
WenmuZhou committed
215
216
<a name="LICENSE"></a>
## License
217
This project is released under <a href="https://github.com/PaddlePaddle/PaddleOCR/blob/master/LICENSE">Apache 2.0 license</a>