Skip to content

Inference - Third-party Models

Third-party Models Support List

MindOCR can support inference for third-party models such as PaddleOCR, etc. This document presents a list of adapted models. Performance testing is based on Ascend310P, and some models currently do not have a test dataset.

Note: All results is test on 310P3 with MindSpore2.2.14.

Text Detection

Name Model Backbone Dataset F-score(%) FPS Origin link Configuration File Original Download Reference Link ONNX Data Shape (NCHW) Lite convert config txt
ch_pp_det_OCRv4 DBNet MobileNetV3 / / / PaddleOCR yaml infer model ch_PP-OCRv4_det onnx (-1,3,-1,-1) config txt
ch_pp_server_det_v2.0 DBNet ResNet18_vd MLT17 48.28 12.68 PaddleOCR yaml infer model ch_ppocr_server_v2.0_det onnx (1,3,736,1280) config txt
ch_pp_det_OCRv3 DBNet MobileNetV3 MLT17 35.02 23.91 PaddleOCR yaml infer model ch_PP-OCRv3_det onnx (-1,3,-1,-1) config txt
ch_pp_det_OCRv2 DBNet MobileNetV3 MLT17 44.80 13.00 PaddleOCR yaml infer model ch_PP-OCRv2_det onnx (1,3,736,1280) config txt
ch_pp_mobile_det_v2.0_slim DBNet MobileNetV3 MLT17 33.48 12.36 PaddleOCR yaml infer model ch_ppocr_mobile_slim_v2.0_det onnx (1,3,736,1280) config txt
ch_pp_mobile_det_v2.0 DBNet MobileNetV3 MLT17 33.36 12.77 PaddleOCR yaml infer model ch_ppocr_mobile_v2.0_det onnx (1,3,736,1280) config txt
en_pp_det_OCRv3 DBNet MobileNetV3 IC15 43.73 40.53 PaddleOCR yaml infer model en_PP-OCRv3_det onnx (-1,3,-1,-1) config txt
ml_pp_det_OCRv3 DBNet MobileNetV3 MLT17 68.79 20.12 PaddleOCR yaml infer model ml_PP-OCRv3_det onnx (-1,3,-1,-1) config txt
en_pp_det_dbnet_resnet50vd DBNet ResNet50_vd IC15 79.25 23.71 PaddleOCR yaml infer model DBNet onnx (1,3,736,1280) config txt
en_pp_det_psenet_resnet50vd PSE ResNet50_vd IC15 82.01 10.22 PaddleOCR yaml train model PSE onnx (1,3,736,1280) config txt
en_pp_det_east_resnet50vd EAST ResNet50_vd IC15 84.80 23.32 PaddleOCR yaml train model EAST onnx (1,3,736,1280) config txt
en_pp_det_sast_resnet50vd SAST ResNet50_vd IC15 86.28 17.45 PaddleOCR yaml train model SAST onnx (1,3,-1,-1) config txt

Notice: When using the en_pp_det_psenet_resnet50vd model for inference, you need to modify the onnx file with the following command

python deploy/models_utils/onnx_optim/insert_pse_postprocess.py \
      --model_path=./pse_r50vd.onnx \
      --binary_thresh=0.0 \
      --scale=1.0

Text Recognition

