tree_en.md 14.1 KB
Newer Older
wangsen's avatar
wangsen committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
# Overall directory structure

The overall directory structure of PaddleOCR is introduced as follows:


```
PaddleOCR
├── configs                                 // Configuration file, you can config the model structure and modify the hyperparameters through the yml file
│   ├── cls                                 // Angle classifier config files
│   │   ├── cls_mv3.yml                     // Training config, including backbone network, head, loss, optimizer and data
│   ├── det                                 // Text detection config files
│   │   ├── det_mv3_db.yml                  // Training config
│   │   ...  
│   └── rec                                 // Text recognition config files
│       ├── rec_mv3_none_bilstm_ctc.yml     // CRNN config
│       ...  
├── deploy                                  // Depoly
│   ├── android_demo                        // Android demo
│   │   ...
│   ├── cpp_infer                           // C++ infer
│   │   ├── CMakeLists.txt                  // Cmake file
│   │   ├── docs                            // Docs
│   │   │   └── windows_vs2019_build.md
│   │   ├── include                         // Head Files
│   │   │   ├── clipper.h                   // clipper
│   │   │   ├── config.h                    // Inference config
│   │   │   ├── ocr_cls.h                   // Angle class
│   │   │   ├── ocr_det.h                   // Text detection
│   │   │   ├── ocr_rec.h                   // Text recognition
│   │   │   ├── postprocess_op.h            // Post-processing
│   │   │   ├── preprocess_op.h             // Pre-processing
│   │   │   └── utility.h                   // tools
│   │   ├── readme.md                       // Documentation
│   │   ├── ...
│   │   ├── src                             // Source code files
│   │   │   ├── clipper.cpp  
│   │   │   ├── config.cpp
│   │   │   ├── main.cpp
│   │   │   ├── ocr_cls.cpp
│   │   │   ├── ocr_det.cpp
│   │   │   ├── ocr_rec.cpp
│   │   │   ├── postprocess_op.cpp
│   │   │   ├── preprocess_op.cpp
│   │   │   └── utility.cpp
│   │   └── tools                           // Compile and execute script
│   │       ├── build.sh                    // Compile script
│   │       ├── config.txt                  // Config file
│   │       └── run.sh                      // Execute script
│   ├── docker
│   │   └── hubserving
│   │       ├── cpu
│   │       │   └── Dockerfile
│   │       ├── gpu
│   │       │   └── Dockerfile
│   │       ├── README_cn.md
│   │       ├── README.md
│   │       └── sample_request.txt
│   ├── hubserving                          // hubserving
│   │   ├── ocr_cls                         // Angle class
│   │   │   ├── config.json                 // Serving config
│   │   │   ├── __init__.py  
│   │   │   ├── module.py                   // Model
│   │   │   └── params.py                   // Parameters
│   │   ├── ocr_det                         // Text detection
│   │   │   ├── config.json                 // serving config
│   │   │   ├── __init__.py  
│   │   │   ├── module.py                   // Model
│   │   │   └── params.py                   // Parameters
│   │   ├── ocr_rec                         // Text recognition
│   │   │   ├── config.json
│   │   │   ├── __init__.py
│   │   │   ├── module.py
│   │   │   └── params.py
│   │   └── ocr_system                      // Inference System
│   │       ├── config.json
│   │       ├── __init__.py
│   │       ├── module.py
│   │       └── params.py
│   ├── imgs                                // Inference images
│   │   ├── cpp_infer_pred_12.png
│   │   └── demo.png
│   ├── ios_demo                            // IOS demo
│   │   ...
│   ├── lite                                // Lite depoly
│   │   ├── cls_process.cc                  // Pre-process for angle class
│   │   ├── cls_process.h
│   │   ├── config.txt                      // Config file
│   │   ├── crnn_process.cc                 // Pre-process for CRNN
│   │   ├── crnn_process.h
│   │   ├── db_post_process.cc              // Pre-process for DB
│   │   ├── db_post_process.h
│   │   ├── Makefile                        // Compile file
│   │   ├── ocr_db_crnn.cc                  // Inference system
│   │   ├── prepare.sh                      // Prepare bash script
│   │   ├── readme.md                       // Documentation
│   │   ...
│   ├── pdserving                           // Pdserving depoly
│   │   ├── det_local_server.py             // Text detection fast version, easy to deploy and fast to predict
│   │   ├── det_web_server.py               // Text detection full version, high stability distributed deployment
│   │   ├── ocr_local_server.py             // Text detection + recognition fast version
│   │   ├── ocr_web_client.py               // client
│   │   ├── ocr_web_server.py               // Text detection + recognition full version
│   │   ├── readme.md                       // Documentation
│   │   ├── rec_local_server.py             // Text recognition fast version
│   │   └── rec_web_server.py               // Text recognition full version
│   └── slim  
│       └── quantization                    // Quantization
│           ├── export_model.py             // Export model
│           ├── quant.py                    // Quantization script
│           └── README.md                   // Documentation
├── doc                                     // Documentation and Tutorials
│   ...
├── ppocr                                   // Core code
│   ├── data                                // Data processing
│   │   ├── imaug                           // Image and label processing code
│   │   │   ├── text_image_aug              // Tia data augment for text recognition
│   │   │   │   ├── __init__.py
│   │   │   │   ├── augment.py              // Tia_distort,tia_stretch and tia_perspective
│   │   │   │   ├── warp_mls.py
│   │   │   ├── __init__.py
│   │   │   ├── east_process.py             // Data processing steps of EAST algorithm
│   │   │   ├── iaa_augment.py              // Data augmentation operations
│   │   │   ├── label_ops.py                // label encode operations
│   │   │   ├── make_border_map.py          // Generate boundary map
│   │   │   ├── make_shrink_map.py          // Generate shrink graph
│   │   │   ├── operators.py                // Basic image operations, such as reading and normalization
│   │   │   ├── randaugment.py              // Random data augmentation operation
│   │   │   ├── random_crop_data.py         // Random crop
│   │   │   ├── rec_img_aug.py              // Data augmentation for text recognition
│   │   │   └── sast_process.py             // Data processing steps of SAST algorithm
│   │   ├── __init__.py                     // Construct dataloader code
│   │   ├── lmdb_dataset.py                 // Read lmdb dataset
│   │   ├── simple_dataset.py               // Read the dataset stored in text format
│   ├── losses                              // Loss function
│   │   ├── __init__.py                     // Construct loss code
│   │   ├── cls_loss.py                     // Angle class loss
│   │   ├── det_basic_loss.py               // Text detection basic loss
│   │   ├── det_db_loss.py                  // DB loss
│   │   ├── det_east_loss.py                // EAST loss
│   │   ├── det_sast_loss.py                // SAST loss
│   │   ├── rec_ctc_loss.py                 // CTC loss
│   │   ├── rec_att_loss.py                 // Attention loss
│   ├── metrics                             // Metrics
│   │   ├── __init__.py                     // Construct metric code
│   │   ├── cls_metric.py                   // Angle class metric
│   │   ├── det_metric.py                   // Text detection metric
    │   ├── eval_det_iou.py                 // Text detection iou code
│   │   ├── rec_metric.py                   // Text recognition metric
│   ├── modeling                            // Network
│   │   ├── architectures                   // Architecture
│   │   │   ├── __init__.py                 // Construct model code
│   │   │   ├── base_model.py               // Base model
│   │   ├── backbones                       // backbones
│   │   │   ├── __init__.py                 // Construct backbone code
│   │   │   ├── det_mobilenet_v3.py         // Text detection mobilenet_v3
│   │   │   ├── det_resnet_vd.py            // Text detection resnet
│   │   │   ├── det_resnet_vd_sast.py       // Text detection resnet backbone of the SAST algorithm
│   │   │   ├── rec_mobilenet_v3.py         // Text recognition mobilenet_v3
│   │   │   └── rec_resnet_vd.py            // Text recognition resnet
│   │   ├── necks                           // Necks
│   │   │   ├── __init__.py                 // Construct neck code
│   │   │   ├── db_fpn.py                   // Standard fpn
│   │   │   ├── east_fpn.py                 // EAST algorithm fpn network
│   │   │   ├── sast_fpn.py                 // SAST algorithm fpn network
│   │   │   ├── rnn.py                      // Character recognition sequence encoding
│   │   ├── heads                           // Heads
│   │   │   ├── __init__.py                 // Construct head code
│   │   │   ├── cls_head.py                 // Angle class head
│   │   │   ├── det_db_head.py              // DB head
│   │   │   ├── det_east_head.py            // EAST head
│   │   │   ├── det_sast_head.py            // SAST head
│   │   │   ├── rec_ctc_head.py             // CTC head
│   │   │   ├── rec_att_head.py             // Attention head
│   │   ├── transforms                      // Transforms
│   │   │   ├── __init__.py                 // Construct transform code
│   │   │   └── tps.py                      // TPS transform
│   ├── optimizer                           // Optimizer
│   │   ├── __init__.py                     // Construct optimizer code
│   │   └── learning_rate.py                // Learning rate decay
│   │   └── optimizer.py                    // Optimizer
│   │   └── regularizer.py                  // Network regularization
│   ├── postprocess                         // Post-processing
│   │   ├── cls_postprocess.py              // Angle class post-processing
│   │   ├── db_postprocess.py               // DB post-processing
│   │   ├── east_postprocess.py             // EAST post-processing
│   │   ├── locality_aware_nms.py           // NMS
│   │   ├── rec_postprocess.py              // Text recognition post-processing
│   │   └── sast_postprocess.py             // SAST post-processing
│   └── utils                               // utils
│       ├── dict                            // Minor language dictionary
│            ....  
│       ├── ic15_dict.txt                   // English number dictionary, case sensitive
│       ├── ppocr_keys_v1.txt               // Chinese dictionary for training Chinese models
│       ├── logging.py                      // logger
│       ├── save_load.py                    // Model saving and loading functions
│       ├── stats.py                        // Training status statistics
│       └── utility.py                      // Utility function
├── tools
│   ├── eval.py                             // Evaluation function
│   ├── export_model.py                     // Export inference model
│   ├── infer                               // Inference based on Inference engine
│   │   ├── predict_cls.py
│   │   ├── predict_det.py
│   │   ├── predict_rec.py
│   │   ├── predict_system.py
│   │   └── utility.py
│   ├── infer_cls.py                        // Angle classification inference based on training engine
│   ├── infer_det.py                        // Text detection inference based on training engine
│   ├── infer_rec.py                        // Text recognition inference based on training engine
│   ├── program.py                          // Inference system
│   ├── test_hubserving.py
│   └── train.py                            // Start training script
├── paddleocr.py
├── README_ch.md                            // Chinese documentation
├── README_en.md                            // English documentation
├── README.md                               // Home page documentation
├── requirements.txt                         // Requirements
├── setup.py                                // Whl package packaging script
├── train.sh                                // Start training bash script