@@ -208,7 +208,7 @@ Execute the built executable file:
...
@@ -208,7 +208,7 @@ Execute the built executable file:
./build/ppocr [--param1][--param2][...]
./build/ppocr [--param1][--param2][...]
```
```
**Note**:ppocr uses the `PP-OCRv3` model by default, and the input shape used by the recognition model is `3, 48, 320`, so if you use the recognition function, you need to add the parameter `--rec_img_h=48`, if you do not use the default `PP-OCRv3` model, you do not need to set this parameter.
**Note**:ppocr uses the `PP-OCRv3` model by default, and the input shape used by the recognition model is `3, 48, 320`, if you want to use the old version model, you should add the parameter `--rec_img_h=32`.
Specifically,
Specifically,
...
@@ -222,7 +222,6 @@ Specifically,
...
@@ -222,7 +222,6 @@ Specifically,
--det=true\
--det=true\
--rec=true\
--rec=true\
--cls=true\
--cls=true\
--rec_img_h=48\
```
```
##### 2. det+rec:
##### 2. det+rec:
...
@@ -234,7 +233,6 @@ Specifically,
...
@@ -234,7 +233,6 @@ Specifically,
--det=true\
--det=true\
--rec=true\
--rec=true\
--cls=false\
--cls=false\
--rec_img_h=48\
```
```
##### 3. det
##### 3. det
...
@@ -254,7 +252,6 @@ Specifically,
...
@@ -254,7 +252,6 @@ Specifically,
--det=false\
--det=false\
--rec=true\
--rec=true\
--cls=true\
--cls=true\
--rec_img_h=48\
```
```
##### 5. rec
##### 5. rec
...
@@ -265,7 +262,6 @@ Specifically,
...
@@ -265,7 +262,6 @@ Specifically,
--det=false\
--det=false\
--rec=true\
--rec=true\
--cls=false\
--cls=false\
--rec_img_h=48\
```
```
##### 6. cls
##### 6. cls
...
@@ -330,7 +326,7 @@ More parameters are as follows,
...
@@ -330,7 +326,7 @@ More parameters are as follows,
|rec_model_dir|string|-|Address of recognition inference model|
|rec_model_dir|string|-|Address of recognition inference model|
* Multi-language inference is also supported in PaddleOCR, you can refer to [recognition tutorial](../../doc/doc_en/recognition_en.md) for more supported languages and models in PaddleOCR. Specifically, if you want to infer using multi-language models, you just need to modify values of `rec_char_dict_path` and `rec_model_dir`.
* Multi-language inference is also supported in PaddleOCR, you can refer to [recognition tutorial](../../doc/doc_en/recognition_en.md) for more supported languages and models in PaddleOCR. Specifically, if you want to infer using multi-language models, you just need to modify values of `rec_char_dict_path` and `rec_model_dir`.
@@ -100,7 +100,7 @@ Considering that the features of some channels will be suppressed if the convolu
...
@@ -100,7 +100,7 @@ Considering that the features of some channels will be suppressed if the convolu
The recognition module of PP-OCRv3 is optimized based on the text recognition algorithm [SVTR](https://arxiv.org/abs/2205.00159). RNN is abandoned in SVTR, and the context information of the text line image is more effectively mined by introducing the Transformers structure, thereby improving the text recognition ability.
The recognition module of PP-OCRv3 is optimized based on the text recognition algorithm [SVTR](https://arxiv.org/abs/2205.00159). RNN is abandoned in SVTR, and the context information of the text line image is more effectively mined by introducing the Transformers structure, thereby improving the text recognition ability.
The recognition accuracy of SVTR_inty outperforms PP-OCRv2 recognition model by 5.3%, while the prediction speed nearly 11 times slower. It takes nearly 100ms to predict a text line on CPU. Therefore, as shown in the figure below, PP-OCRv3 adopts the following six optimization strategies to accelerate the recognition model.
The recognition accuracy of SVTR_tiny outperforms PP-OCRv2 recognition model by 5.3%, while the prediction speed nearly 11 times slower. It takes nearly 100ms to predict a text line on CPU. Therefore, as shown in the figure below, PP-OCRv3 adopts the following six optimization strategies to accelerate the recognition model.
@@ -119,7 +119,18 @@ If you do not use the provided test image, you can replace the following `--imag
...
@@ -119,7 +119,18 @@ If you do not use the provided test image, you can replace the following `--imag
['PAIN', 0.9934559464454651]
['PAIN', 0.9934559464454651]
```
```
If you need to use the 2.0 model, please specify the parameter `--ocr_version PP-OCR`, paddleocr uses the PP-OCRv3 model by default(`--ocr_version PP-OCRv3`). More whl package usage can be found in [whl package](./whl_en.md)
**Version**
paddleocr uses the PP-OCRv3 model by default(`--ocr_version PP-OCRv3`). If you want to use other versions, you can set the parameter `--ocr_version`, the specific version description is as follows:
| version name | description |
| --- | --- |
| PP-OCRv3 | support Chinese and English detection and recognition, direction classifier, support multilingual recognition |
| PP-OCRv2 | only supports Chinese and English detection and recognition, direction classifier, multilingual model is not updated |
| PP-OCR | support Chinese and English detection and recognition, direction classifier, support multilingual recognition |
If you want to add your own trained model, you can add model links and keys in [paddleocr](../../paddleocr.py) and recompile.
More whl package usage can be found in [whl package](./whl_en.md)