Skip to content

Commit c794f03

Browse files
committed
Fix
1 parent 9e7a1f4 commit c794f03

File tree

17 files changed

+36
-36
lines changed

17 files changed

+36
-36
lines changed

README_en.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ PaddleOCR is being oversight by a [PMC](https://github.com/PaddlePaddle/PaddleOC
3131

3232
- **🔥 2024.10.18 release PaddleOCR v2.9, including**:
3333
- PaddleX, an All-in-One development tool based on PaddleOCR's advanced technology, supports low-code full-process development capabilities in the OCR field:
34-
- 🎨 [**Rich Model One-Click Call**](https://paddlepaddle.github.io/PaddleOCR/latest/en/paddlex/quick_start.html): Integrates **17 models** related to text image intelligent analysis, general OCR, general layout parsing, table recognition, formula recognition, and seal recognition into 6 pipelines, which can be quickly experienced through a simple **Python API one-click call**. In addition, the same set of APIs also supports a total of **200+ models** in image classification, object detection, image segmentation, and time series forcasting, forming 20+ single-function modules, making it convenient for developers to use **model combinations**.
34+
- 🎨 [**Rich Model One-Click Call**](https://paddlepaddle.github.io/PaddleOCR/latest/en/paddlex/quick_start.html): Integrates **17 models** related to text image intelligent analysis, general OCR, general layout parsing, table recognition, formula recognition, and seal recognition into 6 pipelines, which can be quickly experienced through a simple **Python API one-click call**. In addition, the same set of APIs also supports a total of **200+ models** in image classification, object detection, image segmentation, and time series forecasting, forming 20+ single-function modules, making it convenient for developers to use **model combinations**.
3535

3636
- 🚀 [**High Efficiency and Low barrier of entry**](https://paddlepaddle.github.io/PaddleOCR/latest/en/paddlex/overview.html): Provides two methods based on **unified commands** and **GUI** to achieve simple and efficient use, combination, and customization of models. Supports multiple deployment methods such as **high-performance inference, service-oriented deployment, and edge deployment**. Additionally, for various mainstream hardware such as **NVIDIA GPU, Kunlunxin XPU, Ascend NPU, Cambricon MLU, and Haiguang DCU**, models can be developed with **seamless switching**.
3737

benchmark/PaddleOCR_DBNet/data_loader/modules/make_shrink_map.py

+8-8
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ def shrink_polygon_pyclipper(polygon, shrink_ratio):
2424
subject = [tuple(l) for l in polygon]
2525
padding = pyclipper.PyclipperOffset()
2626
padding.AddPath(subject, pyclipper.JT_ROUND, pyclipper.ET_CLOSEDPOLYGON)
27-
shrinked = padding.Execute(-distance)
28-
if shrinked == []:
29-
shrinked = np.array(shrinked)
27+
shrunk = padding.Execute(-distance)
28+
if shrunk == []:
29+
shrunk = np.array(shrunk)
3030
else:
31-
shrinked = np.array(shrinked[0]).reshape(-1, 2)
32-
return shrinked
31+
shrunk = np.array(shrunk[0]).reshape(-1, 2)
32+
return shrunk
3333

3434

3535
class MakeShrinkMap:
@@ -69,12 +69,12 @@ def __call__(self, data: dict) -> dict:
6969
cv2.fillPoly(mask, polygon.astype(np.int32)[np.newaxis, :, :], 0)
7070
ignore_tags[i] = True
7171
else:
72-
shrinked = self.shrink_func(polygon, self.shrink_ratio)
73-
if shrinked.size == 0:
72+
shrunk = self.shrink_func(polygon, self.shrink_ratio)
73+
if shrunk.size == 0:
7474
cv2.fillPoly(mask, polygon.astype(np.int32)[np.newaxis, :, :], 0)
7575
ignore_tags[i] = True
7676
continue
77-
cv2.fillPoly(gt, [shrinked.astype(np.int32)], 1)
77+
cv2.fillPoly(gt, [shrunk.astype(np.int32)], 1)
7878

7979
data["shrink_map"] = gt
8080
data["shrink_mask"] = mask

deploy/cpp_infer/src/args.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@
1515
#include <gflags/gflags.h>
1616

1717
// common args
18-
DEFINE_bool(use_gpu, false, "Infering with GPU or CPU.");
18+
DEFINE_bool(use_gpu, false, "Inferring with GPU or CPU.");
1919
DEFINE_bool(use_tensorrt, false, "Whether use tensorrt.");
2020
DEFINE_int32(gpu_id, 0, "Device id of GPU to execute.");
21-
DEFINE_int32(gpu_mem, 4000, "GPU id when infering with GPU.");
21+
DEFINE_int32(gpu_mem, 4000, "GPU id when inferring with GPU.");
2222
DEFINE_int32(cpu_threads, 10, "Num of threads with CPU.");
2323
DEFINE_bool(enable_mkldnn, false, "Whether use mkldnn with CPU.");
2424
DEFINE_string(precision, "fp32", "Precision be one of fp32/fp16/int8");

docs/applications/光功率计数码管字符识别.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ python3 -m pip install paddleocr
5353
![](./images/8dca91f016884e16ad9216d416da72ea08190f97d87b4be883f15079b7ebab9a.jpeg)
5454

5555
```bash linenums="1"
56-
paddleocr --lang=ch --det=Fase --image_dir=data
56+
paddleocr --lang=ch --det=False --image_dir=data
5757
```
5858

5959
得到如下测试结果:

docs/applications/液晶屏读数识别.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ python tools/eval.py -c configs/det/ch_PP-OCRv3/ch_PP-OCRv3_det_student.yml -o G
182182

183183
```python linenums="1"
184184
cd ./pretrained_models/
185-
# transform teacher params in best_accuracy.pdparams into teacher_dml.paramers
185+
# transform teacher params in best_accuracy.pdparams into teacher_dml.pdparams
186186
import paddle
187187

188188
# load pretrained model

docs/index.en.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ PaddleOCR is being oversight by a [PMC](https://github.com/PaddlePaddle/PaddleOC
3232

3333
- **🔥 2024.10.18 release PaddleOCR v2.9, including**:
3434
- PaddleX, an All-in-One development tool based on PaddleOCR's advanced technology, supports low-code full-process development capabilities in the OCR field:
35-
- 🎨 [**Rich Model One-Click Call**](https://paddlepaddle.github.io/PaddleOCR/latest/en/paddlex/quick_start.html): Integrates **17 models** related to text image intelligent analysis, general OCR, general layout parsing, table recognition, formula recognition, and seal recognition into 6 pipelines, which can be quickly experienced through a simple **Python API one-click call**. In addition, the same set of APIs also supports a total of **200+ models** in image classification, object detection, image segmentation, and time series forcasting, forming 20+ single-function modules, making it convenient for developers to use **model combinations**.
35+
- 🎨 [**Rich Model One-Click Call**](https://paddlepaddle.github.io/PaddleOCR/latest/en/paddlex/quick_start.html): Integrates **17 models** related to text image intelligent analysis, general OCR, general layout parsing, table recognition, formula recognition, and seal recognition into 6 pipelines, which can be quickly experienced through a simple **Python API one-click call**. In addition, the same set of APIs also supports a total of **200+ models** in image classification, object detection, image segmentation, and time series forecasting, forming 20+ single-function modules, making it convenient for developers to use **model combinations**.
3636

3737
- 🚀 [**High Efficiency and Low barrier of entry**](https://paddlepaddle.github.io/PaddleOCR/latest/en/paddlex/overview.html): Provides two methods based on **unified commands** and **GUI** to achieve simple and efficient use, combination, and customization of models. Supports multiple deployment methods such as **high-performance inference, service-oriented deployment, and edge deployment**. Additionally, for various mainstream hardware such as **NVIDIA GPU, Kunlunxin XPU, Ascend NPU, Cambricon MLU, and Haiguang DCU**, models can be developed with **seamless switching**.
3838

docs/paddlex/overview.en.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
The All-in-One development tool [PaddleX](https://github.com/PaddlePaddle/PaddleX/tree/release/3.0-beta1), based on the advanced technology of PaddleOCR, supports **low-code full-process** development capabilities in the OCR field. Through low-code development, simple and efficient model use, combination, and customization can be achieved. This will significantly **reduce the time consumption** of model development, **lower its development difficulty**, and greatly accelerate the application and promotion speed of models in the industry. Features include:
44

5-
* 🎨 [**Rich Model One-Click Call**](https://paddlepaddle.github.io/PaddleOCR/latest/en/paddlex/quick_start.html): Integrates **17 models** related to text image intelligent analysis, general OCR, general layout parsing, table recognition, formula recognition, and seal recognition into 6 pipelines, which can be quickly experienced through a simple **Python API one-click call**. In addition, the same set of APIs also supports a total of **200+ models** in image classification, object detection, image segmentation, and time series forcasting, forming 20+ single-function modules, making it convenient for developers to use **model combinations**.
5+
* 🎨 [**Rich Model One-Click Call**](https://paddlepaddle.github.io/PaddleOCR/latest/en/paddlex/quick_start.html): Integrates **17 models** related to text image intelligent analysis, general OCR, general layout parsing, table recognition, formula recognition, and seal recognition into 6 pipelines, which can be quickly experienced through a simple **Python API one-click call**. In addition, the same set of APIs also supports a total of **200+ models** in image classification, object detection, image segmentation, and time series forecasting, forming 20+ single-function modules, making it convenient for developers to use **model combinations**.
66

77
* 🚀 [**High Efficiency and Low barrier of entry**](https://paddlepaddle.github.io/PaddleOCR/latest/en/paddlex/overview.html): Provides two methods based on **unified commands** and **GUI** to achieve simple and efficient use, combination, and customization of models. Supports multiple deployment methods such as **high-performance inference, service-oriented deployment, and edge deployment**. Additionally, for various mainstream hardware such as **NVIDIA GPU, Kunlunxin XPU, Ascend NPU, Cambricon MLU, and Haiguang DCU**, models can be developed with **seamless switching**.
88

docs/ppocr/model_train/tricks.en.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,4 @@ Here we have sorted out some Chinese OCR training and prediction tricks, which a
6060

6161
- **Tips**
6262

63-
There are two possible methods for space recognition. (1) Optimize the text detection. For spliting the text at the space in detection results, it needs to divide the text line with space into many segments when label the data for detection. (2) Optimize the text recognition. The space character is introduced into the recognition dictionary. Label the blank line in the training data for text recognition. In addition, we can also concat multiple word lines to synthesize the training data with spaces. PaddleOCR currently uses the second method.
63+
There are two possible methods for space recognition. (1) Optimize the text detection. For splitting the text at the space in detection results, it needs to divide the text line with space into many segments when label the data for detection. (2) Optimize the text recognition. The space character is introduced into the recognition dictionary. Label the blank line in the training data for text recognition. In addition, we can also concat multiple word lines to synthesize the training data with spaces. PaddleOCR currently uses the second method.

docs/ppstructure/infer_deploy/index.en.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Paddle provides a variety of deployment schemes to meet the deployment requireme
1010

1111
![img](./images/deployment-20240704135743247.png)
1212

13-
PP-OCR has supported muti deployment schemes. Click the link to get the specific tutorial.
13+
PP-OCR has supported multi deployment schemes. Click the link to get the specific tutorial.
1414

1515
- [Python Inference](./python_infer.en.md)
1616
- [C++ Inference](./cpp_infer.en.md)

docs/update.en.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ hide:
99

1010
- **🔥 2024.10.18 release PaddleOCR v2.9, including**:
1111
* PaddleX, an All-in-One development tool based on PaddleOCR's advanced technology, supports low-code full-process development capabilities in the OCR field:
12-
* 🎨 [**Rich Model One-Click Call**](https://paddlepaddle.github.io/PaddleOCR/latest/en/paddlex/quick_start.html): Integrates **17 models** related to text image intelligent analysis, general OCR, general layout parsing, table recognition, formula recognition, and seal recognition into 6 pipelines, which can be quickly experienced through a simple **Python API one-click call**. In addition, the same set of APIs also supports a total of **200+ models** in image classification, object detection, image segmentation, and time series forcasting, forming 20+ single-function modules, making it convenient for developers to use **model combinations**.
12+
* 🎨 [**Rich Model One-Click Call**](https://paddlepaddle.github.io/PaddleOCR/latest/en/paddlex/quick_start.html): Integrates **17 models** related to text image intelligent analysis, general OCR, general layout parsing, table recognition, formula recognition, and seal recognition into 6 pipelines, which can be quickly experienced through a simple **Python API one-click call**. In addition, the same set of APIs also supports a total of **200+ models** in image classification, object detection, image segmentation, and time series forecasting, forming 20+ single-function modules, making it convenient for developers to use **model combinations**.
1313

1414
* 🚀 [**High Efficiency and Low barrier of entry**](https://paddlepaddle.github.io/PaddleOCR/latest/en/paddlex/overview.html): Provides two methods based on **unified commands** and **GUI** to achieve simple and efficient use, combination, and customization of models. Supports multiple deployment methods such as **high-performance inference, service-oriented deployment, and edge deployment**. Additionally, for various mainstream hardware such as **NVIDIA GPU, Kunlunxin XPU, Ascend NPU, Cambricon MLU, and Haiguang DCU**, models can be developed with **seamless switching**.
1515

ppocr/data/imaug/east_process.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ def shrink_poly(self, poly, r):
169169
used for generate the score map
170170
:param poly: the text poly
171171
:param r: r in the paper
172-
:return: the shrinked poly
172+
:return: the shrunk poly
173173
"""
174174
# shrink ratio
175175
R = 0.3

ppocr/data/imaug/make_pse_gt.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -88,17 +88,17 @@ def generate_kernel(self, img_size, shrink_ratio, text_polys, ignore_tags=None):
8888
subject = [tuple(l) for l in poly]
8989
pco = pyclipper.PyclipperOffset()
9090
pco.AddPath(subject, pyclipper.JT_ROUND, pyclipper.ET_CLOSEDPOLYGON)
91-
shrinked = np.array(pco.Execute(-distance))
91+
shrunk = np.array(pco.Execute(-distance))
9292

93-
if len(shrinked) == 0 or shrinked.size == 0:
93+
if len(shrunk) == 0 or shrunk.size == 0:
9494
if ignore_tags is not None:
9595
ignore_tags[i] = True
9696
continue
9797
try:
98-
shrinked = np.array(shrinked[0]).reshape(-1, 2)
98+
shrunk = np.array(shrunk[0]).reshape(-1, 2)
9999
except:
100100
if ignore_tags is not None:
101101
ignore_tags[i] = True
102102
continue
103-
cv2.fillPoly(text_kernel, [shrinked.astype(np.int32)], i + 1)
103+
cv2.fillPoly(text_kernel, [shrunk.astype(np.int32)], i + 1)
104104
return text_kernel, ignore_tags

ppocr/data/imaug/make_shrink_map.py

+7-7
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def __call__(self, data):
6464
subject = [tuple(l) for l in polygon]
6565
padding = pyclipper.PyclipperOffset()
6666
padding.AddPath(subject, pyclipper.JT_ROUND, pyclipper.ET_CLOSEDPOLYGON)
67-
shrinked = []
67+
shrunk = []
6868

6969
# Increase the shrink ratio every time we get multiple polygon returned back
7070
possible_ratios = np.arange(self.shrink_ratio, 1, self.shrink_ratio)
@@ -77,18 +77,18 @@ def __call__(self, data):
7777
* (1 - np.power(ratio, 2))
7878
/ polygon_shape.length
7979
)
80-
shrinked = padding.Execute(-distance)
81-
if len(shrinked) == 1:
80+
shrunk = padding.Execute(-distance)
81+
if len(shrunk) == 1:
8282
break
8383

84-
if shrinked == []:
84+
if shrunk == []:
8585
cv2.fillPoly(mask, polygon.astype(np.int32)[np.newaxis, :, :], 0)
8686
ignore_tags[i] = True
8787
continue
8888

89-
for each_shirnk in shrinked:
90-
shirnk = np.array(each_shirnk).reshape(-1, 2)
91-
cv2.fillPoly(gt, [shirnk.astype(np.int32)], 1)
89+
for each_shrink in shrunk:
90+
shrink = np.array(each_shrink).reshape(-1, 2)
91+
cv2.fillPoly(gt, [shrink.astype(np.int32)], 1)
9292

9393
data["shrink_map"] = gt
9494
data["shrink_mask"] = mask

ppocr/modeling/heads/rec_aster_head.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,13 @@ def __init__(
4848
in_channels, out_channels, sDim, attDim, max_len_labels
4949
)
5050
self.time_step = time_step
51-
self.embeder = Embedding(self.time_step, in_channels)
51+
self.embedder = Embedding(self.time_step, in_channels)
5252
self.beam_width = beam_width
5353
self.eos = self.num_classes - 3
5454

5555
def forward(self, x, targets=None, embed=None):
5656
return_dict = {}
57-
embedding_vectors = self.embeder(x)
57+
embedding_vectors = self.embedder(x)
5858

5959
if self.training:
6060
rec_targets, rec_lengths, _ = targets

ppocr/modeling/heads/self_attention.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -166,15 +166,15 @@ def __init__(
166166
),
167167
)
168168
)
169-
self.processer = PrePostProcessLayer(
169+
self.processor = PrePostProcessLayer(
170170
preprocess_cmd, d_model, prepostprocess_dropout
171171
)
172172

173173
def forward(self, enc_input, attn_bias):
174174
for encoder_layer in self.encoder_layers:
175175
enc_output = encoder_layer(enc_input, attn_bias)
176176
enc_input = enc_output
177-
enc_output = self.processer(enc_output)
177+
enc_output = self.processor(enc_output)
178178
return enc_output
179179

180180

ppstructure/pdf2word/pdf2word.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,7 @@ def handleProgressBarRangeSingal(self, max):
508508
self.pb.setRange(0, max)
509509

510510
def handleEndsignalSignal(self):
511-
# enble buttons
511+
# enable buttons
512512
self.openFileButton.setEnabled(True)
513513
self.startCNButton.setEnabled(True)
514514
self.startENButton.setEnabled(True)

test_tipc/test_inference_cpp.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ function func_cpp_inference(){
6666
for batch_size in ${cpp_batch_size_list[*]}; do
6767
precision="fp32"
6868
if [ ${use_mkldnn} = "False" ] && [ ${_flag_quant} = "True" ]; then
69-
precison="int8"
69+
precision="int8"
7070
fi
7171
_save_log_path="${_log_path}/cpp_infer_cpu_usemkldnn_${use_mkldnn}_threads_${threads}_precision_${precision}_batchsize_${batch_size}.log"
7272
set_infer_data=$(func_set_params "${cpp_image_dir_key}" "${_img_dir}")

0 commit comments

Comments
 (0)