Note : Compared with models 1.1, which are trained with static graph programming paradigm, models 2.0 are the dynamic graph trained version and achieve close performance.
The downloadable models provided by PaddleOCR include inference model
, trained model
, pre-trained model
and slim model
. The differences between the models are as follows:
model type | model format | description |
---|---|---|
inference model | inference.pdmodel、inference.pdiparams | Used for reasoning based on Python prediction engine,detail |
trained model, pre-trained model | *.pdparams、*.pdopt、*.states | The checkpoints model saved in the training process, which stores the parameters of the model, mostly used for model evaluation and continuous training. |
model name | description | config | model size | download |
---|---|---|---|---|
ch_ppocr_mobile_v2.0_det | Original lightweight model, supporting Chinese, English, multilingual text detection | ch_det_mv3_db_v2.0.yml | 3M | inference model / trained model |
ch_ppocr_server_v2.0_det | General model, which is larger than the lightweight model, but achieved better performance | ch_det_res18_db_v2.0.yml | 47M | inference model / trained model |
model name | description | config | model size | download |
---|---|---|---|---|
ch_ppocr_mobile_v2.0_rec | Original lightweight model, supporting Chinese, English and number recognition | rec_chinese_lite_train_v2.0.yml | 3.71M | inference model / trained model / pre-trained model |
ch_ppocr_server_v2.0_rec | General model, supporting Chinese, English and number recognition | rec_chinese_common_train_v2.0.yml | 94.8M | inference model / trained model / pre-trained model |
Note: The trained model
is finetuned on the pre-trained model
with real data and synthsized vertical text data, which achieved better performance in real scene. The pre-trained model
is directly trained on the full amount of real data and synthsized data, which is more suitable for finetune on your own dataset.
model name | description | config | model size | download |
---|---|---|---|---|
en_number_mobile_v2.0_rec | Original lightweight model, supporting English and number recognition | rec_en_number_lite_train.yml | 2.56M | inference model / trained model |
Note: The configuration file of the new multi language model is generated by code. You can use the --help
parameter to check which multi language are supported by current PaddleOCR.
# The code needs to run in the specified directory
cd {your/path/}PaddleOCR/configs/rec/multi_language/
python3 generate_multi_language_configs.py --help
Take the Italian configuration file as an example:
you can generate the default configuration file through the following command, and use the default language dictionary provided by paddleocr for prediction.
# The code needs to run in the specified directory
cd {your/path/}PaddleOCR/configs/rec/multi_language/
# Set the required language configuration file through -l or --language parameter
# This command will write the default parameter to the configuration file.
python3 generate_multi_language_configs.py -l it
If you want to train your own model, you can prepare the training set file, verification set file, dictionary file and training data path. Here we assume that the Italian training set, verification set, dictionary and training data path are:
- Training set:{your/path/}PaddleOCR/train_data/train_list.txt
- Validation set: {your/path/}PaddleOCR/train_data/val_list.txt
- Use the default dictionary provided by paddleocr:{your/path/}PaddleOCR/ppocr/utils/dict/it_dict.txt
- Training data path:{your/path/}PaddleOCR/train_data
# The code needs to run in the specified directory
cd {your/path/}PaddleOCR/configs/rec/multi_language/
# The -l or --language parameter is required
# --train modify train_list path
# --val modify eval_list path
# --data_dir modify data dir
# -o modify default parameters
# --dict Change the dictionary path. The example uses the default dictionary path, so that this parameter can be empty.
python3 generate_multi_language_configs.py -l it \
--train {path/to/train_list} \
--val {path/to/val_list} \
--data_dir {path/to/data_dir} \
-o Global.use_gpu=False
model name | description | config | model size | download |
---|---|---|---|---|
french_mobile_v2.0_rec | Lightweight model for French recognition | rec_french_lite_train.yml | 2.65M | inference model / trained model |
german_mobile_v2.0_rec | Lightweight model for German recognition | rec_german_lite_train.yml | 2.65M | inference model / trained model |
korean_mobile_v2.0_rec | Lightweight model for Korean recognition | rec_korean_lite_train.yml | 3.9M | inference model / trained model |
japan_mobile_v2.0_rec | Lightweight model for Japanese recognition | rec_japan_lite_train.yml | 4.23M | inference model / trained model |
it_mobile_v2.0_rec | Lightweight model for Italian recognition | rec_it_lite_train.yml | 2.53M | inference model / trained model |
xi_mobile_v2.0_rec | Lightweight model for Spanish recognition | rec_xi_lite_train.yml | 2.53M | inference model / trained model |
pu_mobile_v2.0_rec | Lightweight model for Portuguese recognition | rec_pu_lite_train.yml | 2.63M | inference model / trained model |
ru_mobile_v2.0_rec | Lightweight model for Russia recognition | rec_ru_lite_train.yml | 2.63M | inference model / trained model |
ar_mobile_v2.0_rec | Lightweight model for Arabic recognition | rec_ar_lite_train.yml | 2.53M | inference model / trained model |
hi_mobile_v2.0_rec | Lightweight model for Hindi recognition | rec_hi_lite_train.yml | 2.63M | inference model / trained model |
chinese_cht_mobile_v2.0_rec | Lightweight model for chinese traditional recognition | rec_chinese_cht_lite_train.yml | 5.63M | inference model / trained model |
ug_mobile_v2.0_rec | Lightweight model for Uyghur recognition | rec_ug_lite_train.yml | 2.63M | inference model / trained model |
fa_mobile_v2.0_rec | Lightweight model for Persian recognition | rec_fa_lite_train.yml | 2.63M | inference model / trained model |
ur_mobile_v2.0_rec | Lightweight model for Urdu recognition | rec_ur_lite_train.yml | 2.63M | inference model / trained model |
rs_mobile_v2.0_rec | Lightweight model for Serbian(latin) recognition | rec_rs_lite_train.yml | 2.53M | inference model / trained model |
oc_mobile_v2.0_rec | Lightweight model for Occitan recognition | rec_oc_lite_train.yml | 2.53M | inference model / trained model |
mr_mobile_v2.0_rec | Lightweight model for Marathi recognition | rec_mr_lite_train.yml | 2.63M | inference model / trained model |
ne_mobile_v2.0_rec | Lightweight model for Nepali recognition | rec_ne_lite_train.yml | 2.63M | inference model / trained model |
rsc_mobile_v2.0_rec | Lightweight model for Serbian(cyrillic) recognition | rec_rsc_lite_train.yml | 2.63M | inference model / trained model |
bg_mobile_v2.0_rec | Lightweight model for Bulgarian recognition | rec_bg_lite_train.yml | 2.63M | inference model / trained model |
uk_mobile_v2.0_rec | Lightweight model for Ukranian recognition | rec_uk_lite_train.yml | 2.63M | inference model / trained model |
be_mobile_v2.0_rec | Lightweight model for Belarusian recognition | rec_be_lite_train.yml | 2.63M | inference model / trained model |
te_mobile_v2.0_rec | Lightweight model for Telugu recognition | rec_te_lite_train.yml | 2.63M | inference model / trained model |
ka_mobile_v2.0_rec | Lightweight model for Kannada recognition | rec_ka_lite_train.yml | 2.63M | inference model / trained model |
ta_mobile_v2.0_rec | Lightweight model for Tamil recognition | rec_ta_lite_train.yml | 2.63M | inference model / trained model |
model name | description | config | model size | download |
---|---|---|---|---|
ch_ppocr_mobile_v2.0_cls | Original model | cls_mv3.yml | 1.38M | inference model / trained model |