Name Model Backbone Dataset Acc(%) FPS Source Dict file Configuration File Original Download reference ONNX Data Shape (NCHW) Lite convert config txt
ch_pp_rec_OCRv4 CRNN MobileNetV1Enhance / / 310.71 PaddleOCR ppocr_keys_v1.txt yaml infer model ch_PP-OCRv4_rec onnx (1,3,32,100) config txt
ch_pp_server_rec_v2.0 CRNN ResNet34 / / 259.82 PaddleOCR ppocr_keys_v1.txt yaml infer model ch_ppocr_server_v2.0_rec onnx (1,3,32,100) config txt
ch_pp_rec_OCRv3 SVTR MobileNetV1Enhance / / 430.02 PaddleOCR ppocr_keys_v1.txt yaml infer model ch_PP-OCRv3_rec onnx (1,3,32,100) config txt
ch_pp_rec_OCRv2 CRNN MobileNetV1Enhance / / 321.91 PaddleOCR ppocr_keys_v1.txt yaml infer model ch_PP-OCRv2_rec onnx (1,3,32,100) config txt
ch_pp_mobile_rec_v2.0 CRNN MobileNetV3 / / 278.21 PaddleOCR ppocr_keys_v1.txt yaml infer model ch_ppocr_mobile_v2.0_rec onnx (1,3,32,100) config txt
en_pp_rec_OCRv3 SVTR MobileNetV1Enhance IC15 49.83 580.88 PaddleOCR en_dict.txt yaml infer model en_PP-OCRv3_rec onnx (1,3,32,100) config txt
en_pp_mobile_rec_number_v2.0_slim CRNN MobileNetV3 / / 229.21 PaddleOCR en_dict.txt yaml infer model en_number_mobile_slim_v2.0_rec onnx (1,3,32,320) config txt
en_pp_mobile_rec_number_v2.0 CRNN MobileNetV3 IC15 46.08 228.97 PaddleOCR en_dict.txt yaml infer model en_number_mobile_v2.0_rec onnx (1,3,32,320) config txt
korean_pp_rec_OCRv3 SVTR MobileNetV1Enhance / / 511.92 PaddleOCR korean_dict.txt yaml infer model korean_PP-OCRv3_rec onnx (1,3,32,100) config txt
japan_pp_rec_OCRv3 SVTR MobileNetV1Enhance / / 477.32 PaddleOCR japan_dict.txt yaml infer model japan_PP-OCRv3_rec onnx (1,3,32,100) config txt
chinese_cht_pp_rec_OCRv3 SVTR MobileNetV1Enhance / / 390.15 PaddleOCR chinese_cht_dict.txt yaml infer model chinese_cht_PP-OCRv3_rec onnx (1,3,32,100) config txt
te_pp_rec_OCRv3 SVTR MobileNetV1Enhance / / 582.82 PaddleOCR te_dict.txt yaml infer model te_PP-OCRv3_rec onnx (1,3,32,100) config txt
ka_pp_rec_OCRv3 SVTR MobileNetV1Enhance / / 589.41 PaddleOCR ka_dict.txt yaml infer model ka_PP-OCRv3_rec onnx (1,3,32,100) config txt
ta_pp_rec_OCRv3 SVTR MobileNetV1Enhance / / 587.30 PaddleOCR ta_dict.txt yaml infer model ta_PP-OCRv3_rec onnx (1,3,32,100) config txt
latin_pp_rec_OCRv3 SVTR MobileNetV1Enhance / / 584.57 PaddleOCR latin_dict.txt yaml infer model latin_PP-OCRv3_rec onnx (1,3,32,100) config txt
arabic_pp_rec_OCRv3 SVTR MobileNetV1Enhance / / 578.28 PaddleOCR arabic_dict.txt yaml infer model arabic_PP-OCRv3_rec onnx (1,3,32,100) config txt
cyrillic_pp_rec_OCRv3 SVTR MobileNetV1Enhance / / 573.57 PaddleOCR cyrillic_dict.txt yaml infer model cyrillic_PP-OCRv3_rec onnx (1,3,32,100) config txt
devanagari_pp_rec_OCRv3 SVTR MobileNetV1Enhance / / 589.43 PaddleOCR devanagari_dict.txt yaml infer model devanagari_PP-OCRv3_rec onnx (1,3,32,100) config txt
en_pp_rec_crnn_resnet34vd CRNN ResNet34_vd IC15 66.35 392.97 PaddleOCR ic15_dict.txt yaml infer model CRNN onnx (1,3,32,160) config txt
en_pp_rec_rosetta_resnet34vd Rosetta Resnet34_vd IC15 64.52 487.68 PaddleOCR ic15_dict.txt yaml infer model Rosetta onnx (1,3,32,160) config txt
en_pp_rec_vitstr_vitstr ViTSTR ViTSTR IC15 68.42 336.53 PaddleOCR EN_symbol_dict.txt yaml train model ViTSTR onnx (1,1,224,224) config txt

Text Angle Classification

Name Model Dataset Acc(%) FPS Source Configuration File Original Download Reference OONX Data Shape (NCHW) Lite convert config txt
ch_pp_mobile_cls_v2.0 MobileNetV3 / / / PaddleOCR yaml infer model ch_ppocr_mobile_v2.0_cls onnx (1,3,48,192) config txt