@ -135,7 +135,7 @@ If you need to customize dic file, please add character_dict_path field in confi
< a name = "Add_space_category" > < / a >
< a name = "Add_space_category" > < / a >
- Add space category
- Add space category
If you want to support the recognition of the `space` category, please set the `use_space_char` field in the yml file to ` t rue`.
If you want to support the recognition of the `space` category, please set the `use_space_char` field in the yml file to ` T rue`.
**Note: use_space_char only takes effect when character_type=ch**
**Note: use_space_char only takes effect when character_type=ch**
@ -183,8 +183,8 @@ If the evaluation set is large, the test will be time-consuming. It is recommend
| Configuration file | Algorithm | backbone | trans | seq | pred |
| Configuration file | Algorithm | backbone | trans | seq | pred |
| :--------: | :-------: | :-------: | :-------: | :-----: | :-----: |
| :--------: | :-------: | :-------: | :-------: | :-----: | :-----: |
| [rec_chinese_lite_train_v 1.1.yml](../../configs/rec/ch_ppocr_v1.1/rec_chinese_lite_train_v1.1 .yml) | CRNN | Mobilenet_v3 small 0.5 | None | BiLSTM | ctc |
| [rec_chinese_lite_train_v 2.0.yml](../../configs/rec/ch_ppocr_v2.0/rec_chinese_lite_train_v2.0 .yml) | CRNN | Mobilenet_v3 small 0.5 | None | BiLSTM | ctc |
| [rec_chinese_common_train_v 1.1.yml](../../configs/rec/ch_ppocr_v1.1/rec_chinese_common_train_v1.1 .yml) | CRNN | ResNet34_vd | None | BiLSTM | ctc |
| [rec_chinese_common_train_v 2.0.yml](../../configs/rec/ch_ppocr_v2.0/rec_chinese_common_train_v2.0 .yml) | CRNN | ResNet34_vd | None | BiLSTM | ctc |
| rec_chinese_lite_train.yml | CRNN | Mobilenet_v3 small 0.5 | None | BiLSTM | ctc |
| rec_chinese_lite_train.yml | CRNN | Mobilenet_v3 small 0.5 | None | BiLSTM | ctc |
| rec_chinese_common_train.yml | CRNN | ResNet34_vd | None | BiLSTM | ctc |
| rec_chinese_common_train.yml | CRNN | ResNet34_vd | None | BiLSTM | ctc |
| rec_icdar15_train.yml | CRNN | Mobilenet_v3 large 0.5 | None | BiLSTM | ctc |
| rec_icdar15_train.yml | CRNN | Mobilenet_v3 large 0.5 | None | BiLSTM | ctc |
@ -198,9 +198,9 @@ If the evaluation set is large, the test will be time-consuming. It is recommend
| rec_r34_vd_tps_bilstm_ctc.yml | STARNet | Resnet34_vd | tps | BiLSTM | ctc |
| rec_r34_vd_tps_bilstm_ctc.yml | STARNet | Resnet34_vd | tps | BiLSTM | ctc |
For training Chinese data, it is recommended to use
For training Chinese data, it is recommended to use
[rec_chinese_lite_train_v 1.1.yml](../../configs/rec/ch_ppocr_v1.1/rec_chinese_lite_train_v1.1 .yml). If you want to try the result of other algorithms on the Chinese data set, please refer to the following instructions to modify the configuration file:
[rec_chinese_lite_train_v 2.0.yml](../../configs/rec/ch_ppocr_v2.0/rec_chinese_lite_train_v2.0 .yml). If you want to try the result of other algorithms on the Chinese data set, please refer to the following instructions to modify the configuration file:
co
co
Take `rec_chinese_lite_train_v 1.1 .yml` as an example:
Take `rec_chinese_lite_train_v 2.0 .yml` as an example:
```
```
Global:
Global:
...
...
@ -210,7 +210,7 @@ Global:
character_type: ch
character_type: ch
...
...
# Whether to recognize spaces
# Whether to recognize spaces
use_space_char: Fals e
use_space_char: Tru e
Optimizer:
Optimizer:
@ -290,7 +290,7 @@ Global:
character_dict_path: ./ppocr/utils/dict/french_dict.txt
character_dict_path: ./ppocr/utils/dict/french_dict.txt
...
...
# Whether to recognize spaces
# Whether to recognize spaces
use_space_char: Fals e
use_space_char: Tru e
...
...
@ -337,7 +337,7 @@ The default prediction picture is stored in `infer_img`, and the weight is speci
```
```
# Predict English results
# Predict English results
python3 tools/infer_rec.py -c configs/rec/ch_ppocr_v1.1/rec_chinese_lite_train_v1.1 .yml -o Global.checkpoints={path/to/weights}/best_accuracy TestReader.infer_img=doc/imgs_words/en/word_1.jpg
python3 tools/infer_rec.py -c configs/rec/ch_ppocr_v2.0/rec_chinese_lite_train_v2.0 .yml -o Global.checkpoints={path/to/weights}/best_accuracy TestReader.infer_img=doc/imgs_words/en/word_1.jpg
```
```
Input image:
Input image:
@ -352,11 +352,11 @@ infer_img: doc/imgs_words/en/word_1.png
word : joint
word : joint
```
```
The configuration file used for prediction must be consistent with the training. For example, you completed the training of the Chinese model with `python3 tools/train.py -c configs/rec/ch_ppocr_v 1.1/rec_chinese_lite_train_v1.1 .yml`, you can use the following command to predict the Chinese model:
The configuration file used for prediction must be consistent with the training. For example, you completed the training of the Chinese model with `python3 tools/train.py -c configs/rec/ch_ppocr_v 2.0/rec_chinese_lite_train_v2.0 .yml`, you can use the following command to predict the Chinese model:
```
```
# Predict Chinese results
# Predict Chinese results
python3 tools/infer_rec.py -c configs/rec/ch_ppocr_v1.1/rec_chinese_lite_train_v1.1 .yml -o Global.checkpoints={path/to/weights}/best_accuracy TestReader.infer_img=doc/imgs_words/ch/word_1.jpg
python3 tools/infer_rec.py -c configs/rec/ch_ppocr_v2.0/rec_chinese_lite_train_v2.0 .yml -o Global.checkpoints={path/to/weights}/best_accuracy TestReader.infer_img=doc/imgs_words/ch/word_1.jpg
```
```
Input image:
Input image: