Image-to-Text
ONNX
PaddleOCR
English
Chinese
onnxruntime
pp_formulanet
OCR
PaddlePaddle
formula_recognition
Instructions to use ningpp/PP-FormulaNet-L-ONNX with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PaddleOCR
How to use ningpp/PP-FormulaNet-L-ONNX with PaddleOCR:
# 1. See https://www.paddlepaddle.org.cn/en/install to install paddlepaddle # 2. pip install paddleocr from paddleocr import FormulaRecognition model = FormulaRecognition(model_name="PP-FormulaNet-L-ONNX") output = model.predict(input="path/to/image.png", batch_size=1) for res in output: res.print() res.save_to_img(save_path="./output/") res.save_to_json(save_path="./output/res.json") - Notebooks
- Google Colab
- Kaggle
| { | |
| "model_type": "pp_formulanet", | |
| "text_config": { | |
| "activation_dropout": 0.0, | |
| "activation_function": "gelu", | |
| "attention_dropout": 0.0, | |
| "bos_token_id": 0, | |
| "d_model": 512, | |
| "decoder_attention_heads": 16, | |
| "decoder_ffn_dim": 2048, | |
| "decoder_layerdrop": 0.0, | |
| "decoder_layers": 8, | |
| "dropout": 0.1, | |
| "encoder_attention_heads": 16, | |
| "encoder_layers": 12, | |
| "eos_token_id": 2, | |
| "forced_eos_token_id": 2, | |
| "init_std": 0.02, | |
| "max_position_embeddings": 1024, | |
| "num_hidden_layers": 12, | |
| "pad_token_id": 1, | |
| "scale_embedding": true, | |
| "tie_word_embeddings": false, | |
| "vocab_size": 50000 | |
| }, | |
| "vision_config": { | |
| "image_size": 768, | |
| "output_channels":256, | |
| "num_channels":3, | |
| "patch_size":16, | |
| "hidden_act":"gelu", | |
| "layer_norm_eps":1e-6, | |
| "attention_dropout":0.0, | |
| "qkv_bias":true, | |
| "use_abs_pos":true, | |
| "use_rel_pos":true, | |
| "window_size":14, | |
| "hidden_size": 768, | |
| "num_hidden_layers": 12, | |
| "num_attention_heads": 12, | |
| "global_attn_indexes": [2, 5, 8, 11], | |
| "mlp_dim": 3072, | |
| "post_conv_in_channels": 256, | |
| "post_conv_mid_channels": 512, | |
| "post_conv_out_channels": 1024, | |
| "decoder_hidden_size": 512 | |
| } | |
| } |